Commit Graph

22 Commits

Author SHA1 Message Date
thorpej e5c09b191b Use designated initializers for struct ib_mach. 2019-05-07 04:35:31 +00:00
christos 7a3dc95e5c fix various gcc-4.5 warnings 2011-08-14 17:50:16 +00:00
tsutsui 359ac4c562 A checksum value in alpha boot block is stored in little endian,
so use le64toh() to print it on the host tool.
While here, use consistent (unsignd long long) casts on printing it.
2009-10-26 14:26:25 +00:00
lukem 2b2f4703f2 fix sign-compare issues 2009-04-05 11:48:02 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dsl 1ec8e10fce Coverty 7449: Change 'return (0)' to 'goto done' so we free(bootstrapbuf)
before exiting with error.
2006-03-18 11:08:19 +00:00
dsl cce659e230 Move the MD definitions into the MD files, leaving machines.c with just
a list of the supported machines.
2006-02-18 10:08:07 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
dsl ed45ba76c7 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)
2003-04-15 14:22:13 +00:00
grant eda9e509bb sweep of errx/warnx, remove unnecessary trailing \n 2002-07-20 08:40:16 +00:00
matt 5d837662a3 Use to htobe16, not htons 2002-05-31 05:54:36 +00:00
lukem 932b752477 - 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"
2002-05-15 02:18:22 +00:00
lukem 1279ab0cf5 pull in <sys/bootblock.h> in "installboot.h" instead of in arch/*.c
(and remove <dev/dec/dec_boot.h>, since <sys/bootblock.h> has that stuff now)
2002-05-14 06:40:32 +00:00
lukem 1bdd92ee90 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, ...
2002-05-14 06:18:50 +00:00
lukem d9e55fca47 display sector start & count in decimal rather than hex 2002-04-30 14:24:33 +00:00
tv 4887cf3412 HAVE_CONFIG_Hize. Also get *_boot.h from "../../sys/" when HAVE_CONFIG_H,
rather than creating more stubs.
2002-04-25 18:11:53 +00:00
lukem 8eb8919e12 - 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"
2002-04-19 07:08:51 +00:00
lukem d280442683 - 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
2002-04-12 06:50:41 +00:00
lukem aa5396b0ec check size of reading bootblock against the correct size... 2002-04-11 08:02:27 +00:00
mrg 5b7f1cce2d LP64isms. also, be sure to use <string.h> if we use memset or memcpy. 2002-04-04 14:00:55 +00:00
lukem 9f1d1d933d don't pull in <dev/sun/disklabel.h> just for SUN_DKMAGIC; instead,
provide local copy of that #define.
2002-04-04 00:32:06 +00:00
lukem 06d7c45c38 Add support for alpha, based on {vax,pmax}.c and
sys/arch/alpha/stand/installboot.
XXX: not fully tested yet.
2002-04-03 10:21:01 +00:00