[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ARM kernel cross compilation issues for iMX53



On Mon, Mar 26, 2012 at 10:55:12PM -0400, Lennart Sorensen wrote:
> On the other hand using the ubuntu 2.6.35 kernel like this works fine:
> 
> MX53LOCO U-Boot > setenv bootargs root=/dev/sda1 rw rootwait video=mxcdi0fb:RGB24,1080P60
> MX53LOCO U-Boot > set bootargs ${bootargs} root=/dev/sda1 rw rootwait
> MX53LOCO U-Boot > sata init
> AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
> flags: ncq stag pm led clo only pmp pio slum part 
> SATA Device Info:
> S/N:             5SV6CHMY
> Product model number: ST9160310AS
> Firmware version: 0303
> Capacity: 312581808 sectors
> MX53LOCO U-Boot > mmc read 0 ${loadaddr} 0x800 0x1800         
> 
> MMC read: dev # 0, block # 1887436800, count 2048 ... MMC: block number 0x70800800 exceeds max(0x75c000)
> 0 blocks read: ERROR
> MX53LOCO U-Boot > mmc read ${loadaddr} 0x800 0x1800;   
> 
> MMC read: dev # 0, block # 2048, count 6144 ... 6144 blocks read: OK
> MX53LOCO U-Boot > bootm
> ## Booting kernel from Legacy Image at 70800000 ...
>    Image Name:   Linux-2.6.35.3-744-g27fdf7b
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    2967420 Bytes = 2.8 MiB
>    Load Address: 70008000
>    Entry Point:  70008000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> OK
> 
> Starting kernel ...
> 
> Linux version 2.6.35.3-744-g27fdf7b (r80115@bluebell) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #1 PREEMPT Thu Jan 27 15:10:16 CST 2011
> CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
> [snip]
> 
> I wonder if the fact the load address of the uImage is slightly different
> could be a problem.  Hmm.  I seem to have used 70800000 rather than
> 70008000.

So it turns out that yes that matters.  After re making my uImage with
0x70008000 rather than 0x70800000 I get this:

MX53LOCO U-Boot > setenv bootargs root=/dev/sda1 rw rootwait video=mxcdi0fb:RGB24,1080P60 console=ttymxc0,${baudrate}
MX53LOCO U-Boot > printenv
baudrate=115200
bootargs=root=/dev/sda1 rw rootwait video=mxcdi0fb:RGB24,1080P60 console=ttymxc0,115200
bootcmd=if mmc rescan ${mmcdev}; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netbooi
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
ethact=FEC
loadaddr=0x70800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm
mmcdev=0
mmcpart=2
mmcroot=/dev/mmcblk0p3 rw
mmcrootfstype=ext3 rootwait
netargs=setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; dhcp ${uimage}; bootm
script=boot.scr
stderr=serial
stdin=serial
stdout=serial
uimage=uImage

Environment size: 1032/8188 bytes
MX53LOCO U-Boot > sata init
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part 
SATA Device Info:
S/N:             5SV6CHMY
Product model number: ST9160310AS
Firmware version: 0303
Capacity: 312581808 sectors
MX53LOCO U-Boot > ext2load sata 0:1 0x70800000 /boot/uImage-3.2.0-2-mx5
Loading file "/boot/uImage-3.2.0-2-mx5" from sata device 0:1 (hda1)
1979872 bytes read
MX53LOCO U-Boot > ext2load sata 0:1 0x71000000 /boot/uInitrd-3.2.0-2-mx5
Loading file "/boot/uInitrd-3.2.0-2-mx5" from sata device 0:1 (hda1)
4312970 bytes read
MX53LOCO U-Boot > bootm 0x70800000 0x71000000
## Booting kernel from Legacy Image at 70800000 ...
   Image Name:   uImage
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1979808 Bytes = 1.9 MiB
   Load Address: 70008000
   Entry Point:  70008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 71000000 ...
   Image Name:   uImage
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    4312906 Bytes = 4.1 MiB
   Load Address: 71000000
   Entry Point:  71000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.0-2-mx5 (Debian 3.2.12-1) (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-1) ) #1 Tue Mar 20 21:42:11 UTC 2012
[    0.000000] CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Freescale MX53 LOCO Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259072
[    0.000000] Kernel command line: root=/dev/sda1 rw rootwait video=mxcdi0fb:RGB24,1080P60 console=ttymxc0,115200
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB 512MB = 1024MB total
[    0.000000] Memory: 1031332k/1031332k available, 17244k reserved, 524288K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xf4000000   ( 312 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03879a8   (3583 kB)
[    0.000000]       .init : 0xc0388000 - 0xc03a8000   ( 128 kB)
[    0.000000]       .data : 0xc03a8000 - 0xc03e2840   ( 235 kB)
[    0.000000]        .bss : 0xc03e2864 - 0xc04481c4   ( 407 kB)
[    0.000000] NR_IRQS:400
[    0.000000] TrustZone Interrupt Controller (TZIC) initialized
[    0.000000] CPU identified as i.MX53, silicon rev 2.1
[    0.000000] sched_clock: 32 bits at 55MHz, resolution 18ns, wraps every 77386ms
[    0.000000] Console: colour dummy device 80x30
[    0.000306] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    0.040166] pid_max: default: 32768 minimum: 301
[    0.040359] Security Framework initialized
[    0.040449] Mount-cache hash table entries: 512
[    0.041036] Initializing cgroup subsys cpuacct
[    0.041089] Initializing cgroup subsys memory
[    0.041132] Initializing cgroup subsys devices
[    0.041148] Initializing cgroup subsys freezer
[    0.041158] Initializing cgroup subsys net_cls
[    0.041168] Initializing cgroup subsys blkio
[    0.041206] Initializing cgroup subsys perf_event
[    0.041362] CPU: Testing write buffer coherency: ok
[    0.041717] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
[    0.043614] devtmpfs: initialized
[    0.047007] print_constraints: dummy: 
[    0.047440] NET: Registered protocol family 16
[    0.071543] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.075262] bio: create slab <bio-0> at 0
[    0.076590] usbcore: registered new interface driver usbfs
[    0.076748] usbcore: registered new interface driver hub
[    0.077083] usbcore: registered new device driver usb
[    0.078140] Switching to clocksource mxc_timer1
[    0.112269] NET: Registered protocol family 2
[    0.112672] IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.113846] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[    0.114972] TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
[    0.115611] TCP: Hash tables configured (established 65536 bind 65536)
[    0.115624] TCP reno registered
[    0.115642] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.115666] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.116223] NET: Registered protocol family 1
[    0.116635] Unpacking initramfs...
[    0.656992] Freeing initrd memory: 4208K
[    0.658151] audit: initializing netlink socket (disabled)
[    0.658344] type=2000 audit(0.650:1): initialized
[    0.690700] highmem bounce pool size: 64 pages
[    0.691759] VFS: Disk quotas dquot_6.5.2
[    0.691911] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.692218] msgmni has been set to 998
[    0.693739] alg: No test for stdrng (krng)
[    0.694059] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.694087] io scheduler noop registered
[    0.694097] io scheduler deadline registered
[    0.694196] io scheduler cfq registered (default)
[    0.700278] imx-sdma imx35-sdma: initialized
[    0.701056] Serial: IMX driver
[    0.701301] imx21-uart.0: ttymxc0 at MMIO 0x53fbc000 (irq = 31) is a IMX
[    1.115976] console [ttymxc0] enabled
[    1.120600] FEC Ethernet Driver
[    1.145601] fec_enet_mii_bus: probed
[    1.150921] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.158407] mousedev: PS/2 mouse device common for all mice
[    1.165066] imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0)
[    1.174908] usbcore: registered new interface driver usbhid
[    1.180587] usbhid: USB HID core driver
[    1.185351] TCP cubic registered
[    1.188679] NET: Registered protocol family 17
[    1.193196] Registering the dns_resolver key type
[    1.198011] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
[    1.206944] registered taskstats version 1
[    1.211247] /build/buildd-linux-2.6_3.2.12-1-armhf-qF7KeU/linux-2.6-3.2.12/debian/build/source_armhf_none/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    1.225797] Initializing network drop monitor service
[    1.231665] Freeing init memory: 128K
[    1.238811] Kernel panic - not syncing: Attempted to kill init!
[    1.244809] [<c0012fd0>] (unwind_backtrace+0x0/0xe0) from [<c027a3d0>] (panic+0x50/0x18c)
[    1.253113] [<c027a3d0>] (panic+0x50/0x18c) from [<c0029b5c>] (do_exit+0xa0/0x688)
[    1.260760] [<c0029b5c>] (do_exit+0xa0/0x688) from [<c002a3cc>] (do_group_exit+0x74/0xa0)
[    1.269004] [<c002a3cc>] (do_group_exit+0x74/0xa0) from [<c00365f4>] (get_signal_to_deliver+0x464/0x4ac)
[    1.278556] [<c00365f4>] (get_signal_to_deliver+0x464/0x4ac) from [<c000fe34>] (do_signal+0xb0/0x574)
[    1.287804] [<c000fe34>] (do_signal+0xb0/0x574) from [<c0010800>] (do_notify_resume+0x18/0x5c)
[    1.296477] [<c0010800>] (do_notify_resume+0x18/0x5c) from [<c000d618>] (work_pending+0x24/0x28)

So at least the Debian kernel now gives me output.

If I don't provide the initrd, then it gets as far as:

[    0.620024] TCP cubic registered
[    0.623276] NET: Registered protocol family 17
[    0.627785] Registering the dns_resolver key type
[    0.632672] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
[    0.641604] registered taskstats version 1
[    0.645817] /build/buildd-linux-2.6_3.2.12-1-armhf-qF7KeU/linux-2.6-3.2.12/debian/build/source_armhf_none/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    0.660407] Initializing network drop monitor service
[    0.666095] Waiting for root device /dev/sda1...

Maybe I have the initrd image at a bad address too.

-- 
Len Sorensen


Reply to: