A20-SOM REV D wrong board version

Started by Ravor, May 01, 2023, 10:14:44 PM

Previous topic - Next topic

Ravor

Hello. When loaded, it is installed as A20-OLinuXino-LIME Rev.A.
Bullseye loads normally, but intermittently throws this error:

[   24.516877] sun7i-dwmac 1c50000.ethernet: Failed to reset the dma
[   24.523107] sun7i-dwmac 1c50000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   24.532083] sun7i-dwmac 1c50000.ethernet eth0: stmmac_open: Hw setup failed



Trying to change the configuration according to the guide gives a memory error:

Erasing EEPROM configuration...
ERROR: Failed to init eeprom!
Erasing MMC configuration...
Writting EEPROM configuration...
ERROR: Failed to init eeprom!
Writting MMC configuration...



Tell me how to fix the situation?


LubOlimex

I don't think your board has EEPROM at all.
Technical support and documentation manager at Olimex

Ravor

#2
I got it. Please tell me where is the configuration file on mmc from which the version is loaded?

Can I get a dump of the eeprom configuration memory?


LubOlimex

I tested it here, it seems to configure properly. What exactly do you type when you interrupt u-boot? What are the exact commands you run?
Technical support and documentation manager at Olimex

Ravor

#4
I enter commands:
olinuxino
olinuxino config info
ID:    A20-OLinuXino-LIME Rev.A
SN:    00000000
MAC:   FF:FF:FF:FF:FF:FF
olinuxino config write 8849 d 12345678 AA:BB:CC:DD:EE:FF


I am getting error messages.

Erasing EEPROM configuration...
ERROR: Failed to init eeprom!
Erasing MMC configuration...
Writting EEPROM configuration...
ERROR: Failed to init eeprom!
Writting MMC configuration...
olinuxino config info
ID:     Rev.D
SN:    12345678
MAC:   AA:BB:CC:DD:EE:FF

I enter a command:
saveenv
I get an answer:

Saving Environment to EXT4... File System is consistent
file found, deleting
update journal finished
File System is consistent
update journal finished
done


restart olimex : reset
But I still get the error:

WARNING: The board cannot be detected!
Please run:
        'olinuxino config list' - Select your board
        'olinuxino config write' - Store the board configuration
        'reset' - Reset the board and load the configuration

Using 'A20-OLinuXino-LIME' as fallback configuration.

I found the external eeprom, checked its contents, erased it and connected it to Olimex.

I repeat commands.

I get an answer:


=> olinuxino config write 8849 d 12345678 AA:BB:CC:DD:EE:FF
Erasing EEPROM configuration...
Writting EEPROM configuration...
Writting MMC configuration...
=> saveenv
Saving Environment to EXT4... File System is consistent
file found, deleting
update journal finished
File System is consistent
update journal finished
done
OK

But I still get the error:

WARNING: The board cannot be detected!
Please run:
        'olinuxino config list' - Select your board
        'olinuxino config write' - Store the board configuration
        'reset' - Reset the board and load the configuration

Using 'A20-OLinuXino-LIME' as fallback configuration.

I connect eeprom to esp32, and I see the following data.


Could you provide a memory dump of any Olimex A20?




KGS

Hello,

Sorry for refreshing this topic, but I'm in the same situation. The only difference is I got a Rev. B board with 4GB nand. Using the image A20-OLinuXino-bullseye-base-20230515-130040.img

Trying the same steps, selecting the correct board etc and keep getting the same error.

Did you ever get your issue sorted? Is there maybe another image that would be better suited?

LubOlimex

#6
I think the board has no EEPROM and the script doesn't properly save the config to SD card.

Since you board has NAND it might better idea to use the sunxi images instead (NAND has no support in mainline images, it lacks good open source drivers):

https://ftp.olimex.com/Allwinner_Images/A20-SOM/Debian/sd/

Use release 10 which is suitable for NAND memory.
Technical support and documentation manager at Olimex

KGS

Thanks LubOlimex, I have downloaded the image and it's running fine now.
However due to the age of the image it seems I cannot update most of the packages.
I wonder can I upgrade the OS to a more recent release?

Alternatively since mainline has no support for NAND, is there any other option? Say a release or board config where we ignore the NAND? Living from SD or an attached disk would work for me.

LubOlimex

#8
I don't think sunxi images can be upgraded to more recent kernel.

If you use the latest images simply the NAND won't work but the rest of the hardware should work.

Edit: I found some older revision A20-SOM boards without EEPROM and I seem to get the same issue. They are wrongfully recognized as another board and can't be set manually.
Technical support and documentation manager at Olimex

LubOlimex

Can you try using this image, see if it boots successfully (NAND won't be visible since it is mainline image):


https://ftp.olimex.com/Lub-clients/A20-SOM-4N-revision-B.img
Technical support and documentation manager at Olimex

KGS

Downloading it now but will take a while. Getting at best 200kb/s download speed.
I will report back once installed

KGS

Quote from: LubOlimex on October 30, 2023, 03:46:23 PMCan you try using this image, see if it boots successfully (NAND won't be visible since it is mainline image):


https://ftp.olimex.com/Lub-clients/A20-SOM-4N-revision-B.img

Just finished copying the image to the SD card and seems it boots successfully, no issues with eth out of the box.
I do see this error failing to load configuration from EEPROM which I guess is expected:
U-Boot SPL 2021.04+olimex-1-20230515.123927 (May 15 2023 - 12:40:34 +0000)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Loading configuration from EEPROM: Error
Loading configuration from MMC: OK
Verifying data: OK


Question is what issues could I face down the road?
I will do some tests and provide feedback, but for now thank you LubOlimex!

LubOlimex

There should be no issues but my advice is to keep that image I sent you as backup somewhere in case something goes wrong.

What I did was setting the config manually for your board using another board with eMMC. Then I saved the image. Do not use the u-boot commands, they won't work. The olinuxino config is supposed to work in situation like this when there is no EEPROM it should save config on the SD card, but it doesn't work as it seems (somehow if there is no EEPROM it doesn't save the data nowhere, but if there is EEPROM it saves it both on EEPROM and SD card), we are looking into it.

The error shows that the board has no EEPROM, so that is fine, the config gets loaded from the SD card.

You should also probably update it safely with apt update and apt upgrade.
Technical support and documentation manager at Olimex

KGS

Thank you again LubOlimex!

Noted and image saved for now. Hopefully this can be addressed in the future.
Been playing around with it for the last couple of days and it seems pretty stable and responsive.

LubOlimex

We already found a fix for "config write xxx" when the board has no EEPROM and it should be available after "apt update" and "apt upgrade" and "u-boot-install" (notice this might be hard to do if you just got one board and it is not booting successfully). It will also be included in next release, keep an eye at the FTP for the last modified date.
Technical support and documentation manager at Olimex