[Dev] Looking for help to officially support the lime2 (and the lime2-emmc)

Sagar Acharya sagaracharya at tutanota.com
Mon Nov 1 05:48:09 GMT 2021

Thank you Denis.

The issue is something like this. I can't get to work the standard parabola installation on lime2.

There are 2 things to be done:
- u-boot needs to be made for 3 different boards. (Initial fix)
- Fix code in linux dtb to support all 3 boards.

Initially, I'm trying to get standard parabola install with u-boot configs in link below
https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2 . I have a recent lime2 which works with such a method and I hope the other 2 lime2s would. I'll update parabola wiki as soon as I get them working.

The latter is preferred. The issue I find in latter is configuration files are 9000 lines long. I have criticized linux for this gigantic unmanageable code. I did build kernel about 5 times but I'm not sure whether I get it right?!

Under arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts block named &gmac, one of the solutions proposed is
changing phy-mode from rgmii to rgmii-id . I have built kernel with both configs and tried different u-boot installs. So far, I haven't got them to work.

I tried installing standard olimex images available on olimex site and booting on all 3 boards and I faced some issues. Hardware wasn't consistent in bootups. Sometimes, it would boot and sometimes it wouldn't. I was concerned with that. If the hardware is damaged which I would like to know how to detect, I don't wanna dwell on unsolvable problem.

Thanking you
Sagar Acharya

P.S. Any help is appreciated, especially from members who've works on linux dtb and u-boot. I definitely need help understanding the billion keywords in dts and u-boot and how they affect the logic.

Nov 1, 2021, 8:42 AM by GNUtoo at cyberdimension.org:

> Hi,
> Parabola has currently some incomplete support for the Lime2.
> When we go on Olimex website on the page of the lime2 on their shop, we
> can see several versions[1]:
> - A20-OLinuXino-LIME2
> - A20-OLinuXino-LIME2-e16Gs16M
> - A20-OLinuXIno-LIME2-n8G
> - A20-OLinuXino-LIME2-s16M
> - T2-OLinuXino-LIME2-e8Gs16M-IND
> - T2-OLinuXino-LIME2-IND
> - T2-OLinuXino-LIME2-s16M-IND
> And we can see in the description the differences between these
> versions. For instance:
>> 4GB or 16GB eMMC flash memory option (in A20-OLinuXino-LIME2-e4GB or
>> A20-OLinuXino-LIME2-e16GB)
> And from all that information, the Parabola contributors can deduce
> which versions are supported or not and reference that on the Parabola
> wiki on the device page[2] and the installation instructions[3]. 
> Users then hopefully find out what version they have (for instance by
> asking around or asking Olimex, or the people they got their lime2
> from) and it could work if that was the only thing to take into account
> (more details later).
> The version of the Lime2 is important here because if you have the
> standard lime 2 (A20-OLinuXino-LIME2) you need to install the
> uboot4extlinux-a20-olinuxino-lime2 bootloader as part of the Parabola
> installation instructions.
> And if you instead have the versions with an eMMC
> (A20-OLinuXino-LIME2-e4GB and A20-OLinuXino-LIME2-e16GB), you need to
> install the uboot4extlinux-a20-olinuxino-lime2-emmc package instead.
> The issue is that there are also less well known changes. On both the
> standard lime2 and on the eMMC version, the Ethernet chip changed twice
> (probably because the older ones weren't available anymore and because
> the lime2 continues to be manufactured).
> So I asked Olimex for 3 boards, one with each Ethernet chip, in order
> to try to support all 3 Ethernet chips in upstream u-boot and/or Linux
> with the same configuration.
> Currently, there are (not upstream) u-boot configurations that are
> tailored to specific Ethernet chips, but if we don't support all 3
> Ethernet with the same configuration, users will need to know which
> Ethernet chip they have, and most users won't know how to do that.
> And with non-working Ethernet it's also harder to install the right
> u-boot package when you picked the wrong one.
> And if the support isn't upstream, we'd end up having to patch all the
> FSDG compliant distributions out there, and possibly even the
> upstream non-FSDG compliant distributions. So it looks way less work to
> fix it upstream once for good and for everybody, and don't multiply the
> build configurations and u-boot packages.
> We have a bug report about that issue in Parabola[4]. 
> The advantage of fixing that bug (instead of stopping the support
> for the lime2 or not fixing it at all) is also that everything works
> with free software on the Lime2, and that device keeps being produced
> and sold for a lot of years and will most probably continue being
> produced and sold. 
> The only nonfree software required are the builtin firmwares that are
> found in mass storage devices like hard disks, SSDs, microSD, etc.
> Even things like the GPU and video decoding acceleration works with
> free software here.
> So to help us fix that, Olimex shipped the 3 Lime2 boards to
> Sagar Acharya as not only I was already heavily involved in way too
> many other projects, but it also gave the opportunity to Sagar to be
> involved in fixing that bug upstream.
> However new bugs appeared[5], and in some cases compiling and
> booting Linux even resulted in crashes (we were unlucky), so learning
> ARM specifics in these conditions is not ideal.
> I tried to help but I don't have time anymore for that as I'm extremely
> late with Replicant (I am supposed to have released Replicant 11 and
> 6.0 0004 years ago, and there is still a lot to do for Replicant 11).
> So a solution that could work would be (for the people interested) to
> make bootloader and/or kernel packages to be easily installed in order
> to test if the Ethernet works and start from there.
> Since linux-libre releases recent kernels, including RC, we could add
> patches on top if we need to. For u-boot we can also make a git package
> if needed with patches on top.
> One of the thing to take into account is also that we don't know if the
> Ethernet hardware works on the lime2 with the first Ethernet chip that
> we got. 
> Olimex had to solder the only first Ethernet chip they got left on a
> Lime2 specially for us as they didn't have lime2s anymore with this
> version.
> So we also need to find images that are known to work with this
> Ethernet chip and it out to see if it's a hardware problem or a
> software issue.
> In the worst case we could fix it only for the two other Ethernet
> chips, hoping that people don't have these boards anymore or that
> they'd show up to help us with testing.
> References:
> -----------
> [1]https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/open-source-hardware
> [2]https://wiki.parabola.nu/Computers/A20-OLinuXino-LIME2
> [3]https://wiki.parabola.nu/ARM_Installation_Guide#Which_bootloader_package_to_use_for_which_device.3F
> [4]https://labs.parabola.nu/issues/2945
> [5]https://labs.parabola.nu/issues/3058
> Denis.

More information about the Dev mailing list