A20 LIME2 Won't boot

Started by heggerty, April 16, 2018, 02:11:18 AM

Previous topic - Next topic

heggerty

Hi All
Desperately hoping for some help

I received my LIME2 emmc board about a month ago, I have been away working for a couple of weeks since then but on the odd occasion I got to play with it, it seemed fine

Until today

I have successfully booted it using the official image from here, also using Armbian and yesterday using a Debian install

None of the other images apart from the official one seemed to let me copy everything to emmc - either not seeing it or just failing.

Now I have gone back to the official image and ..  the board will not boot...  I think I might have corrupted the emmc with my tinkering.  I have not tried to alter the hardware at all, I have tried numerous SD cards

Is there a way to clear the emmc chip?

Thanks

heggerty



LubOlimex

> Now I have gone back to the official image and ..  the board will not boot...  I think I might have corrupted the emmc with my tinkering.  I have not tried to alter the hardware at all, I have tried numerous SD cards

The board will not boot from a card with the official image? Or it will not boot from the eMMC after you have executed the install script?

Is this the image that you are using: https://www.olimex.com/wiki/images/2/21/A20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_eMMC_rel_15.torrent ?
Technical support and documentation manager at Olimex

heggerty

Hi



It wont boot from an SD card with the official image you linked to above on. I'm pretty sure I've managed somehow to get a bootable system on both the eMMC and on the sd card

Sorry for the length of this next bit - I wouldnt normally post such a long message, but apart from the most basic bits the doesn't mean much to me. Does it look like the board loads U-BOOT from the eMMC?

I clicked 'space' and got into the boot environment, but struggled to figure out a command if any to wipe the emmc..

Any ideas much appreiated  :-\

Copy of boot process;

U-Boot SPL 2017.11-armbian (Jan 16 2018 - 12:38:00)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC2


U-Boot 2017.11-armbian (Jan 16 2018 - 12:38:00 +0100) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
SCSI:  SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c50000
Warning: usb_ether using MAC address from ROM
, eth1: usb_ether
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3708 bytes read in 185 ms (19.5 KiB/s)
## Executing script at 43100000
U-boot loaded from eMMC or secondary SD
Boot script loaded from mmc
202 bytes read in 222 ms (0 Bytes/s)
5069439 bytes read in 539 ms (9 MiB/s)
6968864 bytes read in 660 ms (10.1 MiB/s)
Found mainline kernel configuration
47918 bytes read in 1085 ms (43 KiB/s)
5925 bytes read in 1391 ms (3.9 KiB/s)
Applying kernel provided DT fixup script (sun7i-a20-fixup.scr)
## Executing script at 44000000
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5069375 Bytes = 4.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Ramdisk to 49b2a000, end 49fffa3f ... OK
   reserving fdt memory region: addr=43000000 size=72000
   Loading Device Tree to 49ab5000, end 49b29fff ... OK

Starting kernel ...

Loading, please wait...
starting version 232
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device.  Common problems:
- Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT!  UUID=e17177f8-7642-4854-add7-e17b28699570 does not exist.  Dropping to a shell!
Rebooting automatically due to panic= boot argument


[   49.081893] reboot: Restarting system


heggerty

Hi

OK I really appear to have broken it now.  It wont boot at all since doing this (I was hoping the erase command would give some feedback rather than just erase!)

=> mmc info
Device: SUNXI SD/MMC
Manufacturer ID: fe
OEM: 14e
Name: P1XXX
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.6 GiB
Boot Capacity: 16 MiB ENH
RPMB Capacity: 128 KiB ENH
=> mmc erase mmc 1

MMC erase: dev # 1, block # 0, count 1 ...

Caution! Your devices Erase group is 0x400
The erase range would be change to 0x0~0x3ff

1 blocks erased: OK

I'm incredibly disappointed with myself, it was such a whizzy board.



LubOlimex

Even if you managed to format the eMMC or configured it with wrong settings this shouldn't affect the boot from micro SD card. There is boot priority by default - the board would attempt to boot from micro SD card if there is such inserted. If there is no card or if the card is bad (wrong image, faulty card) it would attempt to boot from eMMC.

> Trying to boot from MMC2

It seems to me that it doesn't attempt to boot from the card. Hmm... Maybe your card is faulty, try another card and again with the official image (for the sake of testing).
Technical support and documentation manager at Olimex

heggerty

Hi LubOlimex

Thank you so much for replying.

I understand that the board shouldn't have tried to boot from emmc if there was a valid microSD card, but I promise that's what appeared to happen.

I tried 3 different cards and even re-downloaded the image and reflashed all 3 cards (I even blew in the card slot in case of dust!)

Nothing worked to change the behaviour

Now when I power on the board nothing at all happens, even watching UART

I can't have the board die on me, I cant afford another and had I known I could mess it up changing OS's I wouldn't have tried, so have been trying to rectify my mistakes. 

I spun up a Debian VM on my PC and have been trying to get the board to boot using u-boot.  Sunxi-fel can see the board over USB and after making the SPI file etc I can do the command sunxi-fel -v uboot u-boot-sunxi-with-spl.bin - but always get the same output

Stack pointers: sp_irq=0x00002000, sp=0x00005E08
Reading the MMU translation table from 0x00020000
Disabling I-cache, MMU and branch prediction... done.
=> Executing the SPL... done.
Setting write-combine mapping for DRAM.
Setting cached mapping for BROM.
Writing back the MMU translation table.
Enabling I-cache, MMU and branch prediction... done.
U-Boot image data size mismatch: expected 516032, got 428236


on UART I get

U-Boot SPL 2018.01 (Apr 19 2018 - 23:19:46)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from FEL

If you have time I'd love some help.  I dont understand uboot whatsoever but am willing to give any suggestions 100%

Thanks

Heggerty




JohnS

You can read about the boot process (which device when, etc) on linux-sunxi.org

It's all ROM (BROM) so you can't have altered it no matter what went wrong.

If it won't boot from SD (this is almost always a bad SD or bad power) you could try FEL.

John

heggerty

Hi JohnS

Thanks for this

I understand what you and LubOlimex are saying. 

Ok, I understand I cant boot from eMMC if a valid SD boot image is available

Which kind of makes sense if in fact my SD slot has failed and the image (I put badly) on the eMMC was corrupt

Coincidence then, SD slot packed up at the same time I wrote a bad image to emmc

But why do I now see no boot cycle in UART, are am I not supposed to?

I have tested my power supply, its an HP tablet power supply I think.  I just measured it with my volt meter at 5.3v (bit over :( ) and 6 amps.

If my SD card lot has packed up please can you explain how exactly can I use FEL to boot the official Olimex image and write this to eMMC?

I have USB-OTG and UART connectivity

I really appreciate your reply though, as above it drives home what LubOlimex was saying (Sorry Lub)

The board offers so much more than my Pi's I'd love to get it working again

Heggerty

JohnS

On the site I posted Search on FEL.

And on boot (or BROM).

The very low level doesn't use the uart as I recall.

John

heggerty

#9
Hi JOhnS

Thank you again for your reply, the problem is I'm not thoroughly fluent in Linux, so following your link doesn't provide anything further than I have already read I'm afraid

I've  built the uboot and sunxi tools using a toolchain and had the size mismatch

I decided to delete my VM and create another (32bit though) but still get the same size mismatch

From your previous post it seems there is a slim chance my board has probably suffered a hardware failure, but since Olimex do not guarantee anything it seems I am now paddling up a sticky brown river using a single thin branch as a paddle

My only hope seems to be trying to figure out how to use uboot and sunxi to boot to an image I can copt to the emmc, otherwise its all been for nought

Heg



LubOlimex

How do you prepare the cards? Can you try with some tested tool like Etcher: https://etcher.io/ (maybe remove the verification from the option else it takes too much time).

Let me know the log that you get over the serial with the official image. Leave the unofficial ones for now. If when using etcher and the official image the board still attempts to boot from the eMMC, it might be a damaged SD card connector/SD card data lines.
Technical support and documentation manager at Olimex