Commit Graph

298 Commits

Author SHA1 Message Date
rin 4cb98d1efb Mention fdisk(8) and x86/mbr(8) in example for x86, for careless
people like me ;).

Bump date.
2021-02-06 12:18:45 +00:00
mrg cb93b81028 add support for new GCC 9 warnings that may be too much to fix
right now.  new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree.  mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it.  (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.)  clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
2020-09-06 07:20:26 +00:00
thorpej 696896edc9 Add evbmips support for u-boot handling. 2020-06-21 17:17:01 +00:00
thorpej bba3c68329 Update for proplib(3) API changes. 2020-06-07 00:51:48 +00:00
wiz c65439fe2c Reduce macro arguments. 2020-06-06 20:30:23 +00:00
tsutsui c332e97e6f Fix ews4800mips example. Its raw partition is rsd0p, not rsd0c. 2020-06-06 10:22:45 +00:00
msaitoh 8012ca3f0e Remove extra semicolon. 2020-05-14 08:34:17 +00:00
thorpej 6e45676f26 Add support for additional install step directives to enable using
installboot(8) to write u-boot images to SPI NOR and other types of
raw flash devices: input-block-size, input-pad-size, output-size, and
output-block-size.

Add the ability to create aliases for install objects, useful for when
e.g. sdmmc and emmc share the same steps.

Tested on an A20-OLinuXino-LIME2-e16Gs16M by bouyer@.

XXX pullup netbsd-9
2019-09-19 01:25:29 +00:00
martin effa0345f7 Never trust a compiler that predefines i386 as 1 - do the symbol name
concatenation at the make level instead.
2019-08-15 19:53:01 +00:00
martin 3e1d4a8ce3 Replace black voodo linker magic (sometimes failing) with some
makefile + macro magic to trim the list of available machines on size
restricted install media.
2019-08-15 14:06:40 +00:00
kamil 74a26dbbb0 Add missing extern declaration of ib_mach_emips in installboot
Change added for the consistency with the existing code.
2019-08-15 08:36:09 +00:00
maya 3544b82379 Use attribute printf.
Helps clang builds. From a.rin.
2019-05-12 13:47:09 +00:00
wiz 43723405a4 Fix typos. Fix link. Use Pa for path. 2019-05-07 08:14:59 +00:00
thorpej 02d67d1066 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.
2019-05-07 05:02:41 +00:00
thorpej e5c09b191b Use designated initializers for struct ib_mach. 2019-05-07 04:35:31 +00:00
kamil 49b4c5f864 Fix integer overflow in installboot(8)
Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.

Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.
2018-06-23 14:15:57 +00:00
wiz e217b7d046 Remove superfluous Tn macros. 2017-08-15 21:21:18 +00:00
mrg c62a157eb2 merge the rest of sbmips into evbmips. install the stand files in
/usr/mdec/sbmips/ and document them in installboot(8) even though
it isn't really ported yet.  also build the SBMIPS kernels.

unfortunately, sbmips has been broken since mips64 merge, but the
fix can happen in the evbmips version, which we might merge into
the older trees anyway.

XXX: releng can turn off sbmips* builds now for -current.
2017-08-15 10:11:31 +00:00
christos fbbb03bfac don't complain if the mbr was all 0's. 2017-07-17 18:43:45 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
wiz 27790f6369 Bump date for previous. 2017-03-15 11:22:47 +00:00
bad 4046b64730 Document option console=auto. Works since at least NetBSD 6. [i386,amd64] 2017-03-14 13:50:40 +00:00
joerg f9c2736326 Disable a couple of warnings until further investigation. 2017-01-11 12:19:43 +00:00
alnsn ff92ad9fb1 Fix a typo: s/can be use/can be used/ 2016-06-21 21:53:55 +00:00
mlelstv 1cd8415fdc Handle getfsspecname errors. 2015-07-25 10:37:22 +00:00
joerg 8cd9de5e58 Linking against libutil is not appropiate for tools. 2015-06-06 15:45:47 +00:00
mlelstv 182e6e3b91 Can't use getfsspecname (and thus wedge names) while building tools. 2015-06-05 07:44:39 +00:00
mlelstv 18bcb9c15b Support wedge names. 2015-06-05 05:03:21 +00:00
mlelstv bddb934a67 Compute bootloader checksum correctly also on little endian systems. 2015-06-05 05:02:48 +00:00
wiz e74dc903d0 Use An in AUTHORS section. 2015-03-22 22:35:08 +00:00
ast 64fd4bb542 Appease various mandoc -Tlint warnings and update copyright while we're here 2015-03-22 09:45:50 +00:00
christos 039e20963e Use VAX_LABELOFFSET here; It needs to be the machine-specific one. Thanks
to gcc-4.8 for discovering the bug and to Atari for having a LABELOFFSET of
516 > 512 :-)
XXX: Perhaps we should put all those constants in <sys/bootblock.h> instead
of spreading them around.
2014-11-13 16:02:25 +00:00
skrll 6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
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
dholland 2737439da3 fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
2013-06-23 02:06:04 +00:00
dholland f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +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
dholland dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
joerg 9edf9a0457 Remove many HAVE_GCC || HAVE_PCC conditionals as the options also apply
to Clang. Add a few cases of HAVE_LLVM for -fno-strict-aliasing.
2012-08-10 12:10:27 +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
wiz d59179dffb Add missing word. 2012-03-10 19:38:16 +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
ast bdf0a8da40 Use "NetBSD 6.0" and not "NetBSD 6" and sound less like a broken record.
Add note where the actual example is because that's where it's expected.
Part of earlier commit ok-ed by releng@
2012-02-11 07:27:25 +00:00
wiz 9328365c03 Remove trailing whitespace. Put macro arguments on same line. 2012-02-10 16:25:47 +00:00
ast 7964aa2984 Update the amd64 and i386 examples to use /usr/mdec/bootxx_ffsv2,
i.e. DEFAULT_UFS2 as src/distrib/utils/sysinst/bsddisklabel.c does
since post-NetBSD5.  This avoids rendering an i386 or amd64 system
unbootable if the given example is thoughtlessly cut-and-pasted on
a NetBSD6.x system (been there, done that ;-) Qualify the descriptions
of /usr/mdec/bootxx_ffsv{1,2} along those lines.

Fixed a small typo in comment of distrib/utils/sysinst/arch/amd64/md.h.

Ok by releng@
2012-02-09 18:35:44 +00:00