Commit Graph

115 Commits

Author SHA1 Message Date
christos
a74a5abffb XXX: gcc initialize a variable 2013-10-21 15:37:46 +00:00
christos
4013b33b0e move all the unused code inside #if 0 2013-10-19 17:08:15 +00:00
martin
23e8ed59f1 In the tool build <nbinclude/vax/disklabel.h> is enough. 2013-06-16 19:05:00 +00:00
msaitoh
0893cfd5dd Remove trailng whitespaces. 2013-06-14 03:54:43 +00:00
matt
252b82608c Make this build with the disk label change. 2013-05-03 21:32:04 +00:00
martin
67c2857b08 Provide an empty __CTASSERT() for toolbuilds 2013-04-04 16:11:12 +00:00
martin
e23a017d74 Fix installboot for VAX, as discussed on port-vax. Problem pointed out
by Jonny Billquist, thanks to Marl Pizzolato for patiently explaining
the various ways of booting a vax to me.
Now VAX 780 can boot directly from VMB.EXE again.
2013-04-04 12:55:30 +00:00
gson
4caffa5d5e When printing the list of valid console names, don't treat the consoles[]
array as NULL terminated, because it's not.
2012-04-06 10:10:11 +00:00
dsl
095ac4e735 Some FAT16 filesystems don't have 'hidden sectors' correctly set to
the offset of the filesystem on the disk.
Let '-b s1blk' be used to fix the value.
2012-03-10 18:42:18 +00:00
skrll
008d551992 Make it an error for the partition to exceed the PDC limit.
Inspired by PR/45742
2012-01-09 11:44:53 +00:00
christos
7a3dc95e5c fix various gcc-4.5 warnings 2011-08-14 17:50:16 +00:00
tsutsui
14d39e456d Fix botch in previous revision. Sorry for a stupid change. 2011-02-10 23:25:11 +00:00
pooka
5f7e80a834 Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing.  eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman.  Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution.  The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.
2011-01-26 01:18:43 +00:00
drochner
23174fa441 Invert the flag bits to control module loading: rename
LOADMODULES->NOMODULES and READBOOTCONF->NOBOOTCONF.
This way, the default value (0) wired into old bootxx_* and installed
to file systems remains valid and we avoid problems on partial updates.
2010-01-17 14:54:43 +00:00
drochner
79f027bbd6 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.
2010-01-14 17:49:31 +00:00
tsutsui
e5f39b5e90 Remove if defined(__RCSID) around __RCSID() macro.
#include "nbtool_config.h" is enough for tools.
2010-01-14 16:27:49 +00:00
tsutsui
17ad8ece63 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.
2010-01-07 13:26:00 +00:00
mbalmer
a72f71643d Fix typo in comments, no code change. 2009-12-23 09:17:40 +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
7c56c3165d refer to FFSv1 instead of UFSv1 2009-05-07 07:03:39 +00:00
lukem
2b2f4703f2 fix sign-compare issues 2009-04-05 11:48:02 +00:00
christos
b86f9ffb61 CID 4393: plug memory leak. 2009-02-18 20:06:27 +00:00
mrg
c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
tsutsui
ff1b9852ce Try DIOCWLABEL ioctl only if write op fails with EROFS
because the ioctl is required and valid only for raw devices.
2008-05-24 19:15:21 +00:00
tsutsui
a9e4cec8d9 Use DIOCWLABEL ioctl before writing block 0 which might be
protected by (now MI) bounds_check_with_label(9).
Fixes a problem on sysinst mentioned in PR port-macppc/38016.
2008-05-09 10:14:35 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dsl
f8907c6f49 Add a large warning about the possible side effect of using '-f'. 2008-03-06 21:27:41 +00:00
itohy
9ef5327a26 Try to warn possibly unbootable conditions:
- no disklabel
 - no partition "a"
 - partition "a" exceeds 2GB boundary
2008-02-02 16:46:15 +00:00
itohy
d87794fe47 Change be32toh to htobe32 where applicable. 2008-02-02 13:37:13 +00:00
itohy
347910d40e d_npartitions field of struct disklabel is 16bit, not 32bit. 2008-02-02 13:09:47 +00:00
christos
115d8ccfd7 Don't use __arraycount because this is a 700L, and toolz have messed up
includes.
2007-06-23 23:18:29 +00:00
dogcow
a7e26eabfd unb0rk tools/ builds on systems that don't have __arraycount() defined. 2007-06-23 23:07:44 +00:00
christos
1d3b6feacb PR/36527: Greg A. Woods: installboot(8) doesn't allow for the valid
consdev=auto setting
2007-06-23 14:46:00 +00:00
dsl
486d411937 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.
2007-02-15 22:23:11 +00:00
dogcow
bee2705c99 %d -> %ld, so that building on alpha doesn't fail. (also print more useful
errors - x bytes written, should be y.)
2007-01-07 04:16:57 +00:00
dsl
eacd963375 Support for non-512 byte media.
Automatically enable writes to the 'labelsector' if necessary.
Detect and recover from problems with the write-protected 'labelsector'
  stopping writes to nearby sectors when the non-raw disk device is used.
Support the installation of 512-byte pbr boot code (eg fatboot).
Verify that there is enough reserved space in the bpb (if not all zeros) to
avoid overwriting the start of FAT filesystems.
2007-01-06 10:21:24 +00:00
christos
34fd379e33 Coverity CID 4160: Remove dead code. 2006-09-27 21:22:52 +00:00
uwe
973bc97b66 NetBSD/landisk support. 2006-09-01 21:47:21 +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
dsl
16ca1f6da7 Fix the detection of the bootstrap magic number when run on big-endian systems.
Correct another typo.
2006-01-30 21:15:37 +00:00
dsl
6c51ef9cb5 Fix spelling mistake in message 2006-01-24 18:35:18 +00:00
tsutsui
3b1ef5e593 Add ews4800mips support. 2005-12-29 15:32:20 +00:00
dsl
8c893c964a 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.
2005-11-11 21:09:50 +00:00
dyoung
00218a63cc Oops, straggler: #include <nbinclude/sys/disklabel.h> if we're
building a host-tool.

XXX In hp300_setboot, quiet -Wunitialized: initialize secsize to
XXX HP300_SECTSIZE.  Is this correct?
2005-06-12 21:38:12 +00:00
dyoung
a039894d70 For portability, use 'unsigned int' instead of 'uint'. 2005-06-12 20:21:20 +00:00
lukem
1363df60c1 Don't try to use an uninitialized variable.
Detected with gcc -Wuninitialized.
2005-06-02 05:10:22 +00:00
chs
2438f5c3ad add hp700 support. 2005-05-14 14:46:21 +00:00
yamt
b012ef443f revert a part of the previous. (uint -> u_int)
to make tools/installboot compile again.
2004-08-16 05:57:52 +00:00
dsl
0b10fdb3b8 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.
2004-08-15 22:00:12 +00:00