[UPDATED] OLinuXino A10 LIME not booting at the first time

Started by DangeMask, October 30, 2015, 12:17:43 PM

Previous topic - Next topic

DangeMask

Hello,
in out company we are using OLinuXino based device called ScanPoint (SP) - designed especialy for us. Right now we've got about 100 SPs deployed and in some cases, we have an issue.
The device starts when power is turned on. It has its own "Power ON" LED to indicate it. On some devices, the power lights up, but OLinuXino won't boot. The workaround is to shut the power down and up again and now everythink works fine. But it is not very handy and in come cases it is not possible to restart the power supply at will.

Did any of you meet anything similar? I'll also get in contact with ScanPoint manufacturer, if it can be caused by their power converter or anything else.

JohnS


DangeMask

Got purchased the debug cable and tested a little:
- When the device doesn't boot, the green GPIO led is on. I can start the device by turning the power off and on again or by holding Reset button on Olinuxino for 3s.

- Then all reset, power off and on and similar tries are successful and the device starts without problem. But if I keep it turned off for 30 minutes, the next "turn on" fails again.

- I am using a bit-copied SD cards and it doesn't matter if I switch cards, still one device has boot issues and another is working well.

First (unsuccessful) boot UART output:


U-Boot SPL 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55)
Board: A10-OLinuXino-Lime
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600


U-Boot 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55) Allwinner Technology

CPU:   Allwinner A10 (SUN4I)
Board: A10-OLinuXino-Lime
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   emac
Hit any key to stop autoboot:  0
reading uEnv.txt
104 bytes read in 17 ms (5.9 KiB/s)
Loaded environment from uEnv.txt
reading boot.scr
337 bytes read in 16 ms (20.5 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading script.bin
Error reading cluster
** Unable to read file script.bin **
reading uImage



Second (successful) boot:

U-Boot SPL 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55)
Board: A10-OLinuXino-Lime
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600


U-Boot 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55) Allwinner Technology

CPU:   Allwinner A10 (SUN4I)
Board: A10-OLinuXino-Lime
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   emac
Hit any key to stop autoboot:  0
reading uEnv.txt
104 bytes read in 17 ms (5.9 KiB/s)
Loaded environment from uEnv.txt
reading boot.scr
337 bytes read in 16 ms (20.5 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading script.bin
Error reading cluster
** Unable to read file script.bin **
reading uImage
Error reading cluster
** Unable to read file uImage **
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.4.90+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4447440 Bytes = 4.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading script.bin
53864 bytes read in 43 ms (1.2 MiB/s)
reading uImage
4447504 bytes read in 311 ms (13.6 MiB/s)
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.4.90+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4447440 Bytes = 4.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

<6>Booting Linux on physical CPU 0
<6>Initializing cgroup subsys cpuset
<5>Linux version 3.4.90+ (root@debian) (gcc version 4.7.1 (Debian 4.7.1-7) ) #3 PREEMPT Tue Jun 10 09:17:04 EEST 2014
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: sun4i
<6>Memory Reserved:
<6>     SYS  : 0x43000000 - 0x4300ffff  (  64 kB)
<6>     VE   : 0x44000000 - 0x48ffffff  (  80 MB)
<6>     G2D  : 0x49000000 - 0x49ffffff  (  16 MB)
<6>     LCD  : 0x4a000000 - 0x4bffffff  (  32 MB)
Memory policy: ECC disabled, Data cache writeback
<6>sunxi: Allwinner A10 revision C (AW1623/sun4i) detected.
<7>On node 0 totalpages: 131072
<7>free_area_init_node: node 0, pgdat c085f108, node_mem_map d0000000
<7>  DMA zone: 512 pages used for memmap
<7>  DMA zone: 0 pages reserved
<7>  DMA zone: 65024 pages, LIFO batch:15
<7>  Normal zone: 512 pages used for memmap
<7>  Normal zone: 65024 pages, LIFO batch:15
<7>pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768<c>
<7>pcpu-alloc: <c>[0] <c>0 <c>
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
<5>Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait loglevel=8 panic=10
<6>PID hash table entries: 2048 (order: 1, 8192 bytes)
<6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
<6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>Memory: 512MB = 512MB total
<5>Memory: 378220k/378220k available, 146068k reserved, 0K highmem
<5>Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc07cbe24   (7952 kB)
      .init : 0xc07cc000 - 0xc07f7000   ( 172 kB)
      .data : 0xc07f8000 - 0xc086a720   ( 458 kB)
       .bss : 0xc086a744 - 0xc0a242a8   (1767 kB)
<6>SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>NR_IRQS:128
<6>sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
<6>Console: colour dummy device 80x30
<6>Calibrating delay loop... <c>1001.88 BogoMIPS (lpj=5009408)
<6>pid_max: default: 32768 minimum: 301
<6>Mount-cache hash table entries: 512
<6>Initializing cgroup subsys cpuacct
<6>Initializing cgroup subsys devices
<6>Initializing cgroup subsys freezer
<6>Initializing cgroup subsys blkio
<6>CPU: Testing write buffer coherency: ok
<6>hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
<6>Setting up static identity map for 0x4055dc50 - 0x4055dca8
<6>devtmpfs: initialized
<6>dummy:
<6>NET: Registered protocol family 16
<6>DMA: preallocated 256 KiB pool for atomic coherent allocations
<6>hw-breakpoint: debug architecture 0x4 unsupported.
<6>Init eGon pin module V2.0
SOFTWINNER DMA Driver, (c) 2003-2004,2006 Simtec Electronics
<6>Initialize DMAC OK
<6>bio: create slab <bio-0> at 0
<5>SCSI subsystem initialized
<7>libata version 3.00 loaded.
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Linux video capture interface: v2.00
<6>Advanced Linux Sound Architecture Driver Version 1.0.25.
<6>Bluetooth: Core ver 2.16
<6>NET: Registered protocol family 31
<6>Bluetooth: HCI device and connection manager initialized
<6>Bluetooth: HCI socket layer initialized
<6>Bluetooth: L2CAP socket layer initialized
<6>Bluetooth: SCO socket layer initialized
<6>Switching to clocksource aw_64bits_counter
<5>FS-Cache: Loaded
<6>cfg80211: Calling CRDA to update world regulatory domain
<6>CacheFiles: Loaded
[usb_manager]: CONFIG_USB_SW_SUNXI_USB0_OTG
[sw_hcd0]: usb host driver initialize........
[sw_hcd0]: open_usb_clock
[sw_hcd0]: host_init_state = 1
[sw_hcd0]: platform is usb host
[sw_hcd0]: sw_hcd_host0: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx (X), HB-ISO Tx (X), SoftConn)
[sw_hcd0]: sw_hcd_init_controller: sw_hcd_host0: USB Host mode controller at f1c13000 using PIO, IRQ 38
<6>sw_hcd_host0 sw_hcd_host0: sw_hcd host driver
<6>sw_hcd_host0 sw_hcd_host0: new USB bus registered, assigned bus number 1
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 1 port detected
wrn: hcd is not enable, need not start hcd
[sw_hcd0]: sw_usb_host0_disable start
-------sw_hcd0_soft_disconnect---------
is_on = 0, hcd0_set_vbus_cnt = 0
[sw_hcd_host0]: Set USB Power Off
wrn: hcd is not enable, need not stop hcd
[sw_hcd0]: close_usb_clock
[sw_hcd0]: sw_usb_host0_disable end
[sw_udc]: udc_init: version 20080411
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>TCP established hash table entries: 16384 (order: 5, 131072 bytes)
<6>TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
<6>TCP: Hash tables configured (established 16384 bind 16384)
<6>TCP: reno registered
<6>UDP hash table entries: 256 (order: 0, 4096 bytes)
<6>UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
<6>NET: Registered protocol family 1
<6>RPC: Registered named UNIX socket transport module.
<6>RPC: Registered udp transport module.
<6>RPC: Registered tcp transport module.
<6>RPC: Registered tcp NFSv4.1 backchannel transport module.
<6>audit: initializing netlink socket (disabled)
<5>type=2000 audit(0.359:1): initialized
<5>VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
<5>NFS: Registering the id_resolver key type
<6>NTFS driver 2.1.30 [Flags: R/W].
<6>fuse init (API version 7.18)
<6>msgmni has been set to 738
<3>alg: comp: Compression test 1 failed for lzo-generic: output len = 57
<6>alg: No test for stdrng (krng)
<6>Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
<6>io scheduler noop registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>sunxi disp driver loaded (/dev/disp api 1.0)
<6>Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
<6>[uart]: used uart info.: 0xf5
<6>[uart]: serial probe 0 irq 1 mapbase 0x01c28000
<6>sunxi-uart.0: ttyS0 at MMIO 0x1c28000 (irq = 1) is a U6_16550A
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Linux version 3.4.90+ (root@debian) (gcc version 4.7.1 (Debian 4.7.1-7) ) #3 PREEMPT Tue Jun 10 09:17:04 EEST 2014
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: sun4i
[    0.000000] Memory Reserved:
[    0.000000]  SYS  : 0x43000000 - 0x4300ffff  (  64 kB)
[    0.000000]  VE   : 0x44000000 - 0x48ffffff  (  80 MB)
[    0.000000]  G2D  : 0x49000000 - 0x49ffffff  (  16 MB)
[    0.000000]  LCD  : 0x4a000000 - 0x4bffffff  (  32 MB)
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] sunxi: Allwinner A10 revision C (AW1623/sun4i) detected.
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c085f108, node_mem_map d0000000
[    0.000000]   DMA zone: 512 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 65024 pages, LIFO batch:15
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 65024 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait loglevel=8 panic=10
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 378220k/378220k available, 146068k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc07cbe24   (7952 kB)
[    0.000000]       .init : 0xc07cc000 - 0xc07f7000   ( 172 kB)
[    0.000000]       .data : 0xc07f8000 - 0xc086a720   ( 458 kB)
[    0.000000]        .bss : 0xc086a744 - 0xc0a242a8   (1767 kB)
[    0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.005997] Calibrating delay loop... 1001.88 BogoMIPS (lpj=5009408)
.
.
.


JohnS

First, check the CPU chip.  Some have been upgraded (by mistake) to A20.

You need an image for the exact CPU (and also the exact board).

Also check you are NOT using an A10S image.

Always suspect your power.

If you can find any other images that should work (Android etc), try them.

A critical problem for Linux is that Allwinner boards need various voltages set during boot and many when set cause instability.  You may need to rebuild the code to set different volts / speeds.

John

DangeMask

Thank you for your response.

The image was included in our prototype device, when delivered from manufacturer. Not sure which image they chose. How can I check it?

I'll try to download another image for A10 LIME and will report here.

JohnS

You'd hope they would not make a mistake (but humans are humans so it's not 100% certain).

I suppose read it with e.g. Linux dd

You can use sfdisk / fdisk / loopback mount it.

John

DangeMask

The hostname in the old image is "a10lime" so I assume the image is correct. It works OK in many devices and only in several ones it has problems to boot at first attempt.

Yesterday I downloaded clean image of Debian from olimex.com and the problematic device started at first attempt without any issues. So IMHO creating new SD card based on this image will help.

UART output of new image booting:

U-Boot SPL 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55)
Board: A10-OLinuXino-Lime
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600


U-Boot 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55) Allwinner Technology

CPU:   Allwinner A10 (SUN4I)
Board: A10-OLinuXino-Lime
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   emac
Hit any key to stop autoboot:  0
reading uEnv.txt
104 bytes read in 17 ms (5.9 KiB/s)
Loaded environment from uEnv.txt
reading boot.scr
337 bytes read in 16 ms (20.5 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading script.bin
54504 bytes read in 38 ms (1.4 MiB/s)
reading uImage
Error reading cluster
** Unable to read file uImage **
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.4.90+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4447440 Bytes = 4.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading script.bin
54504 bytes read in 38 ms (1.4 MiB/s)
reading uImage
4447504 bytes read in 233 ms (18.2 MiB/s)
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.4.90+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4447440 Bytes = 4.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...


The difference I found is in reading of script.bin. Maybe it would help to copy the new script.bin into the old image? But I'm not sure where to find it and if it will be any difference.

LinuxUser

From purely technical standpoint you appear to have card read errors. This can be caused by many factors. Bad card, bad card socket, or even bad power supply which gets unreliable under load. Or in worst case maybe something is poorly soldered and loses contact, etc.

The very clear thing is: system can't read card properly. CRC error is CRC error, u-boot was not able to get correct data from the card. Why it happens is another story, see above for some ideas. In your shoes I would try to use different card and power supply as first things to try.

DangeMask

Thank you for your reply. We have cca 150 running devices with the same card type and based on the same card image and only a few of them are not booting correctly. Now I have new issues with devices "dying" frequently so I had no time testing this.

As I said, we use many cards of the same type. When I try to use another card in the malfunctioning olinuxino, the problem stays the same. But if I use the same card type with new image it works well.