User talk:Oxo
From DD-WRT Wiki
Revision as of 07:26, 4 October 2006 (edit) Oxo (Talk | contribs) m (→ssh) ← Previous diff |
Revision as of 05:05, 4 November 2006 (edit) (undo) Thenextdon13 (Talk | contribs) (→JFFS) Next diff → |
||
Line 21: | Line 21: | ||
Needed for ipkg and others (rw filesystem) | Needed for ipkg and others (rw filesystem) | ||
- | + | nvram set jffs_mounted=1 | |
- | + | nvram set enable_jffs2=1 | |
- | + | nvram set sys_enable_jffs2=1 | |
- | + | nvram set clean_jffs2=1 | |
- | + | nvram set sys_clean_jffs2=1 | |
+ | nvram commit | ||
+ | |||
+ | reboot | ||
+ | |||
= dd-wrt specific= | = dd-wrt specific= | ||
==/jffs/etc/config/*.startup== | ==/jffs/etc/config/*.startup== |
Revision as of 05:05, 4 November 2006
Contents |
Setup
- Between garden shed home and my oldest sons flat
- WDS
- 2 Asus Premium
- OpenWrt - rc5
- USB HD
- 1 Lynksys v5 - for sale, preferably swap for Asus Premium :)
- dd-wrt v23 SP2
- JTAG cable
Basic alterations
Asus 32MByte
mem ok with 32Mbyte (without the following, less memory)
nvram set sdram_init=0x0009 nvram set sdram_ncdl=0 nvram commit reboot
JFFS
Needed for ipkg and others (rw filesystem)
nvram set jffs_mounted=1 nvram set enable_jffs2=1 nvram set sys_enable_jffs2=1 nvram set clean_jffs2=1 nvram set sys_clean_jffs2=1 nvram commit
reboot
dd-wrt specific
/jffs/etc/config/*.startup
v23 starts executable files in /jffs/etc/config/*.startup
/jffs/etc/config/S10modules.startup
ipkg sometimes make modules.d files: like for USB. So make the following to insmod these modules
#!/bin/sh for module in $(cat /jffs/etc/modules.d/*);do /sbin/insmod /jffs/lib/modules/2.4.30/$module.o done
/jffs/etc/config/S90init.startup
ipkg sometimes make init.d files
#!/usr/bin/sh $(/jffs/etc/init.d/S* start)
USB
USB Core
Install the folowing modules for USB
# ipkg install kmod-usb-uhci // this is for USB 1.1 ipkg install kmod-usb-core ipkg install kmod-usb2
USB HD
Install the folowing modules for filesystems:
ipkg install kmod-usb-storage ipkg install kmod-vfat ipkg install kmod-ext2 ipkg install kmod-ext3
Mounting
Unfortunatly, dd-wrt doesn't seem to look for a /jffs/etc/fstab ( fstab referenceh )
/jffs/etc/config/S30mount.startup
#!/bin/sh { read MOUNT_DEVICE MOUNT_POINT FS DUMP FSK i=0 while [ $i -le 15 ];do if [ -e $MOUNT_DEVICE ];then mount $MOUNT_DEVICE $MOUNT_POINT break fi sleep 1 i=$(expr $i + 1) done }</jffs/etc/fstab
USB Diverse
In order to use a multislot card reader, you must add the following parameter to the scsi_mod in the file /jffs/etc/modules.d/60-usb-storage:
scsi_mod max_scsi_luns=8
(I don't know what this means but I put it in: I haven't tested it
USB Printer
Suk! - no /dev/usb/lp0 in the standard dd-wrt.
One need's to mknode and it is not included..
Otherwise, if the /dev/usb/lp0 could be made (recompile or ..) the How-to for OpenWrt and printer would work
Download Master Functionality
Not yet started.
Serial/UART
Waiting for the max3232 ... Circuit made and Diagram comming here One should maybe install a serial board: helps with new firmware and maybe helps with not having to short pins (to be proven: don't know if it is true...) Anyway, it's a nice feeling with a console cable.
MAXIM MAX3232
http://www.dd-wrt.com/phpBB2/files/max3232_428.jpg
Hennings-Electronic: Sejs, Denmark
My friendly local electronics supplier
Asus
Solder points for ttl output:
http://www.dd-wrt.com/phpBB2/files/asus_ttl_111.jpg
The object here is to remove the solder in the holes and solder in a connector.
Go carefully.
Check Software
Ok, the connector is soldered on, so now we need to check software.
- start for example minicom and connect to ...UART2
- check that there is no echo of characters
- connect UART2 tx to rx
- check that there IS echo of characters
- connect UART2 tx to UART1 rx and UART2 rx to UART1 tx
- try and connect to prompt...
The board
Developement
Firmware Modification Kit
started
dd-wrt from source
My only chance for lp0???
Download Ubuntu and run in vmware
add-apts
collect sw
loose hair
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=4778 newmedia missing: touch and chmod +x
Many "cannot execute binary file" compile again (only using development how to as help, not running scripts)
Just found: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2638
- not v.23 sp2
- wasn't able to apt-add uml-utilities
- BUT IT WORKS!!!
Now for v23 sp2 ...
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3668
Never got it to compile: now using Open Wrt which compiled first time
OpenWRT
I now use OpenWrt on ASUS due to printer support and the source code can compile first time...
Future ..
Bluetooth
"Cool": someone has hooked bluetooth to Asus...
- Nice with PBX sw and a bluetooth headset (how to ring out ...hmm)
- Internet access for Mobil...
- GPS
Playtime
Optware
A funny thing happened after I dd-wrt'ed my boxes
You have probably NOT bricked your router if you continually loose wireless to it while going thru the panels.
Every time I left a dd-wrt www interface panel, with ping router and using wireless, I "lost" contact with the router. Repair wireless solved the problem until I moved between panels again.
This has happened on both the routers.
Be patient.
Enable 32MByte memory.
The problem will go away.
(Needs more analysing)
Brick
After first dd-wrt attempt: none since Had to short pins in the end
A typical brick discussion with "what to do"
I believe I had bricked my router and was pressing resets etc, whereas I should have been patient and checked with a wired connection first and not just wireless.
ASUS dmesg
root@oxo-t:~# clear;cat /etc/banner;dmesg _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M WHITE RUSSIAN (RC5) ------------------------------- * 2 oz Vodka Mix the Vodka and Kahlua together * 1 oz Kahlua over ice, then float the cream or * 1/2oz cream milk on the top. --------------------------------------------------- CPU revision is: 00029006 Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes. Primary data cache 16kB, 2-way, linesize 16 bytes. Linux version 2.4.30 (nbd@ux-2y02) (gcc version 3.4.4 (OpenWrt-1.0)) #1 Sun Mar 26 19:02:04 CEST 2006 Setting the PFC value as 0x15 Determined physical RAM map: memory: 02000000 @ 00000000 (usable) On node 0 totalpages: 8192 zone(0): 8192 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200 CPU: BCM4704 rev 9 at 264 MHz Using 132.000 MHz high precision timer. Calibrating delay loop... 263.78 BogoMIPS Memory: 30476k/32768k available (1412k kernel code, 2292k reserved, 100k data, 80k init, 0k highmem) Dentry cache hash table entries: 4096 (order: 3, 32768 bytes) Inode cache hash table entries: 2048 (order: 2, 16384 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 8192 (order: 3, 32768 bytes) Checking for 'wait' instruction... unavailable. POSIX conformance testing by UNIFIX PCI: Fixing up bus 0 PCI: Fixing up bridge PCI: Setting latency timer of device 01:00.0 to 64 PCI: Fixing up bus 1 Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x1 JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher pty: 256 Unix98 ptys configured Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled ttyS00 at 0xb8000300 (irq = 3) is a 16550A ttyS01 at 0xb8000400 (irq = 0) is a 16550A b44.c:v0.93 (Mar, 2004) PCI: Setting latency timer of device 00:01.0 to 64 eth0: Broadcom 47xx 10/100BaseT Ethernet 00:17:31:e1:fb:8d PCI: Setting latency timer of device 00:02.0 to 64 eth1: Broadcom 47xx 10/100BaseT Ethernet 40:10:18:00:00:2d Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 Amd/Fujitsu Extended Query Table v1.3 at 0x0040 number of CFI chips: 1 cfi_cmdset_0002: Disabling fast programming due to code brokenness. Flash device: 0x800000 at 0x1c000000 Creating 5 MTD partitions on "Physically mapped flash": 0x00000000-0x00040000 : "pmon" 0x00040000-0x007f0000 : "linux" 0x000bc400-0x001b6000 : "rootfs" mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only 0x007f0000-0x00800000 : "nvram" 0x001c0000-0x007f0000 : "OpenWrt" Initializing Cryptographic API NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 2048 bind 4096) ip_conntrack version 2.1 (5953 buckets, 5953 max) - 328 bytes per conntrack ip_tables: (C) 2000-2002 Netfilter core team NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. NET4: Ethernet Bridge 008 for NET4.0 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. Mounted devfs on /dev Freeing unused kernel memory: 80k freed Algorithmics/MIPS FPU Emulator v1.5 diag boardtype: 0000042f Probing device eth0: found! b44: eth0: Link is up at 100 Mbps, full duplex. b44: eth0: Flow control is off for TX and off for RX. jffs2.bbc: SIZE compression mode activated. PCI: Setting latency timer of device 01:02.0 to 64 PCI: Enabling device 01:02.0 (0004 -> 0006) eth2: Broadcom BCM4318 802.11 Wireless Controller 3.90.37.0 Journalled Block Device driver loaded BFL_ENETADM not set in boardflags. Use force=1 to ignore. usb.c: registered new driver usbdevfs usb.c: registered new driver hub usb.c: registered new driver usblp printer.c: v0.13: USB Printer Device Class driver SCSI subsystem driver Revision: 1.00 Initializing USB Mass Storage driver... usb.c: registered new driver usb-storage USB Mass Storage support registered. uhci.c: USB Universal Host Controller Interface driver v1.1 PCI: Enabling device 01:03.0 (0000 -> 0001) uhci.c: USB UHCI at I/O 0x100, IRQ 2 usb.c: new USB bus registered, assigned bus number 1 hub.c: USB hub found hub.c: 2 ports detected PCI: Enabling device 01:03.1 (0000 -> 0001) uhci.c: USB UHCI at I/O 0x120, IRQ 2 usb.c: new USB bus registered, assigned bus number 2 hub.c: USB hub found hub.c: 2 ports detected PCI: Enabling device 01:03.2 (0000 -> 0002) ehci_hcd 01:03.2: PCI device 1106:3104 ehci_hcd 01:03.2: irq 2, pci mem c01cb000 usb.c: new USB bus registered, assigned bus number 3 ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4 hub.c: USB hub found hub.c: 4 ports detected device eth0 entered promiscuous mode hub.c: connect-debounce failed, port 1 disabled hub.c: new USB device 01:03.2-1, assigned address 2 scsi0 : SCSI emulation for USB Mass Storage devices Vendor: IC25N030 Model: ATDA04-0 Rev: DA4O Type: Direct-Access ANSI SCSI revision: 02 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 SCSI device sda: 58605121 512-byte hdwr sectors (30006 MB) Partition check: /dev/scsi/host0/bus0/target0/lun0: p1 WARNING: USB Mass Storage data integrity not assured USB Mass Storage device found at 2 vlan0: add 01:00:5e:00:00:01 mcast address to master interface vlan0: dev_set_promiscuity(master, 1) vlan0: dev_set_allmulti(master, 1) device eth2 entered promiscuous mode eth2: attempt to add interface with same source address. br0: port 2(eth2) entering listening state br0: port 1(vlan0) entering listening state br0: port 2(eth2) entering learning state br0: port 1(vlan0) entering learning state br0: port 2(eth2) entering forwarding state br0: topology change detected, propagating br0: port 1(vlan0) entering forwarding state br0: topology change detected, propagating jffs2: attempt to mount non-MTD device 08:01 SQUASHFS error: Can't find a SQUASHFS superblock on sd(8,1) VFS: Can't find ext2 filesystem on dev sd(8,1). VFS: Can't find ext3 filesystem on dev sd(8,1). vlan1: Setting MAC address to 00 13 06 62 00 00. hub.c: new USB device 01:03.0-2, assigned address 2 printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004 vlan1: add 01:00:5e:00:00:01 mcast address to master interface device wds0.49153 entered promiscuous mode wds0.49153: attempt to add interface with same source address. br0: port 3(wds0.49153) entering listening state br0: port 3(wds0.49153) entering learning state br0: port 3(wds0.49153) entering forwarding state br0: topology change detected, propagating device wds0.49154 entered promiscuous mode wds0.49154: attempt to add interface with same source address. br0: port 4(wds0.49154) entering listening state br0: port 4(wds0.49154) entering learning state br0: port 4(wds0.49154) entering forwarding state br0: topology change detected, propagating
DD-WRT v23 SP2 std (c) 2006 NewMedia-NET GmbH Release: 09/13/06 (SVN revision: 3927:3929) DD-WRT-asus login: root Password: ========================================================== ____ ___ __ ______ _____ ____ _____ | _ \| _ \ \ \ / / _ \_ _| __ _|___ \|___ / || | || ||____\ \ /\ / /| |_) || | \ \ / / __) | |_ \ ||_| ||_||_____\ V V / | _ < | | \ V / / __/ ___) | |___/|___/ \_/\_/ |_| \_\|_| \_/ |_____|____/ DD-WRT v23 SP2 http://www.dd-wrt.com ========================================================== DD-WRT VeryBusyBox v1.2.1 (2006.09.13-18:23+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. ~ # dmesg <0>CPU revision is: 00029006 <0>Linux version 2.4.34-pre2 (root@linux) (gcc version 3.4.6 (OpenWrt-2.0)) #160 Wed Sep 13 20:27:16 CEST 2006 <0>Setting the PFC value as 0x15 <0>Determined physical RAM map: <0> memory: 02000000 @ 00000000 (usable) <0>On node 0 totalpages: 8192 <0>zone(0): 8192 pages. <0>zone(1): 0 pages. <0>zone(2): 0 pages. <0>Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 <0>CPU: BCM4704 rev 9 at 264 MHz <0>Using 132.000 MHz high precision timer. <0>Calibrating delay loop... 263.78 BogoMIPS <6>Dentry cache hash table entries: 4096 (order: 3, 32768 bytes) <6>Inode cache hash table entries: 2048 (order: 2, 16384 bytes) <6>Mount cache hash table entries: 512 (order: 0, 4096 bytes) <6>Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) <0>Page-cache hash table entries: 8192 (order: 3, 32768 bytes) <0>Checking for 'wait' instruction... unavailable. <0>POSIX conformance testing by UNIFIX <0>PCI: Fixing up bus 0 <0>PCI: Fixing up bridge <7>PCI: Setting latency timer of device 01:00.0 to 64 <0>PCI: Fixing up bus 1 <0>Initializing RT netlink socket <0>Starting kswapd <6>devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) <6>devfs: boot_options: 0x1 <6>squashfs: version 3.0 (2006/03/15) Phillip Lougher <0>pty: 256 Unix98 ptys configured <6>Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled <6>ttyS00 at 0xb8000300 (irq = 3) is a 16550A <6>ttyS01 at 0xb8000400 (irq = 3) is a 16550A <6>Software Watchdog Timer: 0.05, timer margin: 60 sec <7>PCI: Setting latency timer of device 00:01.0 to 64 <7>PCI: Setting latency timer of device 00:02.0 to 64 <6>imq driver loaded. <6>Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky <7>Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 <7>Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 <7>Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 <5> Amd/Fujitsu Extended Query Table v1.3 at 0x0040 <5>number of CFI chips: 1 <5>cfi_cmdset_0002: Disabling fast programming due to code brokenness. <5>Flash device: 0x800000 at 0x1c000000 <5>Physically mapped flash: squashfs filesystem found at block 823 <5>Creating 5 MTD partitions on "Physically mapped flash": <5>0x00000000-0x00040000 : "pmon" <5>0x00040000-0x007f0000 : "linux" <5>0x000cde58-0x003967d5 : "rootfs" <0>mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only <5>0x007f0000-0x00800000 : "nvram" <5>0x003a0000-0x007f0000 : "ddwrt" <6>Initializing Cryptographic API <6>IP Protocols: ICMP, UDP, TCP, IGMP <6>IP: routing cache hash table of 512 buckets, 4Kbytes <6>TCP: Hash tables configured (established 2048 bind 4096) <0>ip_conntrack version 2.1 (512 buckets, 4096 max) - 336 bytes per conntrack <0>ip_tables: (C) 2000-2002 Netfilter core team <6>IPP2P v0.8.1_rc1 loading <0>ipt_random match loaded <0>netfilter PSD loaded - (c) astaro AG <6>ipt_osf: Startng OS fingerprint matching module. <0>ipt_IPV4OPTSSTRIP loaded <0>ip_conntrack_rtsp v0.01 loading <0>ip_nat_rtsp v0.01 loading <6>NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. <6>802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> <6>All bugs added by David S. Miller <davem@redhat.com> <0>VFS: Mounted root (squashfs filesystem) readonly. <6>Mounted devfs on /dev <6>diag boardtype: 0000042f <7>PCI: Setting latency timer of device 01:02.0 to 64 <0>PCI: Enabling device 01:02.0 (0004 -> 0006) <0>eth2: Broadcom BCM4318 802.11 Wireless Controller 3.90.39.0 <5>JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. <7>vlan0: add 01:00:5e:00:00:01 mcast address to master interface <6>vlan0: dev_set_promiscuity(master, 1) <6>device eth0 entered promiscuous mode <6>device vlan0 entered promiscuous mode <6>device eth2 entered promiscuous mode <6>device wds0.49153 entered promiscuous mode <6>device wds0.49154 entered promiscuous mode <0>vlan1: Setting MAC address to 00 13 06 62 00 00. <7>vlan1: add 01:00:5e:00:00:01 mcast address to master interface <6>Journalled Block Device driver loaded <6>usb.c: registered new driver usbdevfs <6>usb.c: registered new driver hub <6>usb.c: registered new driver usblp <6>printer.c: v0.13: USB Printer Device Class driver <6>SCSI subsystem driver Revision: 1.00 <6>Initializing USB Mass Storage driver... <6>usb.c: registered new driver usb-storage <6>USB Mass Storage support registered. <6>uhci.c: USB Universal Host Controller Interface driver v1.1 <0>PCI: Enabling device 01:03.0 (0000 -> 0001) <6>uhci.c: USB UHCI at I/O 0x100, IRQ 2 <6>usb.c: new USB bus registered, assigned bus number 1 <6>hub.c: USB hub found <6>hub.c: 2 ports detected <0>PCI: Enabling device 01:03.1 (0000 -> 0001) <6>uhci.c: USB UHCI at I/O 0x120, IRQ 2 <6>usb.c: new USB bus registered, assigned bus number 2 <6>hub.c: USB hub found <6>hub.c: 2 ports detected <0>PCI: Enabling device 01:03.2 (0000 -> 0002) <6>ehci_hcd 01:03.2: PCI device 1106:3104 <6>ehci_hcd 01:03.2: irq 2, pci mem c0141000 <6>usb.c: new USB bus registered, assigned bus number 3 <6>ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4 <6>hub.c: USB hub found <6>hub.c: 4 ports detected <3>hub.c: connect-debounce failed, port 1 disabled <6>hub.c: new USB device 01:03.2-1, assigned address 2 <6>scsi0 : SCSI emulation for USB Mass Storage devices <0> Vendor: IC25N030 Model: ATDA04-0 Rev: DA4O <0> Type: Direct-Access ANSI SCSI revision: 02 <0>Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 <0>SCSI device sda: 58605121 512-byte hdwr sectors (30006 MB) <6>Partition check: <6> /dev/scsi/host0/bus0/target0/lun0: p1 <7>WARNING: USB Mass Storage data integrity not assured <7>USB Mass Storage device found at 2 <6>hub.c: new USB device 01:03.0-2, assigned address 2 <6>printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004
Diverse
ssh
- ssh <some host>
- ~/.ssh structure created
- ssh-keygen -t dsa
- id_dsa and id_dsa.pub created
- use code for private key (id_dsa) when medium is unsafe
- make sure id_dsa is only rw for user or else use code for private key (medium is unsafe)
- add id_dsa.pub to hosts that you want to connect to (~/.ssh/authorized_keys2)
ssh_config ie. $HOME/.ssh/config sets ssh parameters.