History log of /src/usr.sbin/installboot/installboot.c |
Revision | | Date | Author | Comments |
1.41 |
| 10-Jul-2022 |
brook | usr.sbin/installboot: Add a command line option (-u) to set U-Boot search paths
Installboot can install U-Boot boot blocks directly into a system image. Normally, the U-Boot files are searched for in /usr/pkg/share/u-boot, under the expectation that most people will build them with pkgsrc. However, it is also possible to set an environment variable (INSTALLBOOT_UBOOT_PATHS) to a colon-separated search path to accommodate other situations. This commit adds a command line option (-u) to set the search path; if present, it overrides the environment and default.
|
1.40 |
| 07-May-2019 |
thorpej | Add installboot(8) support for evbarm (and, in the future, other evb*) boards that use u-boot. A known board database lists boards and their respective u-boot packages. u-boot packages are discovered at run-time (in /usr/pkg/share/u-boot, by default). These packages contain board database overlays that describe u-boot installation procedure that's specific for that board.
Support this as a native tool and as a host tool. The native tool will attempt to determine the running board type using OpenFirmware calls. Host tool and native tool alike may also specify a board type directly using the "-o board=xxx option" or have installboot(8) determine the board type from a device tree blob using "-o dtb=/path/to/board.dtb". A "-o media=xxx" option is provided for boards that have different u-boot binaries and/or installation procedures for different media types (e.g. SDMMC, eMMC, or USB).
This is trivial to extend to other evb* platforms that use u-boot, even if they don't use FDT for autoconfiguration.
|
1.39 |
| 25-Jul-2015 |
mlelstv | branches: 1.39.16; Handle getfsspecname errors.
|
1.38 |
| 05-Jun-2015 |
mlelstv | Can't use getfsspecname (and thus wedge names) while building tools.
|
1.37 |
| 05-Jun-2015 |
mlelstv | Support wedge names.
|
1.36 |
| 03-Nov-2011 |
martin | branches: 1.36.18; Minor usage tweaks for SMALLPROG
|
1.35 |
| 31-Aug-2011 |
joerg | branches: 1.35.2; Use __dead
|
1.34 |
| 14-Jan-2010 |
drochner | On i386/amd64, define two flag bits in the boot parameters which control whether modules are loaded and whether boot.cfg is evaluated, and set both to "off" per default in the PXE bootloader. Extend "installboot" to toggle the bits. This way, pxeboot works with existing dhcp server setups (and as described in the manpage) out of the box. Also, boot.cfg reading involves a stat() call which is horribly inefficient with the TFTP pseudo file system.
|
1.33 |
| 14-Jan-2010 |
tsutsui | Remove if defined(__RCSID) around __RCSID() macro. #include "nbtool_config.h" is enough for tools.
|
1.32 |
| 07-Jan-2010 |
tsutsui | Add a sectorsize parameter member in struct ib_params and use it where sector size (disk block size) is required, instead of DEV_BSIZE constant which means device I/O block size.
"Looks reasonable" from dholland@, and fixes tools installboot(8) on Cygwin where DEV_BSIZE != 512 as mentioned in PR toolchain/42555.
|
1.31 |
| 05-Apr-2009 |
lukem | fix sign-compare issues
|
1.30 |
| 28-Apr-2008 |
martin | branches: 1.30.8; Remove clause 3 and 4 from TNF licenses
|
1.29 |
| 06-Mar-2008 |
dsl | branches: 1.29.2; Don't treat -f and an invalid flag. Report the hex value of unknown unsupported (for the specified arch) flags.
|
1.28 |
| 15-Feb-2007 |
dsl | branches: 1.28.4; 1.28.8; Add a -f (force) parameter to installboot(8). If specified then checks on the disks BPB are not done, and any existing BPB is deleted. This is needed soince newfs(8) doesn't overwrite the BPB - which is basically the FAT superblock. Update documentation and add an example of using bootxx_fat16.
|
1.27 |
| 22-Oct-2006 |
christos | fix initializers
|
1.26 |
| 22-Apr-2006 |
christos | Coverity CID 55: Do things in a different order to appease coverity.
|
1.25 |
| 22-Feb-2006 |
dogcow | Since installboot is part of tools, and TIOCGWINSZ is not present on all systems (PR/32878), make the window sizing stuff conditional.
Also, fix formatting of 'supported file system types are' line.
|
1.24 |
| 18-Feb-2006 |
dsl | Ignore entre is in the 'machines' table that have no name. Use terminal with to break line of machine names.
|
1.23 |
| 18-Feb-2006 |
dsl | Move the MD definitions into the MD files, leaving machines.c with just a list of the supported machines.
|
1.22 |
| 26-Dec-2005 |
jmmv | Installing the primary bootstrap requires two arguments, so ensure they are present. Otherwise, an assertion is triggered (and core is dumped) in the MD setboot code (just try 'installboot /dev/fd0a' on, e.g., i386).
|
1.21 |
| 12-Nov-2005 |
dsl | Don't try to determine the type of the target filesystem unless a second stage bootstrap is specified. It is only needed when we need to copy the sector numbers of the second stage into the first stage. Document that a configured baud rate of zero will cause the baud rate set by the bios to be used.
|
1.20 |
| 11-Nov-2005 |
wiz | Sync usage with man page (sort options).
|
1.19 |
| 11-Nov-2005 |
dsl | Add a -e (edit) option to allow the bootstrap options of an installed bootstrap or a file containing such a bootstrap to be changed/displayed. In particular this will (soon) let you modify the parameters for pxeboot.
|
1.18 |
| 10-Jul-2005 |
isaki | Use errx() rather than err() where appropriate.
|
1.17 |
| 15-Aug-2004 |
dsl | Add an option to set bp_consaddr (serial console IO port address) Only complain about small patch area if we would write something non-zero there.
|
1.16 |
| 20-Jun-2004 |
jmc | Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
|
1.15 |
| 13-Mar-2004 |
dsl | branches: 1.15.2; Add a -o keymap=zyz option that will set the boot keymap. If a character in the map is typed, it gets replaced by the one following.
|
1.14 |
| 05-Jan-2004 |
jmmv | Homogenize usage messages: make the 'usage' word all lowercase, as this seems to be the most common practice in our tree.
|
1.13 |
| 08-May-2003 |
petrov | Format fixes.
|
1.12 |
| 29-Apr-2003 |
dsl | Change 'ulong' to 'unsigned long' so it compiles as a host tool on freebsd.
|
1.11 |
| 15-Apr-2003 |
dsl | Change the way -o options are parsed, now done in MI code with a check after all the options have been processed that they are supported my the specific system. Add i386 MD options (console, password, speed and timeout) (Approved by christos and lukem)
|
1.10 |
| 20-May-2002 |
lukem | - clean up display of supported machines & fstypes to ensure that last column gets a trailing "," if there's more entries to come. - if getmachines() or getfstypes() is called with 3 NULL params, just print the list of supported items. - in usage(), call getmachines() and getfstypes() with 3 NULL params. (i got sick of typing "installboot -m asdf" to get a list of supported machines during testing :)
|
1.9 |
| 15-May-2002 |
lukem | - add fsstat (fstat(2) on fsfd) and s1stat (fstat(2) on s1fd) in ib_params, and use instead of replicating the effort in various locations - if filesystem is not a regular file, use sync(2) instead of fsync(2) after the bootstrap has been written - move <sys/stat.h> and <stdint.h> into "installboot.h"
|
1.8 |
| 14-May-2002 |
lukem | user visible stuff: - add `-B s2bno', to provide the starting block for the secondary bootstrap. intended for use on platforms where the blocks of the stage2 bootstrap are hardcoded into the stage1 bootstrap (currently: sparc, sun2) - don't support `-b s1bno' for sparc or sun2, since the primary is always at a fixed location on the disk. - if `filesystem' is a regular file, use fsync(2) instead of sync(2)
code changes: - add hardcode_stage2(), which uses -B s2bno and the size of the provided secondary bootstrap (as an actual file, not as part of the `filesystem' argument) to provide a sequential list of blocks from s2bno, each block being the appropriate file system size (from params->fstype->blocksize) - add blocksize and needswap run-time parameters to ib_fs - in *_match(), set params->fstype->blocksize to the underlying block size (8KB for raw), and params->fstype->needswap as appropriate - rename IB_STARTBLOCK to IB_STAGE1START, and add IB_STAGE2START - use hardcode_stage2() to implement raw_findstage2() and IB_STAGE2BLOCK support for ffs_findstage2() - improve some comments, add some prototypes, ...
|
1.7 |
| 30-Apr-2002 |
lukem | add some more assert()s
|
1.6 |
| 19-Apr-2002 |
lukem | - Add code from Matt Fredette <fredette@theory.lcs.mit.edu> to implement fstype checking, and back-end "ffs" support. - Consistently use at least uint32_t for blocknumbers (vs. int / long / ...) - Consistently use uintXX_t instead of u_intXX_t. - Move various duplicated prototypes into "installboot.h"
|
1.5 |
| 12-Apr-2002 |
lukem | - support optional secondary bootstrap arg for install (unused by existing backends, but future ones need it) - use "bootstrap" instead of "boot block" in various messages where appropriate - rename some members of ib_params
|
1.4 |
| 12-Apr-2002 |
lukem | run fsync on the fsfd before closing
|
1.3 |
| 11-Apr-2002 |
lukem | - add no_parseopt(), no_setboot() and no_clearboot() methods for back-ends to use when they don't support a particular method - don't automatically generate machines.c anymore - add entries for i386 (temporarily unsupported) and shark (permanently unsupported)
|
1.2 |
| 04-Apr-2002 |
simonb | Include <limits.h> to explicitly get LONG_MAX.
|
1.1 |
| 03-Apr-2002 |
lukem | Machine independent "unified" installboot(8). Currently only supports vax, with more MD back-ends to be added RSN.
|
1.15.2.1 |
| 22-Jun-2004 |
tron | Pull up revision 1.16 (requested by jmc in ticket #527): Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
|
1.28.8.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.28.4.1 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.29.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.30.8.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.35.2.1 |
| 10-Nov-2011 |
yamt | sync with head
|
1.36.18.2 |
| 30-Jul-2015 |
snj | Pull up following revision(s) (requested by mlelstv in ticket #900): sbin/newfs/newfs.c: revision 1.113 usr.sbin/installboot/installboot.c: revision 1.39 Handle getfsspecname errors.
|
1.36.18.1 |
| 16-Jul-2015 |
snj | Pull up following revision(s) (requested by mlelstv in ticket #844): usr.sbin/installboot/Makefile: revisions 1.49, 1.50 usr.sbin/installboot/installboot.c: revisions 1.37, 1.38 usr.sbin/installboot/arch/amiga.c: revision 1.9 Support wedge names. -- Can't use getfsspecname (and thus wedge names) while building tools. -- Linking against libutil is not appropiate for tools. -- Compute bootloader checksum correctly also on little endian systems.
|
1.39.16.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|