Dear Andreas,
sorry for this long delay :-(.
Now I'm able to built a root filesystem for imx51evk.
I can boot my imx51 with a none realtime kernel.
But I can't boot the patched imx51 Realtime Kernel.
I did it as follow:
make ARCH=arm CROSS_COMPILE= 'HOSTCC=ccache /usr/bin/gcc -B/usr/bin/' imx51_defconfig
make ARCH=arm CROSS_COMPILE= 'HOSTCC=ccache /usr/bin/gcc -B/usr/bin/' zImage
There were three errors during build process. Therefore I changed the following:
- in arch/arm/Makefile at line 53 I changed "armv7-a" to "armv7a"
- in include/linux/regulator/machine.h at line 135 I added the variable const char *dev_name to the regulator_consumer_supply structur
- in arch/arm/mach-mx5/mx51_3stack.c at line 150 I changed "#if 0" to "#if 1" and I commented line 156 to 165 out
After successful built, I booted zImage with imx51evk and I get a Kernel panic as follow:
Uncompressing Linux............................................................................................................................
Linux version 2.6.31.12-rt21 (sischerzinger@pc574301) (gcc version 4.1.2) #24 PREEMPT RT Wed Sep 7 10:22:06 BST 2011
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX51 Babbage Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 105664
Kernel command line: noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot=172.17.20.2:/home/sischerzinger/Reiner/IMX51RT/rootfs rw ip=dhcp panic=10
PID hash table entries: 2048 (order: 11, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 416MB = 416MB total
Memory: 417480KB available (3908K code, 377K data, 132K init, 0K highmem)
Real-Time Preemption Support (C) 2004-2007 Ingo Molnar
Preemptible RCU implementation.
NR_IRQS:368
MXC IRQ initialized
MXC_Early serial console at MMIO 0x73fbc000 (options '115200')
console [ttymxc0] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 799.53 BogoMIPS (lpj=3997696)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
i.MX IRAM pool: 128 KB@0xda840000
IRAM READY
CPU is i.MX51 Revision 3.0
MXC GPIO hardware
iomux_config_mux: Warning: iomux pin config changed, reg=f7ea8134, prev=0x1 new=0x3
Using SDMA I.API
MXC DMA API initialized
bio: create slab <bio-0> at 0
SCSI subsystem initialized
CSPI: mxc_spi-0 probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
mc13892 Rev 2.0 FinVer 2 detected
Initializing regulators for Babbage.
regulator: SW1: 600 <--> 1375 mV
regulator: SW2: 900 <--> 1850 mV
regulator: SW3: 1100 <--> 1850 mV
regulator: SW4: 1100 <--> 1850 mV
regulator: SWBST: 0 mV
regulator: VIOHI: 0 mV
regulator: VPLL: 1050 <--> 1800 mV
regulator: VDIG: 1650 mV
regulator: VSD: 1800 <--> 3150 mV
regulator: VUSB2: 2400 <--> 2775 mV
regulator: VVIDEO: 2775 mV
regulator: VAUDIO: 2300 <--> 3000 mV
regulator: VCAM: 2500 <--> 3000 mV fast normal
regulator: VGEN1: 1200 mV
regulator: VGEN2: 1200 <--> 3150 mV
regulator: VGEN3: 1800 <--> 2900 mV
regulator: VUSB: 0 mV
regulator: GPO1: 0 mV
regulator: GPO2: 0 mV
regulator: GPO3: 0 mV
regulator: GPO4: 0 mV
Device spi1.0 probed
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 6, 458752 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
LPMode driver module loaded
Static Power Management for Freescale i.MX51
PM driver module loaded
sdram autogating driver module loaded
Bus freq driver module loaded
DVI monitor is primary
mxc_dvfs_core_probe
mxc_dvfs_core_probe: failed to get gp regulator
DVFS driver module loaded
i.MXC CPU frequency driver
mxc_cpufreq_driver_init: failed to get gp regulator
mxc_dvfsper_probe: failed to get lp regulator
DVFS PER driver module loaded
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 815
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
fbcvt: 1024x768@60: CVT Name - .786M3
mxc_ipu mxc_ipu: Channel already disabled 9
mxc_ipu mxc_ipu: Channel already uninitialized 9
IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
Console: switching to colour frame buffer device 128x48
fbcvt: 1024x768@60: CVT Name - .786M3
regulator: get() with no identifier
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT
Modules linked in:
CPU: 0 Not tainted (2.6.31.12-rt21 #24)
PC is at rt_spin_lock_slowlock+0x64/0x234
LR is at clk_enable+0x20/0xa8
pc : [<c0314afc>] lr : [<c003918c>] psr: 60000093
sp : d8023e60 ip : f7ed4070 fp : 00000000
r10: c0425058 r9 : 00000000 r8 : 00000000
r7 : c0420120 r6 : c044a998 r5 : 60000013 r4 : c041d740
r3 : 00000000 r2 : d8022000 r1 : d8021a40 r0 : d8022000
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 90004019 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xd80222e8)
Stack: (0xd8023e60 to 0xd8024000)
3e60: 00000000 c0463d24 c0420128 00000000 d8022000 60000013 c044a998 c0420120
3e80: 00000000 c0314b48 c0420128 d8023e9c 00000000 c01b34e8 da80c000 c041d740
3ea0: c041d6fc c0463d80 c0420120 00000000 c0425058 c003918c 00000000 c041d784
3ec0: c041d6fc c0034258 c041cdb0 c041d784 c0420128 c003901c c041d784 c0039194
3ee0: c0420120 c0463d24 c0420128 c01b2108 c03a0ca0 c0420120 d80831b8 00000000
3f00: 00000000 00000001 c0420130 c0420128 c0436ba0 c0436ba0 c0436ba0 00000000
3f20: c043b1e0 c01d7b84 c0436ba0 c01d6dc8 c0420128 c0436ba0 c042015c c01d6ed4
3f40: 00000000 d8023f50 c01d6e74 c01d6208 d80087b0 d80315e8 d8023f54 c0436ba0
3f60: c0436ba0 d80eda60 c0017600 c01d67ac c03a0ca0 c0190ff0 c0436ba0 00000000
3f80: c044a2ac c0017600 00000000 00000000 00000000 c01d71d0 00000000 c002240c
3fa0: 00000000 c044a2ac c0017600 00000000 00000000 c00292ec c042bec8 c0079e78
3fc0: 00000000 32317c20 00000037 00000000 c002240c 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 c00086e8 00000000 c002a914 ffffffff 00000000
[<c0314afc>] (rt_spin_lock_slowlock+0x64/0x234) from [<c003918c>] (clk_enable+0x20/0xa8)
[<c003918c>] (clk_enable+0x20/0xa8) from [<c0034258>] (_clk_tve_enable+0x2c/0x54)
[<c0034258>] (_clk_tve_enable+0x2c/0x54) from [<c003901c>] (__clk_enable+0x54/0x64)
[<c003901c>] (__clk_enable+0x54/0x64) from [<c0039194>] (clk_enable+0x28/0xa8)
[<c0039194>] (clk_enable+0x28/0xa8) from [<c01b2108>] (tve_probe+0x1bc/0x408)
[<c01b2108>] (tve_probe+0x1bc/0x408) from [<c01d7b84>] (platform_drv_probe+0x1c/0x24)
[<c01d7b84>] (platform_drv_probe+0x1c/0x24) from [<c01d6dc8>] (driver_probe_device+0xb8/0x164)
[<c01d6dc8>] (driver_probe_device+0xb8/0x164) from [<c01d6ed4>] (__driver_attach+0x60/0x84)
[<c01d6ed4>] (__driver_attach+0x60/0x84) from [<c01d6208>] (bus_for_each_dev+0x48/0x80)
[<c01d6208>] (bus_for_each_dev+0x48/0x80) from [<c01d67ac>] (bus_add_driver+0xa0/0x224)
[<c01d67ac>] (bus_add_driver+0xa0/0x224) from [<c01d71d0>] (driver_register+0xac/0x134)
[<c01d71d0>] (driver_register+0xac/0x134) from [<c00292ec>] (do_one_initcall+0x5c/0x1a8)
[<c00292ec>] (do_one_initcall+0x5c/0x1a8) from [<c00086e8>] (kernel_init+0x94/0x12c)
[<c00086e8>] (kernel_init+0x94/0x12c) from [<c002a914>] (kernel_thread_exit+0x0/0x8)
Code: e3c33003 e1530001 1a000002 e3a03000 (e5833000)
---[ end trace da227214a82491b7 ]---
note: swapper[1] exited with preempt_count 1
Kernel panic - not syncing: Attempted to kill init!
I'm looking after this problem for a while.
Do you have any experience for this error?
Do you have a proposal how to fix this Kernel panic?
Regards Simon
Andreas Orfanos said:
Dear Simon,
Good to hear that you have managed to build the Linux kernel with Real-Time support successfully
If you need to build distros, one of the ways to do it is to use Yokto project, or openEmbedded.
There is a long learning curve to go in order to start working with those distro build platforms, but it is the mainstream and the way forward.
Please see links below:
http://www.yoctoproject.org/Regards,
Andreas