Now that we have support for the Routerboard 100 series working, we come to
the problem of making it easy for the end user to build and install.

I have a script (wget2nand) which is currently a package but is only of use
by the RB100 series at the moment so I think it should actually be under
base-files in the adm5120-2.6 target (but that is up to Florian who built
the package from my script).  This script automates the transfer of the
code that needs to be put onto the nand flash.  It expects the code to
be available on a web server at a URL that is entered by the user using
the console (through minicom).  The URL could be derived automatically if
we force a particular layout of web server and assume it is on the machine
that the card got its DHCP address from (and its netbooted kernel),  or make
this the default URL if one is not specified.

But we need two kernels, and a TGZ version of the flash image.  The ADM-5120
target already builds a kernel as well as the TGZ image, this being the
final kernel to be put on the flash.

The first kernel is the one to be netbooted.  This needs a minimal initramfs
containing busybox, udhcpc and wget2nand (and any pre-reqs to those).  It 
takes a command line which specifies that the serial console should be used
and that the line speed is 115200.

The second kernel is essentially the same as the first, but has only the 
dummy initramfs that is always present in a 2.6 kernel these days, and has
a command line giving the same serial parameters and root=/dev/mtdblock1
rootfs=yaffs.  This second kernel is then TARed to ensure that it has the
right atttributes.

Ideally the build process would produce the files that wget2nand expects
directly, so that the directory into which they are put can used directly
by the tftps server (can be dnsmasq) and the web server.

BTW, I used wget2nand as there seems no point in storing the downloaded
TAR files, rather I stream them directly into TAR from wget.  If anyone 
knows a tftp client which get get to stdout rather than to file we could
use that instead and then the users would only need dnsmasq to do all the
host processing.

Unless it has been fixed, and I have not managed to verify this yet, objcopy
has a problem (at least on mipsel) when replacing sections, so replacing the
initramfs is difficult as there is always one there be default.  We could 
simply have the same initramfs as it is so minimal and the real files will
override the ones in the initramfs, but we would not want to have a complete
rootfs with lots of packages in it in the initramfs as quite quickly we would
blow the 4MB boot partition.  So really we need two separate root directories,
one for the minimal content in the initramfs, the other for the tar file.

Obviously we need to make this as easy as possible to use for the end user,
and I would welcome any ideas as to the best way to achieve this odd 
requirement.

David
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to