Lime2 Boot Failure

This forum is for supported devices using an ARMv7 Allwinner SoC.

Lime2 Boot Failure

Postby kdubious » Sun Feb 28, 2016 8:48 am

Trying to get ALARM running on a lime 2 using a legacy kernel (with i2s slave mode)

I followed the instruction on the site, but the device hangs/crashes on boot. It gets to "loading kernel" then video on hdmi drops and nic led stops.

The current version of Armbian also hangs here. Not sure if they're related.

I was going to look at the fex, but bin2fex won't convert the bin file.
kdubious
 
Posts: 3
Joined: Tue Dec 16, 2014 6:14 pm

Re: Lime2 Boot Failure

Postby fradav » Wed Mar 09, 2016 11:31 am

Hi,

I can confirm that the latest official alarm u-boot for lime2 is bogus. Just dd the one from the vanilla image from armbian distro and it will boot ok.

Regards,
fradav
 
Posts: 4
Joined: Wed Mar 09, 2016 9:13 am

Re: Lime2 Boot Failure

Postby lulingar » Thu Mar 10, 2016 3:28 pm

Hi frdav,

I'm new to these Allwinner based boards (mine is also a Lime2). I tried to follow the installation procedure for Arch, and although Uboot seems to start loading the kernel, at some point during bootup the board freezes. For instance, the ethernet leds light up but power down right after the board freezes. On the other hand, I tested armbian vanilla jessie and it works just fine, at least for basic interactions with the board.

If you think this might still be an issue with Uboot, would you mind explaining a bit more what exactly should I dd from the armbian distro?

The boot log is shown below:
Code: Select all
$ miniterm.py /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

U-Boot SPL 2016.01-1 (Feb 07 2016 - 18:13:39)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC


U-Boot 2016.01-1 (Feb 07 2016 - 18:13:39 -0700) Arch Linux ARM

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

In:    serial
Out:   serial
Err:   serial
SCSI:  SUNXI SCSI INIT
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
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
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
805 bytes read in 131 ms (5.9 KiB/s)
## Executing script at 43100000
5364680 bytes read in 366 ms (14 MiB/s)
45943 bytes read in 516 ms (86.9 KiB/s)
** File not found /boot/initramfs-linux.img **
Kernel image @ 0x42000000 [ 0x000000 - 0x51dbc8 ]
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Device Tree to 49ff1000, end 49fff376 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.3-1-ARCH (builduser@leming) (gcc version 5.3.0 (GCC) ) #1 SMP Fri Feb 26 19:13:37 MST 2016
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Olimex A20-OLinuXino-LIME2
[    0.000000] cma: Reserved 24 MiB at 0x7e800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] PERCPU: Embedded 13 pages/cpu @ef6b9000 s23564 r8192 d21492 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyS0,115200 root=PARTUUID=dfa1441c-01 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 994320K/1048576K available (11302K kernel code, 1241K rwdata, 4612K rodata, 1244K init, 927K bss, 29680K reserved, 24576K cma-reserved, 237568K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0f92b54   (15915 kB)
[    0.000000]       .init : 0xc0f93000 - 0xc10ca000   (1244 kB)
[    0.000000]       .data : 0xc10ca000 - 0xc1200738   (1242 kB)
[    0.000000]        .bss : 0xc1203000 - 0xc12ead90   ( 928 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] GIC physical location is 0x1c81000
[    0.000000] Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000021] Switching to timer-based delay loop, resolution 41ns
[    0.002643] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.003560] clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns
[    0.005181] Console: colour dummy device 80x30
[    0.005222] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=120000)
[    0.005240] pid_max: default: 32768 minimum: 301
[    0.005372] Security Framework initialized
[    0.005556] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.005571] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.006462] Initializing cgroup subsys io
[    0.006498] Initializing cgroup subsys memory
[    0.006537] Initializing cgroup subsys devices
[    0.006556] Initializing cgroup subsys freezer
[    0.006572] Initializing cgroup subsys net_cls
[    0.006587] Initializing cgroup subsys perf_event
[    0.006603] Initializing cgroup subsys net_prio
[    0.006618] Initializing cgroup subsys pids
[    0.006687] CPU: Testing write buffer coherency: ok
[    0.006739] ftrace: allocating 39863 entries in 117 pages
[    0.081291] /cpus/cpu@0 missing clock-frequency property
[    0.081325] /cpus/cpu@1 missing clock-frequency property
[    0.081340] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.081439] Setting up static identity map for 0x40008280 - 0x40008318
[    0.086932] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.087047] Brought up 2 CPUs
[    0.087070] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.087077] CPU: All CPU(s) started in HYP mode.
[    0.087084] CPU: Virtualization extensions available.
[    0.088077] devtmpfs: initialized
[    0.103001] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[    0.104055] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
[    0.105729] xor: measuring software checksum speed
[    0.151110]    arm4regs  :  1132.000 MB/sec
[    0.201177]    8regs     :   676.000 MB/sec
[    0.251252]    32regs    :   832.800 MB/sec
[    0.301329]    neon      :   660.000 MB/sec
[    0.301338] xor: using function: arm4regs (1132.000 MB/sec)
[    0.301498] pinctrl core: initialized pinctrl subsystem
[    0.303454] NET: Registered protocol family 16
[    0.305454] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.317326] No ATAGs?
[    0.317379] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.317394] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.319764] Serial: AMBA PL011 UART driver
[    0.432267] raid6: int32x1  gen()   125 MB/s
[    0.517468] raid6: int32x1  xor()    95 MB/s
[    0.602362] raid6: int32x2  gen()   144 MB/s
[    0.687537] raid6: int32x2  xor()    96 MB/s
[    0.772941] raid6: int32x4  gen()   128 MB/s
[    0.858029] raid6: int32x4  xor()    87 MB/s
[    0.943492] raid6: int32x8  gen()   115 MB/s
[    1.028495] raid6: int32x8  xor()    75 MB/s
[    1.113416] raid6: neonx1   gen()   427 MB/s
[    1.198591] raid6: neonx1   xor()   335 MB/s
[    1.283779] raid6: neonx2   gen()   582 MB/s
[    1.368871] raid6: neonx2   xor()   429 MB/s
[    1.454121] raid6: neonx4   gen()   590 MB/s
[    1.539255] raid6: neonx4   xor()   427 MB/s
[    1.624444] raid6: neonx8   gen()   420 MB/s
[    1.709611] raid6: neonx8   xor()   337 MB/s
[    1.709620] raid6: using algorithm neonx4 gen() 590 MB/s
[    1.709627] raid6: .... xor() 427 MB/s, rmw enabled
[    1.709634] raid6: using intx1 recovery algorithm
[    1.712631] reg-fixed-voltage ahci-5v: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/ahci_pwr_pin@1, deferring probe
[    1.712683] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb0_vbus_pin@0, deferring probe
[    1.712714] reg-fixed-voltage usb1-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe
[    1.712743] reg-fixed-voltage usb2-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb2_vbus_pin@0, deferring probe
[    1.718251] vgaarb: loaded
[    1.719573] SCSI subsystem initialized
[    1.720374] usbcore: registered new interface driver usbfs
[    1.720461] usbcore: registered new interface driver hub
[    1.720578] usbcore: registered new device driver usb
[    1.722255] media: Linux media interface: v0.10
[    1.722324] Linux video capture interface: v2.00
[    1.722433] pps_core: LinuxPPS API ver. 1 registered
[    1.722442] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.722474] PTP clock support registered
[    1.722545] EDAC MC: Ver: 3.0.0
[    1.724165] Advanced Linux Sound Architecture Driver Initialized.
[    1.725043] NetLabel: Initializing
[    1.725057] NetLabel:  domain hash size = 128
[    1.725063] NetLabel:  protocols = UNLABELED CIPSOv4
[    1.725124] NetLabel:  unlabeled traffic allowed by default
[    1.725540] clocksource: Switched to clocksource arch_sys_counter
[    1.821285] NET: Registered protocol family 2
[    1.822188] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    1.822285] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    1.822414] TCP: Hash tables configured (established 8192 bind 8192)
[    1.822514] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    1.822574] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    1.822870] NET: Registered protocol family 1
[    1.823470] RPC: Registered named UNIX socket transport module.
[    1.823487] RPC: Registered udp transport module.
[    1.823494] RPC: Registered tcp transport module.
[    1.823501] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.824584] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    1.827088] futex hash table entries: 512 (order: 3, 32768 bytes)
[    1.835957] zbud: loaded
[    1.836645] VFS: Disk quotas dquot_6.6.0
[    1.836880] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.839212] NFS: Registering the id_resolver key type
[    1.839304] Key type id_resolver registered
[    1.839314] Key type id_legacy registered
[    1.839343] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.846615] bounce: pool size: 64 pages
[    1.846907] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.847121] io scheduler noop registered
[    1.847143] io scheduler deadline registered
[    1.847216] io scheduler cfq registered (default)
[    1.848638] sun4i-usb-phy 1c13400.phy: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb0_id_detect_pin@0, deferring probe
[    1.854415] sun7i-a20-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    1.871457] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    1.874682] console [ttyS0] disabled
[    1.894918] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 41, base_baud = 1500000) is a U6_16550A
[    2.770832] console [ttyS0] enabled
[    2.774899] Serial: AMBA driver
[    2.779858] [drm] Initialized drm 1.1.0 20060810
[    2.786620] exynos-drm-ipp exynos-drm-ipp: drm ipp registered successfully.
[    2.804925] loop: module loaded
[    2.809942] Loading iSCSI transport class v2.0-870.
[    2.815601] iscsi: registered transport (tcp)
[    2.827111] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.833708] ehci-pci: EHCI PCI platform driver
[    2.838251] ehci-platform: EHCI generic platform driver
[    2.843904] ehci-mxc: Freescale On-Chip EHCI Host driver
[    2.849371] ehci-omap: OMAP-EHCI Host Controller driver
[    2.854748] ehci-orion: EHCI orion driver
[    2.858921] ehci-exynos: EHCI EXYNOS driver
[    2.863272] tegra-ehci: Tegra EHCI driver
[    2.867444] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.873700] ohci-pci: OHCI PCI platform driver
[    2.878250] ohci-platform: OHCI generic platform driver
[    2.883847] ohci-exynos: OHCI EXYNOS driver
[    2.888245] ohci-omap3: OHCI OMAP3 driver
[    2.892776] usbcore: registered new interface driver uas
[    2.898214] usbcore: registered new interface driver usb-storage
[    2.904295] usbcore: registered new interface driver ums-cypress
[    2.910372] usbcore: registered new interface driver ums_eneub6250
[    2.916622] usbcore: registered new interface driver ums-freecom
[    2.922693] usbcore: registered new interface driver ums-isd200
[    2.928689] usbcore: registered new interface driver ums-usbat
[    2.940766] sunxi-rtc 1c20d00.rtc: rtc core: registered rtc-sunxi as rtc0
[    2.947614] sunxi-rtc 1c20d00.rtc: RTC enabled
[    2.952561] i2c /dev entries driver
[    2.957783] axp20x 0-0034: AXP20x variant AXP209 found
[    2.977342] input: axp20x-pek as /devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
|␁␀␀␀␀␀


And the board gets frozen immediately at this point.
lulingar
 
Posts: 7
Joined: Thu Mar 10, 2016 3:13 pm

Re: Lime2 Boot Failure

Postby fradav » Fri Mar 11, 2016 9:43 am

Hi lulingar,

Simple, just get the vanilla zip http://www.armbian.com/olimex-lime-2/ (for example jessie)
Extract the .raw
Code: Select all
dd if=Armbian_4.5_Lime2_Debian_jessie_4.2.3.raw of=/dev/mmcblk0 bs=1024 seek=8 skip=8 count=1016


Regards,

PS: I compiled the 2015.10 version of the u-boot and it boots just fine on my Lime2. I guess something borked between 2015.10 and 2016.01 (actual version). Out of curiosity I tried the latest u-boot from official sources 2016.03-rc3, but no luck (still freeze in boot).
fradav
 
Posts: 4
Joined: Wed Mar 09, 2016 9:13 am

Re: Lime2 Boot Failure

Postby fradav » Fri Mar 11, 2016 1:03 pm

I think I got the reason of the "power-off on boot", I am pretty sure there is a conflict in the init of the PMIC (AXP209 in our case) between u-boot and the kernel. Something changed in the u-boot code a few month ago which is not endorsed by the mainline kernel, hence the blackout at PMIC init. I will try a patch ASAP to confirm this.
fradav
 
Posts: 4
Joined: Wed Mar 09, 2016 9:13 am

Re: Lime2 Boot Failure

Postby fradav » Fri Mar 11, 2016 5:30 pm

I was right : deactivating PMIC in uboot 2016.01 let the kernel finally boot fine.
Just add CONFIG_SUNXI_NO_PMIC=y in the lime2's defconfig.

As a side note, I'm really wondering why bootloaders are so bloated those days. Just my two cents rant.

Regards
fradav
 
Posts: 4
Joined: Wed Mar 09, 2016 9:13 am

Re: Lime2 Boot Failure

Postby lulingar » Fri Mar 11, 2016 6:10 pm

Hi frdav,

Thanks a lot for the deep debugging work! I don't have the board right now with me, but when I do, I will try these two separate procedures:

1. Into a newly flashed stock ALARM image, dd the uboot part from armbian.
2. Into a newly flashed stock ALARM image, adding CONFIG_SUNXI_NO_PMIC=y to the defconfig (I'll dig around /boot to find the specific file)

And I'll let you know how these turn out.

(I'd love it if the board implemented inline code blocks)
lulingar
 
Posts: 7
Joined: Thu Mar 10, 2016 3:13 pm

Re: Lime2 Boot Failure

Postby lulingar » Mon Mar 14, 2016 1:40 pm

Hi frdav,

I have the board with me now, and my results so far are:

1. dding uboot from armbian as per your instructions works great, I've got a shell now.
2. I didn't find a file under /boot where I could add CONFIG_SUNXI_NO_PMIC=y. I'm sorry to come as a complete noob, I assume you mean that as a kernel configuration option, which would require me to compile the kernel, right?

Thanks for your help.
lulingar
 
Posts: 7
Joined: Thu Mar 10, 2016 3:13 pm

Re: Lime2 Boot Failure

Postby ventosus » Thu Apr 21, 2016 5:21 pm

I'm having the same problem on my LIME2 (boot hangs when loading driver axp20x)

I tried to recompile u-boot with 'CONFIG_SUNXI_NO_PMIC=y' but this was no good (kernel panic)

Reverting to u-boot 2015.10 resolved the issue for me, too.
ventosus
 
Posts: 3
Joined: Sun Jan 18, 2015 8:13 am


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 3 guests