After read that OpenWrt support Cambria board I try to run OpenWrt on my Intel KIXRP435 reference platform.
I work with trunk revision 12987 and patch from Ticket #4051.
I have a kernel panic and I open new Ticket #4111.
After further investigations, seems that the problem is due to /bin/init application.
I try to use initramfs and I modified /etc/preinit as follow:
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
. /etc/diag.shfailsafe_ip() {
ifconfig $ifname 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up
}failsafe() {
[ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
failsafe_ip
netmsg 192.168.1.255 "Entering Failsafe!"
telnetd -l /bin/login <> /dev/null 2>&1
}
lock /tmp/.failsafe
ash --login
}mount proc /proc -t proc
mount sysfs /sys -t sysfssize=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>l)?mt-l:s}' /proc/meminfo)
mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777if grep devfs /proc/filesystems > /dev/null; then
mount devfs /dev -t devfs
M0=/dev/pty/m0
M1=/dev/pty/m1
HOTPLUG=/sbin/hotplug-callelif [ -x /sbin/hotplug2 ]; then
mount -t tmpfs tmpfs /dev -o size=512K
mknod /dev/console c 5 1
/sbin/hotplug2 --coldplug --set-rules-file /etc/hotplug2-init.rules
/sbin/hotplug2 --no-coldplug --persistent --set-rules-file /etc/hotplug2-init.rules &
M0=/dev/ptmx
M1=/dev/ptmx
HOTPLUG=elif [ -x /sbin/udevd ]; then
mount -n -t tmpfs -o mode=0755 udev /dev
/sbin/udevd --daemon
/sbin/udevtrigger
/sbin/udevsettle
M0=/dev/pty/ptmx
M1=/dev/pty/ptmx
HOTPLUG=
fimkdir -p /dev/pts /dev/shm
mount devpts /dev/pts -t devpts# the shell really doesn't like having stdin/out closed
# that's why we use /dev/pty/m0 and m1 as replacement
# for /dev/console if there's no serial console available
dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && {
M0=/dev/console
M1=/dev/console
}exec <$M0 >$M1 2>&0
echo "- preinit -"
echo "Press CTRL-C for failsafe"
trap 'FAILSAFE=true' INT
trap 'FAILSAFE=true' USR1
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
echo "- trace 2 -"
set_state preinit
echo "- trace 3 -"
echo "$HOTPLUG" > /proc/sys/kernel/hotplug
echo "- trace 4 -"
eval ${FAILSAFE:+failsafe}
echo "- trace 5 -"
lock -w /tmp/.failsafe
echo "- trace 6 -"#if [ -z "$INITRAMFS" ]; then
echo "- trace 7 -"
mount_root
echo "- trace 8 -"
[ -f /sysupgrade.tgz ] && {
echo "- config restore -"
cd /
mv sysupgrade.tgz /tmp
tar xzf /tmp/sysupgrade.tgz
rm -f /tmp/sysupgrade.tgz
sync
}echo "- init -"
# exec /sbin/init
echo " STUB: Calling ash instead of /bin/init "
ash --login
#fi
The console output is:
+
Trying NPE-C...success. Using NPE-C with PHY 1.
... waiting for BOOTP information
Ethernet lan: MAC address 00:1a:2a:87:ef:ec
IP: 192.168.1.23/255.255.255.0, Gateway: 192.168.1.1
Default server: 192.168.1.36RedBoot(tm) bootstrap and debug environment [ROM]
Red Hat certified release, version 2.04 - built 15:42:38, Mar 21 2007Platform: KIXRP435 Development Platform (IXP43X) BE
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.RAM: 0x00000000-0x08000000, [0x00030c58-0x07fc1000] available
FLASH: 0x50000000 - 0x51000000, 128 blocks of 0x00020000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
^C
RedBoot> load -r -v -b %{FREEMEMLO} openwrt-kixrp435-zImage
Using default protocol (TFTP)
/
Raw file loaded 0x00031000-0x001b28cb, assumed entry at 0x00031000
RedBoot> exec
Using base address 0x00031000 and length 0x001818cc
Uncompressing Linux................................................................................... done, booting the kernel.
Linux version 2.6.26.5 (antonello@AntoPC001) (gcc version 4.1.2) #9 Wed Oct 22 11:28:07 CEST 2008
CPU: XScale-IXP43x Family [69054041] revision 1 (ARMv5TE), cr=000039ff
Machine: Intel KIXRP435 Reference Platform
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit
PID hash table entries: 512 (order: 9, 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: 127232KB available (1788K code, 140K data, 688K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 480 bytes
NET: Registered protocol family 16
IXP4xx: Using 16MiB expansion bus window size
PCI: IXP4xx is host
PCI: IXP4xx Using direct access for memory space
PCI: bus0: Fast back to back transfers enabled
dmabounce: registered device 0000:00:01.0 on pci bus
PCI: Failed to allocate mem resource #2:4000000@4c000000 for 0000:00:01.0
PCI: Failed to allocate mem resource #1:200000@4c000000 for 0000:00:01.0
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
NET: Registered protocol family 1
IXP4xx Queue Manager initialized.
NPE-B: reset: npe_debug_instr(): timeout
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 248
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xc8000000 (irq = 15) is a XScale
console [ttyS0] enabled
eth0: MII PHY 1 on NPE-C
eth1: MII PHY 5 on NPE-A
IXP4XX-Flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
Searching for RedBoot partition table in IXP4XX-Flash.0 at offset 0xfe0000
3 RedBoot partitions found on MTD device IXP4XX-Flash.0
Creating 3 MTD partitions on "IXP4XX-Flash.0":
0x00000000-0x00080000 : "RedBoot"
0x00fe0000-0x00fff000 : "FIS directory"
0x00fff000-0x01000000 : "RedBoot config"
i2c /dev entries driver
i2c-gpio i2c-gpio.0: using pins 7 (SDA) and 6 (SCL)
IXP4xx Watchdog Timer: heartbeat 60 sec
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
XScale DSP coprocessor detected.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Freeing init memory: 688K
- preinit -
Press CTRL-C for failsafe
- trace 2 -
- trace 3 -
- trace 4 -
- trace 5 -
- trace 6 -
- trace 7 -
- trace 8 -
- init -
STUB: Calling ash instead of /bin/initBusyBox v1.11.2 (2008-10-20 10:40:28 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands._______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (bleeding edge, r12987) -------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
root@(none):# mknod /dev/mtd2 c 90 4
root@(none):# fconfig -l -d /dev/mtd2
Low verbosity messages are printed.
boot_script: TRUE
boot_script_data: load -r -v -b %{FREEMEMLO} openwrt-kixrp435-zImage
execboot_script_timeout: 2
bootp: TRUE
bootp_my_gateway_ip: 0.0.0.0
bootp_my_ip: 0.0.0.0
bootp_my_ip_mask: 0.0.0.0
bootp_server_ip: 192.168.1.36
console_baud_rate: 115200
gdb_port: 9000
info_console_force: FALSE
info_console_number: 0
net_debug: FALSE
net_device: i82559_eth0
npe_lan_esa: 00:1a:2a:87:ef:ec
npe_wan_esa: 00:1a:2a:87:ef:ed
utopia: FALSE
root@(none):# ifconfig eth0 hw ether 00:1a:2a:87:ef:ec
root@(none):# ifconfig eth0 192.168.1.77
firmware: requesting NPE-C <---------------------- require more time: about 2 minutes
root@(none):# ifconfig
root@(none):#
Has someone experienced similar problems?