Short reasearch on the topic shows we need scsi_mod , sd_mod , usb-storage as modules. This can be implemented statically (boot script with modprobe scsi-mod ... in it) or dynamically (using udev rules). Dont know if they are compiled in, but probably not because it doesnt work.
Concerning the question if we need usb-support in the bootloader for using usb as root. No, we don't. We would only need it if we wanted to boot DIRECTLY from the usb-stick (i.e. starting the kernel from there too), which we won't (the hassle of porting u-boot wouldnt make up for it).
P.S: davy_gravy your bootlog shows me those modules are already there. As im still not at home (alas, work work work
), i cant inspect it myself. If you boot normally (root=harddisk), is the usb-stick recognized and if yes, as which device?).
For clarity sake, I'm not using an initrd at all in my image.
Well, I'm not sure what you mean w/ the first sentence (but I've not had my 1st cup of coffee yet...
) ... you say "... we need scsi_mod , sd_mod , usb-storage as modules." I know that USB storage works fine/normally and is built-in (not modulized) in my kernel (which is updated to 126.96.36.199 w/ a bucketful of new modules... 609 to be exact). It seems counter intuitive to me to have those three (scsi_mod , sd_mod , usb-storage) as modules. Wouldn't they need to be built in so the kernel can recognize and work w/ the USB storage device? I'm thinking that the fs support for whatever fs is on the flash drive must also be built in (rather than modulized) otherwise, the kernel couldn't read it. (?)
Contents of sdb1 (ext3 filesystem - an afterthought ext3 should be OK, or does it have to be ext2 for uboot ?
LS-GL:/media/usb0# ls -ln
drwxr-xr-x 2 0 0 3072 May 30 03:07 bin
drwxr-xr-x 2 0 0 1024 Jun 22 02:24 boot
drwxr-xr-x 4 0 0 3072 May 30 03:09 dev
drwxr-xr-x 42 0 0 3072 Jun 22 02:35 etc
drwxr-xr-x 2 0 0 1024 Mar 11 11:20 home
drwxr-xr-x 11 0 0 5120 Jun 14 14:57 lib
drwx------ 2 0 0 12288 Jul 25 13:21 lost+found
drwxr-xr-x 2 0 0 1024 May 30 03:02 media
drwxr-xr-x 2 0 0 1024 Mar 11 11:20 mnt
drwxr-xr-x 2 0 0 1024 May 30 03:02 opt
drwxr-xr-x 2 0 0 1024 Mar 11 11:20 proc
drwxr-xr-x 3 0 0 1024 May 31 20:23 root
drwxr-xr-x 2 0 0 3072 Jun 1 19:06 sbin
drwxr-xr-x 2 0 0 1024 May 30 03:02 srv
drwxr-xr-x 2 0 0 1024 Apr 12 09:06 sys
drwxrwxrwt 5 0 0 1024 Jun 21 09:42 tmp
drwxr-xr-x 11 0 0 1024 May 30 04:00 usr
drwxr-xr-x 13 0 0 1024 May 30 03:02 var
drwxr-xr-x 2 0 0 1024 Jun 1 19:29 www
The second sentence, I agree w/, but I haven't looked at if we'd need more than turning on CFG_CMD_USB in the UBoot header(s) & code. Maybe we'd also need to define CONFIG_USB_STORAGE to get it to see the flash drive properly ... as it sees a hdd now. Building a new UBoot is no problem if it is just a tweak of the code. "If" is the operative word there ... I'm not sure how much wiggle room there is in that tiny 256k image ... the crosscompiler/toolchain always pads it out to 240k roughly for the LSPro's UBoot. On the KuroPro's UBoot I had to disable some of the CFG options that I wanted orginally to throw in ... as it didn't map out in memory - I think bbradley knows how to fix that.
From /u-boot-1.1.4-LSPro-w_netconsolepatchesbasic/doc/README.usb :
Common USB Commands:
- usb start:
- usb reset: (re)starts the USB. All USB devices will be
initialized and a device tree is build for them.
- usb tree: shows all USB devices in a tree like display
- usb info [dev]: shows all USB infos of the device dev, or of all
- usb stop [f]: stops the USB. If f==1 the USB will also stop if
an USB keyboard is assigned as stdin. The stdin
is then switched to serial input.
Storage USB Commands:
- usb scan: scans the USB for storage devices.The USB must be
running for this command (usb start)
- usb device [dev]: show or set current USB staorage device
- usb part [dev]: print partition table of one or all USB storage
- usb read addr blk# cnt:
read `cnt' blocks starting at block `blk#'to
memory address `addr'
- usbboot addr dev:part:
boot from USB device
CFG_CMD_USB enables basic USB support and the usb command
CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined if
CONFIG_USB_KEYBOARD enables the USB Keyboard
CONFIG_USB_STORAGE enables the USB storage devices
For grins I may try it later on... but my guess is that I'd have to turn off some of those extra functions in order to get CFG_CMD_USB and CONFIG_USB_STORAGE to fit in ...
LS1 (foonas, nfs, Tranmission
print server, Firefly
for my Roku
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org
lately... => wooohooo!
Unknown command 'wooohooo!' - try 'help'