[meta-ti] Stumped. Can't get 2.6.37 TI kernel to boot when built with toolchain from denzil or Linaro gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/
Brian Hutchinson
b.hutchman at gmail.com
Fri Aug 16 08:12:59 PDT 2013
Another update (any my feeble cry for ideas is at the very bottom after the
kernel boot dump). I applied the patches Khem mentioned. The patch
applied but I studied the code and there are big differences between 2.6.37
for ti816x vs the 3.8 for beagle. There looked to be more in the patch
than was able to be applied so I didn't have any confidence this would fix
anything after I noticed that and when I tried to boot the kernel the hung
boot confirmed my suspicion. At this point I'm using the toolchains
outside of OE (meta-toolchain from denzil branch and Linaro 4.8) to make
life a bit simpler. Here is what my memset.S looks like after applying the
two patches:
/*
* linux/arch/arm/lib/memset.S
*
* Copyright (C) 1995-2000 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ASM optimised string functions
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
.text
.align 5
ENTRY(memset)
ands r3, r0, #3 @ 1 unaligned?
mov ip, r0 @ preserve r0 as return value
bne 6f @ 1
/*
* we know that the pointer in ip is aligned to a word boundary.
*/
1: orr r1, r1, r1, lsl #8
orr r1, r1, r1, lsl #16
mov r3, r1
cmp r2, #16
blt 4f
#if ! CALGN(1)+0
/*
* We need 2 extra registers for this loop - use r8 and the LR
*/
stmfd sp!, {r8, lr}
mov r8, r1
mov lr, r1
2: subs r2, r2, #64
stmgeia ip!, {r1, r3, r8, lr} @ 64 bytes at a time.
stmgeia ip!, {r1, r3, r8, lr}
stmgeia ip!, {r1, r3, r8, lr}
stmgeia ip!, {r1, r3, r8, lr}
bgt 2b
ldmeqfd sp!, {r8, pc} @ Now <64 bytes to go.
/*
* No need to correct the count; we're only testing bits from now on
*/
tst r2, #32
stmneia ip!, {r1, r3, r8, lr}
stmneia ip!, {r1, r3, r8, lr}
tst r2, #16
stmneia ip!, {r1, r3, r8, lr}
ldmfd sp!, {r8, lr}
#else
/*
* This version aligns the destination pointer in order to write
* whole cache lines at once.
*/
stmfd sp!, {r4-r8, lr}
mov r4, r1
mov r5, r1
mov r6, r1
mov r7, r1
mov r8, r1
mov lr, r1
cmp r2, #96
tstgt ip, #31
ble 3f
and r8, ip, #31
rsb r8, r8, #32
sub r2, r2, r8
movs r8, r8, lsl #(32 - 4)
stmcsia ip!, {r4, r5, r6, r7}
stmmiia ip!, {r4, r5}
tst r8, #(1 << 30)
mov r8, r1
strne r1, [ip], #4
3: subs r2, r2, #64
stmgeia ip!, {r1, r3-r8, lr}
stmgeia ip!, {r1, r3-r8, lr}
bgt 3b
ldmeqfd sp!, {r4-r8, pc}
tst r2, #32
stmneia ip!, {r1, r3-r8, lr}
tst r2, #16
stmneia ip!, {r4-r7}
ldmfd sp!, {r4-r8, lr}
#endif
4: tst r2, #8
stmneia ip!, {r1, r3}
tst r2, #4
strne r1, [ip], #4
/*
* When we get here, we've got less than 4 bytes to zero. We
* may have an unaligned pointer as well.
*/
5: tst r2, #2
strneb r1, [ip], #1
strneb r1, [ip], #1
tst r2, #1
strneb r1, [ip], #1
mov pc, lr
6: subs r2, r2, #4 @ 1 do we have enough
blt 5b @ 1 bytes to align with?
cmp r3, #2 @ 1
strltb r1, [ip], #1 @ 1
strleb r1, [ip], #1 @ 1
strb r1, [ip], #1 @ 1
add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
b 1b
ENDPROC(memset)
So to recap, the TI 2.6.37 kernel freezes after displaying (kernel being
tftp'd in):
Bytes transferred = 2349296 (23d8f0 hex)
## Booting kernel from Legacy Image at 83000000 ...
Image Name: Linux-2.6.37+
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2349232 Bytes = 2.2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
The toolchain built by bitbake meta-toolchain in denzil (doesn't have the
-c populate_sdk feature) boots farther but later dies. The full dump of
that boot is:
Bytes transferred = 2343056 (23c090 hex)
## Booting kernel from Legacy Image at 83000000 ...
Image Name: Linux-2.6.37+
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2342992 Bytes = 2.2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.37+ (hutch at Strider) (gcc version 4.6.4 20120303
(prerelease) (GCC) ) #1 Fri Aug 16 10:10:53 EDT 2013
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ti8168evm
reserved size = 0 at 0x0
Memory policy: ECC disabled, Data cache writeback
OMAP chip is TI8168 2.0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 42164
Kernel command line: mem=166M console=ttyO2,115200n8 noinitrd
ip=192.168.1.1:192.168.1.5:192.168.1.0:255.255.255.0:255.255.255.1:eth0:off
eth=84:7e:40:d6:a7:5e root=/dev/nfs nfsroot=192.168.1.5:
/home/hutch/ione_wcs_yocto_test/trunk/arm/rootfs
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 166MB = 166MB total
Memory: 163428k/163428k available, 6556k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xca800000 - 0xf8000000 ( 728 MB)
lowmem : 0xc0000000 - 0xca600000 ( 166 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0037000 ( 188 kB)
.text : 0xc0037000 - 0xc046a000 (4300 kB)
.data : 0xc046a000 - 0xc04a6100 ( 241 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:407
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
GPMC revision 6.0
Trying to install interrupt handler for IRQ400
Trying to install interrupt handler for IRQ401
Trying to install interrupt handler for IRQ402
Trying to install interrupt handler for IRQ403
Trying to install interrupt handler for IRQ404
Trying to install interrupt handler for IRQ405
Trying to install interrupt handler for IRQ406
Trying to install type control for IRQ407
Trying to set irq flags for IRQ407
OMAP clockevent source: GPTIMER1 at 27000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
omap_voltage_early_init: voltage driver support not added
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
omap_voltage_add_dev: VDD specified does not exist!
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
configure pinmux for RS485. etc
omap_mux_init: Add partition: #1: core, flags: 0
_omap_mux_get_by_name: Could not find signal i2c2_scl.i2c2_scl
_omap_mux_get_by_name: Could not find signal i2c2_sda.i2c2_sda
registered NOR flash on CS1 (second NOR)
registered ti816x_sram_procfs_bootcount device
dsa: initialize distributed switch architecture (dsa) marvell (mv)
ethernet switch
dsa: dsa_on_flag=1
pm_dbg_init: only OMAP3 supported
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
USBSS revision 4ea20809
registerd cppi-dma Intr @ IRQ 17
Cppi41 Init Done
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz
i2c i2c-2: Invalid 7-bit I2C address 0x00
i2c i2c-2: Can't create device at 0x00
Switching to clocksource gp timer
musb-hdrc: version 6.0, host, debug=0
musb-hdrc musb-hdrc.0: dma type: dma-cppi41
MUSB controller-0 revision 4ea20800
musb-hdrc musb-hdrc.0: MUSB HDRC host driver
musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 2.6.37+ musb-hcd
usb usb1: SerialNumber: musb-hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc.0: USB Host mode controller at ca822000 using DMA, IRQ
18
musb-hdrc musb-hdrc.1: dma type: dma-cppi41
MUSB controller-1 revision 4ea20800
musb-hdrc musb-hdrc.1: MUSB HDRC host driver
musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 2.6.37+ musb-hcd
usb usb2: SerialNumber: musb-hdrc.1
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
musb-hdrc musb-hdrc.1: USB Host mode controller at ca826800 using DMA, IRQ
19
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
omap-iommu omap-iommu.0: ducati registered
omap-iommu omap-iommu.1: sys registered
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 319
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
console [ttyO2] enabled
brd: module loaded
loop: module loaded
physmap platform flash device: 08000000 at 08000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID
0x000001 Chip ID 0x002801
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.5.
Enabling Spansion 65nm mode, writesize = 512 bytes
number of CFI chips: 1
RedBoot partition parsing not available
Using physmap partition information
Creating 8 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot_env1"
0x000000060000-0x000000080000 : "u-boot_env2"
0x000000080000-0x0000000a0000 : "pad1"
0x0000000a0000-0x0000004a0000 : "kernel_1"
0x0000004a0000-0x0000036a0000 : "rootfs_1"
0x0000036a0000-0x0000068a0000 : "appfs_1"
0x0000068a0000-0x000007b60000 : "overlay_1"
physmap platform flash device: 08000000 at 10000000
physmap-flash.1: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID
0x000001 Chip ID 0x002801
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.5.
Enabling Spansion 65nm mode, writesize = 512 bytes
number of CFI chips: 1
RedBoot partition parsing not available
Using physmap partition information
Creating 8 MTD partitions on "physmap-flash.1":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot_env1"
0x000000060000-0x000000080000 : "u-boot_env2"
0x000000080000-0x0000000a0000 : "pad2"
0x0000000a0000-0x0000004a0000 : "kernel_2"
0x0000004a0000-0x0000036a0000 : "rootfs_2"
0x0000036a0000-0x0000068a0000 : "appfs_2"
0x0000068a0000-0x000007b60000 : "overlay_2"
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffffc
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
PPP generic driver version 2.4.2
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver uas
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-onetouch
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
mice: PS/2 mouse device common for all mice
usb 1-1: new high speed USB device using musb-hdrc and address 2
rtc-ds1307 1-0068: rtc core: registered ds1337 as rtc0
i2c /dev entries driver
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
Unable to handle kernel NULL pointer dereference at virtual address 00000002
pgd = c0004000
[00000002] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0 Not tainted (2.6.37+ #1)
PC is at strcmp+0xc/0x40
LR is at omap_mbox_get+0x3c/0x1d0
pc : [<c01dfb34>] lr : [<c0061db8>] psr: a0000013
sp : ca023f20 ip : ca023f30 fp : ca023f2c
r10: 00000000 r9 : 00000000 r8 : 00000000
r7 : 00000013 r6 : c040ce09 r5 : c04a05d8 r4 : c04815c8
r3 : 00000064 r2 : 00000076 r1 : c040ce09 r0 : 00000002
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 80004019 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xca0222e8)
Stack: (0xca023f20 to 0xca024000)
3f20: ca023f54 ca023f30 c0061db8 c01dfb34 c02ba2ec c01dfb34 00000000
c04a057c
3f40: c04a0578 00000000 ca023f74 ca023f58 c02bde3c c0061d88 00000000
00000000
3f60: c002b480 c00251fc ca023fa4 ca023f78 c0025238 c02bdcb8 ca022000
c002b480
3f80: c00251fc 00000000 00000013 00000000 00000000 00000000 ca023fdc
ca023fa8
3fa0: c00373b8 c0025208 ca023fc4 00000196 c048d6dc c006adfc c002b480
c002b510
3fc0: c006adfc 00000013 00000000 00000000 ca023ff4 ca023fe0 c0008d44
c0037304
3fe0: 00000000 c0008ca4 00000000 ca023ff8 c006adfc c0008cb0 eda485b5
b186e796
Backtrace:
[<c01dfb28>] (strcmp+0x0/0x40) from [<c0061db8>] (omap_mbox_get+0x3c/0x1d0)
[<c0061d7c>] (omap_mbox_get+0x0/0x1d0) from [<c02bde3c>]
(notify_shm_drv_setup+0x190/0x268)
r6:00000000 r5:c04a0578 r4:c04a057c
[<c02bdcac>] (notify_shm_drv_setup+0x0/0x268) from [<c0025238>]
(notify_init+0x3c/0x2b0)
r5:c00251fc r4:c002b480
[<c00251fc>] (notify_init+0x0/0x2b0) from [<c00373b8>]
(do_one_initcall+0xc0/0x194)
[<c00372f8>] (do_one_initcall+0x0/0x194) from [<c0008d44>]
(kernel_init+0xa0/0x14c)
r9:00000000 r8:00000000 r7:00000013 r6:c006adfc r5:c002b510
r4:c002b480
[<c0008ca4>] (kernel_init+0x0/0x14c) from [<c006adfc>] (do_exit+0x0/0x5dc)
r5:c0008ca4 r4:00000000
Code: e89da800 e1a0c00d e92dd800 e24cb004 (e4d03001)
---[ end trace d65e423459d53e0a ]---
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c0044d10>] (dump_backtrace+0x0/0x110) from [<c03567d8>]
(dump_stack+0x18/0x1c)
r6:ca022000 r5:0000000b r4:c04a6898 r3:c048329c
[<c03567c0>] (dump_stack+0x0/0x1c) from [<c03569c0>] (panic+0x5c/0x178)
[<c0356964>] (panic+0x0/0x178) from [<c006ae64>] (do_exit+0x68/0x5dc)
r3:c04848a4 r2:ca023cf8 r1:00000001 r0:c040f24d
r7:ca020000
[<c006adfc>] (do_exit+0x0/0x5dc) from [<c0045180>] (die+0x2ac/0x2e8)
r7:00000000
[<c0044ed4>] (die+0x0/0x2e8) from [<c0356838>]
(__do_kernel_fault.part.3+0x5c/0x7c)
[<c03567dc>] (__do_kernel_fault.part.3+0x0/0x7c) from [<c035cf04>]
(do_page_fault+0x1f8/0x214)
r7:00000000 r3:ca023ed8
[<c035cd0c>] (do_page_fault+0x0/0x214) from [<c035cf44>]
(do_translation_fault+0x24/0xa8)
[<c035cf20>] (do_translation_fault+0x0/0xa8) from [<c00371f4>]
(do_DataAbort+0x3c/0xa0)
r7:ca023ed8 r6:00000002 r5:c046e560 r4:00000005
[<c00371b8>] (do_DataAbort+0x0/0xa0) from [<c035afec>]
(__dabt_svc+0x4c/0x60)
Exception stack(0xca023ed8 to 0xca023f20)
3ec0: 00000002
c040ce09
3ee0: 00000076 00000064 c04815c8 c04a05d8 c040ce09 00000013 00000000
00000000
3f00: 00000000 ca023f2c ca023f30 ca023f20 c0061db8 c01dfb34 a0000013
ffffffff
r7:00000013 r6:c040ce09 r5:ca023f0c r4:ffffffff
[<c01dfb28>] (strcmp+0x0/0x40) from [<c0061db8>] (omap_mbox_get+0x3c/0x1d0)
[<c0061d7c>] (omap_mbox_get+0x0/0x1d0) from [<c02bde3c>]
(notify_shm_drv_setup+0x190/0x268)
r6:00000000 r5:c04a0578 r4:c04a057c
[<c02bdcac>] (notify_shm_drv_setup+0x0/0x268) from [<c0025238>]
(notify_init+0x3c/0x2b0)
r5:c00251fc r4:c002b480
[<c00251fc>] (notify_init+0x0/0x2b0) from [<c00373b8>]
(do_one_initcall+0xc0/0x194)
[<c00372f8>] (do_one_initcall+0x0/0x194) from [<c0008d44>]
(kernel_init+0xa0/0x14c)
r9:00000000 r8:00000000 r7:00000013 r6:c006adfc r5:c002b510
r4:c002b480
[<c0008ca4>] (kernel_init+0x0/0x14c) from [<c006adfc>] (do_exit+0x0/0x5dc)
r5:c0008ca4 r4:00000000
I've read other messages that mailbox (mbox in the trace walk above) could
be a problem but we need to use syslink so I haven't tired turning it off
since that isn't an option.
In thinking of my options, I initially thought I could maybe get by with
continuing to use our u-boot/kernel build with CSL and just use a Cortex A8
based machine with OE Core support (beagleboard or beaglebone) and generate
the rootfs that I need that way since the ABI's should be compatible. But
with the kernels being so far apart, now I'm thinking that is probably a
bad idea because the new packages are probably using new system calls
(built against new kernel headers) the old kernel doesn't have. The
core-image-minimal rootfs does come up when I try using a new OE Core
rootfs with my old kernel but I noticed a strange message from udev and
then noticed that it looked like one of my udev rules wasn't working to
mount one of our usb based NAND flashes and I think that is probably
because of the differences in the ABI's I mentioned.
So I really don't know where to go from here. I can't be stuck with OE
Classic forever. Our customers are demanding current packages so I need OE
Core. I guess it is possible to make poky or arago use and old toolchain
to build new OE Core packages so the ABI's all match but I've never tried
to go down that path. I would also have make the rootfs packages be built
against my old kernel headers and I'm not too sure about how to go about
that either.
Any words of wisdom?
Regards,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-ti/attachments/20130816/7a08c534/attachment.html>
More information about the meta-ti
mailing list