A20 lime2 fails to boot.

Started by votroto, April 18, 2023, 11:16:02 PM

Previous topic - Next topic

votroto

Hello, I have a few A20 lime2. One of the boards refuses to start using the newest bullseye-minimal image from your website.

I can list the files on the SD card from u-boot fine, but linux fails to start.

There is a u-boot warning saying:
Loading Environment from EXT4... *** Warning - bad CRC, using default environment

Not sure if that is related.

The console output shows:
Loading essential drivers ... done
Running /scripts/init-premount
Mounting root file system ... Running /scripts/local-top ...done
Running /scripts/local-premount ... done
Waiting for root file system ... Running /scripts/local-block ... done
Running /scripts/local-block ... done
Running /scripts/local-block ... done
Running /scripts/local-block ... done

and then it just repeats local-block until: Gave up waiting for root file system device, after which it claims a PARTUUID does not exist.

The SD card is not broken, I tried it on my other devices.

The board ID is A20-OLinuXino-LIME2 Rev.L1.

I do not have the UART debugging cable.

Any idea what the issue might be and how to fix it?

LubOlimex

1. What is the board that you have exactly? What does it say on the box, does it match what ID is printed at start of boot?

2. How do you access the board? What medium do you use (it is not debug cable, but what is it)?

Probably wrong config for the board gets loaded. Similar error appeared in this thread here:

https://www.olimex.com/forum/index.php?topic=8068.0

First try downloading and preparing a card with the base image (instead of the minimal). Get the archive from here: http://images.olimex.com/release/a20/

Make sure to use balena etcher for the card preparation, sometimes dd can leave few sectors at the start of the card intact.

Test with the new card, if the issue persists maybe the EEPROM of the board lost the information about the board. You might need to manually setup the board in u-boot as explained in the forum thread I linked above.
Technical support and documentation manager at Olimex

votroto

#2
  • I don't have a box, but it is the basic model of A20 Lime2 with no options, and the board has "rev L" silk-screened on it. The SN is 0002970E and MAC 30:1f:9a:d1:57:c8.
  • When the board did not boot, I used an HDMI cable to connect a monitor, then rewrote the "console" env parameter to "tty0" in "/boot/boot.cmd" (then mkimage as instructed at the bottom) to get the output visible on screen.

Burning the base image with etcher did nothing, of course.

Ok, in the boot folder I see a ".its" file from which i can glean the ID 7701 for the basic lime2. Is that right, where are IDs listed? Running "olinuxino config write 7701 l" then "saveenv" and rebooting also did not help.

LubOlimex

You can see list of all boards and corresponding IDs with:

olinuxino config list

But this command has to be executed in u-boot, e.g. you need to interrupt the boot process early before some debug methods are available (like HMDI and SSH).
Technical support and documentation manager at Olimex

votroto

Quote from: LubOlimex on April 19, 2023, 04:28:53 PMBut this command has to be executed in u-boot, e.g. you need to interrupt the boot process early before some debug methods are available (like HMDI and SSH).

If by "in u-boot" you mean the shell i get into by interrupting the boot process, then it seems like hdmi is available immediately on this board.

Still the same problem.


votroto

It seems the board is somehow convinced it is the A20 micro.

I've tried my alpine linux installation now too. This board still refuses to load.

Despite it initially saying it's the lime2 (Rev.L) in uboot, it then tries to load the micro's dtb. Modifying extlinux.conf and setting FDT to be the correct one gets me further, but then mounting the boot media fails.

What could be the cause? How could it correctly read the uboot, but then fail to proceed? Is this some unsupported revision, or a faulty chip?

LubOlimex

Yes, u-boot is where you interrupt the boot. It is good that you can enter there through the HDMI, this gives us some options.

You said you got a few LIME2 boards, can you confirm the same card works with the rest of them? Probably the EEPROM got weird. If one of the other boards can boot the card, perform olinuxino-reset script and when the board shuts down remove the power supply (before it can run again) then try this "reset card" in the problematic LIME2 board. Then after boot use software reset and wait to see if the issue persists. If it does do again reset and manually configure it. Use just to stop the u-boot and type

olinuxino config 7701 L

then type

saveenv

then

reset

I am not familiar with Alpine Linux so please leave that aside for the moment. Same for manually editing files inside the image. What we used was only the command from the u-boot. If you edited files, better re-write the image and start anew.
Technical support and documentation manager at Olimex

votroto

Quote from: LubOlimex on April 20, 2023, 02:46:06 PMYou said you got a few LIME2 boards, can you confirm the same card works with the rest of them? Probably the EEPROM got weird.

Yeah, but I took just the faulty one with me to debug. OK, I'll try to get one of the other ones tomorrow.

The card works, I wrote the image on multiple cards in a big batch, tried multiple of cards, and then even tried different brands and sizes.

Can I try editing the eeprom manually from uboot first? The structure described on your github repo seems simple, I'm just not sure about the checksum at the end.

votroto

Quote from: LubOlimex on April 20, 2023, 02:46:06 PMYou said you got a few LIME2 boards, can you confirm the same card works with the rest of them? Probably the EEPROM got weird. If one of the other boards can boot the card, perform olinuxino-reset script and when the board shuts down remove the power supply (before it can run again) then try this "reset card" in the problematic LIME2 board. Then after boot use software reset and wait to see if the issue persists. If it does do again reset and manually configure it. Use just to stop the u-boot and type

olinuxino config 7701 L

then type

saveenv

then

reset

I've tried the reset card thing and it did not work. Using olinuxino config in uboot also did not work.

LubOlimex

Did you stumble upon this python tool that allows to print some info from the EEPROM, there are also documents describing the EEPROM, the structure is the same since 2019:

https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A20/A20-eeprom-contents

Also if the issue remains drop me an e-mail at support@olimex.com (remember to point to this forum thread in your e-mail).
Technical support and documentation manager at Olimex