Hey ramponis,
I'm certainly not in a hurry to get this working and I can wait for your return. After digging into the reference redboot I realized it lacked support for my flash chip, the Atmel AT49BV322A. After I added it to the list of supported chips the flash was finally recognized. Before I could do anything useful I had to erase the whole flash using jtag.
Here is the log of a typical startup and some sample commands:
RedBoot startup
Could not find valid MAC address for enet1. Using default!
Ethernet eth0: MAC address 00:03:7f:**:**:**
IP: 192.168.0.50/255.255.255.0, Gateway: 192.168.0.1
Default server: 192.168.0.1, DNS server IP: 0.0.0.0
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 01:08:19, Jun 16 2007
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x80000400-0x81000000, 0x80000400-0x80fe1000 available
FLASH: 0xbfc00000 - 0xbffe0000, 62 blocks of 0x00010000 bytes each.
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0xBFC00000 0xBFC00000 0x00030000 0x00000000
RedBoot config 0xBFFC0000 0xBFFC0000 0x00001000 0x00000000
FIS directory 0xBFFD0000 0xBFFD0000 0x00010000 0x00000000
RedBoot> fconfig -l
Run script at boot: false
Use BOOTP for network configuration: false
Gateway IP address: 192.168.0.1
Local IP address: 192.168.0.50
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.0.1
Console baud rate: 9600
DNS server IP address: 0.0.0.0
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
RedBoot> load -r -v -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
Raw file loaded 0x80041000-0x80100fff, assumed entry at 0x80041000
RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin
... Erase from 0xbfe70000-0xbff30000: ............
... Program from 0x80041000-0x80101000 at 0xbfe70000: ............
... Erase from 0xbffd0000-0xbffe0000:
Error erasing FIS directory at 0xbffd0000: Device/region is write-protected
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0xBFC00000 0xBFC00000 0x00030000 0x00000000
RedBoot config 0xBFFC0000 0xBFFC0000 0x00001000 0x00000000
FIS directory 0xBFFD0000 0xBFFD0000 0x00010000 0x00000000
RedBoot>
As the above log show, I could not create a new fis partition since the FIS directory was locked. But why was it locked?
Cheers,
ramcheck
Followup #1: I have since figured out that my memory chip does not support memory unlocking and thus I disabled locking and rebuild redboot. Now I can create partitions:
RedBoot> load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
Raw file loaded 0x80041000-0x80100fff, assumed entry at 0x80041000
RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
... Erase from 0xbfc30000-0xbfcf0000: ............
... Program from 0x80041000-0x80101000 at 0xbfc30000: ............
... Erase from 0xbffd0000-0xbffe0000: .
... Program from 0x80fef000-0x80fff000 at 0xbffd0000: .
RedBoot> load -r -v -b 0x80041000 openwrt-atheros-2.6-root.squashfs
Raw file loaded 0x80041000-0x80160fff, assumed entry at 0x80041000
RedBoot> fis create -b 0x80041000 -l 0x11ffff -e 0 rootfs
... Erase from 0xbfcf0000-0xbfe0ffff: ..................
... Program from 0x80041000-0x80160fff at 0xbfcf0000: ..................
... Erase from 0xbffd0000-0xbffe0000: .
... Program from 0x80fef000-0x80fff000 at 0xbffd0000: .
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0xBFC00000 0xBFC00000 0x00030000 0x00000000
RedBoot config 0xBFFC0000 0xBFFC0000 0x00001000 0x00000000
FIS directory 0xBFFD0000 0xBFFD0000 0x00010000 0x00000000
vmlinux.bin.l7 0xBFC30000 0x80041000 0x000C0000 0x80041000
rootfs 0xBFCF0000 0x80041000 0x0011FFFF 0x00000000
RedBoot>
However, when I try to load and run vmlinux, redboot crashes and goes into gdb. Sic. No more clues at the moment, but I guess I'm making steady progress.
Followup #2: Yeah, I know. redboot has no support for lzma compression and in order to use gz compression I must add the -d switch. Now everything is fine. I have successfully compiled, flashed and run both redboot and openwrt. Here is the result:
RedBoot startup
Ethernet eth0: MAC address 00:11:95:**:**:**
IP: 192.168.0.50/255.255.255.0, Gateway: 192.168.0.1
Default server: 192.168.0.1, DNS server IP: 0.0.0.0
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 04:19:18, Jun 16 2007
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x80000400-0x81000000, 0x80000400-0x80fe1000 available
FLASH: 0xbfc00000 - 0xbffe0000, 62 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot> fis load -d vmlinux.bin.gz
Image loaded from 0x80041000-0x80292085
RedBoot> exec
Now booting linux kernel:
Base address 0x80080000 Entry 0x80041000
Cmdline :
Linux version 2.6.21.1 (waldeck@hal64) (gcc version 4.1.2) #1 Sat Jun 16 14:39:48 BRT 2007
CPU revision is: 0001800a
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Built 1 zonelists. Total pages: 4064
Kernel command line: console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
Using 90.000 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13496k/16384k available (1963k kernel code, 2888k reserved, 292k data, 116k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Radio config found at offset 0x10000(0x100)
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0xbc000003 (irq = 37) is a 16550A
eth0: Dropping NETIF_F_SG since no checksum feature.
eth0: Atheros AR231x: 00:11:95:**:**:**, irq 4
physmap platform flash device: 00400000 at 1e000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0041
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
Searching for RedBoot partition table in physmap-flash.0 at offset 0x3d0000
5 RedBoot partitions found on MTD device physmap-flash.0
Creating 5 MTD partitions on "physmap-flash.0":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x00130000 : "vmlinux.bin.gz"
0x00130000-0x002d0000 : "rootfs"
0x003c0000-0x003c1000 : "RedBoot config"
0x003d0000-0x003e0000 : "FIS directory"
nf_conntrack version 0.5.0 (128 buckets, 1024 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing unused kernel memory: 116k freed
Warning: unable to open an initial console.
eth0: Configuring MAC for full duplex
Algorithmics/MIPS FPU Emulator v1.5
- preinit -
- init -
init started: BusyBox v1.4.2 (2007-06-16 12:46:52 BRT) multi-call binary
Please press Enter to activate this console. eth0: Configuring MAC for full duplex
device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
wlan: 0.8.4.2 (svn r2377)
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.30.13 (AR5212, AR5312, RF2316, TX_DESC_SWAP)
ath_rate_minstrel: 1.2 (svn r2377)
Minstrel automatic rate control algorithm.
Look around rate set to 10%
EWMA rolloff level set to 75%
Max Segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_ahb: 0.9.4.5 (svn r2377)
wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)
psirq 0, desc: 80273040, depth: 1, count: 0, unhandled: 0
->handle_irq(): 80087f54, ->chip(): 80267c80, ->action(): 00000000
IRQ_DISABLED set
unexpected IRQ # 0
BusyBox v1.4.2 (2007-06-16 12:46:52 BRT) 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, r7424) -------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
root@OpenWrt:/# psirq 0, desc: 80273040, depth: 1, count: 0, unhandled: 0
->handle_irq(): 80087f54, ->chip(): 80267c80, ->action(): 00000000
IRQ_DISABLED set
unexpected IRQ # 0
PID Uid VmSize Stat Command
1 root 392 S init
2 root SWN [ksoftirqd/0]
3 root SW< [events/0]
4 root SW< [khelper]
5 root SW< [kthread]
17 root SW< [kblockd/0]
28 root SW [pdflush]
29 root SW [pdflush]
30 root SW< [kswapd0]
31 root SW< [aio/0]
41 root SW [mtdblockd]
149 root SWN [jffs2_gcd_mtd2]
155 root 396 S logger -s -p 6 -t
157 root 476 S /bin/ash --login
361 root 336 S syslogd -C16
364 root 276 S klogd
372 root 228 S /sbin/hotplug2 --persistent --max-children 1
918 root 324 S crond -c /etc/crontabs
951 root 168 S httpd -p 80 -h /www -r OpenWrt
957 root 200 S telnetd -l /bin/login
1019 nobody 348 S dnsmasq -F 192.168.1.100,192.168.1.250,255.255.255.0,
1050 root 372 R ps
root@OpenWrt:/#
At last, my DWL-2100AP can run openwrt. Steady progress indeed!
(Last edited by ramcheck on 17 Jun 2007, 00:09)