Boot router from usb flash drive

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2, 3 ... 15, 16, 17  Next
Author Message
lightix
DD-WRT User


Joined: 03 Dec 2008
Posts: 111

PostPosted: Thu Dec 25, 2008 20:28    Post subject: Reply with quote
USB and DD-WRT MEGA on Asus WL-520GC.

Sorry for my bad English, my russian discussion is here

Hardware mod.
1. You must use 5V 2A power adapter for router.
2. On board : NF1 – data+ & data-, resistors 20 – 50 Ohm.
3. F1 – resistor 0,2-0,5 Ohm (you can use 0 Ohm), BF12 – resistor 0 Ohm.C9 (C130) - SMD 0,1mF or any other 0,1mF between +VCC USB and GND.
4. R56, R3 – 0 Ohm.
5. USB connector (J3):
*GND
*data+
*data-
*+5V

Photo:
more

more

more

more
more


Firmware mod (Thanks to IronShaft)

1. Unpack micro-plus-ssh with FirmwareModKit
2. Go to /rootfs/usr/sbin and remove 2 files: dropbearmulti и pppd.
3. Copy into /rootfs/lib/modules/<kernel>/ drivers: usbcore.o, usb-ohci.o, scsi_mod.o, usb-storage.o, sd_mod.o,ext2.o. (from unpacked nokaid, mega).
4. Go to rootfs/sbin
5. Move file init into rootfs/usr/sbin
6. Create new file rootfs/sbin/init:
Code:

#!/bin/sh
if [ $1 == "noinitrd" ] ; then
    insmod /lib/modules/`uname -r`/usbcore.o
    insmod /lib/modules/`uname -r`/usb-ohci.o
    insmod /lib/modules/`uname -r`/scsi_mod.o
    insmod /lib/modules/`uname -r`/usb-storage.o
    insmod /lib/modules/`uname -r`/sd_mod.o 
    insmod /lib/modules/`uname -r`/ext2.o
    sleep 8s
    mount -t proc none /proc
    mount -t ext2 -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
    if [ -x /mnt/sbin/init ] ; then
        mount -o move /proc /mnt/proc && \
        pivot_root /mnt /mnt/mnt && {
            mount -o move /mnt/dev /dev
            mount -o move /mnt/tmp /tmp
            mount -o move /mnt/jffs /jffs
            exec /sbin/init $*
        }

    else
        exec /usr/sbin/init $*
    fi
else
    exec /usr/sbin/init $*
fi


Make this file executable.

7. Build firmware image and put it into router.

8. Create ext2 linux partition on usb flash drive (partition must be first in partition table, and size >= 15Mb)

9. Unpack MEGA firmware and put contents of rootfs to partition on usb flash drive. Change all files owner to 'root'.

Now, you can boot router from usb flash drive avtomaticaly if usb flash drive with ext2 partition is plugged.

Here is MICRO-PLUS-USB firmware, based on http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24_TNG/svn11218/dd-wrt.v24-11218_NEWD_micro-plus_ssh.bin

rootfs MEGA

_________________
DD-WRT v24 sp2 MEGA on ASUS wl-520gc [with USB]


Last edited by lightix on Sat Dec 27, 2008 8:00; edited 2 times in total
Sponsor
MrAlvin
DD-WRT User


Joined: 07 Jan 2007
Posts: 453
Location: Denmark

PostPosted: Thu Dec 25, 2008 22:29    Post subject: Reply with quote
GREAT job lightix. This means that any router with USB can now be made able to use Mega version of dd-wrt, plus more!

What a great proof of concept. Cool
lightix
DD-WRT User


Joined: 03 Dec 2008
Posts: 111

PostPosted: Sat Dec 27, 2008 8:00    Post subject: Reply with quote
Added links to firmware and unpacked rootfs of MEGA.
_________________
DD-WRT v24 sp2 MEGA on ASUS wl-520gc [with USB]
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Sat Dec 27, 2008 18:22    Post subject: Reply with quote
great!..
After that, can you use it as standalone downloader..
lightix
DD-WRT User


Joined: 03 Dec 2008
Posts: 111

PostPosted: Sat Dec 27, 2008 18:57    Post subject: Reply with quote
Last "tuning"



_________________
DD-WRT v24 sp2 MEGA on ASUS wl-520gc [with USB]
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Tue Dec 30, 2008 7:56    Post subject: Reply with quote
Does It work with usb hard disk drives too?
lightix
DD-WRT User


Joined: 03 Dec 2008
Posts: 111

PostPosted: Tue Dec 30, 2008 9:20    Post subject: Reply with quote
Yes, you can use any USB device
_________________
DD-WRT v24 sp2 MEGA on ASUS wl-520gc [with USB]
hapahopi
DD-WRT Novice


Joined: 07 Nov 2008
Posts: 12

PostPosted: Tue Dec 30, 2008 9:45    Post subject: Reply with quote
Very interesting!!!

Since I have an Asus WL-520gu, can i skip the hardware modification and load the mega instead of the std nokaid?
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Tue Dec 30, 2008 11:05    Post subject: Reply with quote
I have not undersood one point.

As far as I can see in the pictures, You used only one condenser (0,1uF). But in your message, You mention about two condenser.
lightix
DD-WRT User


Joined: 03 Dec 2008
Posts: 111

PostPosted: Tue Dec 30, 2008 12:24    Post subject: Reply with quote
hapahopi wrote:
Very interesting!!!
Since I have an Asus WL-520gu, can i skip the hardware modification and load the mega instead of the std nokaid?

Yes!

_________________
DD-WRT v24 sp2 MEGA on ASUS wl-520gc [with USB]
lightix
DD-WRT User


Joined: 03 Dec 2008
Posts: 111

PostPosted: Tue Dec 30, 2008 12:27    Post subject: Reply with quote
decsan wrote:
I have not undersood one point.
As far as I can see in the pictures, You used only one condenser (0,1uF). But in your message, You mention about two condenser.

C9 (C130) means that condenser must be placed on C9 OR C130 OR any other place between +VCC and GND.

_________________
DD-WRT v24 sp2 MEGA on ASUS wl-520gc [with USB]
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Tue Dec 30, 2008 19:33    Post subject: Reply with quote
I bought smd parts an usb connector. I'm gonna modify router soon..
boolah
DD-WRT Novice


Joined: 17 Jun 2006
Posts: 10

PostPosted: Fri Jan 09, 2009 19:27    Post subject: Thank You! Reply with quote
lightix - I just wanted to thank you for that write-up.

I just flashed my ASUS WL-520gU and it's running mega now! I've been trying to figure out how to get OpenVPN, JFFS, USB and SNMP all working together on the WL-520gU and haven't been able to... until now!

Thanks so much for the contribution. It really is appreciated.
spoch
DD-WRT Novice


Joined: 28 Nov 2008
Posts: 17

PostPosted: Tue Jan 13, 2009 15:04    Post subject: Reply with quote
lightix wrote:
hapahopi wrote:
Very interesting!!!
Since I have an Asus WL-520gu, can i skip the hardware modification and load the mega instead of the std nokaid?

Yes!


I can load the mega directly on the 520GU or on a usb stick? Sorry, I'm a n00b. Thanks much.
anonymous123
DD-WRT User


Joined: 20 Feb 2008
Posts: 120

PostPosted: Tue Jan 13, 2009 15:21    Post subject: Reply with quote
@spoch

You cannot load the mega version directly on the WL-520GU (the router has only 4 MB flash). The mega version must be loaded in the USB stick (uncompress it with the Firmware Modification Kit and copy the root filesystem - the contents of "rootfs" folder - in the USB stick).

Kind regards.
Goto page 1, 2, 3 ... 15, 16, 17  Next Display posts from previous:    Page 1 of 17
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum