olimex a20 rev L1 : a) cannot boot from emmc "sf: unrecognized jedec id bytes 0"

Started by att2, September 23, 2024, 02:10:20 PM

Previous topic - Next topic

att2

Hello,
My board: T2-OlinuXino-LIME2-e16Gs16M-IND Revision L1
Lot Code: P19826 from 2024/W13

I am trying to use an older, but somewhat working image, which works on a Rev L board:

root@A20-OLinuXino:~# uname -a
Linux A20-OLinuXino 3.4.103-00033-g9a1cd034181a-dirty #49 SMP PREEMPT Fri May 18 16:07:20 EEST 2018 armv7l GNU/Linux

root@A20-OLinuXino:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.3 (jessie)
Release:        8.3
Codename:       jessie


The older image comes with a script in the root dir called emmc.sh.
I am simply starting the script and it says it copies everything to EMMC and it ought to work.
However, when I boot the system, it does not boot from EMMC. Without SD-card, nothing comes up on the debug serial, not even a u-boot bootloader message.
"Okay", I thought, "I have to install the bootloader to Flash SPI mem".
I am aware that the docs to install the bootloader are, or were, as follows:

Put the SD card in A20 Olinuxino board using a serial-USB cable connected to debug pins.
After power up interrupt the u-boot pressing any key (when the interrupt countdown appears) and execute the next commands in order to copy the bootloader to on board SPI flash memory.

=> sf probe
=> sf erase 0 0x200000
=> mmc dev 0
=> mmc read 0x50000000 0x10 0xFF0
=> sf write 0x50000000 0 0x200000

and boot the board

with:

=>  boot

However, it fails at the first "sf probe" command with the error

=> sf probe
SF: unrecognized JEDEC id bytes: 00, 00, 00
Failed to initialize SPI flash at 0:0 (error -2)

Now I dont know how to proceed and how to get the bootloader to the NAND or SPI flash. Any help is greatly appreciated.

b) Meanwhile I noticed that the previously working eth0 ethernet is not working.

Entering "dhclient eth0" takes a very long time, runs into a 60sec timeout, and then does not give the ethernet card a proper ip adress. Nothing happens:

root@A20-OLinuXino:~# dhclient eth0
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

root@A20-OLinuXino:~# ifconfig
eth0      Link encap:Ethernet  HWaddr b6:54:de:a3:be:7b
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:342 (342.0 B)
          Interrupt:117 Base address:0x4000


Any help with these two problems is greatly appreciated.



att2

Now I decided to download the "testing" image from
https://images.olimex.com/testing/a20-som-gabriel/

I tried the image
A20-OLinuXino-buster-minimal-20211103-105047.img.7z   (161.940.948 bytes)

The result was, that u-boot did not even boot the system, because he found out that the eth0 physical interface doesnt seem to work:

https://pastebin.com/yL00zkU9

Again, I am at a loss of what to try next in order to get eth0 working, emmc booting working, and a olimex display working (lcd olinuxino 10"-ts).

Any help is greatly appreciated.

LubOlimex

The board is still listed wrong at start of boot. The image you downloaded is not suitable for the board you have.

Test with the latest base A20 image. Do the following:

1. Download the "A20-OLinuXino-bullseye-base-20231106-081613.img.7z" archive with the A20 image from here:

https://images.olimex.com/release/a20/

2. Extract and prepare the card with BalenaEtcher.

3. Plug card in board, attach debug medium, power the board.

Wait to see if the boot succeeds. If the boot still fails, maybe EEPROM got overwritten and proper config for the board can't be loaded, then do the following to manually fix the EEPROM contents:

1. Power down the board, wait few seconds and re-apply power.
2. Keep pressing a key over the debug medium to interrupt boot and stay in u-boot console. If you miss it, reboot again until you stop the boot process.
3. Once inside type "olinuxino" without the quotes to see available commands.
4. Execute this exact line:

olinuxino config write 11444 L1 0002FDE2 30:1F:9A:D1:96:C4
then type:

saveenv
then:

reset
This should restore EEPROM to factory default.
Technical support and documentation manager at Olimex

att2

IF the EEPROM is restored to factory default, how does this help me to get the bootloader to the SPI NAND FLASH memory ?

LubOlimex

I don't understand the problem. T2-OlinuXino-LIME2-e16Gs16M-IND has no NAND flash. It has eMMC. Also SPI flash and EEPROM are different memories.

I don't understand the goal either. I thought the goal was to test if the board boots with the latest Olimage.
Technical support and documentation manager at Olimex

att2

No, you misunderstand me. The goal is to get the Linux from SD-card to EMMC.

The "emmc.sh" script from an older image for an older revision of Olimex A20 Lime2 (Revision K) copies everything to EMMC, but then it cannot boot from EMMC. Seemingly the boot loader is missing from the EMMC or SPI-Flash or NAND or whatever kludge is being used to boot from something else than the SD-Card.

Tell me how to make booting from EMMC work, without any SD-card.


LubOlimex

1. You can't boot from eMMC with old sunxi image. There is no support for eMMC in old sunxi images.

2. You can't boot from NAND with new mainline image (Olimage). There is no driver for NAND in newer images (there is only such driver in sunxi images).

3. The easiest way to boot from eMMC of the board you have (T2-OlinuXino-LIME2-e16Gs16M-IND) is:

- Download archive with latest Olimage
- Extract archive and prepare a card with balenaEtcher
- Plug the card and power the board
- Login with user root and password olimex
- Type: "olinuxino-sd-to-emmc" press enter and wait
- Perform software poweroff, remove the power supply, remove the card and test if it boots.

It is explained with more details in this document:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex