I'm still getting beat up by this kernel boot...
The board I'm booting is a very minimal module, the only thing on board (that is applicable to this bootup) is console UART, Ethernet and .25G DRAM. It boots from SPI-NOR flash, and eventually will also run with eMMC. Note also that I am running with an iMX6D, not an iMX6Q. The periphery I mentioned is wired the same as the SABRESD (except that at the moment my DRAM is only 16bits wide). Note that I do not have a PMIC of any kind on this module, no USB periphery, and no multimedia interfaces. I need the kernel to be able to boot this (admittedly very minimal) platform.
For uboot, I started with u-boot-2013.10 from denx and modified it for this hw. For kernel, I started with git clone http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git. Note that I have used this combination on a SABRESD platform and it boots just fine; so I am assuming the issues are related to pruning down the kernel to match my custom board's periphery.
I believe uboot is in good shape. It boots fine and network access is intact. I've modified uboot so that it passes a unique machine-id so that the kernel will use my custom startup code under arch/arm/mach-mx6. I started by simply duplicating the board-mx6q_sabresd.c to board-mx6d_custom.c, and modified the MACHINE_START macro at the base of the file to use this new machine id. I also modified Kconfig in that directory with a new MACH_MX6D_CUSTOM that
initially looks just like MACH_MX6Q_SABRESD. This, I believe (someone please correct me if I'm wrong), allows me to run the same kernel on my hardware and the SABRESD; because uboot on my board will pass the kernel a different machine-id than uboot on SABRESD.
I start with make imx6_defconfig; and (as described above) I disable CONFIG_MXC_GPU_VIV. That allows the kernel log to start printing at the console.
Then it locks up at i.MXC CPU frequency driver...
Linux version 3.0.35-03053-g8d2b169-dirty (els@elslinux1) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-
24) ) #1 SMP PREEMPT Sat Feb 1 11:33:03 EST 2014
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Custom i.MX6D Board
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6Q, silicon rev 1.2
PERCPU: Embedded 7 pages/cpu @80d0a000 s5440 r8192 d15040 u32768
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 32256
Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=135.222.138.108:/home/els/imx6/pass4
/rootfs/buildroot-2013.08/my_rootfs,v3,tcp
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 117556k/117556k available, 144588k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf4600000 - 0xffe00000 ( 184 MB)
vmalloc : 0x90800000 - 0xf2000000 (1560 MB)
lowmem : 0x80000000 - 0x90000000 ( 256 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x8003e000 ( 216 kB)
.text : 0x8003e000 - 0x80a70034 (10441 kB)
.data : 0x80a72000 - 0x80ad76c0 ( 406 kB)
.bss : 0x80ad76e4 - 0x80b0546c ( 184 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:624
MXC GPIO hardware
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
arm_max_freq=800MHz
MXC_Early serial console at MMIO 0x2020000 (options '115200')
bootconsole [ttymxc0] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
CPU1: Booted secondary processor
Brought up 2 CPUs
SMP: Total of 2 processors activated (3162.11 BogoMIPS).
print_constraints: dummy:
NET: Registered protocol family 16
*************************************iram init
print_constraints: vddpu: 725 <--> 1300 mV at 1150 mV fast normal
print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal
print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal
print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal
print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal
print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal
********************************mx6_vsm400_board_init completed!
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
hw-breakpoint: maximum watchpoint size is 4 bytes.
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x32070000, Cache size: 1048576 B
bio: create slab <bio-0> at 0
mxs-dma mxs-dma-apbh: initialized
print_constraints: SPKVDD: 4200 mV
print_constraints: vmmc: 3300 mV
SCSI subsystem initialized
spi_imx imx6q-ecspi.0: probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Freescale USB OTG Driver loaded, $Revision: 1.55 $
mc_pfuze 1-0008: recv failed!:-5,84
mc_pfuze: probe of 1-0008 failed with error -1
imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 driver probed
mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 dphy version is 0x3130302a
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Version 1.0.24.
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
cfg80211: Calling CRDA to update world regulatory domain
max17135 2-0048: PMIC MAX17135 for eInk display
i2c-core: driver [max17135] using legacy suspend method
i2c-core: driver [max17135] using legacy resume method
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 3, 49152 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 128 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PMU: registered new PMU device of type 0
Static Power Management for Freescale i.MX6
wait mode is enabled for i.MX6
cpaddr = 90880000 suspend_iram_base=90918000
PM driver module loaded
IMX usb wakeup probe
the wakeup pdata is 0x84225b40
add wake up source irq 75
IMX usb wakeup probe
the wakeup pdata is 0x8419d7c0
cpu regulator mode:ldo_enable
i.MXC CPU frequency driver
Note also in the above log: CPU identified as i.MX6Q, silicon rev 1.2.
My CPU is an iMX6D. I'm assuming this is ok, since it later only initializes 2 cores.
So, at this point I use menuconfig to turn of CPUfreq driver for i.MX CPUs (because I don't have a PMIC). This hangs, but with the log ending at "the wakeup pdata is 0x8419d7c0",
two lines above. I started pruning things from arch/arm/mach-mx6/Kconfig and the board_init function in board-mx6d_custom.c. But no matter how much I prune bootup still hangs...
Linux version 3.0.35-03053-g8d2b169-dirty (els@elslinux1) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-24) ) #24 PREEMPT Fri Jan 31 15:55:01 EST 2014
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Alcatel-Lucent i.MX6D VSM400
Memory policy: ECC disabled, Data cache writeback
CPU identified as i.MX6Q, silicon rev 1.2
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 32256
Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=135.222.138.108:/home/els/imx6/pass4/rootfs/buildroot-2013.08/my_rootfs,v3,tcp
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 124072k/124072k available, 138072k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf4600000 - 0xffe00000 ( 184 MB)
vmalloc : 0x90800000 - 0xf2000000 (1560 MB)
lowmem : 0x80000000 - 0x90000000 ( 256 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80029000 ( 132 kB)
.text : 0x80029000 - 0x804587e4 (4286 kB)
.data : 0x8045a000 - 0x80494940 ( 235 kB)
.bss : 0x80494964 - 0x804b1f18 ( 118 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:624
MXC GPIO hardware
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
arm_max_freq=800MHz
MXC_Early serial console at MMIO 0x2020000 (options '115200')
bootconsole [ttymxc0] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
NET: Registered protocol family 16
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
hw-breakpoint: maximum watchpoint size is 4 bytes.
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x32070000, Cache size: 1048576 B
bio: create slab <bio-0> at 0
mxs-dma mxs-dma-apbh: initialized
SCSI subsystem initialized
spi_imx imx6q-ecspi.0: probed
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PMU: registered new PMU device of type 0
Static Power Management for Freescale i.MX6
wait mode is enabled for i.MX6
cpaddr = 90880000 suspend_iram_base=90828000
PM driver module loaded
Any clue on what may be causing the hangup?
I'm by no means an expert at this, so I may be totally wrong in my approach. Anyone have any thoughts on what is best here?
One final point to mention...
I had built a kernel based on kernel.org's linux-3.13 (using device tree), and was able to boot to a linux login prompt on this board. I stepped back to the git.freescale version (not using device tree) because there were other subtle issues (command line doesn't process wildcards, why?) that made me suspicious that I needed to be more in sync with git.freescale.