--- flashboot.old/README Sat Aug 26 20:08:25 2006 +++ flashboot.allthestuff/README Tue Aug 29 14:57:47 2006 @@ -93,7 +93,7 @@ execute it, it will build the dynamic release in the current dir. If you are storing your src & sys-folders somewhere else, then you will have to edit build-release.sh. This build can take a very -long time. (Make sure you run this in the flashdist-directory +long time. (Make sure you run this in the flashdist-directory) # ./build-release.sh @@ -115,41 +115,63 @@ Customisation ------------- -This system is customised to _my_ needs, but is general enough -to be (IMO) useful to others. The most likely change will be the -kernel configuration. It is probably best that different kernel -configurations be derived from the GENERIC-RD template provided. Once -a derivative kernel config has been created, modify the KERNEL -variable in the Makefile to specify its filename. +The system support customisation in three different ways. -A couple of caveats regarding kernel customisation: First, if your -kernel+ramdisk blob is larger than 16Mb, then you will need to increase -NKPTP in the kernel config (just uncomment the entry in the file, it's -good for 32Mb kernels). The symptom of a kernel with a too-small NKPTP -is an immediate crash or reboot after the kernel is loaded. Another -caveat is that kernels larger than about 14Mb in size will use up all -the ISA DMA memory and the kernel will panic at boot unless isadma is -disabled in the config or via UKC. This leads to the final problem: if -isadma is disabled, then things that attempt to use it (e.g. floppy disk -access) will panic the kernel. The best solution is to try to keep your -kernels small. +1. Any file that you add to the root of the flash-card (/flash) that +has the tgz-extension is automatically extracted to the ramdisk +during boot. This is useful for small extensions or configuration +that you can distribute in a single tgz-package. Files can also be +added to the /flash/conf directory, they are then automatically +copied (not extracted) to the ramdisk during boot. -The contents of the ramdisk filesystem may be easily modified by -editing the "list" file. The format is the same as used by the OpenBSD -installation media and is fairly self-explanatory. +2. There is also an option in rc.conf to create a second ramdisk in +/usr/local. By default this is not done at all to save memory on the +device. If activated this will also extract any files located in +/flash/pkg/ ending with the tgz-extension to /usr/local. This +provides an excellent way to add packages directly from the OpenBSD +ftp-server without needing to expand the original ramdisk. The +rc-script will even remove some unnecessary files from the packages +such as man-pages and files needed only for compiling. -This infrastructure does a couple of things to save space, but is -not at all ferocious as I stopped tweaking once I reached my target -(bsd.gz < 5Mb). To save space, only a couple of term{cap,info} entries -are transferred (see TERMTYPES in the Makefile). +3. Recompile a kernel that suits your needs and that includes or +excludes the binaries and libs that you need for your application. +Change the list to include extra files. You can also use the script +build-largekernel.sh which is an exact copy of the build-kernel.sh +with the difference that it creates a 25MB ramdisk instead of a ~15 +MB kernel. It also includes the content of the list.largekernel-file +to include some extra binaries and libs that does not fit in the +original distribution. If you have decided to go down this road you +might just as well modify the default configuration located under +the initial-conf directory. +The first two alternatives can be done without having to recompile +the distribution and should be sufficient for most needs. But on +devices that do not have the memory concern, there should be much +easier to do build the larger kernel and add stuff as you need them. + +Kernelsizes are a problem when piggybacking a ramdisk blob. +Kernel+ramdisks larger than 16MB needs to increase the NKPTP in the +kernel config. This is already done for all the kernels and you +shouldn't have to do anything as long as you stay under 32MB. The +second problem is that kernels larger than about 14MB will use up +all the ISA DMA memory, for this reason ISA DMA is disabled. This +leads to the final problem: if isadma is disabled, then things that +attempt to use it (e.g. floppy disk access) will panic the kernel. +In the end the best solution is to try to keep your kernels small. + +This infrastructure does a couple of things to save space, but is +not at all ferocious as I stopped tweaking once I reached my target +(bsd.gz < 5Mb). To save space, only a couple of term{cap,info} +entries are transferred (see TERMTYPES in the Makefile). + + Support and bug reporting ------------------------- -Please send bug reports to djm@mindrot.org. I don't have time to -support this software, so if you run into problems you are on your -own. This code works very well for me, so hopefully it will for you -too. +Please send bug reports to djm@mindrot.org or subscibe to the +mailinglist flashboot@mindrot.org. I don't have time to support this +software, so if you run into problems you are on your own. This code +works very well for me, so hopefully it will for you too. Damien Miller