Just succeeded in booting OpenWrt from the USB pendrive on an ECS A928 desknote PC. (Pentium 4 system, ~2002, with VIA VT6202 usb2.0 controller and SiS 650/961 chipset)
There are actually no special tricks needed in terms of additions to OpenWrt but it is required to make changes to the kernel compilation settings.
The procedure:
A: OpenWrt compilation
1. Download and install a working openwrt compiler toolchain; mine is kamikaze trunk of Feb. 13 2009 r14476.
2. Under make menuconfig of course select x86 and generic profile and whatever you want in terms of packages.
3. Do a 'make kernel_menuconfig' and there activate relevant scsi and usb 1.0 / 2.0 / disk support to be permanent part of the kernel. Under scsi it is important to activate the asynchronous scsi feature (otherwise it tries to mount the file systems on the pen-drive before they have been identified to exist which results in kernel panic).
B: My PC and USB pen-drive specific stuff
1. what is on my 4 GB pen-drive is two partitions which when the PC runs with Fedora Core 10 Linux show as /dev/sdb4 (a bootable vfat partition 124 MB with syslinux files to which I added OpenWrt's renamed kernel vmlinuz) and /dev/sdb2 (ext2 partition with OpenWrt ext2 file system and files, the remaining 3.8 GB)
2. I partitioned the pen drive the above way using dd to copy an image onto it that contains master boot record, partition table, and partitions and stems from puppy linux; it makes the drive, although partitioned, also appear to be a zip-drive to older AMI BIOS systems (boot partition must be # 4), like mine; more modern PCs with USB boot option shouldn't need this tricky partitioning but mine doesn't boot unless it thinks it is an unpartitioned zip drive or superfloppy, even though the AMI bios talks about a USB RMD-FDD).
Notes:
* openwrt-x86-vmlinuz needs to be renamed to just vmlinuz (syslinux specific, not applicable to grub)
* my choice for syslinux bootloader was forced by the special boot image and partitioning my PC needs and happens to use syslinux. Normally with more recent PCs the images produced by the OpenWrt compilation, offering through menuconfig a choice between grub and lilo, should work fine.
Now it almost worked and showed signs of scsi and the presence of the usb pen drive but there turned out to be a naming convention issue. What shows under Fedora10 as sdb4 and sdb2, in the presence of also a harddisk sda, shows during OpenWrt boot as uba4 and uba2. So the filesystem to be mounted is the ext2 one with the OpenWrt file system on it and seen by the kernel as uba2. When the kernel doesn't find a mountable filesystem it will list the partitions it has found through the scsi/usb system and then panic; so you can edit the boot configuration file to make the kernel pick the right one next time.
My syslinux.cfg file now looks as follows:
default openwrt
label openwrt
kernel vmlinuz
append root=/dev/uba2 rootfstype=ext2 init=/etc/preinit noinitrd console=tty0 console=ttyS0,38400n8 reboot=bios
and then it boots, no HDD or CD/DVD drive present, just the pen-drive and RAM . Again impressed by the flexibility of OpenWrt !
(Last edited by doddel on 15 Feb 2009, 15:58)