Adding USB support into firmware

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Author Message
Bird333
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 809

PostPosted: Mon Mar 03, 2008 12:56    Post subject: Reply with quote
I think they all should stay. I don't think all of them are needed for USB but the other are needed for other things. You might want to add fat.o, vfat.o, and xfs.o also.
Sponsor
extasy
DD-WRT User


Joined: 30 Oct 2007
Posts: 52

PostPosted: Mon Mar 03, 2008 12:59    Post subject: Reply with quote
Eko wrote:
We have now all these modules in my usb-mini
root@DD-WRT:/lib/modules# cd 2.4.35/
Code:
root@DD-WRT:/lib/modules/2.4.35# ls
adma100.o                 ide-cd.o                  ipt_mac.o
aec62xx.o                 ide-core.o                ipt_mark.o
bcm57xxlsys.o             ide-detect.o              ipt_webstr.o
cdrom.o                   ide-disk.o                jbd.o
diag.o                    ide-scsi.o                jffs2.o
ebt_arpnat.o              imq.o                     printer.o
ebt_dnat.o                ip_conntrack_pptp.o       scsi_mod.o
ebt_mark.o                ip_conntrack_proto_gre.o  sd_mod.o
ebt_mark_m.o              ip_gre.o                  sr_mod.o
ebt_redirect.o            ip_nat_pptp.o             switch-adm.o
ebt_snat.o                ip_nat_proto_gre.o        switch-core.o
ebtable_filter.o          ip_wccp.o                 switch-robo.o
ebtable_nat.o             ipip.o                    usb-ohci.o
ebtables.o                ipt_CONNMARK.o            usb-storage.o
ehci-hcd.o                ipt_IMQ.o                 usb-uhci.o
ext2.o                    ipt_ipp2p.o               usbcore.o
ext3.o                    ipt_layer7.o
root@DD-WRT:/lib/modules/2.4.35#


Anybody knows what we really need?


I know what is missing Wink.

usbserial.o
ftdi_sio.o
bkmo
DD-WRT User


Joined: 18 Oct 2007
Posts: 385
Location: Grecia, Costa Rica

PostPosted: Mon Mar 03, 2008 13:22    Post subject: Reply with quote
extasy wrote:
This project is getting where I was just dreaming about 2 month ago. I’ve been waiting for a usb support for ASUS routers a long time!

I would very much appreciate if you would include 2 modules in your release:

usbserial.o
ftdi_sio.o

This project rocks! Tank you so much for your effort I’m so grateful.


Yes, this is getting real interesting. I have been building my own USB firmwares, but won't have to now. Please keep up the great work. The only thing that I would suggest that a lot of people ask for is the p910nd printer daemon. It is small and is just one file without any extra libraries. I would think it also could be configured easily from the webui.


Last edited by bkmo on Mon Mar 03, 2008 13:25; edited 1 time in total
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Mon Mar 03, 2008 13:24    Post subject: Reply with quote
Well, here is something to test, integrated some shinji257 code (struggled with his typos...), some mine.

ext2 and ext3 fs only for now.

GUI settings are on Services page, don't forget to reboot after you apply, so that modules get loaded.

Anyway, something to start with, something to build upon...



dd-wrt.v24-9205_mini_usb.bin
 Description:

Download
 Filename:  dd-wrt.v24-9205_mini_usb.bin
 Filesize:  2.98 MB
 Downloaded:  892 Time(s)

shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Mon Mar 03, 2008 13:38    Post subject: Reply with quote
Eko wrote:
Well, here is something to test, integrated some shinji257 code (struggled with his typos...), some mine.

ext2 and ext3 fs only for now.

GUI settings are on Services page, don't forget to reboot after you apply, so that modules get loaded.

Anyway, something to start with, something to build upon...


Typos? Embarassed Please let me know where they were so maybe I can avoid them in the future. Anyways I am updating my router with this new firmware too. Wink

EDIT: Ahh... ic some of the typos now.

Likewise if they were in the webconfig and/or nvramconfig files then I struggled with just getting the formatting right since there is no documentation as to how they should be written. I kinda went against the already existing scripts and worked from there. :cry:

BTW, I should add that when I was building the firmware I couldn't get fat or vfat modules to build at all for some reason.

Oh it looks like the FAT and XFS options to enable/disable it is still present but it isn't compiled. For anyone that still needs FAT support there isn't anything stopping you from getting the FAT kernel modules, storing them in jffs, and then loading them manually.

Also since it is in the subversion repositiory I guess we can start to try and localize it by replacing my hard strings with references to strings added into lang_pack.js.


Last edited by shinji257 on Mon Mar 03, 2008 14:09; edited 2 times in total
rkozola
DD-WRT User


Joined: 27 Oct 2007
Posts: 152

PostPosted: Mon Mar 03, 2008 13:50    Post subject: Reply with quote
eko

Here is another thread with something I wrote up to add usb support into the firmware. It may help you out with getting some of the other modules to load with src/router/Makefile changes and some other things. And don't forget the kernel config changes to get the modules. Wink

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=28348
rkozola
DD-WRT User


Joined: 27 Oct 2007
Posts: 152

PostPosted: Mon Mar 03, 2008 14:53    Post subject: Reply with quote
eko

One more thing, you may not need to have that code in there for the usb led. I think it is already handled by something called [USBLEDprobe]. I think will turn on the led when a usb device gets an address and will also blink when an attached device is reading/writing.
shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Mon Mar 03, 2008 15:27    Post subject: Reply with quote
Hmm... It looks like the file system items are not re-appearing on their own. Maybe because I set it up to be nested (hide until USB storage support is enabled). Maybe we should just go ahead and put it in the main set.

BTW, The following modules were seen listed in /lib/modules/2.4.35 but isn't likely needed.

cdrom.o
ide-cd.o
ide-core.o
ide-detect.o
ide-disk.o
ide-scsi.o

I also found some multi-slot flash card readers may not work. This was referenced in the USB_storage wiki file but I thought to bring it up again. These have been tested.

SanDisk ImageMate 12-in-1 Model SDDR-89 -- Not Working usb timeout when accessing media - Media changes are detected but is unable to access partition table correctly

SanDisk MobileMate SD+ Model SDDR-103 -- Working fine - Media changes detected and access is good.
rkozola
DD-WRT User


Joined: 27 Oct 2007
Posts: 152

PostPosted: Mon Mar 03, 2008 15:31    Post subject: Reply with quote
the src/router/Makefile needs to be modified to remove the uneeded stuff and for the new file systems. I did something like the following.

Code:

ifeq ($(CONFIG_USB),y)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/ext3/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/jbd/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/fat/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/vfat/* $(TARGETDIR)/lib/modules/$(LINUXVER)
ifeq ($(CONFIG_USB),y)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/xfs
   #mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/cdrom/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   #mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/ide/pci/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   #mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/ide/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/scsi/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/usb/host/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/usb/storage/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/usb/* $(TARGETDIR)/lib/modules/$(LINUXVER)
   rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/host
   rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/pci
   rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/storage
   rm -f $(TARGETDIR)/lib/modules/$(LINUXVER)/sr_mod.o
   rm -f $(TARGETDIR)/lib/modules/$(LINUXVER)/ide-scsi.o   

endif


Last edited by rkozola on Mon Mar 03, 2008 15:31; edited 1 time in total
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Mon Mar 03, 2008 15:31    Post subject: Reply with quote
rkzola & Shinji, please review all my changes. I'm new to usb. I'll do new mini now....
rkozola
DD-WRT User


Joined: 27 Oct 2007
Posts: 152

PostPosted: Mon Mar 03, 2008 15:32    Post subject: Reply with quote
Eko wrote:
rkzola & Shinji, please review all my changes. I'm new to usb. I'll do new mini now....


where do you want them posted? This post? I don't want to fill trac if not needed.
shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Mon Mar 03, 2008 15:40    Post subject: Reply with quote
Eko wrote:
rkzola & Shinji, please review all my changes. I'm new to usb. I'll do new mini now....


Ok. Last revision. You can comment out the following lines.

Code:

mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/cdrom/* $(TARGETDIR)/lib/modules/$(LINUXVER)
mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/ide/pci/* $(TARGETDIR)/lib/modules/$(LINUXVER)


Basically lines 301 and 302 in rev 9210. They relate to the modules above and copy them over. These modules were never included in any prior build and I never added them to the ones I did previously. I think rkozola had them commented out in his instructions too.
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Mon Mar 03, 2008 15:40    Post subject: Reply with quote
rkozola wrote:
Eko wrote:
rkzola & Shinji, please review all my changes. I'm new to usb. I'll do new mini now....


where do you want them posted? This post? I don't want to fill trac if not needed.

you have pm
shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Mon Mar 03, 2008 15:54    Post subject: Reply with quote
kodo wrote:
Hi,
shinji257 wrote:
BTW, Are you sure you are wanting UFS support? It doesn't seem right. Are you sure you don't mean FFS?


thanks for your efforts, yes, it is UFS, FreeBSD stuff
Very Happy

but, this is not an important thing, just a "nice to have"


From what I had seen stable UFS support was not included into the kernel until 2.6.5. DD-WRT is currently running on 2.4.35. Alas it may not become possible. Your suggestion has be noted though.
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Mon Mar 03, 2008 15:55    Post subject: Reply with quote
Look like xfs module is HUGE. For mini build it's OK, but for others might be problematic.

Here is 9213 mini build, with fat, vfat and xfs too.

For now you have to manualy mount usb drive, e.g
Code:
mkdir /tmp/usb
mount /dev/scsi/host0/bus0/target0/lun0/part1 /tmp/usb



dd-wrt.v24-9213_mini_usb.bin
 Description:

Download
 Filename:  dd-wrt.v24-9213_mini_usb.bin
 Filesize:  3.24 MB
 Downloaded:  9952 Time(s)



Last edited by Eko on Mon Mar 03, 2008 17:09; edited 2 times in total
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next Display posts from previous:    Page 4 of 10
Post new topic   Reply to topic    DD-WRT 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