Getting upstream/sunxi-next kernel to boot on Cubietruck

1,105 views
Skip to first unread message

Richard W.M. Jones

unread,
Nov 26, 2013, 8:33:54 AM11/26/13
to linux...@googlegroups.com, maxime...@free-electrons.com

I'm having a lot of trouble trying to make any upstream or sunxi-next
or sunxi-devel kernel to boot on a Cubietruck.

It's fair to say I have very little idea how these boards boot. Is
there any documentation about how ARM in general or Cubietruck in
particular boots?

This is what I'm doing. It is based on:
http://linux-sunxi.org/Mainline_Kernel_Howto

(1) Check out sunxi-next-a20-smp (I also tried upstream Linus's kernel
and sunxi-next and sunxi-devel, but all basically fail the same way,
hanging very very early during boot).

(2) Compile as directed on the page above. LOADADDR was 0x40008000.

However I am *not* using an initrd (I've disabled initramfs in the
menuconfig).

(3) Copy uImage and sun7i-a20-cubietruck.dtb to /boot

(4) Use a boot.cmd which looks like this:

setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
ext2load mmc 0 0x46000000 uImage.sunxi-next-a20-smp
ext2load mmc 0 0x49000000 sun7i-a20-cubietruck.dtb
bootm 0x46000000 - 0x49000000

(5) Compile the boot.cmd into boot.scr using this:

mkimage -C none -A arm -T script -d boot.cmd boot.scr

(6) I'm using the uboot untouched from Hans De Goede's Fedora image
(working on this hardware).

(7) Reboot. The sunxi-next-a20-smp kernel hangs here:

----------------------------------------------------------------------
U-Boot SPL 2013.10-rc2-00118-gbf62731 (Oct 13 2013 - 11:53:07)
Board: Cubietruck
DRAM: 2048 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600


U-Boot 2013.10-rc2-00118-gbf62731 (Oct 13 2013 - 11:53:07) Allwinner Technology

CPU: Allwinner A20 (SUN7I)
Board: Cubietruck
I2C: ready
DRAM: 2 GiB
MMC: SUNXI SD/MMC: 0
In: serial
Out: serial
Err: serial
Net: emac
Hit any key to stop autoboot: 0
260 bytes read in 9 ms (27.3 KiB/s)
Loaded environment from uEnv.txt
299 bytes read in 6 ms (47.9 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
1568280 bytes read in 117 ms (12.8 MiB/s)
8181 bytes read in 33 ms (241.2 KiB/s)
## Booting kernel from Legacy Image at 46000000 ...
Image Name: Linux-3.12.0-rc3-00080-ga8db8de
Created: 2013-11-26 13:07:55 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1568216 Bytes = 1.5 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 40ffa000, end 40ffeff4 ... OK

Starting kernel ...

CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Memory policy: ECC disabled, Data cache writealloc
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522768
Memory: 2076640K/2097152K available (2272K kernel code, 144K rwdata, 432K rodata, 130K init, 203K bss, 20512K reserved, 1318912K highmem)
/cpus/cpu@0 missing clock-frequency property
/cpus/cpu@1 missing clock-frequency property
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/arm/mach-sunxi/platsmp.c:104 smp_prepare_cpus+0x74/0x78()
unable to setup cup configure
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.0-rc3-00080-ga8db8de #4
[<c00142c8>] (unwind_backtrace+0x0/0xf4) from [<c001142c>] (show_stack+0x10/0x14)
[<c001142c>] (show_stack+0x10/0x14) from [<c02258fc>] (dump_stack+0x80/0x90)
[<c02258fc>] (dump_stack+0x80/0x90) from [<c001b740>] (warn_slowpath_common+0x68/0x84)
[<c001b740>] (warn_slowpath_common+0x68/0x84) from [<c001b7b8>] (warn_slowpath_fmt+0x30/0x40)
[<c001b7b8>] (warn_slowpath_fmt+0x30/0x40) from [<c02af81c>] (smp_prepare_cpus+0x74/0x78)
[<c02af81c>] (smp_prepare_cpus+0x74/0x78) from [<c02adbdc>] (kernel_init_freeable+0x74/0x1d4)
[<c02adbdc>] (kernel_init_freeable+0x74/0x1d4) from [<c0222e1c>] (kernel_init+0x8/0x158)
[<c0222e1c>] (kernel_init+0x8/0x158) from [<c000e078>] (ret_from_fork+0x14/0x3c)
---[ end trace 1b75b31a2719ed1c ]---
CPU1: failed to boot: -38
bounce pool size: 64 pages
Could not switch to high resolution mode on CPU 0
----------------------------------------------------------------------

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

Richard W.M. Jones

unread,
Nov 26, 2013, 9:00:49 AM11/26/13
to linux...@googlegroups.com, maxime...@free-electrons.com

FWIW this is how the upstream Linus kernel from a few days ago hangs:

Hit any key to stop autoboot: 0
260 bytes read in 8 ms (31.3 KiB/s)
Loaded environment from uEnv.txt
289 bytes read in 6 ms (46.9 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
3622608 bytes read in 214 ms (16.1 MiB/s)
8181 bytes read in 33 ms (241.2 KiB/s)
## Booting kernel from Legacy Image at 46000000 ...
Image Name: Linux-3.13.0-rc1-00025-g2e7babf
Created: 2013-11-24 0:01:00 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3622544 Bytes = 3.5 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 40ffa000, end 40ffeff4 ... OK

Starting kernel ...

[ 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] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522768
[ 0.000000] Memory: 2072044K/2097152K available (5013K kernel code, 587K rwdata, 1412K rodata, 478K init, 284K bss, 25108K reserved, 1318912K highmem)
[ 0.062658] /cpus/cpu@0 missing clock-frequency property
[ 0.062688] /cpus/cpu@1 missing clock-frequency property
[ 0.062835] unable to find compatible sirf rstc node in dtb
[ 0.063972] CPU1: failed to boot: -38
[ 0.078969] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[ 0.079012] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[ 0.093982] bounce pool size: 64 pages
[ 0.255304] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

Richard W.M. Jones

unread,
Nov 26, 2013, 10:36:51 AM11/26/13
to linux...@googlegroups.com, maxime...@free-electrons.com
I went back to v3.13-rc1 tag, recompiled everything, made sure I had
the correct dtb (also just compiled), and I get the same output as
above.

Also the blue LED is on solid, which is unlike what happens when the
Cubietruck boots the 3.4 kernel (all lights flashing at random). Of
course this may be because the LED driver is broken, but it could also
indicate that it has really hung and is not just booting silently.

Here is the boot.cmd I am using:

setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
ext2load mmc 0 0x46000000 uImage.upstream
ext2load mmc 0 0x49000000 sun7i-a20-cubietruck.dtb
env set fdt_high ffffffff
bootm 0x46000000 - 0x49000000

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/

Maxime Ripard

unread,
Nov 26, 2013, 10:54:56 AM11/26/13
to Richard W.M. Jones, linux...@googlegroups.com
On Tue, Nov 26, 2013 at 03:36:51PM +0000, Richard W.M. Jones wrote:
> I went back to v3.13-rc1 tag, recompiled everything, made sure I had
> the correct dtb (also just compiled), and I get the same output as
> above.
>
> Also the blue LED is on solid, which is unlike what happens when the
> Cubietruck boots the 3.4 kernel (all lights flashing at random). Of
> course this may be because the LED driver is broken, but it could also
> indicate that it has really hung and is not just booting silently.

What configuration are you using? Could you also share the content of
the u-boot environment?

Thanks,
Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
signature.asc

Michal Suchanek

unread,
Nov 26, 2013, 10:54:57 AM11/26/13
to linux-sunxi, Maxime Ripard
Hello,

I am booting a mainline kernel on CT and CB2 from network. The
mainline kernel works for me but CT does not work with GBit ethernet
due to some sort of bug in the dw driver.

This is a branch with recent clock fixes and upstream gmac driver
which works for me on a20:

https://github.com/hramrach/linux-sunxi/tree/sunxi-next-dw-gmac-wip

You should be able to boot with sunxi-defconfig and if you have
problems I can send you the config I use.

I use gcc 3.7.2 from emdebian.

Also see here: http://elinux.org/Initcall_Debug

HTH

Michal

Richard W.M. Jones

unread,
Nov 26, 2013, 11:10:22 AM11/26/13
to Maxime Ripard, linux...@googlegroups.com
On Tue, Nov 26, 2013 at 04:54:56PM +0100, Maxime Ripard wrote:
> On Tue, Nov 26, 2013 at 03:36:51PM +0000, Richard W.M. Jones wrote:
> > I went back to v3.13-rc1 tag, recompiled everything, made sure I had
> > the correct dtb (also just compiled), and I get the same output as
> > above.
> >
> > Also the blue LED is on solid, which is unlike what happens when the
> > Cubietruck boots the 3.4 kernel (all lights flashing at random). Of
> > course this may be because the LED driver is broken, but it could also
> > indicate that it has really hung and is not just booting silently.
>
> What configuration are you using?

The configuration is 'make multi_v7_defconfig' followed by
'make menuconfig' and disabling initramfs in General Setup.

> Could you also share the content of
> the u-boot environment?

I'm not totally sure what this means. /boot/uEnv.txt
appears to be loaded by uboot. This file contains:

console=tty0
loglevel=5
root=/dev/mmcblk0p3 ro rootwait rootfstype=ext4
extraargs=console=ttyS0,115200 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 sunxi_fb_mem_reserve=20 sunxi_no_mali_mem_reserve

Here is the full output when I interrupt uboot and type the printenv
command:

U-Boot SPL 2013.10-rc2-00118-gbf62731 (Oct 13 2013 - 11:53:07)
Board: Cubietruck
DRAM: 2048 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600


U-Boot 2013.10-rc2-00118-gbf62731 (Oct 13 2013 - 11:53:07) Allwinner Technology

CPU: Allwinner A20 (SUN7I)
Board: Cubietruck
I2C: ready
DRAM: 2 GiB
MMC: SUNXI SD/MMC: 0
In: serial
Out: serial
Err: serial
Net: emac
Hit any key to stop autoboot: 0
sun7i# printenv
baudrate=115200
boot_mmc=ext2load mmc 0 0x43000000 script.bin && ext2load mmc 0 0x48000000 ${kernel} && watchdog 0 && bootm 0x48000000
bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv}; env import -t ${scriptaddr} ${filesize}; fi; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; if run loadbootscr; then echo Jumping to ${bootscr}; source ${scriptaddr}; fi; run setargs boot_mmc;
bootdelay=1
bootenv=uEnv.txt
bootscr=boot.scr
console=ttyS0,115200
ethact=emac
kernel=uImage
loadbootenv=ext2load mmc 0 $scriptaddr ${bootenv}
loadbootscr=ext2load mmc 0 $scriptaddr ${bootscr}
loglevel=8
panicarg=panic=10
root=/dev/mmcblk0p3 rootwait
scriptaddr=0x44000000
setargs=setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
stderr=serial
stdin=serial
stdout=serial

Environment size: 881/131068 bytes

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

Richard W.M. Jones

unread,
Nov 26, 2013, 11:31:53 AM11/26/13
to Maxime Ripard, linux...@googlegroups.com
I just tried the following uboot commands on their own:

setenv bootargs console=ttyS0,115200 loglevel=5 root=/dev/mmcblk0p3 ro rootwait
ext2load mmc 0 0x46000000 uImage.upstream
ext2load mmc 0 0x49000000 sun7i-a20-cubietruck.dtb
env set fdt_high ffffffff
bootm 0x46000000 - 0x49000000

It still hangs at exactly the same place. I will try the alternate
kernel with clock fixes suggested elsewhere in this thread next.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

Richard W.M. Jones

unread,
Nov 26, 2013, 12:49:51 PM11/26/13
to linux...@googlegroups.com, maxime...@free-electrons.com

I enabled earlyprintk, CONFIG_DEBUG_LL and initcall_debug, and this is
very interesting. The upstream kernel now gets as far as trying to
mount root.

I suspect this means it's really working fine. I'm going to play with
it a bit more, mainly to see if it works with less debugging and/or I
can get the root disk to work.

Rich.

Starting kernel ...

[ 0.190563] console [ttyS0] enabled
[ 0.194088] bootconsole [earlycon0] disabled
[ 0.198673] initcall dw8250_platform_driver_init+0x0/0x10 returned 0 after 28405 usecs
[ 0.206630] calling pl011_dma_initcall+0x0/0x290 @ 1
[ 0.211680] initcall pl011_dma_initcall+0x0/0x290 returned 0 after 0 usecs
[ 0.218565] calling imx_serial_init+0x0/0x50 @ 1
[ 0.223272] Serial: IMX driver
[ 0.226433] initcall imx_serial_init+0x0/0x50 returned 0 after 3081 usecs
[ 0.233233] calling of_platform_serial_driver_init+0x0/0x10 @ 1
[ 0.239310] initcall of_platform_serial_driver_init+0x0/0x10 returned 0 after 73 usecs
[ 0.247232] calling serial_omap_init+0x0/0x44 @ 1
[ 0.252116] initcall serial_omap_init+0x0/0x44 returned 0 after 91 usecs
[ 0.258832] calling vt8500_serial_init+0x0/0x4c @ 1
[ 0.263869] initcall vt8500_serial_init+0x0/0x4c returned 0 after 61 usecs
[ 0.270736] calling xuartps_init+0x0/0x44 @ 1
[ 0.275254] initcall xuartps_init+0x0/0x44 returned 0 after 60 usecs
[ 0.281601] calling sirfsoc_uart_init+0x0/0x40 @ 1
[ 0.286557] initcall sirfsoc_uart_init+0x0/0x40 returned 0 after 65 usecs
[ 0.293353] calling tegra_uart_init+0x0/0x70 @ 1
[ 0.298113] initcall tegra_uart_init+0x0/0x70 returned 0 after 56 usecs
[ 0.304738] calling lpuart_serial_init+0x0/0x50 @ 1
[ 0.309695] serial: Freescale lpuart driver
[ 0.313943] initcall lpuart_serial_init+0x0/0x50 returned 0 after 4142 usecs
[ 0.320984] calling omap_rng_driver_init+0x0/0x10 @ 1
[ 0.326179] initcall omap_rng_driver_init+0x0/0x10 returned 0 after 45 usecs
[ 0.333232] calling drm_core_init+0x0/0x120 @ 1
[ 0.337903] [drm] Initialized drm 1.1.0 20060810
[ 0.342535] initcall drm_core_init+0x0/0x120 returned 0 after 4576 usecs
[ 0.349229] calling host1x_drm_init+0x0/0xb4 @ 1
[ 0.354141] initcall host1x_drm_init+0x0/0xb4 returned 0 after 194 usecs
[ 0.360836] calling tegra_host1x_init+0x0/0x3c @ 1
[ 0.365818] initcall tegra_host1x_init+0x0/0x3c returned 0 after 90 usecs
[ 0.372618] calling topology_sysfs_init+0x0/0x70 @ 1
[ 0.377703] initcall topology_sysfs_init+0x0/0x70 returned 0 after 34 usecs
[ 0.384669] calling twl_driver_init+0x0/0x10 @ 1
[ 0.389403] initcall twl_driver_init+0x0/0x10 returned 0 after 32 usecs
[ 0.396023] calling twl4030_power_driver_init+0x0/0x10 @ 1
[ 0.401636] initcall twl4030_power_driver_init+0x0/0x10 returned 0 after 43 u
secs
[ 0.444119] calling mv_init+0x0/0x10 @ 1
[ 0.448170] initcall mv_init+0x0/0x10 returned 0 after 41 usecs
[ 0.454095] calling omap2_mcspi_driver_init+0x0/0x10 @ 1
[ 0.459551] initcall omap2_mcspi_driver_init+0x0/0x10 returned 0 after 57 usecs
[ 0.466865] calling spi_sirfsoc_driver_init+0x0/0x10 @ 1
[ 0.472312] initcall spi_sirfsoc_driver_init+0x0/0x10 returned 0 after 48 usecs
[ 0.479626] calling tegra_spi_driver_init+0x0/0x10 @ 1
[ 0.484910] initcall tegra_spi_driver_init+0x0/0x10 returned 0 after 49 usecs
[ 0.492038] calling tegra_slink_driver_init+0x0/0x10 @ 1
[ 0.497490] initcall tegra_slink_driver_init+0x0/0x10 returned 0 after 44 usecs
[ 0.504804] calling net_olddevs_init+0x0/0x6c @ 1
[ 0.509604] initcall net_olddevs_init+0x0/0x6c returned 0 after 12 usecs
[ 0.516309] calling sun4i_mdio_driver_init+0x0/0x10 @ 1
[ 0.521667] initcall sun4i_mdio_driver_init+0x0/0x10 returned 0 after 46 usecs
[ 0.528894] calling emac_driver_init+0x0/0x10 @ 1
[ 0.533737] initcall emac_driver_init+0x0/0x10 returned 0 after 43 usecs
[ 0.540432] calling xgmac_driver_init+0x0/0x10 @ 1
[ 0.545361] initcall xgmac_driver_init+0x0/0x10 returned 0 after 42 usecs
[ 0.552143] calling fec_driver_init+0x0/0x10 @ 1
[ 0.556911] initcall fec_driver_init+0x0/0x10 returned 0 after 54 usecs
[ 0.563531] calling ks8851_driver_init+0x0/0xc @ 1
[ 0.568434] initcall ks8851_driver_init+0x0/0xc returned 0 after 26 usecs
[ 0.575228] calling smsc911x_init_module+0x0/0x10 @ 1
[ 0.580405] initcall smsc911x_init_module+0x0/0x10 returned 0 after 40 usecs
[ 0.587457] calling stmmac_init+0x0/0x3c @ 1
[ 0.591869] initcall stmmac_init+0x0/0x3c returned 0 after 53 usecs
[ 0.598142] calling ehci_hcd_init+0x0/0x70 @ 1
[ 0.602677] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.609199] initcall ehci_hcd_init+0x0/0x70 returned 0 after 6366 usecs
[ 0.615816] calling ehci_platform_init+0x0/0x54 @ 1
[ 0.620773] ehci-platform: EHCI generic platform driver
[ 0.626065] initcall ehci_platform_init+0x0/0x54 returned 0 after 5161 usecs
[ 0.633119] calling ehci_omap_init+0x0/0x54 @ 1
[ 0.637730] ehci-omap: OMAP-EHCI Host Controller driver
[ 0.643014] initcall ehci_omap_init+0x0/0x54 returned 0 after 5153 usecs
[ 0.649709] calling ehci_orion_init+0x0/0x50 @ 1
[ 0.654419] ehci-orion: EHCI orion driver
[ 0.658470] initcall ehci_orion_init+0x0/0x50 returned 0 after 3951 usecs
[ 0.665265] calling ehci_spear_init+0x0/0x54 @ 1
[ 0.669962] SPEAr-ehci: EHCI SPEAr driver
[ 0.674025] initcall ehci_spear_init+0x0/0x54 returned 0 after 3963 usecs
[ 0.680807] calling ehci_tegra_init+0x0/0x84 @ 1
[ 0.685514] tegra-ehci: Tegra EHCI driver
[ 0.689569] initcall ehci_tegra_init+0x0/0x84 returned 0 after 3953 usecs
[ 0.696360] calling xhci_hcd_init+0x0/0x8 @ 1
[ 0.700802] initcall xhci_hcd_init+0x0/0x8 returned 0 after 0 usecs
[ 0.707071] calling isp1760_init+0x0/0x54 @ 1
[ 0.711620] initcall isp1760_init+0x0/0x54 returned 0 after 104 usecs
[ 0.718070] calling usb_storage_driver_init+0x0/0x18 @ 1
[ 0.723511] usbcore: registered new interface driver usb-storage
[ 0.729513] initcall usb_storage_driver_init+0x0/0x18 returned 0 after 5896 usecs
[ 0.736999] calling omap_usb3_driver_init+0x0/0x10 @ 1
[ 0.742267] initcall omap_usb3_driver_init+0x0/0x10 returned 0 after 43 usecs
[ 0.749406] calling samsung_usb2phy_driver_init+0x0/0x10 @ 1
[ 0.755231] initcall samsung_usb2phy_driver_init+0x0/0x10 returned 0 after 67 usecs
[ 0.762894] calling samsung_usb3phy_driver_init+0x0/0x10 @ 1
[ 0.768685] initcall samsung_usb3phy_driver_init+0x0/0x10 returned 0 after 44 usecs
[ 0.776347] calling tegra_usb_phy_driver_init+0x0/0x10 @ 1
[ 0.781963] initcall tegra_usb_phy_driver_init+0x0/0x10 returned 0 after 46 usecs
[ 0.789449] calling gpio_vbus_driver_init+0x0/0x10 @ 1
[ 0.794718] initcall gpio_vbus_driver_init+0x0/0x10 returned 0 after 36 usecs
[ 0.801847] calling isp1301_driver_init+0x0/0x10 @ 1
[ 0.806936] initcall isp1301_driver_init+0x0/0x10 returned 0 after 29 usecs
[ 0.813902] calling ci_hdrc_driver_init+0x0/0x10 @ 1
[ 0.818988] initcall ci_hdrc_driver_init+0x0/0x10 returned 0 after 35 usecs
[ 0.825954] calling ci_hdrc_msm_driver_init+0x0/0x10 @ 1
[ 0.831386] initcall ci_hdrc_msm_driver_init+0x0/0x10 returned 0 after 34 usecs
[ 0.838699] calling ci_hdrc_imx_driver_init+0x0/0x10 @ 1
[ 0.844149] initcall ci_hdrc_imx_driver_init+0x0/0x10 returned 0 after 43 usecs
[ 0.851452] calling usbmisc_imx_driver_init+0x0/0x10 @ 1
[ 0.856908] initcall usbmisc_imx_driver_init+0x0/0x10 returned 0 after 47 usecs
[ 0.864220] calling serport_init+0x0/0x30 @ 1
[ 0.868662] initcall serport_init+0x0/0x30 returned 0 after 1 usecs
[ 0.874931] calling ambakmi_driver_init+0x0/0xc @ 1
[ 0.879926] initcall ambakmi_driver_init+0x0/0xc returned 0 after 31 usecs
[ 0.886805] calling mousedev_init+0x0/0x88 @ 1
[ 0.891758] mousedev: PS/2 mouse device common for all mice
[ 0.897388] initcall mousedev_init+0x0/0x88 returned 0 after 5905 usecs
[ 0.904015] calling atkbd_init+0x0/0x18 @ 1
[ 0.908363] initcall atkbd_init+0x0/0x18 returned 0 after 75 usecs
[ 0.914563] calling spear_kbd_driver_init+0x0/0x10 @ 1
[ 0.919858] initcall spear_kbd_driver_init+0x0/0x10 returned 0 after 67 usecs
[ 0.927006] calling psmouse_init+0x0/0x98 @ 1
[ 0.931641] initcall psmouse_init+0x0/0x98 returned 0 after 180 usecs
[ 0.938114] calling pl031_driver_init+0x0/0xc @ 1
[ 0.942957] initcall pl031_driver_init+0x0/0xc returned 0 after 41 usecs
[ 0.949653] calling spear_rtc_driver_init+0x0/0x10 @ 1
[ 0.954952] initcall spear_rtc_driver_init+0x0/0x10 returned 0 after 60 usecs
[ 0.962081] calling tegra_rtc_driver_init+0x0/0x14 @ 1
[ 0.967387] initcall tegra_rtc_driver_init+0x0/0x14 returned -19 after 66 usecs
[ 0.974705] calling twl4030rtc_driver_init+0x0/0x10 @ 1
[ 0.980060] initcall twl4030rtc_driver_init+0x0/0x10 returned 0 after 43 usecs
[ 0.987290] calling vt8500_rtc_driver_init+0x0/0x10 @ 1
[ 0.992648] initcall vt8500_rtc_driver_init+0x0/0x10 returned 0 after 39 usecs
[ 0.999863] calling i2c_sirfsoc_driver_init+0x0/0x10 @ 1
[ 1.005321] initcall i2c_sirfsoc_driver_init+0x0/0x10 returned 0 after 40 usecs
[ 1.012636] calling bcm_kona_i2c_driver_init+0x0/0x10 @ 1
[ 1.018159] initcall bcm_kona_i2c_driver_init+0x0/0x10 returned 0 after 38 usecs
[ 1.025561] calling vexpress_reset_init+0x0/0x10 @ 1
[ 1.030661] initcall vexpress_reset_init+0x0/0x10 returned 0 after 49 usecs
[ 1.037629] calling highbank_mc_edac_driver_init+0x0/0x10 @ 1
[ 1.043517] initcall highbank_mc_edac_driver_init+0x0/0x10 returned 0 after 43 usecs
[ 1.051252] calling highbank_l2_edac_driver_init+0x0/0x10 @ 1
[ 1.057134] initcall highbank_l2_edac_driver_init+0x0/0x10 returned 0 after 38 usecs
[ 1.064881] calling mmc_blk_init+0x0/0x8c @ 1
[ 1.069352] initcall mmc_blk_init+0x0/0x8c returned 0 after 28 usecs
[ 1.075711] calling mmci_driver_init+0x0/0xc @ 1
[ 1.080452] initcall mmci_driver_init+0x0/0xc returned 0 after 37 usecs
[ 1.087071] calling sdhci_drv_init+0x0/0x24 @ 1
[ 1.091681] sdhci: Secure Digital Host Controller Interface driver
[ 1.097862] sdhci: Copyright(c) Pierre Ossman
[ 1.102218] initcall sdhci_drv_init+0x0/0x24 returned 0 after 10283 usecs
[ 1.109008] calling sdhci_driver_init+0x0/0x10 @ 1
[ 1.113937] initcall sdhci_driver_init+0x0/0x10 returned 0 after 42 usecs
[ 1.120719] calling mmc_omap_driver_init+0x0/0x10 @ 1
[ 1.125902] initcall mmc_omap_driver_init+0x0/0x10 returned 0 after 34 usecs
[ 1.132956] calling omap_hsmmc_driver_init+0x0/0x10 @ 1
[ 1.138313] initcall omap_hsmmc_driver_init+0x0/0x10 returned 0 after 45 usecs
[ 1.145539] calling wmt_mci_driver_init+0x0/0x10 @ 1
[ 1.150628] initcall wmt_mci_driver_init+0x0/0x10 returned 0 after 38 usecs
[ 1.157594] calling sdhci_pltfm_drv_init+0x0/0x18 @ 1
[ 1.162732] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.168387] initcall sdhci_pltfm_drv_init+0x0/0x18 returned 0 after 5516 usecs
[ 1.175611] calling sdhci_esdhc_imx_driver_init+0x0/0x10 @ 1
[ 1.181412] initcall sdhci_esdhc_imx_driver_init+0x0/0x10 returned 0 after 56 usecs
[ 1.189072] calling sdhci_tegra_driver_init+0x0/0x10 @ 1
[ 1.194526] initcall sdhci_tegra_driver_init+0x0/0x10 returned 0 after 47 usecs
[ 1.201830] calling hid_init+0x0/0x54 @ 1
[ 1.205997] initcall hid_init+0x0/0x54 returned 0 after 58 usecs
[ 1.212000] calling hid_generic_init+0x0/0x18 @ 1
[ 1.216833] initcall hid_generic_init+0x0/0x18 returned 0 after 31 usecs
[ 1.223540] calling a4_driver_init+0x0/0x18 @ 1
[ 1.228194] initcall a4_driver_init+0x0/0x18 returned 0 after 36 usecs
[ 1.234719] calling apple_driver_init+0x0/0x18 @ 1
[ 1.239621] initcall apple_driver_init+0x0/0x18 returned 0 after 25 usecs
[ 1.246414] calling belkin_driver_init+0x0/0x18 @ 1
[ 1.251404] initcall belkin_driver_init+0x0/0x18 returned 0 after 25 usecs
[ 1.258282] calling ch_driver_init+0x0/0x18 @ 1
[ 1.262934] initcall ch_driver_init+0x0/0x18 returned 0 after 26 usecs
[ 1.269455] calling ch_driver_init+0x0/0x18 @ 1
[ 1.274108] initcall ch_driver_init+0x0/0x18 returned 0 after 25 usecs
[ 1.280629] calling cp_driver_init+0x0/0x18 @ 1
[ 1.285283] initcall cp_driver_init+0x0/0x18 returned 0 after 25 usecs
[ 1.291805] calling ez_driver_init+0x0/0x18 @ 1
[ 1.296457] initcall ez_driver_init+0x0/0x18 returned 0 after 24 usecs
[ 1.302989] calling ks_driver_init+0x0/0x18 @ 1
[ 1.307634] initcall ks_driver_init+0x0/0x18 returned 0 after 27 usecs
[ 1.314168] calling lg_driver_init+0x0/0x18 @ 1
[ 1.318801] initcall lg_driver_init+0x0/0x18 returned 0 after 25 usecs
[ 1.325334] calling ms_driver_init+0x0/0x18 @ 1
[ 1.329991] initcall ms_driver_init+0x0/0x18 returned 0 after 38 usecs

[.....]

[ 1.690635] calling max_swapfiles_check+0x0/0x8 @ 1
[ 1.695609] initcall max_swapfiles_check+0x0/0x8 returned 0 after 0 usecs
[ 1.702390] calling init_root_keyring+0x0/0x4 @ 1
[ 1.707260] initcall init_root_keyring+0x0/0x4 returned 0 after 69 usecs
[ 1.713987] calling prandom_reseed+0x0/0x4c @ 1
[ 1.718640] initcall prandom_reseed+0x0/0x4c returned 0 after 33 usecs
[ 1.725179] calling tegra_gpio_debuginit+0x0/0x38 @ 1
[ 1.730324] initcall tegra_gpio_debuginit+0x0/0x38 returned 0 after 8 usecs
[ 1.737296] calling regulator_init_complete+0x0/0x1a4 @ 1
[ 1.742795] initcall regulator_init_complete+0x0/0x1a4 returned 0 after 2 usecs
[ 1.750098] calling deferred_probe_initcall+0x0/0x80 @ 1
[ 1.755738] initcall deferred_probe_initcall+0x0/0x80 returned 0 after 219 usecs
[ 1.763169] calling rtc_hctosys+0x0/0x120 @ 1
[ 1.767610] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 1.773886] initcall rtc_hctosys+0x0/0x120 returned -19 after 6126 usecs
[ 1.780582] calling tcp_congestion_default+0x0/0xc @ 1
[ 1.785816] initcall tcp_congestion_default+0x0/0xc returned 0 after 3 usecs
[ 1.792867] calling ip_auto_config+0x0/0x1010 @ 1
[ 1.797674] initcall ip_auto_config+0x0/0x1010 returned 0 after 18 usecs
[ 1.804383] calling __omap_device_late_init+0x0/0x34 @ 1
[ 1.809780] initcall __omap_device_late_init+0x0/0x34 returned 0 after 2 usecs
[ 1.817006] calling clk_disable_unused+0x0/0xd8 @ 1
[ 1.822032] initcall clk_disable_unused+0x0/0xd8 returned 0 after 61 usecs
[ 1.829579] async_waiting @ 1
[ 1.832581] async_continuing @ 1 after 1 usec
[ 1.836943] Waiting for root device /dev/mmcblk0p3...

(hangs here)

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org

Richard W.M. Jones

unread,
Nov 26, 2013, 1:43:05 PM11/26/13
to linux...@googlegroups.com
On Tue, Nov 26, 2013 at 04:54:57PM +0100, Michal Suchanek wrote:
> I am booting a mainline kernel on CT and CB2 from network.

I haven't tried network booting, but really must do as it would make
testing this a lot easier.

> The mainline kernel works for me but CT does not work with GBit
> ethernet due to some sort of bug in the dw driver.
>
> This is a branch with recent clock fixes and upstream gmac driver
> which works for me on a20:
>
> https://github.com/hramrach/linux-sunxi/tree/sunxi-next-dw-gmac-wip
>
> You should be able to boot with sunxi-defconfig and if you have
> problems I can send you the config I use.

Thanks for the suggestion, and also about using initcall_debug.

This kernel works quite well, hanging just on mounting the root. I've
attached the full log below. My config is just sunxi-defconfig +
enabling earlyprink and CONFIG_DEBUG_LL.

Do you happen to know which driver should be configured in to support
the /dev/mmcblk0 device? (Or if it's supported by this kernel ...)

Rich.

sun7i# setenv bootargs console=ttyS0,115200 loglevel=9 earlyprintk root=/dev/mmcblk0p3 ro rootwait
sun7i# ext2load mmc 0 0x46000000 uImage.sunxi-next-dw-gmac-wip
1604048 bytes read in 120 ms (12.7 MiB/s)
sun7i# ext2load mmc 0 0x49000000 sun7i-a20-cubietruck.dtb.sunxi-next-dw-gmac-wip
11300 bytes read in 39 ms (282.2 KiB/s)
sun7i# env set fdt_high ffffffff
sun7i# bootm 0x46000000 - 0x49000000
## Booting kernel from Legacy Image at 46000000 ...
Image Name: Linux-3.13.0-rc1-00039-gfabecad
Created: 2013-11-26 18:32:11 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1603984 Bytes = 1.5 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
Using Device Tree in place at 49000000, end 49005c23

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.13.0-rc1-00039-gfabecad (rjo...@cube.home.annexia.org) (gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC) ) #7 SMP Tue Nov 26 13:31:20 EST 2013
[ 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: Cubietech Cubietruck
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] On node 0 totalpages: 524288
[ 0.000000] free_area_init_node: node 0, pgdat c0301c80, node_mem_map c0337000
[ 0.000000] Normal zone: 1520 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 194560 pages, LIFO batch:31
[ 0.000000] HighMem zone: 2576 pages used for memmap
[ 0.000000] HighMem zone: 329728 pages, LIFO batch:31
[ 0.000000] PERCPU: Embedded 5 pages/cpu @c1347000 s6528 r0 d13952 u32768
[ 0.000000] pcpu-alloc: s6528 r0 d13952 u32768 alloc=8*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522768
[ 0.000000] Kernel command line: console=ttyS0,115200 loglevel=9 earlyprintk root=/dev/mmcblk0p3 ro 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: 2076560K/2097152K available (2322K kernel code, 145K rwdata, 440K rodata, 138K init, 207K bss, 20592K reserved, 1318912K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] .text : 0xc0008000 - 0xc02bab70 (2763 kB)
[ 0.000000] .init : 0xc02bb000 - 0xc02dd980 ( 139 kB)
[ 0.000000] .data : 0xc02de000 - 0xc0302700 ( 146 kB)
[ 0.000000] .bss : 0xc0302708 - 0xc0336480 ( 208 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
[ 0.000000] Console: colour dummy device 80x30
[ 0.004740] Calibrating delay loop... 1915.28 BogoMIPS (lpj=9576448)
[ 0.062913] pid_max: default: 32768 minimum: 301
[ 0.067759] Mount-cache hash table entries: 512
[ 0.073086] CPU: Testing write buffer coherency: ok
[ 0.078340] /cpus/cpu@0 missing clock-frequency property
[ 0.083783] /cpus/cpu@1 missing clock-frequency property
[ 0.089181] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.094950] Setting up static identity map for 0x402356e0 - 0x40235738
[ 0.102532] CPU1: failed to boot: -38
[ 0.106301] Brought up 1 CPUs
[ 0.109349] SMP: Total of 1 processors activated.
[ 0.114171] CPU: All CPU(s) started in SVC mode.
[ 0.119527] devtmpfs: initialized
[ 0.126580] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[ 0.134560] pinctrl core: initialized pinctrl subsystem
[ 0.140194] regulator-dummy: no parameters
[ 0.144606] NET: Registered protocol family 16
[ 0.149410] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.159428] bio: create slab <bio-0> at 0
[ 0.164622] Switched to clocksource timer
[ 0.174310] NET: Registered protocol family 2
[ 0.179310] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.186561] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.193192] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.199716] TCP: reno registered
[ 0.203036] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.209106] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.215819] NET: Registered protocol family 1
[ 0.221703] bounce pool size: 64 pages
[ 0.230761] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 0.238296] io scheduler noop registered
[ 0.242299] io scheduler deadline registered
[ 0.246807] io scheduler cfq registered (default)
[ 0.253434] sunxi-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.295956] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.324585] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.333682] console [ttyS0] enabled
[ 0.333682] console [ttyS0] enabled
[ 0.340748] bootconsole [earlycon0] disabled
[ 0.340748] bootconsole [earlycon0] disabled
[ 0.350014] mousedev: PS/2 mouse device common for all mice
[ 0.355887] i2c /dev entries driver
[ 0.359783] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.368797] TCP: cubic registered
[ 0.372121] NET: Registered protocol family 17
[ 0.376687] Registering SWP/SWPB emulation handler
[ 0.385856] Waiting for root device /dev/mmcblk0p3...


--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones

Zalán Blénessy

unread,
Nov 26, 2013, 1:44:52 PM11/26/13
to linux...@googlegroups.com
You're tying to boot from SD/MMC and those drivers have not yet been mainlined as far as I know.

http://linux-sunxi.org/Linux_mainlining_effort

I use initramfs or try netboot.

Maxime Ripard

unread,
Nov 27, 2013, 3:45:21 AM11/27/13
to Richard W.M. Jones, linux...@googlegroups.com
Hi Richard,

On Tue, Nov 26, 2013 at 05:49:51PM +0000, Richard W.M. Jones wrote:
>
> I enabled earlyprintk, CONFIG_DEBUG_LL and initcall_debug, and this is
> very interesting. The upstream kernel now gets as far as trying to
> mount root.
>
> I suspect this means it's really working fine. I'm going to play with
> it a bit more, mainly to see if it works with less debugging and/or I
> can get the root disk to work.

Ah, yes. I've been confused by the different loglevel you've been using.

But we don't have any MMC driver for now. So booting a rootfs on MMC
won't work, obviously.

You can use either an initramfs, or NFS for the moment.
signature.asc
Reply all
Reply to author
Forward
0 new messages