README.altboot revision 1.10
11.1Snisimura/// notes about altboot /// 21.1Snisimura 31.10Snisimura$NetBSD: README.altboot,v 1.10 2012/04/24 14:56:07 nisimura Exp $ 41.1Snisimura 51.1SnisimuraAltboot is a functional bridge to fill the gap between a NAS product 61.1Snisimuracustom bootloader and the NetBSD kernel startup environment. Altboot 71.1Snisimurairons out and rectifies erroneously configured HW by product 81.3Sphxbootloaders and prepares a sane runtime, better suited for booting 91.1SnisimuraNetBSD kernels. 101.1Snisimura 111.1Snisimura- provides the foundation of a fast NetBSD porting cycle with functionalities 121.1Snisimura product bootloaders don't have. 131.1Snisimura- facilitates a flexible and clean NetBSD implementation tailoured 141.1Snisimura to target HW in detail, minimizing bumpy adjustments and hacks in 151.1Snisimura locore asm and machdeps in very early kernel startup stage. 161.1Snisimura- levels out differences among similar-but-not-the-same porting 171.1Snisimura targets to make it possible having common NetBSD kernels for them. 181.1Snisimura- builds and hands a bootinfo list to the NetBSD kernel. 191.1Snisimura 201.3SphxAltboot is known working on at least these models: 211.3Sphx 221.7Sphx- KuroBox or LinkStation with a popular U-Boot as replacement of 231.7Sphx the vendor's proprietary one 241.1Snisimura 251.1Snisimura U-Boot 1.1.4 LiSt 2.1.0 (Sep 21 2006 - 00:22:56) LinkStation / KuroBox 261.1Snisimura 271.1Snisimura- Synology 101g+ with vendor custom PPCboot 281.1Snisimura 291.1Snisimura PPCBoot 2.0.0 (Mar 1 2005 - 15:31:41) 301.1Snisimura 311.6Sphx- Synology 106j, 207, 407e with vendor custom PPCboot 321.5Sphx 331.5Sphx PPCBoot 2.0.0 (Jan 30 2007 - xx:xx:xx) 341.5Sphx 351.2Sphx- D-Link DSM-G600 with heavily restricted vendor custom U-Boot 361.2Sphx 371.2Sphx U-Boot 0.2.0 (May 26 2005 - 19:38:32) 381.2Sphx 391.3Sphx- QNAP TS-101 (V200) with vendor custom U-Boot 401.3Sphx 411.3Sphx U-Boot 1.1.2 (Aug 28 2005 - 13:37:25) QNAP System, Inc. 421.3Sphx 431.7Sphx- Iomega StorCenter with vendor custom U-Boot 441.7Sphx 451.7Sphx U-Boot 1.0.0 (Sep 2 2005 - 14:49:11) 461.7Sphx 471.9Sphx- Allnet 6250 and compatible with restricted vendor custom PPCboot 481.8Sphx 491.8Sphx PPCBoot 2.0.0-A9 (Feb 13 2006 - 14:56:11) 501.8Sphx 511.10Snisimura- KURO-BOX/T4 vendor custom U-Boot 521.10Snisimura 531.10Snisimura U-Boot 2009.06-BUFFALO-svn1376 (Jul 11 2009 - 04:11:01) KURO-NAS/T4 541.10Snisimura 551.1SnisimuraThe standard use of altboot is to invoke it with a short script from 561.3SphxU-Boot/PPCboot, where the altboot.bin image is stored in an unoccupied 128KB 571.1Snisimurasection of the target's HW NOR flash. Combined with standard 581.1SnisimuraU-Boot/PPCboot functions, it is possible to boot a NetBSD kernel off 591.1Snisimurait right after power-on, without the help of manual intervention. Note 601.1Snisimurathat the original U-Boot/PPCboot still remains useful and altboot works 611.1Snisimuraas a functional extension for them. 621.1Snisimura 631.3SphxIn case the firmware was crippled by the vendor so that it only boots 641.3SphxLinux U-Boot images (D-Link), you can still use altboot by uploading 651.3Sphxaltboot.img instead of the Linux kernel. 661.3Sphx 671.7SphxAltboot passes the following bootinfo records to the NetBSD/sandpoint 681.1Snisimurakernel. 691.1Snisimura- processor clock tick value driving MPC8241/8245. 701.1Snisimura- serial console selection. 711.1Snisimura- booted kernel filename and which device it was fetched from. 721.1Snisimura- Ethernet MAC address, if target HW lacks SEEPROM to store a unit unique 731.1Snisimura value. 741.1Snisimura- product family indication. 751.1Snisimura- preloaded kernel module names (under development). 761.1Snisimura 771.4SphxWhen no arguments are given, altboot defaults to boot a kernel called 781.4Sphx"netbsd" from the root partition of the first disk in multiuser mode. 791.4Sphx 801.4SphxBoot arguments may be passed in three ways: 811.4Sphx- On the command line, directly after the "go 0x1000000" command. 821.4Sphx- From the U-Boot "bootargs" environment variable, when started by "bootm". 831.4Sphx- By entering the interactive mode. 841.4Sphx 851.4SphxThe following boot arguments are recognized: 861.4Sphx- multi boot into multiuser 871.4Sphx- auto boot into multiuser 881.4Sphx- single boot into singleuser 891.4Sphx- ask ask for boot device 901.4Sphx- ddb drop into the kernel debugger 911.4Sphx- userconf change configured devices 921.4Sphx 931.4SphxThe following boot flags are recognized: 941.4Sphx- norm boot normally 951.4Sphx- quiet boot quietly 961.4Sphx- verb boot verbosely 971.4Sphx- silent boot silently 981.4Sphx- debug boot with debug output 991.4Sphx 1001.4SphxAdditionally the special argument "altboot" is recognized, which replaces 1011.4Sphxthe actually running altboot program with the loaded binary file and 1021.4Sphxrestarts itself. Mainly useful for altboot testing. 1031.4Sphx 1041.4SphxMultiple arguments may be specified at once, although not all combinations 1051.4Sphxmake sense. The format of an altboot command line is: 1061.4Sphx 1071.4Sphx [[<bootargs> ...] <devicename>:[<bootfile>]] 1081.4Sphx 1091.4SphxThe following device names are supported: 1101.4Sphx- tftp boot from TFTP (address retrieved by DHCP) 1111.4Sphx- nfs boot from NFS (address retrieved by DHCP) 1121.4Sphx- wd[N[P]] boot from disk N, partition P, defaults to wd0a 1131.4Sphx- mem boot from memory 1141.4Sphx 1151.4SphxFor tftp and nfs the bootfile is determined by DHCP, when missing. 1161.4SphxFor wd it defaults to "netbsd". 1171.4SphxFor mem the bootfile is actually a hexadecimal address to load from and 1181.4Sphxis mandatory. 1191.4Sphx 1201.1Snisimura ### ### ### 121