Apalis iMX6 mainline v4.7-rc7 hangs at starting kernel

I am trying to build the kernel on my Apalis IMx6 but the kernel doesn’t seem to be starting properly:

CPU: Freescale i.MX6Q rev1.5 at 792 MHz
Reset cause: POR
I2C: ready
DRAM: 2 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
auto-detected panel vga-rgb
Display: vga-rgb (640x480)
In: serial
Out: serial
Err: serial
Model: Toradex Apalis iMX6 Quad 2GB IT V1.1A, Serial# 04875903
Net: using phy at 7
FEC [PRIME]
Hit any key to stop autoboot: 0
293 bytes read in 85 ms (2.9 KiB/s)
\#\# Executing script at 10800000
Booting from internal eMMC chip...
44078 bytes read in 93 ms (461.9 KiB/s)
4087936 bytes read in 188 ms (20.7 MiB/s)
\#\# Booting kernel from Legacy Image at 10800000 ...
Image Name: Linux-4.7.0-rc7-00092-g47ef4ad-d
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4087872 Bytes = 3.9 MiB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... OK
\#\# Flattened Device Tree blob at 12000000
Booting using the fdt blob at 0x12000000
Loading Kernel Image ... OK
Using Device Tree in place at 12000000, end 1200dc2d
Starting kernel ...

It just hangs at “Starting kernel”.

my bootargs are:

Apalis iMX6 # printenv bootargs
bootargs=enable_wait_mode=off vmalloc=400M ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 rootwait fec_mac=00:14:2d:4a:66:7f consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 mxc_hdmi.only_cea=1 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M init=/bin/bash

Any help is very much appreciated.

Which exact defconfig and device tree are you using?

I am using ‘make menuconfig’ and recycled the old .config file from 3.14.52 kernel build.

As for the device tree, I am using /arch/arm/boot/dts/imx6q-apalis-ixora.dts.

I tried reproducing the issue here but could not. Can you check if the device tree blob is correct?

Apalis iMX6 # run sdboot 
Booting from SD card in 8-bit slot...
reading imx6q-apalis-ixora.dtb       
44078 bytes read in 18 ms (2.3 MiB/s)
reading uImage                       
6571520 bytes read in 188 ms (33.3 MiB/s)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Linux-4.7.0-rc7-00092-g47ef4ad    
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6571456 Bytes = 6.3 MiB              
   Load Address: 10008000               
   Entry Point:  10008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
   Loading Kernel Image ... OK             
   Using Device Tree in place at 12000000, end 1200dc2d
                                                       
Starting kernel ...
                   
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.7.0-rc7-00092-g47ef4ad (sanchayan@Sanchayan-Arch) (gcc version 5.2.1 20151005 (Linaro GCC 5.
2-2015.11-2) ) #56 SMP Thu Jul 21 11:44:28 IST 2016
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Toradex Apalis iMX6Q/D Module on Ixora Carrier Board
[    0.000000] cma: Reserved 16 MiB at 0x8f000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 13 pages/cpu @e577f000 s24448 r8192 d20608 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 523056
[    0.000000] Kernel command line: enable_wait_mode=off vmalloc=400M ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3
 rootwait fec_mac=00:14:2d:4b:16:04 consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8
[    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: 2041048K/2097152K available (9220K kernel code, 436K rwdata, 2868K rodata, 1024K init, 8225K bss, 39
720K reserved, 16384K cma-reserved, 1449984K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe7000000 - 0xff800000   ( 392 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe6800000   ( 616 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0cce09c   (13081 kB)
[    0.000000]       .init : 0xc0d00000 - 0xc0e00000   (1024 kB)
[    0.000000]       .data : 0xc0e00000 - 0xc0e6d3e0   ( 437 kB)
[    0.000000]        .bss : 0xc0e6f000 - 0xc16775e4   (8226 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU lockdep checking is enabled.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76070001
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000007] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000029] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.001494] Console: colour dummy device 80x30
[    0.004056] console [tty1] enabled
[    0.004086] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.004135] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.004165] ... MAX_LOCK_DEPTH:          48
[    0.004196] ... MAX_LOCKDEP_KEYS:        8191
[    0.004226] ... CLASSHASH_SIZE:          4096
[    0.004256] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.004288] ... MAX_LOCKDEP_CHAINS:      65536
[    0.004322] ... CHAINHASH_SIZE:          32768
[    0.004353]  memory used by lock dependency info: 5167 kB
[    0.004388]  per task-struct memory footprint: 1536 bytes
[    0.004448] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.004517] pid_max: default: 32768 minimum: 301
[    0.004850] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.004901] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.006741] CPU: Testing write buffer coherency: ok
[    0.007727] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.007851] Setting up static identity map for 0x10100000 - 0x10100070
[    0.012923] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.014745] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.016234] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.016449] Brought up 4 CPUs
[    0.016592] SMP: Total of 4 processors activated (24.00 BogoMIPS).
[    0.016634] CPU: All CPU(s) started in SVC mode.

The Angstrom Distribution apalis-imx6 ttymxc0
Angstrom v2015.12 - Kernel 4.7.0-rc7-00092-g47ef4ad
Apalis_iMX6_LinuxImageV2.6_20160630

apalis-imx6 login: root
Last login: Thu Jul 21 06:38:35 UTC 2016 on ttymxc0
root@apalis-imx6:~# uname -a
Linux apalis-imx6 4.7.0-rc7-00092-g47ef4ad #56 SMP Thu Jul 21 11:44:28 IST 2016 armv7l GNU/Linux
root@apalis-imx6:~# 

defconfig used was imx_v6_v7_defconfig. Note that you might also need to change the rootfs and set the vidargs to blank. The mainline kernel does not use the vivante driver stuff from our current 3.14.52 kernel. One can use the Vybrid rootfs from our current release as it will have the modesetting driver for the display to work correctly with mainline.

Hi Sanchayan,

May I know where to obtain the linux package from? I see that your image is “Linux-4.7.0-rc7-00092-g47ef4ad”. I tried it from https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git/+/v4.7-rc7 but that did not work.

Please note that still using Linux 4.7-rc7 now makes absolutely no sense. Please try 4.8.4 or the latest 4.9-rc2 both available directly from kernel.org.

It does not necessarily have to be 4.7-rc7. You can try the Linus’s master branch with

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

or try one of the stable branches with

git clone -b linux-4.7.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

as 4.7 has been release and no need to use -rc release as a result.