Adding USB support into firmware

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


Joined: 02 May 2007
Posts: 222

PostPosted: Mon Mar 03, 2008 16:30    Post subject: Reply with quote
I agree. The xfs one is the one module that will likely have to be left out of the nokaid and std releases. I do think it can be placed back in on the mega one though. For the custom builds I was doing it was 700K large. Looks like the compression from the squash filesystem helps to negate how big it is.

Depending on how useful it is though we can opt to build it but leave it out of the firmware leaving it up to the user to add and insert it themselves. This will make it far easier to implement the complete set into the nokaid version as well.

Now the trick. If we opt to only include XFS in the mini and mega builds how do we get it so that it won't show up in the interface for the nokaid and std builds?
Sponsor
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5772

PostPosted: Mon Mar 03, 2008 16:37    Post subject: Reply with quote
haha, with ej function in e.g. broadcom.c that will list only present modules found in modules dir. Or something....

Not today.... Smile
Bird333
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 809

PostPosted: Mon Mar 03, 2008 16:48    Post subject: Reply with quote
shinji257 wrote:
I agree. The xfs one is the one module that will likely have to be left out of the nokaid and std releases. I do think it can be placed back in on the mega one though. For the custom builds I was doing it was 700K large. Looks like the compression from the squash filesystem helps to negate how big it is.

Depending on how useful it is though we can opt to build it but leave it out of the firmware leaving it up to the user to add and insert it themselves. This will make it far easier to implement the complete set into the nokaid version as well.

Now the trick. If we opt to only include XFS in the mini and mega builds how do we get it so that it won't show up in the interface for the nokaid and std builds?


I agree. I didn't know it was that big. Leave it out and let users add it manually if needed.
bkmo
DD-WRT User


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

PostPosted: Mon Mar 03, 2008 18:34    Post subject: Reply with quote
shinji257 wrote:
I agree. The xfs one is the one module that will likely have to be left out of the nokaid and std releases.
Depending on how useful it is though we can opt to build it but leave it out of the firmware leaving it up to the user to add and insert it themselves.

I always build my firmware against the nokaid firmwares. I am in agreement that XFS can be added manually if needed.

Bkmo
bkmo
DD-WRT User


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

PostPosted: Mon Mar 03, 2008 18:39    Post subject: Reply with quote
Eko wrote:

For now you have to manualy mount usb drive


You could easily add an automount startup via the webui no? such as something simple like:

# automount multiple partitions if they exist
mkdir /tmp/usb
# mount partition 2
if [ -e /dev/discs/disc0/part2 ]; then
mkdir /tmp/usb/2
/sbin/e2fsck -p /dev/discs/disc0/part2
/bin/mount /dev/discs/disc0/part2 /tmp/usb/2
fi
# mount partition 3
if [ -e /dev/discs/disc0/part3 ]; then
mkdir /tmp/usb/3
/sbin/e2fsck -p /dev/discs/disc0/part3
/bin/mount /dev/discs/disc0/part3 /tmp/usb/3
fi
# mount partition 4
if [ -e /dev/discs/disc0/part4 ]; then
mkdir /tmp/usb/4
/sbin/e2fsck -p /dev/discs/disc0/part4
/bin/mount /dev/discs/disc0/part4 /tmp/usb/4
fi
# mount partition 5
if [ -e /dev/discs/disc0/part5 ]; then
mkdir /tmp/usb/5
/sbin/e2fsck -p /dev/discs/disc0/part5
/bin/mount /dev/discs/disc0/part5 /tmp/usb/5
fi

#Load USB Printer support for 1 USB Printer Bi-directional
if [ -e /dev/usb/lp0 ]; then /usr/sbin/p910nd -b -f /dev/usb/lp0 0
fi
Bird333
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 809

PostPosted: Mon Mar 03, 2008 18:45    Post subject: Reply with quote
Question, what do statements in brackets mean in a startup script?

Example
bkmo wrote:
[ -e /dev/discs/disc0/part2 ]
Bird333
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 809

PostPosted: Mon Mar 03, 2008 18:49    Post subject: Reply with quote
Eko, if you make a new mega usb build; I would be glad to test..
shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Mon Mar 03, 2008 23:25    Post subject: Reply with quote
Bird333 wrote:
Question, what do statements in brackets mean in a startup script?

Example
bkmo wrote:
[ -e /dev/discs/disc0/part2 ]


-e means to check to see if it exists so it is checking to see if /dev/discs/disc0/part2 exists in this example. Note that it will only exist if the partition is actually present.
Bird333
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 809

PostPosted: Tue Mar 04, 2008 0:44    Post subject: Reply with quote
Thanks. I have seen other things aswell like '-z' in brackets. I guess what I am really wanting to know is what the brackets do/mean?
shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Tue Mar 04, 2008 1:08    Post subject: Reply with quote
The brackets indicate a condition test.

There is a whole list of them in this link.
http://tille.garrels.be/training/bash/ch07.html

It is for the bash shell but they work easily well with dd-wrt scripts.
Bird333
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 809

PostPosted: Tue Mar 04, 2008 3:53    Post subject: Reply with quote
Thanks! That looks like a good site.
extasy
DD-WRT User


Joined: 30 Oct 2007
Posts: 52

PostPosted: Wed Mar 05, 2008 9:49    Post subject: Reply with quote
How is it going? I've been sitting here on nails waiting for a new release witch mounts hdd/usb automatically and have

usbserial.o
ftdi_sio.o

serial support, a mega release would rock!

I tried to mount hdd with the instructions given by eco:
"Code:
mkdir /tmp/usb
mount /dev/scsi/host0/bus0/target0/lun0/part1 /tmp/usb"

But it did not work, tried to install nano, did not work. tried to get samba setup, got error message there as well. tried to get sftp to work, error there as well.

So thought I'll just sit in the boat and wait Smile
shinji257
DD-WRT User


Joined: 02 May 2007
Posts: 222

PostPosted: Wed Mar 05, 2008 10:04    Post subject: Reply with quote
Try doing it against /dev/discs/disc0/part1 like this.

Code:

mkdir /tmp/usb
mount /dev/discs/disc0/part1


Make sure that it exists. Does dmesg report that it detected the drive? What kind of device are you trying to mount?

BTW, Once I am setup I will create a new firmware against the latest svn. I will be dropping XFS support in the firmware to allow USB support to be properly enabled in the nokaid builds. I will try to get USB serial support into it for you. Just curious but what does ftdi_sio.o provide?

EDIT: Looks like eko is ahead of me on this one. XFS is already removed. I will get a couple of usb to serial adapters however since I think they will come in handy.
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5772

PostPosted: Wed Mar 05, 2008 11:12    Post subject: Reply with quote
Yes, xfs is dropped, also ext2 module is dropped, since ext3 module supports ext2 too.

All fits nicely now in nokaid. :)

Please find build 9235 mini_usb and nokaid_usb in my downloads. Mega build has usb inside by default now.
bkmo
DD-WRT User


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

PostPosted: Wed Mar 05, 2008 13:14    Post subject: Reply with quote
Eko wrote:
Yes, xfs is dropped, also ext2 module is dropped, since ext3 module supports ext2 too.

All fits nicely now in nokaid. :)

Please find build 9235 mini_usb and nokaid_usb in my downloads. Mega build has usb inside by default now.


Great work Eko. I almost don't have to rebuild the firmware for my own liking. What I am doing is adding an automount script, and a couple of files for the autoap repeater application. Maybe these could be added to the mega build? Maybe the p910nd print daemon also?

Thanks
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next Display posts from previous:    Page 5 of 10
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