OpenWrt Forum Archive

Topic: OpenWRT on RouterBoard 433UAH

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I've just acquired a RouterBoard 433UAH and was hoping to install OpenWRT.  Using either the svn trunk or branches/8.09 builds I can produce a network bootable kernel/rootfs, however I am unable to access or write OpenWRT to the NAND.

This board has a 512 MB NAND chip instead of the 64 MB one on the RB433AH (at least according to the Mikrotik spec sheets).

If served up via TFTP the prebuilt Kamikaze AR71xx vmlinux.elf kernel will boot but panics when unable to mount a root file system.

I tried following the NAND erase procedure from the 433AH Wiki Page without success.

Startup messages:

RouterBOOT booter 2.20

RouterBoard 433UAH

CPU frequency: 680 MHz
  Memory size: 128 MB

Press any key within 2 seconds to enter setup..
kernel not found
trying dhcp protocol...... OK
resolved mac address 00:00:27:32:AF:AA
Gateway: 192.168.1.1
transfer started ............................. transfer ok, time=3.55s
setting up elf image... OK
jumping to kernel code
Linux version 2.6.26.5 (user@debian) (gcc version 4.1.2) #2 Sat May 2 03:07:02 CDT 2009
console [early0] enabled
CPU revision is: 00019374 (MIPS 24K)
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal          0 ->    32768
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->    32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00010600
Readback ErrCtl register=00010600
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: 125540k/131072k available (1786k kernel code, 5424k reserved, 320k data, 1704k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
net_namespace: 484 bytes
NET: Registered protocol family 16
MIPS: machine is Generic AR71xx board
registering PCI controller with io_map_base unset
PCI: no irq found for pin1@0000:00:14.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
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.
yaffs May  2 2009 02:15:19 Installing. 
msgmni has been set to 245
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console handover: boot [early0] -> real [ttyS0]
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: invalid speed specified
ag71xx: probe of ag71xx.0 failed with error -22
eth0: Atheros AG71xx at 0xba000000, irq 5
INFTL: inftlcore.c $Revision: 1.19 $, inftlmount.c $Revision: 1.18 $
SSFDC read-only Flash Translation layer
block2mtd: version $Revision: 1.30 $
Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: pm25lv512 (64 Kbytes)
rfd_ftl: no RFD magic found in 'spi0.0'
ftl_cs: FTL header not found.
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP vegas 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>
Freeing unused kernel memory: 1704k freed
Algorithmics/MIPS FPU Emulator v1.5
[sighandler]: No more events to be processed, quitting.
[cleanup]: Waiting for children.
[cleanup]: All children terminated.
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
wlan: trunk
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 2008-10-02 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, DFS, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: trunk
PCI: Enabling device 0000:00:14.0 (0000 -> 0002)
wifi%d: request_irq failed



BusyBox v1.11.2 (2009-05-02 01:58:18 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
 KAMIKAZE (8.09, r15549) ----------------------------
  * 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:/#

Under the branches/8.09 build I see a single MTD entry (and the single corresponding /dev/mtdblock0 device):

root@OpenWrt:/# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00010000 00001000 "spi0.0"
root@OpenWrt:/#

Under the trunk build I see no /dev/mtdblock* devices or entries in the /proc/mtd file.

Attempting to mount the /dev/mtdblock0 device results in:

root@OpenWrt:/# mount /dev/mtdblock0 /mnt
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs: MTD device is not NAND it's type 3
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs: MTD device is not NAND it's type 3
mount: mounting /dev/mtdblock0 on /mnt failed: Invalid argument
root@OpenWrt:/#

I'd greatly appreciate any suggestions on how to proceed.  I've got some free time and am more than happy to test builds or contribute in any way I can.

Thanks,
-Justin

Hi Justin,

I just got an RB433-AH board and I am trying to accomplish the same thing as you.
Can you help me get where you got? How did you configure the network bootable kernel/rootfs?

Did you configure boot from dhcp in RouterBOOT? Any chance you can share the /etc/dhcpd.conf file (or relevant portion of it). Any other configuration on RouterBOOT?

As to how to write to NAND, it seems that someone has written a script for this purpose "wget2nand". After you netboot openWRT, you can use it to write to NAND Flash. Check this out.
If you google it, it will give a link to the script. It is timing out for me now but I accessed it before.

Eli

tcsh2002 wrote:

I just got an RB433-AH board and I am trying to accomplish the same thing as you.
Can you help me get where you got? How did you configure the network bootable kernel/rootfs?

Did you configure boot from dhcp in RouterBOOT? Any chance you can share the /etc/dhcpd.conf file (or relevant portion of it). Any other configuration on RouterBOOT?

Eli

To get the bootable kernel I built from an SVN checkout of /openwrt/branches/8.09

In

make menuconfig

I set the Target System to Atheros AR71xx, Target Profile to Default, Target Images to ramdisk and then compiled the images.

In RouterBOOT the only changes were to set the boot protocol to DHCP (p -> 2) and the boot device to ethernet (o -> e).

I have a WRT54GL that is currently acting as my router (the 433UAH is its replacement) and it doesn't have storage space for the image to be served over TFTP, so my setup ended up being slightly convoluted.  I have a Debian system running under Virtual Box that I did the build on and setup the TFTP server.  I was having trouble getting the init scripts for dnsmasq to correctly read the UCI configuration variables for so I ended up launching dnsmasq manually on the WRT54GL:

/usr/sbin/dnsmasq --dhcp-boot=pxelinux,tftp.prv,192.168.1.222 -K -D -y -Z -b -E -H /etc/hosts.local -s prv -S /lan/ -l /tmp/dhcp.leases -r /tmp/resolv.conf.auto --dhcp-range=lan,192.168.1.100,192.168.1.250,255.255.255.0,12h -2 eth0.1

On the TFTP server I have pxelinux symlinked to openwrt-ar71xx-vmlinux-initramfs.elf from the build.

Network booting is a bit off topic for this thread but if you shoot me an email I'd be happy to help you get your DHCP server setup (if you haven't already).

tcsh2002 wrote:

As to how to write to NAND, it seems that someone has written a script for this purpose "wget2nand". After you netboot openWRT, you can use it to write to NAND Flash. Check this out.
If you google it, it will give a link to the script. It is timing out for me now but I accessed it before.

I had seen this script before but I don't think that I'm at a point where I can use it.  The RB433UAH has a different NAND chip than the 433 and 433AH, it doesn't seem to be correctly detected. 

Just FYI, I am able to boot using the image from wifi.ozo.com (in the link you provided): http://wifi.ozo.com/airo/openwrt/firmwa … tramfs.elf  but I don't see any of the mtd or mtdblock devices.

-Justin

Thanks Justin, you saved me a lot of frustration. I can netboot now.

I have the 433AH board. The board spec. says it should have 64 MB of NAND Flash. OpenWRT is seeing 512 MB: "NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit". The chip on the board: HY27UT084G2A is supposed to be 4 Gig MLC NAND Flash! I could not find the datasheet online, this is the closest I found:
http://brandonjebon.en.made-in-china.co … Flash.html

I am wondering if you have the same flash chip. I am able to see mtdblock under /dev.

Having said that, I was initially interested in the UAH board you have because of the USB but the list of supported platforms did not include it (see below).

o Atheros AP-81 reference board
o Atheros AP-83 reference board
o Atheros PB-42 reference board
o AzureWave AW-NR580
o Compex WP543
o D-Link DIR-615 rev C1/rev C2
o Mikrotik RB-411/A/AH
o Mikrotik RB-450
o Mikrotik RB-433/AH
o NetGear WNR2000
o Planex MZK-W04NU
o Ubiquiti RouterStation
o Ubiquiti LS-SR71
o TP-LINK TL-WR841ND v3.0
o TP-LINK TL-WR941ND v2.0/v2.2
o TRENDNET TEW-632BRP rev 1.0/rev 1.1
o TRENDNET TEW-652BRP

tcsh2002 wrote:

I have the 433AH board. The board spec. says it should have 64 MB of NAND Flash. OpenWRT is seeing 512 MB: "NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit". The chip on the board: HY27UT084G2A is supposed to be 4 Gig MLC NAND Flash! I could not find the datasheet online, this is the closest I found:
http://brandonjebon.en.made-in-china.co … Flash.html

I am wondering if you have the same flash chip. I am able to see mtdblock under /dev.

Eli,

Indeed, that is the same chip that is on my board.  Maybe a 433AH Rev. B?

Is that information about the NAND chip in your startup messages?  I'm not getting anything like that.  Are you using a verbose boot option or such?

There is a distinct possibility that I messed something up while tinkering with build options, I'm currently rebuilding from a clean copy of branches/8.09 and will try that.

Thanks,

-Justin

Hi Justin,

Yes the message I posted is from the startup. I have not built an image myself, I used the initramfs image you pointed in the link (latest from wifi.ozo url).

If my memory is correct, you have to use trunk (not kamikaze branch) to build for ar71xx (even though they have support for these boards in the kamikaze release). I am not completely sure but I remember reading this in openWRT forum. It did not make sense to me but it might be worth it for you to try trunk as well.

If I ever build and test from trunk, I will let you know what I find. Good luck.

Eli

The RB433UAH has a board name of "433U" in prom, unlike the RB433/AH which just used "433".  Similarly the RB450G has a board name of "450G". 

Attached are simple patches that allow both these new boards to be detected and identified properly.

--- openwrt-rb433uah/trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c.orig    2009-05-15 14:30:29.000000000 -0400
+++ openwrt-rb433uah/trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c    2009-05-16 07:39:59.000000000 -0400
@@ -72,7 +72,7 @@
     }
 };
 
-#if 0
+#if 1
 /*
  * SPI device support is experimental
  */
@@ -84,7 +84,8 @@
     {
         .bus_num    = 0,
         .chip_select    = 0,
-        .max_speed_hz    = 25000000,
+        .max_speed_hz    = 33000000,
+        .mode        = SPI_MODE_0,
         .modalias    = "m25p80",
         .platform_data    = &rb4xx_flash_data,
     }
@@ -98,13 +99,15 @@
     {
         .bus_num    = 0,
         .chip_select    = 0,
-        .max_speed_hz    = 25000000,
+        .max_speed_hz    = 33000000,
+        .mode        = SPI_MODE_0,
         .modalias    = "m25p80",
-        .platform_data    = &rb433_flash_data,
+        .platform_data    = &rb4xx_flash_data,
     }, {
         .bus_num    = 0,
         .chip_select    = 2,
-        .max_speed_hz    = 25000000,
+        .max_speed_hz    = 10000000,
+        .mode        = SPI_MODE_0,
         .modalias    = "mmc_spi",
         .platform_data    = &rb433_mmc_data,
     }
@@ -206,6 +209,31 @@
 
 MIPS_MACHINE(AR71XX_MACH_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup);
 
+static void __init rb433u_setup(void)
+{
+    rb4xx_generic_setup();
+    rb433_add_device_spi();
+
+    ar71xx_add_device_mdio(0xffffffe9);
+
+    ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+    ar71xx_eth0_data.phy_mask = 0x00000006;
+    ar71xx_eth0_data.speed = SPEED_100;
+    ar71xx_eth0_data.duplex = DUPLEX_FULL;
+
+    ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+    ar71xx_eth1_data.phy_mask = 0x00000010;
+
+    ar71xx_add_device_eth(1);
+    ar71xx_add_device_eth(0);
+
+    ar71xx_add_device_usb();
+
+    ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
+}
+
+MIPS_MACHINE(AR71XX_MACH_RB_433U, "MikroTik RouterBOARD 433UAH", rb433u_setup);
+
 static void __init rb450_setup(void)
 {
     rb4xx_generic_setup();
@@ -227,6 +255,27 @@
 
 MIPS_MACHINE(AR71XX_MACH_RB_450, "MikroTik RouterBOARD 450", rb450_setup);
 
+static void __init rb450g_setup(void)
+{
+    rb4xx_generic_setup();
+    rb4xx_add_device_spi();
+
+    ar71xx_add_device_mdio(0xffffffe0);
+
+    ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+    ar71xx_eth0_data.phy_mask = 0x0000000f;
+    ar71xx_eth0_data.speed = SPEED_1000;
+    ar71xx_eth0_data.duplex = DUPLEX_FULL;
+
+    ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+    ar71xx_eth1_data.phy_mask = 0x00000010;
+
+    ar71xx_add_device_eth(1);
+    ar71xx_add_device_eth(0);
+}
+
+MIPS_MACHINE(AR71XX_MACH_RB_450G, "MikroTik RouterBOARD 450G", rb450g_setup);
+
 static void __init rb493_setup(void)
 {
     rb4xx_generic_setup();
--- openwrt-rb433uah/trunk/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c.orig    2009-05-15 14:26:59.000000000 -0400
+++ openwrt-rb433uah/trunk/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c    2009-05-15 14:27:37.000000000 -0400
@@ -39,9 +39,15 @@
         .name        = "433",
         .mach_type    = AR71XX_MACH_RB_433,
     }, {
+        .name        = "433U",
+        .mach_type    = AR71XX_MACH_RB_433U,
+    }, {
         .name        = "450",
         .mach_type    = AR71XX_MACH_RB_450,
     }, {
+        .name        = "450G",
+        .mach_type    = AR71XX_MACH_RB_450G,
+    }, {
         .name        = "493",
         .mach_type    = AR71XX_MACH_RB_493,
     }, {
--- openwrt-rb433uah/trunk/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h.orig    2009-05-15 14:28:16.000000000 -0400
+++ openwrt-rb433uah/trunk/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h    2009-05-15 14:29:39.000000000 -0400
@@ -131,6 +131,8 @@
 #define AR71XX_MACH_UBNT_RSPRO    17    /* Ubiquiti RouterStation Pro */
 #define AR71XX_MACH_AP81    18    /* Atheros AP81 */
 #define AR71XX_MACH_WRT400N    19    /* Linksys WRT400N */
+#define AR71XX_MACH_RB_433U    20    /* MikroTik RouterBOARD 433UAH */
+#define AR71XX_MACH_RB_450G    21    /* MikroTik RouterBOARD 450G */
 
 /*
  * PLL block

Here's the output of booting a RB433UAH with these patches:

RouterBOOT booter 2.20

RouterBoard 433UAH

CPU frequency: 680 MHz
  Memory size: 128 MB

Press any key within 2 seconds to enter setup..
trying dhcp protocol... OK
resolved mac address 00:0C:29:EE:76:D1
Gateway: 192.168.1.100
transfer started .............................**********... transfer ok, time=3.53s
setting up elf image... OK
jumping to kernel code
Linux version 2.6.28.10 (ggallowa@fedora.local) (gcc version 4.1.2) #1 Wed May 20 09:22:21 EDT 2009
console [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7161 rev 2 (id:0xaa), CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00008000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00020920
Readback ErrCtl register=00020920
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: 125184k/131072k available (1954k kernel code, 5720k reserved, 340k data, 1808k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
Mount-cache hash table entries: 512
net_namespace: 480 bytes
NET: Registered protocol family 16
MIPS: machine is MikroTik RouterBOARD 433UAH
registering PCI controller with io_map_base unset
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
PCI: mapping irq 32 to pin1@0000:00:12IP 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
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.
yaffs May 20 2009 09:15:57 Installing. 
msgmni has been set to 244
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console handover: boot [early0] -> real [ttyS0]
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xba000000, irq 5
eth1: Atheros AG71xx at 0xb9000000, irq 4
NAND flash driver for RouterBoard 4xx series version 0.1.10
NAND SPI clock 28333 kHz (AHB 170000 kHz / 6)
FLASH SPI clock 28333 kHz (AHB 170000 kHz / 6)
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 931 at 0x0e8c0000
Bad eraseblock 1755 at 0x1b6c0000
Creating 3 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00040000 : "booter"
0x00040000-0x00400000 : "kernel"
0x00400000-0x20000000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: error occured while reading from "NAND 512MiB 3,3V 8-bit"
Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: pm25lv512 (0 Kbytes)
Searching for RedBoot partition table in spi0.0 at offset 0xfffffffe
Atheros AR71xx hardware watchdog driver version 0.1.0
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>
Freeing unused kernel memory: 1808k freed
Algorithmics/MIPS FPU Emulator v1.5
[sighandler]: No more events to be processed, quitting.
[cleanup]: Waiting for children.
[cleanup]: All children terminated.
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. device eth0 entered promiscuous mode
eth1: link up (100Mbps/Full duplex)
eth1: link down
eth1: link up (100Mbps/Full duplex)
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
wlan: trunk
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 2009-05-08 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: trunk
PCI: Enabling device 0000:00:12.0 (0000 -> 0002)
Atheros HAL provided by OpenWrt, DD-WRT and MakSat Technologies
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
ath_pci: wifi0: Atheros 5212: mem=0x10000000, irq=32
gpio-buttons driver version 0.1.1
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
eth0: link up (100Mbps/Full duplex)
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state



BusyBox v1.11.3 (2009-05-20 08:29:12 EDT) 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, r15848) -------------------
  * 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:/#

The NAND flash partitions seem to be detected properly during the boot, but don't look correct in the /proc:

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00040000 "booter"
mtd1: 003c0000 00040000 "kernel"
mtd2: 1fc00000 00040000 "rootfs"
mtd3: 00000002 00000002 "spi0.0"

I don't know anything about mtd yet.  Can anyone point me in the right direction?

If I leave the experimental SPI support disabled (change the #if 1 back to #if 0 in the patch above), the strange mtd3 partition goes away and everything looks normal.

Does anyone know if those erase sizes are correct?

Now I'm able to erase, mount, and copy kernel and rootfs.  But I'm getting an out of space error on the kernel partition:

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00040000 "booter"
mtd1: 003c0000 00040000 "kernel"
mtd2: 1fc00000 00040000 "rootfs"
root@OpenWrt:/# mtd erase kernel
Unlocking kernel ...
Erasing kernel ...
root@OpenWrt:/# mtd erase rootfs
Unlocking rootfs ...
Erasing rootfs ...
nand_erase: attempt to erase a bad block at page 0x0002d600
Failed to erase block on rootfs at 0x16700000
root@OpenWrt:/# mkdir /tmp/kernel /tmp/rootfs
root@OpenWrt:/# mount /dev/mtdblock1 /tmp/kernel 
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs: auto selecting yaffs2
yaffs_read_super: isCheckpointed 0
root@OpenWrt:/# mount /dev/mtdblock2 /tmp/rootfs 
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 1437 is bad
yaffs_read_super: isCheckpointed 0
root@OpenWrt:/# cd /tmp
root@OpenWrt:/tmp# wget http://192.168.1.100/openwrt-ar71xx-vmlinux.elf
Connecting to 192.168.1.100 (192.168.1.100:80)
openwrt-ar71xx-vmlin 100% |*******************************|  2497k --:--:-- ETA
root@OpenWrt:/tmp# wget http://192.168.1.100/openwrt-ar71xx-rootfs.tgz 
Connecting to 192.168.1.100 (192.168.1.100:80)
openwrt-ar71xx-rootf 100% |*******************************|  1687k --:--:-- ETA
root@OpenWrt:/tmp# df -k
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                    63580      4244     59336   7% /tmp
tmpfs                      512         0       512   0% /dev
/dev/mtdblock1            3840      2304      1536  60% /tmp/kernel
/dev/mtdblock2          520192      2560    517632   0% /tmp/rootfs
root@OpenWrt:/tmp# tar -C /tmp/rootfs -xzf openwrt-ar71xx-rootfs.tgz 
root@OpenWrt:/tmp# ls -F /tmp/rootfs 
bin/        jffs/       mnt/        root/       tmp/        www/
dev/        lib/        proc/       sbin/       usr/
etc/        lost+found/ rom/        sys/        var@
root@OpenWrt:/tmp# cp openwrt-ar71xx-vmlinux.elf /tmp/kernel/kernel
cp: write error: No space left on device
ggal625 wrote:

Now I'm able to erase, mount, and copy kernel and rootfs.  But I'm getting an out of space error on the kernel partition:

Just FYI, I was able to write to erase, mount and copy to the kernel and rootfs partitions with SPI enabled, but I ran into the same out of space problem.

Thank you for the patch!

-Justin

Hi

Any ideas on how to create an image which will boot from within metaRouter on the RB433?

Thanks

ggal625 wrote:

...But I'm getting an out of space error on the kernel partition:

/dev/mtdblock1            3840      2304      1536  60% /tmp/kernel
/dev/mtdblock2          520192      2560    517632   0% /tmp/rootfs
root@OpenWrt:/tmp# cp openwrt-ar71xx-vmlinux.elf /tmp/kernel/kernel
cp: write error: No space left on device

You have only 1536k free and kernel size is 2497k
try rm old kernel first

rm  /tmp/kernel/kernel
cp openwrt-ar71xx-vmlinux.elf /tmp/kernel/kernel

Below is a bootlog netbooting the RB433UAH with the patch from post #7 ported to trunk revision 16499. You can't use the microSD slot since the mmc_spi driver isn't able to share the bus. This is a show stopper for me to erase the NAND flash with wget2nand to put OpenWrt on the flash. I may try it again when SPI can share the bus and stick to stock RouterOS.

RouterBOOT booter 2.20

RouterBoard 433UAH

CPU frequency: 680 MHz
  Memory size: 128 MB

Press any key within 2 seconds to enter setup.

RouterBOOT-2.20
What do you want to configure?
   d - boot delay
   k - boot key
   s - serial console
   o - boot device
   u - cpu mode
   f - cpu frequency
   r - reset booter configuration
   e - format nand
   g - upgrade firmware
   i - board info
   p - boot protocol
   t - do memory testing
   x - exit setup
your choice: o - boot device

Select boot device:
   e - boot over Ethernet
 * n - boot from NAND, if fail then Ethernet
   1 - boot Ethernet once, then NAND
   o - boot from NAND only
   b - boot chosen device
your choice: 1 - boot Ethernet once, then NAND

RouterBOOT-2.20
What do you want to configure?
   d - boot delay
   k - boot key
   s - serial console
   o - boot device
   u - cpu mode
   f - cpu frequency
   r - reset booter configuration
   e - format nand
   g - upgrade firmware
   i - board info
   p - boot protocol
   t - do memory testing
   x - exit setup
your choice: o - boot device

Select boot device:
   e - boot over Ethernet
   n - boot from NAND, if fail then Ethernet
 * 1 - boot Ethernet once, then NAND
   o - boot from NAND only
   b - boot chosen device
your choice: b - boot chosen device
trying bootp protocol.... OK
Got IP address: 192.168.1.196
resolved mac address 00:23:54:8C:58:CF
Gateway: 192.168.1.1
transfer started .................................................. transfer ok, time=4.10s
setting up elf image... OK
jumping to kernel code
Linux version 2.6.28.10 (dogge@localhost) (gcc version 4.1.2) #1 Thu Jun 18 12:08:35 CEST 2009
console [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7161 rev 2 (id:0xaa), CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00008000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000100
Readback ErrCtl register=00000100
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: 122864k/131072k available (1836k kernel code, 8040k reserved, 338k data, 4248k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
Mount-cache hash table entries: 512
net_namespace: 480 bytes
NET: Registered protocol family 16
MIPS: machine is MikroTik RouterBOARD 433UAH
registering PCI controller with io_map_base unset
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
PCI: mapping irq 32 to pin1@0000:00:12.0
PCI: mapping irq 33 to pin1@0000:00:13.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
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.
yaffs Jun 18 2009 12:05:22 Installing. 
msgmni has been set to 240
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console handover: boot [early0] -> real [ttyS0]
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xba000000, irq 5
eth1: Atheros AG71xx at 0xb9000000, irq 4
NAND flash driver for RouterBoard 4xx series version 0.1.10
NAND SPI clock 28333 kHz (AHB 170000 kHz / 6)
FLASH SPI clock 28333 kHz (AHB 170000 kHz / 6)
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1 at 0x00040000
Bad eraseblock 2 at 0x00080000
Bad eraseblock 3 at 0x000c0000
Bad eraseblock 4 at 0x00100000
Bad eraseblock 5 at 0x00140000
Bad eraseblock 6 at 0x00180000
Bad eraseblock 7 at 0x001c0000
Bad eraseblock 8 at 0x00200000
Bad eraseblock 9 at 0x00240000
Bad eraseblock 10 at 0x00280000
Bad eraseblock 11 at 0x002c0000
Bad eraseblock 16 at 0x00400000
Bad eraseblock 17 at 0x00440000
Bad eraseblock 18 at 0x00480000
Bad eraseblock 19 at 0x004c0000
Bad eraseblock 20 at 0x00500000
Bad eraseblock 21 at 0x00540000
Bad eraseblock 22 at 0x00580000
Bad eraseblock 23 at 0x005c0000
Bad eraseblock 24 at 0x00600000
Bad eraseblock 25 at 0x00640000
Bad eraseblock 26 at 0x00680000
Bad eraseblock 27 at 0x006c0000
Bad eraseblock 28 at 0x00700000
Bad eraseblock 29 at 0x00740000
Bad eraseblock 30 at 0x00780000
Bad eraseblock 31 at 0x007c0000
Bad eraseblock 32 at 0x00800000
Bad eraseblock 33 at 0x00840000
Bad eraseblock 34 at 0x00880000
Bad eraseblock 35 at 0x008c0000
Bad eraseblock 36 at 0x00900000
Bad eraseblock 37 at 0x00940000
Bad eraseblock 38 at 0x00980000
Bad eraseblock 39 at 0x009c0000
Bad eraseblock 40 at 0x00a00000
Bad eraseblock 41 at 0x00a40000
Bad eraseblock 42 at 0x00a80000
Bad eraseblock 43 at 0x00ac0000
Bad eraseblock 44 at 0x00b00000
Bad eraseblock 45 at 0x00b40000
Bad eraseblock 46 at 0x00b80000
Bad eraseblock 47 at 0x00bc0000
Bad eraseblock 48 at 0x00c00000
Bad eraseblock 49 at 0x00c40000
Bad eraseblock 50 at 0x00c80000
Bad eraseblock 51 at 0x00cc0000
Bad eraseblock 52 at 0x00d00000
Bad eraseblock 53 at 0x00d40000
Bad eraseblock 54 at 0x00d80000
Bad eraseblock 55 at 0x00dc0000
Bad eraseblock 56 at 0x00e00000
Bad eraseblock 57 at 0x00e40000
Bad eraseblock 58 at 0x00e80000
Bad eraseblock 59 at 0x00ec0000
Bad eraseblock 60 at 0x00f00000
Bad eraseblock 61 at 0x00f40000
Bad eraseblock 62 at 0x00f80000
Bad eraseblock 63 at 0x00fc0000
Bad eraseblock 64 at 0x01000000
Bad eraseblock 65 at 0x01040000
Bad eraseblock 66 at 0x01080000
Bad eraseblock 67 at 0x010c0000
Bad eraseblock 68 at 0x01100000
Bad eraseblock 69 at 0x01140000
Bad eraseblock 70 at 0x01180000
Bad eraseblock 71 at 0x011c0000
Bad eraseblock 72 at 0x01200000
Bad eraseblock 73 at 0x01240000
Bad eraseblock 74 at 0x01280000
Bad eraseblock 75 at 0x012c0000
Bad eraseblock 76 at 0x01300000
Bad eraseblock 77 at 0x01340000
Bad eraseblock 78 at 0x01380000
Bad eraseblock 79 at 0x013c0000
Bad eraseblock 80 at 0x01400000
Bad eraseblock 81 at 0x01440000
Bad eraseblock 82 at 0x01480000
Bad eraseblock 83 at 0x014c0000
Bad eraseblock 84 at 0x01500000
Bad eraseblock 85 at 0x01540000
Bad eraseblock 86 at 0x01580000
Bad eraseblock 87 at 0x015c0000
Bad eraseblock 88 at 0x01600000
Bad eraseblock 89 at 0x01640000
Bad eraseblock 90 at 0x01680000
Bad eraseblock 91 at 0x016c0000
Bad eraseblock 92 at 0x01700000
Bad eraseblock 93 at 0x01740000
Bad eraseblock 94 at 0x01780000
Bad eraseblock 95 at 0x017c0000
Bad eraseblock 96 at 0x01800000
Bad eraseblock 97 at 0x01840000
Bad eraseblock 98 at 0x01880000
Bad eraseblock 99 at 0x018c0000
Bad eraseblock 100 at 0x01900000
Bad eraseblock 101 at 0x01940000
Bad eraseblock 102 at 0x01980000
Bad eraseblock 103 at 0x019c0000
Bad eraseblock 104 at 0x01a00000
Bad eraseblock 105 at 0x01a40000
Bad eraseblock 106 at 0x01a80000
Bad eraseblock 107 at 0x01ac0000
Bad eraseblock 108 at 0x01b00000
Bad eraseblock 109 at 0x01b40000
Bad eraseblock 110 at 0x01b80000
Bad eraseblock 111 at 0x01bc0000
Bad eraseblock 112 at 0x01c00000
Bad eraseblock 113 at 0x01c40000
Bad eraseblock 114 at 0x01c80000
Bad eraseblock 115 at 0x01cc0000
Bad eraseblock 116 at 0x01d00000
Bad eraseblock 117 at 0x01d40000
Bad eraseblock 118 at 0x01d80000
Bad eraseblock 119 at 0x01dc0000
Bad eraseblock 120 at 0x01e00000
Bad eraseblock 121 at 0x01e40000
Bad eraseblock 122 at 0x01e80000
Bad eraseblock 123 at 0x01ec0000
Bad eraseblock 124 at 0x01f00000
Bad eraseblock 125 at 0x01f40000
Bad eraseblock 126 at 0x01f80000
Bad eraseblock 127 at 0x01fc0000
Bad eraseblock 128 at 0x02000000
Bad eraseblock 129 at 0x02040000
Bad eraseblock 130 at 0x02080000
Bad eraseblock 131 at 0x020c0000
Bad eraseblock 132 at 0x02100000
Bad eraseblock 133 at 0x02140000
Bad eraseblock 134 at 0x02180000
Bad eraseblock 135 at 0x021c0000
Bad eraseblock 136 at 0x02200000
Bad eraseblock 137 at 0x02240000
Bad eraseblock 138 at 0x02280000
Bad eraseblock 139 at 0x022c0000
Bad eraseblock 140 at 0x02300000
Bad eraseblock 141 at 0x02340000
Bad eraseblock 142 at 0x02380000
Bad eraseblock 143 at 0x023c0000
Bad eraseblock 144 at 0x02400000
Bad eraseblock 145 at 0x02440000
Bad eraseblock 146 at 0x02480000
Bad eraseblock 147 at 0x024c0000
Bad eraseblock 148 at 0x02500000
Bad eraseblock 149 at 0x02540000
Bad eraseblock 150 at 0x02580000
Bad eraseblock 151 at 0x025c0000
Bad eraseblock 152 at 0x02600000
Bad eraseblock 153 at 0x02640000
Bad eraseblock 154 at 0x02680000
Bad eraseblock 155 at 0x026c0000
Bad eraseblock 156 at 0x02700000
Bad eraseblock 157 at 0x02740000
Bad eraseblock 158 at 0x02780000
Bad eraseblock 159 at 0x027c0000
Bad eraseblock 160 at 0x02800000
Bad eraseblock 161 at 0x02840000
Bad eraseblock 162 at 0x02880000
Bad eraseblock 163 at 0x028c0000
Bad eraseblock 164 at 0x02900000
Bad eraseblock 165 at 0x02940000
Bad eraseblock 166 at 0x02980000
Bad eraseblock 167 at 0x029c0000
Bad eraseblock 168 at 0x02a00000
Bad eraseblock 169 at 0x02a40000
Bad eraseblock 170 at 0x02a80000
Bad eraseblock 171 at 0x02ac0000
Bad eraseblock 172 at 0x02b00000
Bad eraseblock 173 at 0x02b40000
Bad eraseblock 174 at 0x02b80000
Bad eraseblock 175 at 0x02bc0000
Bad eraseblock 176 at 0x02c00000
Bad eraseblock 177 at 0x02c40000
Bad eraseblock 178 at 0x02c80000
Bad eraseblock 179 at 0x02cc0000
Bad eraseblock 1092 at 0x11100000
Bad eraseblock 1093 at 0x11140000
Creating 3 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00040000 : "booter"
0x00040000-0x00400000 : "kernel"
0x00400000-0x20000000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: error occured while reading from "NAND 512MiB 3,3V 8-bit"
Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: pm25lv512 (0 Kbytes)
Searching for RedBoot partition table in spi0.0 at offset 0xfffffffe
Atheros AR71xx hardware watchdog driver version 0.1.0
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>
Freeing unused kernel memory: 4248k freed
Algorithmics/MIPS FPU Emulator v1.5
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. device eth0 entered promiscuous mode
eth1: link up (100Mbps/Full duplex)
hifn_795x: Unknown symbol hwrng_unregister
hifn_795x: Unknown symbol hwrng_register
ocf: module license 'BSD' taints kernel.
Uniform Multi-Platform E-IDE driver
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
eth0: link up (100Mbps/Full duplex)
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
hda: probing with STATUS(0x42) instead of ALTSTATUS(0x0a)
hda: probing with STATUS(0xec) instead of ALTSTATUS(0x0a)
hda: no response (status = 0xec)
hdb: probing with STATUS(0xec) instead of ALTSTATUS(0x0a)
hdb: probing with STATUS(0xa1) instead of ALTSTATUS(0x0a)
hdb: no response (status = 0xa1), resetting drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: probing with STATUS(0x24) instead of ALTSTATUS(0x0a)
hdc: probing with STATUS(0xa1) instead of ALTSTATUS(0x0a)
hdc: no response (status = 0xa1), resetting drive
hdd: probing with STATUS(0xa1) instead of ALTSTATUS(0x0a)
hdd: probing with STATUS(0xa1) instead of ALTSTATUS(0x0a)
hdd: no response (status = 0xa1), resetting drive
ide1 at 0x170-0x177,0x376 on irq 15
PPP generic driver version 2.4.2
ide-gd driver 1.18
ip_tables: (C) 2000-2006 Netfilter Core Team
Driver 'sd' needs updating - please use bus_type methods
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ar71xx-ehci ar71xx-ehci: Atheros AR71xx built-in EHCI controller
ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
wlan: trunk
ath_hal: 2009-05-08 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: trunk
PCI: Enabling device 0000:00:13.0 (0000 -> 0002)
Atheros HAL provided by OpenWrt, DD-WRT and MakSat Technologies
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
ath_pci: wifi0: Atheros 5212: mem=0x10000000, irq=33
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ar71xx-ohci ar71xx-ohci: Atheros AR71xx built-in OHCI controller
ar71xx-ohci ar71xx-ohci: new USB bus registered, assigned bus number 2
ar71xx-ohci ar71xx-ohci: request interrupt 14 failed
ar71xx-ohci ar71xx-ohci: USB bus 2 deregistered
ar71xx-ohci: probe of ar71xx-ohci failed with error -16
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
gpio-buttons driver version 0.1.1
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
mmc_spi spi0.2: can't share SPI bus
mmc_spi: probe of spi0.2 failed with error -16



BusyBox v1.13.4 (2009-06-18 03:41:26 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, r16499) -------------------
  * 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:/#
root@OpenWrt:/# lspci -vv
00:00.0 Non-VGA unclassified device: Device 0700:1107 (rev 01)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B+ DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
        Latency: 0
        Region 0: Memory at <unassigned> (32-bit, prefetchable)
        Region 1: I/O ports at <unassigned> [disabled]
        Capabilities: [dc] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
                Bridge: PM- B3+

00:12.0 Co-processor: Hifn Inc. 7955 Security Processor
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 32
        Region 0: Memory at 1001a000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Region 1: Memory at 10018000 (32-bit, non-prefetchable) [disabled] [size=8K]
        Region 2: Memory at 10010000 (32-bit, non-prefetchable) [disabled] [size=32K]

00:13.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter (rev 01)
        Subsystem: Wistron NeWeb Corp. CM9 Wireless a/b/g MiniPCI Adapter
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 96 (2500ns min, 7000ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 33
        Region 0: Memory at 10000000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=2 PME-
        Kernel driver in use: ath_pci
root@OpenWrt:/# opkg list_installed
base-files-ar71xx - 23-r16499 - 
busybox - 1.13.4-1 - 
cfdisk - 2.13.0.1-2 - 
dnsmasq - 2.49-1 - 
dropbear - 0.52-2 - 
e2fsprogs - 1.41.5-1 - 
firewall - 1-3 - 
hostapd - 0.6.9-1 - 
hotplug2 - 1.0-beta-3 - 
iptables - 1.4.3.2-1 - 
iptables-mod-conntrack - 1.4.3.2-1 - 
iptables-mod-nat - 1.4.3.2-1 - 
kernel - 2.6.28.10-ar71xx-1 - 
kmod-ata-ahci - 2.6.28.10-ar71xx-1 - 
kmod-ata-core - 2.6.28.10-ar71xx-1 - 
kmod-button-hotplug - 2.6.28.10-ar71xx-1 - 
kmod-crc-ccitt - 2.6.28.10-ar71xx-1 - 
kmod-crc-itu-t - 2.6.28.10-ar71xx-1 - 
kmod-crc7 - 2.6.28.10-ar71xx-1 - 
kmod-crypto-aes - 2.6.28.10-ar71xx-1 - 
kmod-crypto-core - 2.6.28.10-ar71xx-1 - 
kmod-crypto-des - 2.6.28.10-ar71xx-1 - 
kmod-crypto-hw-hifn-795x - 2.6.28.10-ar71xx-1 - 
kmod-crypto-md5 - 2.6.28.10-ar71xx-1 - 
kmod-crypto-misc - 2.6.28.10-ar71xx-1 - 
kmod-crypto-ocf - 2.6.28.10-ar71xx-1 - 
kmod-crypto-sha1 - 2.6.28.10-ar71xx-1 - 
kmod-crypto-test - 2.6.28.10-ar71xx-1 - 
kmod-fs-ext3 - 2.6.28.10-ar71xx-1 - 
kmod-fs-vfat - 2.6.28.10-ar71xx-1 - 
kmod-ide-aec62xx - 2.6.28.10-ar71xx-1 - 
kmod-ide-core - 2.6.28.10-ar71xx-1 - 
kmod-input-core - 2.6.28.10-ar71xx-1 - 
kmod-input-gpio-buttons - 2.6.28.10-ar71xx-1 - 
kmod-input-polldev - 2.6.28.10-ar71xx-1 - 
kmod-ipt-conntrack - 2.6.28.10-ar71xx-1 - 
kmod-ipt-core - 2.6.28.10-ar71xx-1 - 
kmod-ipt-nat - 2.6.28.10-ar71xx-1 - 
kmod-ipt-nathelper - 2.6.28.10-ar71xx-1 - 
kmod-madwifi - 2.6.28.10+r3314-ar71xx-2 - 
kmod-mmc - 2.6.28.10-ar71xx-1 - 
kmod-mmc-spi - 2.6.28.10-ar71xx-1 - 
kmod-nls-base - 2.6.28.10-ar71xx-1 - 
kmod-nls-cp437 - 2.6.28.10-ar71xx-1 - 
kmod-nls-iso8859-1 - 2.6.28.10-ar71xx-1 - 
kmod-nls-iso8859-15 - 2.6.28.10-ar71xx-1 - 
kmod-nls-utf8 - 2.6.28.10-ar71xx-1 - 
kmod-ppp - 2.6.28.10-ar71xx-1 - 
kmod-pppoe - 2.6.28.10-ar71xx-1 - 
kmod-scsi-core - 2.6.28.10-ar71xx-1 - 
kmod-usb-core - 2.6.28.10-ar71xx-1 - 
kmod-usb-ohci - 2.6.28.10-ar71xx-1 - 
kmod-usb-storage - 2.6.28.10-ar71xx-1 - 
kmod-usb-uhci - 2.6.28.10-ar71xx-1 - 
kmod-usb2 - 2.6.28.10-ar71xx-1 - 
libblkid - 1.41.5-1 - 
libc - 0.9.30.1-23 - 
libext2fs - 1.41.5-1 - 
libgcc - 4.1.2-23 - 
libiptc - 1.4.3.2-1 - 
liblua - 5.1.4-3 - 
libncurses - 5.7-1 - 
libnl-tiny - 0.1-1 - 
libopenssl - 0.9.8k-2 - 
libpthread - 0.9.30.1-23 - 
librt - 0.9.30.1-23 - 
libuci - 0.7.5-1 - 
libuci-lua - 0.7.5-1 - 
libusb - 0.1.12-2 - 
libuuid - 1.41.5-1 - 
libxtables - 1.4.3.2-1 - 
mtd - 8 - 
nano - 2.0.9-1 - 
openssl-util - 0.9.8k-2 - 
opkg - 4993-4 - 
pciutils - 3.1.2-1 - 
ppp - 2.4.4-1 - 
ppp-mod-pppoe - 2.4.4-1 - 
spidev-test - 2.6.28.10-2.6.28.10 - 
swap-utils - 2.13.0.1-2 - 
swconfig - 1 - 
uci - 0.7.5-1 - 
ucitrigger - 0.7.5-1 - 
udevtrigger - 106-1 - 
usbutils - 0.73-1 - 
wireless-tools - 29-4 - 
zlib - 1.2.3-5 - 
root@OpenWrt:/#

(Last edited by Yanira on 18 Jun 2009, 11:34)

I install OpenWRT on a RouterBoard 433 UAH thanks to help from you.

But I do not to work other network interfaces. Only the interface with POE works.

More information below:


My interfaces configuration:

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:0C:42:41:29:7B
          inet addr:192.168.77.1  Bcast:192.168.77.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:656 (656.0 B)  TX bytes:814 (814.0 B)

br-wan    Link encap:Ethernet  HWaddr 00:0C:42:41:29:7C
          inet addr:10.10.10.1  Bcast:10.10.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:0C:42:41:29:7B
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:684 (684.0 B)  TX bytes:814 (814.0 B)
          Interrupt:5

eth1      Link encap:Ethernet  HWaddr 00:0C:42:41:29:7C
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


Ping test:

root@OpenWrt:/# ping 192.168.77.254
PING 192.168.77.254 (192.168.77.254): 56 data bytes
64 bytes from 192.168.77.254: seq=0 ttl=64 time=6.739 ms
64 bytes from 192.168.77.254: seq=1 ttl=64 time=0.197 ms
64 bytes from 192.168.77.254: seq=2 ttl=64 time=0.220 ms
64 bytes from 192.168.77.254: seq=3 ttl=64 time=0.194 ms
^C
--- 192.168.23.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.194/1.837/6.739 ms


root@OpenWrt:/# ping 10.10.10.20
PING 10.10.10.20 (10.10.10.20): 56 data bytes
^C
--- 10.10.10.20 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss




My dmesg:

ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xba000000, irq 5
eth1: Atheros AG71xx at 0xb9000000, irq 4


I installed the pciutils and ethtool to try to discover the problem but failed.

root@OpenWrt:/# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 4
        Transceiver: external
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
        Link detected: yes

root@OpenWrt:/# ethtool eth1
Settings for eth1:
Cannot get device settings: No such device
        Current message level: 0x000000ff (255)
        Link detected: yes

root@OpenWrt:/# ethtool eth2
Settings for eth2:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available

root@OpenWrt:/# ethtool eth3
Settings for eth3:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available


root@OpenWrt:/# lspci -vv
00:00.0 Non-VGA unclassified device: Device 0700:1107 (rev 01)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B+ DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
        Latency: 0
        Region 0: Memory at <unassigned> (32-bit, prefetchable)
        Region 1: I/O ports at <unassigned> [disabled]
        Capabilities: [dc] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
                Bridge: PM- B3+


Please, help me!!!

Thanks in advance.

hi alysonbc,
                  I am too facing the same problem.. in my case i am not even able to ping to the external networks.

if you have solved this problem,can you give me some pointers to where can i look to solve this issue ?

Thanks

I have the same problem as alysonbc, too.  I'm running trunk so I don't need to hack as many files to get it to detect my board correctly, so it is possible that somethings else is broken, but it appears to run fine otherwise, so I don't know.

For some reason I cannot remove the cruft from the kernel partition, so I had to increase the size so the kernel would fit when installed:

--- target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c.orig        2009-10-07 11:08:46.000000000 -0700
+++ target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c     2009-10-07 11:09:00.000000000 -0700
@@ -92,7 +92,7 @@
        {
                .name   = "kernel",
                .offset = (256 * 1024),
-               .size   = (4 * 1024 * 1024) - (256 * 1024),
+               .size   = (8 * 1024 * 1024) - (256 * 1024),
        },
        {
                .name   = "rootfs",

After the install I change /etc/config/network, swapping eth0 and eth1.

eth0 and ath0 work fine, but while eth1 claims it is up, no packets are ever sent or received by the other two ports (the ones that are not POE, right of the serial port).  Everything else works flawlessly, provided all computers on the lan side are accessing the gateway wirelessly.

Any clue why eth1 doesn't seem to work?

Thanks,
Eric

(Last edited by ericj on 7 Oct 2009, 21:20)

I'm tried to port the patch against trunk but it seems there are already some changes done so i'm not realy sure what is to change.

I have still the problem that openwrt thinks that the kernel partition is not empty.

any suggestions what to do? any idear when it will be fixed in trunk?

hi
i tried installing openwrt on routerboard 433ah  according to  http://blog.vodkamelone.de/archives/148 … RB433.html
i compiled the openwrt image on fedora11 system, placed it in tftpboot folder made changes in the dhcpd.conf file .FEdora system ip set to 192.168.23.254 ,started dhcpd ,xinetd and tftp services... connected fedora ssyetm with the routerboard using a straight cable..

but when i try to boot from the linux system i get this message :
resolved mac adress : (machines mac address)
Gateway:192.168.23.254
transfer started udp error 1
kernel loading failed


and then it reboots..

Any idea whats going wrong...
Iam new to all this...

Thanx
savitri

hi
I was able to succesfully port openwrt on rb433ah. earlier problem that i discussed was due to the reason that dhcp was working fine but tftp client on routerboard was not able to locate the required file ,I figured it out using wireshark ,, the reason being that i had given absolute path of the file in tftpboot file..
so it worked correctly when i gave just the file name..
On forum i have seen that lot of people struggled with error : couldn;t obtain administrative lock. I had the same problem which i was able to solve so would share the same for other members who may be newbies like me smile

i tried to write the file onto NAND flash as specified in http://blog.vodkamelone.de/archives/148 … RB433.html openwrt  seemed to be working all Okay . It booted from NAND also but when i tried to make changes in any files it din't allow me , even run opkg  gave the error couldn't obtain administartive lock . I struggled with it for few days to find out the problem .Later i found that there was some problem in the whole process because when i did df -h it  dint show the whole NAND space of 64MB it was showing just 1.4 MB which was 100% being used. 
After all this I tried to use wget2nand script and wheni was able to write a fresh copy of openwrt on NAND using this script every thing worked perfectly .atleast till now smile
Though Iam struggling right now to ping using wifi interface (R52 on mini PCI) ,i guess its some configuration problem because wifi interface is detected and Iam even able to set its IP address ..

thanx
savitri negi

The discussion might have continued from here.