Next steps:


Previous Steps:

2007-08-12

Eric builds OpenWRT

URL: https://svn.openwrt.org/openwrt/trunk
Revision: 8400

which results:

eric@xyzzy:~/freesa/openwrt-trunk$ ls -l ./bin/openwrt-brcm47xx-2.6-squashfs.trx
-rw-r--r-- 1 eric eric 1839104 2007-07-07 15:14 ./bin/openwrt-brcm47xx-2.6-squashfs.trx

but that's too big:

ERROR!! copysize is 1839104, amtcopy is 1802240

So we try again with make menuconfig to trim options.

eric@xyzzy:~/freesa/openwrt-trunk$ ls -l bin/*.trx         
-rw-r--r-- 1 eric eric 1708032 2007-08-12 14:21 bin/openwrt-brcm47xx-2.6-squashfs.trx
eric@xyzzy:~/freesa/openwrt-trunk$

1.7 meg. Much better.

(If we really want to press the limit, the total flash size is 2097152 bytes ... 262144 is consumed by CFE ... 65536 is consumed by NVRAM ... leaving 1769472 for the .trx ... 1728 kb is 1.6875 MB)

Also, we had to do some config file hacking to get the darn aec62xx drivers built:

eric@xyzzy:~/freesa/openwrt-trunk$ find ./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/ -name "*.ko"
./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/pci/generic.ko
./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/pci/cmd64x.ko
./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/pci/aec62xx.ko
./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/ide-core.ko
./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/ide-disk.ko
./build_dir/linux-2.6-brcm47xx/linux-2.6.22.1/drivers/ide/ide-generic.ko
eric@xyzzy:~/freesa/openwrt-trunk$

OpenWrtBootImage Instructions:

So basically following the steps outlined in ReflashingWithTftp we did the following:

  • booted to CFE> and did the ifconfig eth0 -auto bit ...

so that we could get an ip address that doesn't conflict with the OTHER 192.168.1.1 which is Eric's upstream router ....

CFE> printenv                                                                   
Variable Name        Value                                                      
-------------------- --------------------------------------------------         
BOOT_CONSOLE         uart0                                                      
CFE_VERSION          1.0.37                                                     
CFE_BOARDNAME        BCM947XX                                                   
CFE_MEMORYSIZE       67108864                                                   
STARTUP              go;                                                        
NET_DEVICE           eth0                                                       
NET_IPADDR           192.168.23.8                                               
NET_NETMASK          255.255.255.0                                              
NET_GATEWAY          192.168.23.1                                               
NET_NAMESERVER       192.168.23.1                                               
*** command status = 0           
  • then held down the EZSETUP orange button and typed "go"
CFE> go                                                                         
Null Rescue Flag.                                                               
Null Rescue Flag.                                                               
10 seconds to Rescue mode...                                                    
Null Rescue Flag.                                                               
9 seconds to Rescue mode...                                                     

[SNIP]

1 seconds to Rescue mode...                                                     
Null Rescue Flag.                                                               
Hello!! Enter Rescue Mode: (by Force)                                           
                                                                                
Reading :: TFTP Server.                                                         
Failed.: Timeout occured                                                        
Reading :: TFTP Server.                                                         
Failed.: Timeout occured                                                        

[SNIP]

  • Then from the OpenWRT build machine, we did the following (with tftp "bin" mode this time!):
eric@xyzzy:~/freesa/openwrt-trunk/bin$ tftp.inetutils
tftp> connect 192.168.23.8
tftp> bin
tftp> put openwrt-brcm47xx-2.6-squashfs.trx
Sent 1708032 bytes in 3.5 seconds
tftp> quit
eric@xyzzy:~/freesa/openwrt-trunk/bin$

Which resulted in this on the WL-700gE console:

[SNIP]

Reading :: TFTP Server.                                                         
Failed.: Timeout occured                                                        
Reading :: TFTP Server.                                                         
TFTP_BLKLEN!!                                                                   
Done. 1708032 bytes read                                                        
Download of 0x1a1000 bytes completed                                            
Write kernel and filesystem binary to FLASH (0xbfc40000)                        
flash device 'flash1.trx'                                                       
Programming...                                                                  
done. 1708032 bytes written

and the console is halted there.

  • Time to reboot!
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)                                   
Build Date: ?| 12?? 29 20:36:58 CST 2005 (root@localhost.localdomain)           
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.                         
                                                                                
Initializing Arena                                                              
Initializing Devices.                                                           
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.23.0                 
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)                              
CPU type 0x29006: 264MHz                                                        
Total memory: 67108864 KBytes                                                   
                                                                                
Total memory used by CFE:  0x80800000 - 0x8089BA00 (637440)                     
Initialized Data:          0x80831B70 - 0x80834250 (9952)                       
BSS Area:                  0x80834250 - 0x80835A00 (6064)                       
Local Heap:                0x80835A00 - 0x80899A00 (409600)                     
Stack Area:                0x80899A00 - 0x8089BA00 (8192)                       
Text (code) segment:       0x80800000 - 0x80831B70 (203632)                     
Boot area (physical):      0x0089C000 - 0x008DC000                              
Relocation Factor:         I:00000000 - D:00000000                              
                                                                                
Device eth0:  hwaddr 00-17-31-2A-90-0B, ipaddr 192.168.1.1, mask 255.255.255.0  
        gateway not set, nameserver not set                                     
Null Rescue Flag.                                                               
Null Restore Flag.                                                              
set pivot_wait = 0                                                              
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)                       
Loading: .. 3740 bytes read                                                     
Entry at 0x80001000                                                             
Closing network.                                                                
Starting program at 0x80001000                                                  
Linux version 2.6.22.1 (eric@xyzzy) (gcc version 4.1.2) #5 Sun Aug 12 14:21:19 7
CPU revision is: 00029006                                                       
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x03, vendor 0x4243)               
ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x06, vendor 0x4243)            
ssb: Core 2 found: Fast Ethernet (cc 0x806, rev 0x06, vendor 0x4243)            
ssb: Core 3 found: USB 1.1 Hostdev (cc 0x808, rev 0x02, vendor 0x4243)          
ssb: Core 4 found: PCI (cc 0x804, rev 0x08, vendor 0x4243)                      
ssb: Core 5 found: MIPS 3302 (cc 0x816, rev 0x00, vendor 0x4243)                
ssb: Core 6 found: V90 (cc 0x807, rev 0x02, vendor 0x4243)                      
ssb: Core 7 found: IPSEC (cc 0x80B, rev 0x00, vendor 0x4243)                    
ssb: Core 8 found: MEMC SDRAM (cc 0x80F, rev 0x00, vendor 0x4243)               
ssb: Initializing MIPS core...                                                  
ssb: set_irq: core 0x0806, irq 2 => 2                                           
ssb: set_irq: core 0x0806, irq 3 => 3                                           
ssb: set_irq: core 0x0804, irq 0 => 4                                           
ssb: Sonics Silicon Backplane found at address 0x18000000                       
Determined physical RAM map:                                                    
 memory: 04000000 @ 00000000 (usable)                                           
Initrd not found or empty - disabling initrd                                    
Built 1 zonelists.  Total pages: 16256                                          
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/pr0
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.    
Primary data cache 16kB, 2-way, linesize 16 bytes.                              
Synthesized TLB refill handler (20 instructions).                               
Synthesized TLB load handler fastpath (32 instructions).                        
Synthesized TLB store handler fastpath (31 instructions).                       
Synthesized TLB modify handler fastpath (30 instructions).                      
PID hash table entries: 256 (order: 8, 1024 bytes)                              
Using 132.000 MHz high precision timer.                                         
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)                   
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)                    
Memory: 62304k/65536k available (2024k kernel code, 3168k reserved, 295k data, )
Mount-cache hash table entries: 512                                             
NET: Registered protocol family 16                                              
ssb: PCIcore in host mode found                                                 
registering PCI controller with io_map_base unset                               
PCI: fixing up bridge                                                           
PCI: Fixing up device 0000:00:00.0                                              
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: 2048 (order: 2, 16384 bytes)                
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)                        
TCP: Hash tables configured (established 2048 bind 2048)                        
TCP reno registered                                                             
squashfs: version 3.0 (2006/03/15) Phillip Lougher                              
Registering mini_fo version $Id$                                                
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.                             
io scheduler noop registered                                                    
io scheduler deadline registered (default)                                      
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled        
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A                             
serial8250: ttyS1 at MMIO 0x0 (irq = 3) is a 16550A                             
b44.c:v1.01 (Jun 16, 2006)                                                      
eth0: Broadcom 10/100BaseT Ethernet 00:17:31:2a:90:0b                           
eth1: Broadcom 10/100BaseT Ethernet 40:10:18:00:00:2c                           
flash init: 0x1c000000 0x02000000                                               
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank              
 Amd/Fujitsu Extended Query Table at 0x0040                                     
Physically mapped flash: CFI does not contain boot bank location. Assuming top. 
number of CFI chips: 1                                                          
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.        
Flash device: 0x200000 at 0x1fc00000                                            
bootloader size: 262144                                                         
Updating TRX offsets and length:                                                
old trx = [0x0000001c, 0x000008f0, 0x000b7800], len=0x001a1000 crc32=0xc41bee4b 
new trx = [0x0000001c, 0x000008f0, 0x000b7800], len=0x000b7800 crc32=0xed94ea80 
Done                                                                            
Creating 4 MTD partitions on "Physically mapped flash":                         
0x00000000-0x00040000 : "cfe"                                                   
0x00040000-0x001f0000 : "linux"                                                 
0x000f7800-0x001f0000 : "rootfs"                                                
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-y
mtd: partition "rootfs" set to be root filesystem                               
mtd: partition "rootfs_data" created automatically, ofs=1D0000, len=20000       
0x001d0000-0x001f0000 : "rootfs_data"                                           
0x001f0000-0x00200000 : "nvram"                                                 
nf_conntrack version 0.5.0 (512 buckets, 4096 max)                              
ip_tables: (C) 2000-2006 Netfilter Core Team                                    
TCP vegas registered                                                            
NET: Registered protocol family 1                                               
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>                            
VFS: Mounted root (squashfs filesystem) readonly.                               
Freeing unused kernel memory: 120k freed                                        
Warning: unable to open an initial console.                                     
Algorithmics/MIPS FPU Emulator v1.5                                             
- preinit -                                                                     
diag: Detected 'ASUS WL-700gE'                                                  
diag: Spinning up HDD and enabling leds                                         
b44: eth0: Link is up at 100 Mbps, full duplex.                                 
b44: eth0: Flow control is off for TX and off for RX.                           
Probing device eth0: found!                                                     
jffs2 not ready yet; using ramdisk                                              
mini_fo: using base directory: /                                                
mini_fo: using storage directory: /tmp/root                                     
- init -                                                                        
init started:  BusyBox v1.4.2 (2007-08-12 14:16:56 CEST) multi-call binary      
                                                                                
Please press Enter to activate this console. b44: eth0: Link is up at 100 Mbps,.
b44: eth0: Flow control is off for TX and off for RX.                           
There is already a switch registered on the device 'eth0'                       
eth0.0: Setting MAC address to  00 17 31 2a 90 0b.                              
VLAN (eth0.0):  Underlying device (eth0) has same MAC, not checking promiscious.
eth0.1: Setting MAC address to  00 17 31 2a 90 0c.                              
device eth0 entered promiscuous mode                                            
VLAN (eth0.1):  Setting underlying device (eth0) to promiscious mode.           
jffs2: Too few erase blocks (2)                                                 
                                                                                
                                                                                
                                                                                
BusyBox v1.4.2 (2007-08-12 14:16:56 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, r8400) -------------------                            
  * 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:/#

Then, using ifconfig, get rid of the eth0.1, eth0.1, and eth0. Then re-add eth0 with a local network address. Once complete, obtain the kernel modules:

ifconfig eth0.1 down                                            
ifconfig eth0.0 down                                            
ifconfig eth0 down                                              
ifconfig eth0 add 192.168.23.8/24 up                            
route add default gw 192.168.23.1                               
echo "nameserver 192.168.23.1" > /etc/resolv.conf               
ping -c1 www.google.com 

wget http://tiedyedfreaks.org/eric/tmp/ide-core.ko           
wget http://tiedyedfreaks.org/eric/tmp/ide-generic.ko        
wget http://tiedyedfreaks.org/eric/tmp/ide-disk.ko           
wget http://tiedyedfreaks.org/eric/tmp/generic.ko            
wget http://tiedyedfreaks.org/eric/tmp/aec62xx.ko            

And then load them ... todo capture screen output here


2007-08-11

Random builds OpenWRT, and mounts hard disk.


2007-07-07

Eric builds OpenWRT

URL: https://svn.openwrt.org/openwrt/trunk
Revision: 7885

Using make menuconfig to trim options creating this configuration file: [2] and then make V=99 [3].

The strangely it seems that the aec62xx drivers are not built, just as had been foretold:

eric@xyzzy:~/freesa/openwrt-trunk$ ls bin/packages/*aec*
ls: bin/packages/*aec*: No such file or directory

How can we insmod the driver if it isn't built? Anyway, let's forge ahead.

With very promising results:

Algorithmics/MIPS FPU Emulator v1.5                                             
- preinit -                                                                     
diag: Detected 'ASUS WL-700gE'                                                  
diag: Spinning up HDD and enabling leds                                         
b44: eth0: Link is up at 100 Mbps, full duplex.                                 

and yay:

BusyBox v1.4.2 (2007-07-07 14:56:11 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, r7885) -------------------                            
  * 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:/# ls -l /lib/modules/2.6.22-rc6                                   
-rw-r--r--    1 root     root         2572 Jul  7  2007 crc-ccitt.ko            
-rw-r--r--    1 root     root        38780 Jul  7  2007 diag.ko                 
-rw-r--r--    1 root     root        66636 Jul  7  2007 ext2.ko                 
-rw-r--r--    1 root     root        16856 Jul  7  2007 ppp_async.ko            
-rw-r--r--    1 root     root        34948 Jul  7  2007 ppp_generic.ko          
-rw-r--r--    1 root     root        18456 Jul  7  2007 pppoe.ko                
-rw-r--r--    1 root     root         4480 Jul  7  2007 pppox.ko                
-rw-r--r--    1 root     root         8504 Jul  7  2007 slhc.ko                 
root@OpenWrt:/#

But still no idea how to get the aec driver going.


2007-06-17 -- Hard drive spins.

Eric built OpenWRT with the broadcomm with 2.6 kernel and everything else default with hopes of getting it to boot and see if we can spin the hard drive.

URL: https://svn.openwrt.org/openwrt/trunk
Revision: 7646

which resulted in:

eric@xyzzy:~/freesa/openwrt-trunk$ ls -l ./bin/openwrt-brcm47xx-2.6-squashfs.trx
-rw-r--r-- 1 eric eric 2297856 2007-06-16 22:29 ./bin/openwrt-brcm47xx-2.6-squashfs.trx
eric@xyzzy:~/freesa/openwrt-trunk$ 

2297856 is bigger than the max size of our flash, wish is about 1.7 meg after bootloader. So we rebuilt with many options removed. like wireless.

tftp> connect 192.168.23.8
tftp> bin
tftp> put openwrt-brcm47xx-2.6-squashfs.trx
Sent 1445888 bytes in 2.9 seconds
tftp> 
Failed.: Timeout occured                                                        
Reading :: TFTP Server.                                                         
TFTP_BLKLEN!!                                                                   
Done. 1445888 bytes read                                                        
Download of 0x161000 bytes completed                                            
Write kernel and filesystem binary to FLASH (0xbfc40000)                        
flash device 'flash1.trx'                                                       
Programming...                                                                  
done. 1445888 bytes written  

Time to reboot! (For the annotated output of this boot, see: OpenWrtBootAnalysis)

BusyBox v1.4.2 (2007-06-17 18:39:35 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, r7646) -------------------                            
  * 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:/#

for the record:

eric@xyzzy:~/freesa/openwrt-trunk$ svn info
Path: .
URL: https://svn.openwrt.org/openwrt/trunk
Repository Root: https://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 7646
Node Kind: directory
Schedule: normal
Last Changed Author: nbd
Last Changed Rev: 7645
Last Changed Date: 2007-06-16 04:08:06 +0200 (Sat, 16 Jun 2007)

eric@xyzzy:~/freesa/openwrt-trunk$

2006-11-28 -- OpenWRT built and flashed onto system.

Brett has built an OpenWRT image using the latest OpenWRT subversion trunk -- that's revision 5671 -- and the attached config file which should be uncompressed and renamed to .config. There are lots of resulting image files, three of which are trx files: openwrt-brcm-2.6-jffs2-128k.trx, openwrt-brcm-2.6-jffs2-64k.trx, and openwrt-brcm-2.6-squashfs.trx.