Hello,
I am trying to port kamikaze to my powerpc based board. It is based on AMCC PPC405EP. For old kernels such as 2.6.19 and 2.6.21, I have used the old OCP and arch/ppc. For 2.6.23 and since, I have used OF, the device tree compiler and arch/powerpc. Using uclibc.org buildroot I have been able to bring up a number of kernel versions in this manner so I know that the kernel and BSP are sound.
Also, a colleague has brought up the board on kamikaze using 2.6.26 kernel, OCP and arch/ppc. I want to get my arch/powerpc BSP working since arch/ppc has been removed from newer kernels.
I am able to build OK, but during boot, it gets as far as finalizing the device tree and then hangs. Below is the output I see...
=> run tsf_boot_openwrt
## Booting image at f5000000 ...
Image Name: Linux-2.6.26.8
Created: 2009-03-12 14:20:12 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1457716 Bytes = 1.4 MB
Load Address: 00400000
Entry Point: 0040044c
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
CPU clock-frequency <- 0x13de4352 (333MHz)
CPU timebase-frequency <- 0x13de4352 (333MHz)
/plb: clock-frequency <- 69f6bc6 (111MHz)
/plb/opb: clock-frequency <- 34fb5e3 (56MHz)
/plb/ebc: clock-frequency <- 34fb5e3 (56MHz)
/plb/opb/serial@ef600300: clock-frequency <- a98ac7 (11MHz)
/plb/opb/serial@ef600400: clock-frequency <- a98ac7 (11MHz)
Memory <- <0x0 0x8000000> (128MB)
ENET0: local-mac-address <- 00:13:4f:ff:fd:00
ENET1: local-mac-address <- 50:00:00:00:90:01zImage starting: loaded at 0x00400000 (sp: 0x07fa1538)
Allocating 0x304028 bytes for kernel ...
gunzipping (0x00000000 <- 0x0040e000:0x0070275c)...done 0x2e15a1 bytesLinux/PowerPC load: root=/dev/mtdblock11 rootfstype=squashfs,jffs2 noinitrd init=/etc/preinit console=ttyS0,115200 ip=192.168.1.99:192.168.1.151::::eth0:off panic=1
Finalizing device tree... flat tree at 0x70f300
Below is the output from a successful boot when built using my uclibc.org buildroot based environment.
U-Boot 1.3.0-rc3 (Feb 4 2008 - 17:08:02)
CPU: AMCC PowerPC 405EP Rev. B at 330 MHz (PLB=110, OPB=55, EBC=55 MHz)
I2C boot EEPROM disabled
Internal PCI arbiter enabled
16 kB I-Cache 16 kB D-Cache
Board: Taihushui - Tranzeo PPC405EP WiFi/WiMAX Platform
I2C: ready
DRAM: 128 MB
DRAM: Quick test ... passed
FLASH: 66 MB
PCI: Bus Dev VenId DevId Class Int
In: serial
Out: serial
Err: serial
Net: ppc_4xx_eth0, ppc_4xx_eth1
Hit any key to stop autoboot: 0
## Booting image at f4000000 ...
Image Name: Linux-2.6.26.8
Created: 2009-03-11 16:55:38 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1444965 Bytes = 1.4 MB
Load Address: 00400000
Entry Point: 00400450
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
CPU clock-frequency <- 0x13de4352 (333MHz)
CPU timebase-frequency <- 0x13de4352 (333MHz)
/plb: clock-frequency <- 69f6bc6 (111MHz)
/plb/opb: clock-frequency <- 34fb5e3 (56MHz)
/plb/ebc: clock-frequency <- 34fb5e3 (56MHz)
/plb/opb/serial@ef600300: clock-frequency <- a98ac7 (11MHz)
/plb/opb/serial@ef600400: clock-frequency <- a98ac7 (11MHz)
Memory <- <0x0 0x8000000> (128MB)
ENET0: local-mac-address <- 00:13:4f:ff:fd:00
ENET1: local-mac-address <- 50:00:00:00:90:01zImage starting: loaded at 0x00400000 (sp: 0x07fa1538)
Allocating 0x303624 bytes for kernel ...
gunzipping (0x00000000 <- 0x0040e000:0x007056ec)...done 0x2e4504 bytesLinux/PowerPC load: root=/dev/mtdblock11 rw rootfstype=jffs2 console=ttyS0,115200 ip=192.168.101.3:192.168.1.151::255.255.255.0::eth0:off panic=1
Finalizing device tree... flat tree at 0x712300
[ 0.000000] Using Taihushui machine description
[ 0.000000] Linux version 2.6.26.8 (darcy@pentomino) (gcc version 4.2.4) #1 PREEMPT Wed Mar 11 09:55:29 PDT 2009
[ 0.000000] console [udbg0] enabled
setup_arch: bootmem
arch: exit
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0 -> 32768
[ 0.000000] Normal 32768 -> 32768
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0 -> 32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: root=/dev/mtdblock11 rw rootfstype=jffs2 console=ttyS0,115200 ip=192.168.101.3:192.168.1.151::255.255.255.0::eth0:off panic=1
[ 0.000000] Preemptible RCU implementation.
[ 0.000000] UIC0 (32 IRQ sources) at DCR 0xc0
[ 0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[ 0.000017] clocksource: timebase mult[c00000] shift[22] registered
[ 0.006738] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.014303] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.042138] Memory: 126676k/131072k available (2836k kernel code, 4232k reserved, 100k data, 121k bss, 124k init)
[ 0.282966] Mount-cache hash table entries: 512
[ 0.291783] net_namespace: 484 bytes
[ 0.296339] NET: Registered protocol family 16
[ 0.304749] PCI host bridge /pci@eec00000 (primary) ranges:
[ 0.310252] MEM 0x0000000080000000..0x000000009fffffff -> 0x0000000080000000
[ 0.317348] IO 0x00000000e8000000..0x00000000e800ffff -> 0x0000000000000000
[ 0.324492] 4xx PCI DMA offset set to 0x00000000
[ 0.329022] PCI: Probing PCI hardware
[ 0.333491] PCI: Hiding 4xx host bridge resources 0000:00:00.0
[ 0.475496] NET: Registered protocol family 2
[ 0.830215] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.838577] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.845819] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.852306] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.858493] TCP reno registered
[ 0.980178] NET: Registered protocol family 1
[ 0.997405] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 1.003981] msgmni has been set to 247
[ 1.007843] io scheduler noop registered
[ 1.011687] io scheduler deadline registered (default)
[ 1.375854] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[ 1.389158] serial8250.0: ttyS0 at MMIO 0xef600300 (irq = 16) is a 16550A
[ 1.395896] console handover: boot [udbg0] -> real [ttyS0]
[ 1.403241] serial8250.0: ttyS1 at MMIO 0xef600400 (irq = 17) is a 16550A
[ 1.413263] ef600300.serial: ttyS0 at MMIO 0xef600300 (irq = 16) is a 16550A
[ 1.422831] ef600400.serial: ttyS1 at MMIO 0xef600400 (irq = 17) is a 16550A
[ 1.448427] brd: module loaded
[ 1.451584] PPC 4xx OCP EMAC driver, version 3.54
[ 1.456991] MAL v1 /plb/mcmal, 4 TX channels, 2 RX channels
[ 1.466937] eth0: EMAC-0 /plb/opb/ethernet@ef600800, MAC 00:13:4f:ff:fd:00
[ 1.473908] eth0: found Generic MII PHY (0x00)
[ 1.482071] eth1: EMAC-1 /plb/opb/ethernet@ef600900, MAC 50:00:00:00:90:01
[ 1.488955] eth1: found Generic MII PHY (0x01)
[ 1.495120] ffe00000.bootflash: Found 1 x16 devices at 0x0 in 16-bit bank
[ 1.502145] Amd/Fujitsu Extended Query Table at 0x0040
[ 1.507397] number of CFI chips: 1
[ 1.510879] cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
[ 1.519207] cmdlinepart partition parsing not available
[ 1.525012] RedBoot partition parsing not available
[ 1.530014] Creating 5 MTD partitions on "ffe00000.bootflash":
[ 1.535860] 0x00000000-0x00190000 : "recover"
[ 1.542777] 0x00190000-0x001a0000 : "uboot.dts"
[ 1.549470] 0x001a0000-0x001b0000 : "uboot.bak"
[ 1.556269] 0x001b0000-0x001c0000 : "uboot.env"
[ 1.563076] 0x001c0000-0x00200000 : "uboot.bin"
[ 1.572888] f4000000.appflash: Found 1 x16 devices at 0x0 in 16-bit bank
[ 1.579618] Amd/Fujitsu Extended Query Table at 0x0040
[ 1.584982] f4000000.appflash: CFI does not contain boot bank location. Assuming top.
[ 1.592884] number of CFI chips: 1
[ 1.596299] cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
[ 1.604578] cmdlinepart partition parsing not available
[ 1.610375] RedBoot partition parsing not available
[ 1.615311] Creating 8 MTD partitions on "f4000000.appflash":
[ 1.621178] 0x00000000-0x00780000 : "fw.a"
[ 1.627495] 0x00780000-0x00f00000 : "fw.b"
[ 1.633842] 0x00f00000-0x00f20000 : "cfg.factory"
[ 1.640774] 0x00f20000-0x00f40000 : "cfg.dat"
[ 1.647303] 0x00f40000-0x00f60000 : "cfg.bak"
[ 1.653939] 0x00f60000-0x01000000 : "logs"
[ 1.660405] 0x01000000-0x03000000 : "rootfs"
[ 1.666936] 0x03000000-0x04000000 : "stuff"
[ 1.673810] i2c /dev entries driver
[ 1.682891] TCP cubic registered
[ 1.686149] NET: Registered protocol family 17
[ 1.690710] NET: Registered protocol family 15
[ 1.695997] RPC: Registered udp transport module.
[ 1.700837] RPC: Registered tcp transport module.
[ 2.211698] eth0: link is down
[ 3.010074] eth0: link is up, 100 FDX, pause enabled
[ 3.220247] IP-Config: Complete:
[ 3.223329] device=eth0, addr=192.168.101.3, mask=255.255.255.0, gw=255.255.255.255,
[ 3.231574] host=192.168.101.3, domain=, nis-domain=(none),
[ 3.237595] bootserver=192.168.1.151, rootserver=192.168.1.151, rootpath=
[ 3.989688] VFS: Mounted root (jffs2 filesystem).
[ 3.994702] Freeing unused kernel memory: 124k initTarget System Framework
tsf login: root
#
#
I have carefully looked at the differences between the Makefiles for ppc40x, ppc44x, magicbox, the files from my colleague and the one I prepared. All appears to be in good order.
For kicks, I even tried removing all the generic 2.6, -> 2.6.26 patches except 951-revert_gcc4_4_fixes.patch which was needed to build the kernel. Still no difference.
I notice that as it generates the cuImage.taihushui and the vmlinux.elf files, I see the following messages...
HOSTCC arch/powerpc/boot/hack-coff
HOSTCC arch/powerpc/boot/mktree
arch/powerpc/boot/dtc -O dtb -o arch/powerpc/boot/taihushui.dtb -b 0 /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/linux-2.6.26.8/arch/powerpc/boot/dts/taihushui.dts
DTC: dts->dtb on file "/home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/linux-2.6.26.8/arch/powerpc/boot/dts/taihushui.dts"
WRAP arch/powerpc/boot/cuImage.taihushui
BFD: ./vmlinux.strip.9752: section .text lma 0xc0000000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .ref.text lma 0xc0210000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .devinit.text lma 0xc02117c0 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .devexit.text lma 0xc0216d28 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .rodata lma 0xc0218000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .pci_fixup lma 0xc028e000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section __ksymtab lma 0xc028e5e8 overlaps previous sections
BFD: ./vmlinux.strip.9752: section __ksymtab_gpl lma 0xc0292a00 overlaps previous sections
BFD: ./vmlinux.strip.9752: section __ksymtab_strings lma 0xc02940a0 overlaps previous sections
BFD: ./vmlinux.strip.9752: section __param lma 0xc02a012c overlaps previous sections
BFD: ./vmlinux.strip.9752: section __ex_table lma 0xc02a1000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section __bug_table lma 0xc02a2390 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .init.text lma 0xc02a6000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .exit.text lma 0xc02bfa1c overlaps previous sections
BFD: ./vmlinux.strip.9752: section .init.data lma 0xc02c040c overlaps previous sections
BFD: ./vmlinux.strip.9752: section .init.setup lma 0xc02c2ec0 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .initcall.init lma 0xc02c3190 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .con_initcall.init lma 0xc02c33a0 overlaps previous sections
BFD: ./vmlinux.strip.9752: section __ftr_fixup lma 0xc02c33a8 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .machine.desc lma 0xc02c4000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .data lma 0xc02c5000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .data.init_task lma 0xc02de000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .data.page_aligned lma 0xc02e0000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .data.cacheline_aligned lma 0xc02e3000 overlaps previous sections
BFD: ./vmlinux.strip.9752: section .data.read_mostly lma 0xc02e30c0 overlaps previous sections
Image Name: Linux-2.6.26.8
Created: Thu Mar 12 07:20:12 2009
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1457716 Bytes = 1423.55 kB = 1.39 MB
Load Address: 0x00400000
Entry Point: 0x0040044C
rm arch/powerpc/boot/taihushui.dtb
Building modules, stage 2.
MODPOST 73 modules
make[5]: Leaving directory `/home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/linux-2.6.26.8'
powerpc-linux-uclibc-objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -R .note.gnu.build-id -S /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/linux-2.6.26.8/vmlinux /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux
powerpc-linux-uclibc-objcopy -R .reginfo -R .note -R .comment -R .mdebug -R .note.gnu.build-id -S /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/linux-2.6.26.8/vmlinux /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .text lma 0xc0000000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .ref.text lma 0xc0210000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .devinit.text lma 0xc02117c0 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .devexit.text lma 0xc0216d28 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .rodata lma 0xc0218000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .pci_fixup lma 0xc028e000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __ksymtab lma 0xc028e5e8 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __ksymtab_gpl lma 0xc0292a00 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __ksymtab_strings lma 0xc02940a0 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __param lma 0xc02a012c overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __ex_table lma 0xc02a1000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __bug_table lma 0xc02a2390 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .init.text lma 0xc02a6000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .exit.text lma 0xc02bfa1c overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .init.data lma 0xc02c040c overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .init.setup lma 0xc02c2ec0 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .initcall.init lma 0xc02c3190 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .con_initcall.init lma 0xc02c33a0 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section __ftr_fixup lma 0xc02c33a8 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .machine.desc lma 0xc02c4000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .data lma 0xc02c5000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .data.init_task lma 0xc02de000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .data.page_aligned lma 0xc02e0000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .data.cacheline_aligned lma 0xc02e3000 overlaps previous sections
BFD: /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/vmlinux.elf: section .data.read_mostly lma 0xc02e30c0 overlaps previous sections
touch /home/darcy/workspace/openwrt-wifi/build_dir/linux-taihushui/linux-2.6.26.8/.image
make -C image compile install TARGET_BUILD=
make[5]: Entering directory `/home/darcy/workspace/openwrt-wifi/target/linux/taihushui/image'
make[5]: `compile' is up to date.
I think there must be something I need to tweak in the toolchain. Does it need to be built differently for arch/powerpc versus arch/ppc. I also don't know why I need the 951-revert_gcc4_4_fixes.patch patch to build the kernel. I don't need it when building in the other environment.
Someone please point me in the right direction.
Regards,
Darcy