My patches are complete, and work!
What follows is a complete, start to finish boot of OpenWRT on the Javelin. A working ramdisk, with some basic tools to verify that i have booted into a working os!
Code:
U-Boot 1.3.4 (NS4600p - 015 - 800MHz) (Jan 27 2011 - 10:21:32)
CPU: AMCC PowerPC 431EXr at 800 MHz (PLB=200, OPB=100, EBC=100 MHz)
Security/Kasumi support
Bootstrap Option F - Boot ROM Location NAND (8 bits), booting from NAND
Internal PCI arbiter disabled
32 kB I-Cache 32 kB D-Cache
Board: NS4600p - PROMISE 4-bay NAS Target Board, 1*PCIe/1*SATA
I2C: ready
DRAM: 256 MB
Enclosure: Load fan configurations from VPD
NAND: 128 MiB
eth0 MAC = 00:01:55:31:00:e4
eth1 MAC = 00:00:00:00:00:00
PCI: Bus Dev VenId DevId Class Int
PCIE1: successfully set as root-complex
01 00 105a 3f20 0104 00
SCSI: Net: ppc_4xx_eth0
Hit Ctrl + C to stop autoboot: 0
Leave clock generator PD mode... OK
Leave net PHY PD mode... OK
Turn on all activity LED power... OK
FAN_SET mode... OK
Turn off all status LED... OK
Turn on disk power... OK
=> <INTERRUPT>
=> <INTERRUPT>
=> nand read.e 1a00000 dtb 3000
NAND read: device 0 offset 0x100000, size 0x3000
12288 bytes read: OK
=> tftp 1200000 uimage
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.87; our IP address is 192.168.1.250
Filename 'uimage'.
Load address: 0x1200000
Loading: #################################################################
#################################################################
#############
done
Bytes transferred = 2097631 (2001df hex)
=> bootm 1200000 - 1a00000
## Booting kernel from Legacy Image at 01200000 ...
Image Name: Linux-3.0.3
Created: 2011-10-09 8:00:32 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2097567 Bytes = 2 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01a00000
Booting using the fdt blob at 0x1a00000
Uncompressing Kernel Image ... OK
Loading Device Tree to 00ffa000, end 00ffffff ... OK
Using Canyonlands machine description
Linux version 3.0.3 (builder@BadIntentions) (gcc version 4.5.4 20110808 (prerelease) (Linaro GCC 4.5-2011.08) ) #2 Sun Oct 9 03:00:31 CDT 2011
Zone PFN ranges:
DMA 0x00000000 -> 0x00010000
Normal empty
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00010000
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: root=/dev/ram rw console=ttyS0,115200
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: 255296k/262144k available (4292k kernel code, 6848k reserved, 140k data, 55k bss, 2096k init)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfde00000..0xfe000000 : consistent mem
* 0xfde00000..0xfde00000 : early ioremap
* 0xd1000000..0xfde00000 : vmalloc & ioremap
NR_IRQS:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
UIC2 (32 IRQ sources) at DCR 0xe0
UIC3 (32 IRQ sources) at DCR 0xf0
clocksource: timebase mult[500000] shift[22] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
256k L2-cache enabled
PCIE0: Port disabled via device-tree
PCIE1: Checking link...
PCIE1: Device detected, waiting for link...
PCIE1: link is up !
PCI host bridge /plb/pciex@d20000000 (primary) ranges:
MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000
MEM 0x0000000f00100000..0x0000000f001fffff -> 0x0000000000000000
IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000
Removing ISA hole at 0x0000000f00100000
4xx PCI DMA offset set to 0x00000000
/plb/pciex@d20000000: Legacy ISA memory support enabled
PCIE1: successfully set as root-complex
PCI: Probing PCI hardware
PCI: Hiding 4xx host bridge resources 0000:80:00.0
pci 0000:80:00.0: PCI bridge to [bus 81-bf]
pci 0000:80:00.0: BAR 8: assigned [mem 0xe80000000-0xe800fffff]
pci 0000:80:00.0: BAR 7: assigned [io 0x1000-0x1fff]
pci 0000:81:00.0: BAR 4: assigned [mem 0xe80000000-0xe8001ffff]
pci 0000:81:00.0: BAR 4: set to [mem 0xe80000000-0xe8001ffff] (PCI address [0x80000000-0x8001ffff])
pci 0000:81:00.0: BAR 5: assigned [mem 0xe80020000-0xe80021fff]
pci 0000:81:00.0: BAR 5: set to [mem 0xe80020000-0xe80021fff] (PCI address [0x80020000-0x80021fff])
pci 0000:81:00.0: BAR 3: assigned [mem 0xe80022000-0xe80022fff]
pci 0000:81:00.0: BAR 3: set to [mem 0xe80022000-0xe80022fff] (PCI address [0x80022000-0x80022fff])
pci 0000:81:00.0: BAR 2: assigned [io 0x1000-0x10ff]
pci 0000:81:00.0: BAR 2: set to [io 0x1000-0x10ff] (PCI address [0x1000-0x10ff])
pci 0000:81:00.0: BAR 0: assigned [io 0x1400-0x147f]
pci 0000:81:00.0: BAR 0: set to [io 0x1400-0x147f] (PCI address [0x1400-0x147f])
pci 0000:80:00.0: PCI bridge to [bus 81-bf]
pci 0000:80:00.0: bridge window [io 0x1000-0x1fff]
pci 0000:80:00.0: bridge window [mem 0xe80000000-0xe800fffff]
pci 0000:80:00.0: bridge window [mem pref disabled]
bio: create slab <bio-0> at 0
Switching to clocksource timebase
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
failed did not find amcc, ppc460ex bcsr node
setting trigger mode 3 for irq 43 failed (0xc0015968)
setting trigger mode 3 for irq 43 failed (0xc0015968)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 498
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a U6_16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a U6_16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
of-flash 4e0000000.nor_flash: do_map_probe() failed
PPC 4xx OCP EMAC driver, version 3.54
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:01:55:31:00:e4
eth0: found Generic MII PHY (0x00)
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
/plb/opb/ethernet@ef600f00: can't find PHY!
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8
Freeing unused kernel memory: 2096k init
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -
Please press Enter to activate this console. eth0: link is up, 1000 FDX
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering forwarding state
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (4021 buckets, 16084 max)
BusyBox v1.18.5 (2011-10-09 02:54:39 CDT) 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
ATTITUDE ADJUSTMENT (bleeding edge, r28387) ----------
* 1/4 oz Vodka Pour all ingredients into mixing
* 1/4 oz Gin tin with ice, strain into glass.
* 1/4 oz Amaretto
* 1/4 oz Triple sec
* 1/4 oz Peach schnapps
* 1/4 oz Sour mix
* 1 splash Cranberry juice
-----------------------------------------------------
root@OpenWrt:/# uname -a
Linux OpenWrt 3.0.3 #2 Sun Oct 9 03:00:31 CDT 2011 ppc GNU/Linux
root@OpenWrt:/#
I have verified networking has basic functionality (must disable the bridge first)
After configuring DNS server, the OpenWRT'd Javelin can talk to the outside world.
Installing packages can be achived by moving overlay into ramdisk. (Temporary Only)
USB causes a crash.
SATA does not yet work (neither the promise controller nor the onboard controller AKA esata)
Up next is booting from USB (kernel and everything). This shouldnt be TOO hard, given that the Javelin U-Boot bootloader apparently is okay with USB.
If you want to boot my kernel + ramdisk, right now you will need a serial cable as described in my Console Access post, and a tftp server setup (tftpd32 is free). it is not yet for the faint of heart. Pretty soon, hopefully all you will need is a Serial cable and a USB stick for a permanent install, with failsafe back to the built in OS.