A20 Lime2 Rev.K : EMMC Booting fails!!

Started by att2, February 14, 2019, 03:23:44 PM

Previous topic - Next topic

att2

Hello,
We have the following system:
Olimex A20 Lime2 Revision K ; Olimex Display Revision C

We can boot from SD-Card perfectly, however, booting from emmc fails. Only red LED burns, no green led comes up, nothing happens.

Used Software:

root@A20-OLinuXino:~# uname -a
QuoteLinux 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
QuoteNo LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.3 (jessie)
Release:        8.3
Codename:       jessie

Any help greatly appreciated, since I have started the script at /root/emmc.sh many, many, times, I have rebooted many, many times, and it still does not want to boot from emmc. We also have no power problem issues; and everything works fine but only by booting from SD-card....



LubOlimex

This is expected if you purchased the board recently. Do you have 16MB SPI? The new 5.1 eMMC memories have hard time booting Linux. That is why it is recommended to boot from the SPI and store the system on the eMMC. I explained it here: https://www.olimex.com/forum/index.php?topic=7084.msg27009#msg27009 - use the same Armbian image and test if SPI install works.

Technical support and documentation manager at Olimex

att2

I will test this new Armbian image tomorrow, but in the meantime, can you tell me:

* Which Olimex A20 Lime2 board revisions require this image? Rev. K? Earlier than Rev.K.?
* Is this latest image (Armbian_5.72.1_Olinuxino-a20_Ubuntu_bionic_next_4.19.17_desktop.7z) backwards compatible with earlier Olimex A20 board revisions and especially their EMMC booting?
* If I want to boot from EMMC, which Linux image do I use for which board revision?

Thanks,
ATT2

LubOlimex

Quote* Which Olimex A20 Lime2 board revisions require this image? Rev. K? Earlier than Rev.K.?

The two 5.0 and 5.1 eMMC memories are pin-to-pin compatible - to swap between them no PCB changes were required, hence the print of the PCB is the same.

You need to identify the print on the eMMC memory itself:

Old eMMC: KLMAG2GEND-B031
New eMMC: KLMAG1JETD-B041

Quote* Is this latest image (Armbian_5.72.1_Olinuxino-a20_Ubuntu_bionic_next_4.19.17_desktop.7z) backwards compatible with earlier Olimex A20 board revisions and especially their EMMC booting?

Yes. It works with older revisions of the boards.

Quote* If I want to boot from EMMC, which Linux image do I use for which board revision?

Use the latest Armbian image Armbian_5.72.1_Olinuxino-a20_Ubuntu_bionic_next_4.19.17_desktop.7z - but store the boot on the SPI memory and the rest of the system on the eMMC; straight boot from eMMC might not always work reliably. Run the nand-sata-install script to see the options (or armbian-config).
Technical support and documentation manager at Olimex

att2

Hello,
Unfortunately I have bad news: I downloaded, depacked, and copied the latest Armbian_5.72.1_Olinuxino-a20_Ubuntu_bionic_next_4.19.17_desktop.img to SD-Card. Under Linux on PC, I can read this SD-card fine, it has a file system, a correct partition table, and 1.5 GB are used. (I noticed that the partition tables' "active-flag" is not set, so I set it...). When I try to boot from this SD-card, the red PWR_LED is on, the green "LED1" keeps burning, it will never blink, and the Linux system will never start. Also the connected display (LCD-Olinuxino-10"-TS, Rev.C), never even blinks white or anything, it just does not come up.
I am now at a loss and don't know what to do in order to get a Linux up and running on that Olimex A20-Rev.K. 
Any clue, help, hints, etc. greatly appreciated.


LubOlimex

#5
Did you try interrupting u-boot with space (you have 1 second to do it, else restart) and then manually configuring the image for the board and the display? Once you interrupt u-boot, type "olinuxino" to see help. Check the list with "olinuxino config list" and complete board selection is done with "olinuxino config write [id, number for your exact board from the list] [revsion, in your case just "k"]" remember to save the selection with "saveenv" and then type "reset" to restart. Refer to the article here: https://www.olimex.com/wiki/ArmbianHowTo

What does the console say during boot? Where does it hang?

The 10 inch LCD would NOT turn on with any Linux image by default. You need to configure the video output first, and to be able to configure it you would need USB-serial converter working at 3.3V attached to the UART debug pins, or you would need HDMI display with native HDMI (without converters).

Edit: I've deleted the separate post since it is duplicate.
Technical support and documentation manager at Olimex

att2

I'm so sorry, I finally figured some of my mistakes.   :'(

First, I was too used to the blinking green LED, so when it now doesn't blink, I was mistakenly assuming a boot failure. It wasn't.
Second, I forgot to connect a HDMI cable, since I was so conditioned of using the 10"-external display that it did not dawn on me that the real output happens on the HDMI. D'oh.   :(

Yes, I managed to get into the boot loader menu, did do a "saveenv" there, consequently after the next reboot the whole armbian was booted, root pass was 1234, changed now, etc.etc.

I'm installing the rest of the software to SD-card at the mo, and when all that works, I'll be writing everything to EMMC by using the armbian-menu. ....

att2

...well, at the moment I am trying to install from SD-card to EMMC.
Guess what?
It takes ages and seems to get stuck.   :(

I boot the latest armbian from SD-card; I am starting the armbian-config tool;
I select "install to emmc, boot from SPI" option; it asks me what filesystem to use for the emmc partition. Then I say "ext4", and after selecting "ext4" it takes ages.   :(

Viewing the list of running programs with ps aux:


olimex    2051  0.0  0.3   5488  3380 pts/0    Ss+  16:29   0:00 bash
root      2060  0.0  0.4  10052  4800 ?        Ss   16:29   0:00 sshd: root@pts/1
root      2062  0.0  0.5  10096  5640 ?        Ss   16:29   0:00 /lib/systemd/systemd --user
root      2063  0.0  0.2  29968  2120 ?        S    16:29   0:00 (sd-pam)
root      2077  0.0  0.3   5540  3440 pts/1    Ss   16:29   0:00 -bash
root      2102  0.0  0.2   5116  2216 pts/1    S+   16:30   0:00 screen
root      2103  0.0  0.2   5644  2360 ?        Rs   16:30   0:00 SCREEN
root      2104  0.0  0.2   4952  2856 pts/2    Ss   16:30   0:00 /bin/bash
root      2115  0.0  0.3   5444  3668 pts/2    S+   16:30   0:00 /bin/bash /usr/sbin/armbian-config
root      2218  0.0  0.2   4756  2884 pts/2    S+   16:30   0:00 /bin/bash /usr/sbin/nand-sata-install
root      2282  0.0  0.0   3416   396 pts/2    D+   16:31   0:00 dd bs=1 seek=446 count=64 if=/dev/zero of=/dev/mmcblk1
root      2288  0.0  0.0      0     0 ?        I    16:39   0:00 [kworker/0:2-eve]
root      2289  0.0  0.0      0     0 ?        I<   16:40   0:00 [kworker/0:0H]
root      2290  0.0  0.2  14084  2660 ?        Ss   16:41   0:00 /lib/systemd/systemd-udevd
root      2293  0.0  0.0      0     0 ?        I    16:43   0:00 [kworker/1:0-cgr]
root      2294  0.0  0.0      0     0 ?        I    16:44   0:00 [kworker/0:1-eve]
root      2305  0.0  0.2   4952  2692 pts/3    Ss   16:45   0:00 /bin/bash
root      2316  8.0  0.2   6716  2540 pts/3    R+   16:47   0:00 ps aux


Now, seemingly nothing happens; OR, the "dd " command takes ages. I have no idea what's happening here.

Any advice of how to proceed is greatly appreciated.


att2

Quoting the /var/log/kern.log:

Feb 15 16:31:05 localhost kernel: [  169.134594] sunxi-mmc 1c11000.mmc: data error, sending stop command
Feb 15 16:31:06 localhost kernel: [  170.131409] sunxi-mmc 1c11000.mmc: send stop command failed

???

LubOlimex

This scripts needs to complete successfully if it doesn't try to manually format the eMMC before executing the nand-sata-install script again. Use this as a reference: https://www.jeffgeerling.com/blog/2016/format-built-emmc-storage-on-orange-pi-plus
Technical support and documentation manager at Olimex

att2

Latest news: We have a whole batch of Olimex A20 Rev.K and Rev.K1 boards here.
Some of them work with EMMC, some of them lock up as soon as you try to write to EMMC using Kernel 4.x/latest Linux software (nand-sata-install script)... (syslog says "emmc: send stop command failed", followed by software-lockup).

When writing the linux system to EMMC using Kernel 3.x (old software and /root/emmc.sh script), all Olimex boards say "that worked fine" but subsequently will never boot from EMMC.

jonas.dorel

#11
I have the same problem with the old eMMC: KLMAG2GEND-B031.

EDIT: I assumed I only needed to use armbian-config to install to eMMC. It works now after pressing space while being connected to serial, and using the `olinuxino` command.

I still have one problem though: when rebooting, it just powers off.