mainline uboot with sunxi-next kernel hangs for Olimex A20 Lime2

608 views
Skip to first unread message

Vishnu Patekar

unread,
Nov 15, 2014, 8:18:12 AM11/15/14
to linux...@googlegroups.com
I've taken uboot and kernel from below locations:
uboot: git clone git://git.denx.de/u-boot.git
Kernel: git clone git://github.com/mripard/linux.git -b sunxi-next

Followed the steps mentioned at http://linux-sunxi.org/Mainline_Kernel_Howto
I've enabled the DEBUG_LL, DEBUG_SUNXI_UART0 , still While booting it on Olimex A20-OLinuXino-Lime2 does not go beyond "starting kernel..."

U-Boot 2015.01-rc1-00062-g0d485b9 (Nov 15 2014 - 17:32:38) Allwinner Technology


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: dwmac.1c50000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0...
Found U-Boot script /boot.scr
reading /boot.scr
291 bytes read in 16 ms (17.6 KiB/s)
## Executing script at 43100000
reading uImage
2824272 bytes read in 353 ms (7.6 MiB/s)
reading sun7i-a20-olinuxino-lime2.dtb
23270 bytes read in 31 ms (732.4 KiB/s)
## Booting kernel from Legacy Image at 46000000 ...
Image Name: Linux-3.18.0-rc3-31432-gd1b8ab3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2824208 Bytes = 2.7 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 49000000
Booting using the fdt blob at 0x49000000
Loading Kernel Image ... OK
Loading Device Tree to 4fff7000, end 4ffffae5 ... OK


Starting kernel ...

Iain Paton

unread,
Nov 15, 2014, 11:23:11 AM11/15/14
to linux...@googlegroups.com, Vishnu Patekar
On 15/11/14 13:18, Vishnu Patekar wrote:

> Followed the steps mentioned at http://linux-sunxi.org/Mainline_Kernel_Howto
> I've enabled the DEBUG_LL, DEBUG_SUNXI_UART0 , still While booting it on Olimex
> A20-OLinuXino-Lime2 <http://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2> does
> not go beyond "starting kernel..."

Without knowing what's in your boot.scr, your partition layout etc. it's
difficult to help.

The section in the mainline kernel howto relating to boot.cmd/boot.scr is probably
out of date. With recent mainline u-boot like you've used, it's much simpler to
use extlinux.conf. You then just need a single ext partition and can use zImage
instead of uImage and avoid various problems.

My /boot/extlinux/extlinux.conf basically contains this:

menu title LIME2 boot menu
timeout 10
ontimeout linux
LABEL linux
KERNEL /boot/zImage
fdt /boot/sun7i-a20-olinuxino-lime2.dtb
append root=/dev/mmcblk0p1 console=ttyS0,115200 ro rootwait

with a repeated LABEL section for different images or append lines.

My .config from a working kernel running on a lime2 can be found here
http://pastebin.com/Znf14tqL
(note that this is configured to be a multi platform kernel so has lots
of stuff you don't need if you only need it to work on lime2)


boot log using the same versions you used looks like this:

U-Boot SPL 2015.01-rc1-00062-g0d485b9 (Nov 15 2014 - 14:28:17)
DRAM: 1024 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2


U-Boot 2015.01-rc1-00062-g0d485b9 (Nov 15 2014 - 14:28:17) Allwinner Technology

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: dwmac.1c50000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
617 bytes read in 251 ms (2 KiB/s)
LIME2 boot menu
1: linux
2: recovery
3: sata
4: 317rc1
Enter choice: 1: linux
Retrieving file: /boot/zImage
3863048 bytes read in 376 ms (9.8 MiB/s)
append: root=/dev/mmcblk0p1 console=ttyS0,115200 ro rootwait
Retrieving file: /boot/sun7i-a20-olinuxino-lime2.dtb
23270 bytes read in 183 ms (124 KiB/s)
Kernel image @ 0x42000000 [ 0x000000 - 0x3af208 ]
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Loading Device Tree to 4fff7000, end 4ffffae5 ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.18.0-rc3-lime2-31432-gd1b8ab3 (root@sl3) (gcc version 4.9.1 (GCC) ) #2 SMP Sat Nov 15 15:38:53 UTC 2014
[ 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 16 MiB at 7f000000



Vishnu Patekar

unread,
Nov 15, 2014, 2:45:36 PM11/15/14
to linux...@googlegroups.com, vishnupa...@gmail.com, ipa...@gmail.com
Thanks a ton.
It worked with the your .config. There is something wrong with sunxi-next  sunxi_defconfig.

even steps mentioned Mainline_Kernel_Howto works fine.

Gerardo Di Iorio

unread,
Dec 31, 2014, 12:16:56 PM12/31/14
to linux...@googlegroups.com
hi,

2014-11-15 17:22 GMT+01:00 Iain Paton <ipa...@gmail.com>:
On 15/11/14 13:18, Vishnu Patekar wrote:

> Followed the steps mentioned at http://linux-sunxi.org/Mainline_Kernel_Howto
> I've enabled the DEBUG_LL, DEBUG_SUNXI_UART0 , still While booting it on Olimex
> A20-OLinuXino-Lime2 <http://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2> does
> not go beyond "starting kernel..."

Without knowing what's in your boot.scr, your partition layout etc. it's
difficult to help.

The section in the mainline kernel howto relating to boot.cmd/boot.scr is probably
out of date. With recent mainline u-boot like you've used, it's much simpler to
use extlinux.conf. You then just need a single ext partition and can use zImage
instead of uImage and avoid various problems.


but extlinux not work with vfat partition?

 



--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hans de Goede

unread,
Jan 1, 2015, 7:25:49 AM1/1/15
to linux...@googlegroups.com
Hi,

On 31-12-14 18:16, Gerardo Di Iorio wrote:
> hi,
>
> 2014-11-15 17:22 GMT+01:00 Iain Paton <ipa...@gmail.com>:
>
>> On 15/11/14 13:18, Vishnu Patekar wrote:
>>
>>> Followed the steps mentioned at
>> http://linux-sunxi.org/Mainline_Kernel_Howto
>>> I've enabled the DEBUG_LL, DEBUG_SUNXI_UART0 , still While booting it on
>> Olimex
>>> A20-OLinuXino-Lime2 <http://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2>
>> does
>>> not go beyond "starting kernel..."

If you want to use mainline u-boot with sunxi kernels (rather then the
mainline kernel) you need to enable the old kernel compatibility in
u-boot's .config and spl/.config as outlined in the thread titled:

"linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot"

And specifically this bit from the mail starting that thread:

###

2. How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
==========================================================================

Here are some example instructions on how to build upstream u-boot for
the Cubietruck:

git clone git://git.denx.de/u-boot.git
cd u-boot
make -j4 CROSS_COMPILE=arm-linux-gnu- Cubietruck_defconfig
# If you want to use an upstream kernel the next steps can be skipped (*)
make -j4 CROSS_COMPILE=arm-linux-gnu- menuconfig
# select "ARM architecture" -> "Enable workarounds for booting old kernels"
# exit & save
make -j4 CROSS_COMPILE=arm-linux-gnu- spl/menuconfig
# select "ARM architecture" -> "Enable workarounds for booting old kernels"
# exit & save
# skip to here if you're using an upstream kernel
make -j4 CROSS_COMPILE=arm-linux-gnu-

And now you will have a u-boot-sunxi-with-spl.bin to dd to your sdcard as
usual.

If you look in the upstream configs directory you will already find
defconfig files for a lot of popular boards there, replace
Cubietruck_defconfig with the one for your board to build u-boot for your
board.

###

Regards,

Hans

Gerardo Di Iorio

unread,
Jan 2, 2015, 12:32:41 PM1/2/15
to linux...@googlegroups.com
hi,
the problem is that not find 
the command for load script.bin with extlionux.conf
this is my extlinux.conf
i have this error
Ignoring unknown command:         fatload
Ignoring unknown command: append


--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.

Vishnu Patekar

unread,
Jan 2, 2015, 2:14:02 PM1/2/15
to linux...@googlegroups.com
HI,
why don't you use boot.scr.

add below content in boot.cmd and create boot.scr using mkimage -C none -A arm -T script -d boot.cmd boot.scr
setenv bootargs console=ttyS0 root=/dev/mmcblk0p2 rw rootwait panic=10
ext2load mmc 0 0x43000000 boot/script.bin
ext2load mmc 0 0x48000000 boot/uImage
bootm 0x48000000

It works.

To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages