Commit Graph

285 Commits

Author SHA1 Message Date
mrg 95edaa90e6 allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
the expression expands to "0" or empty, and sometimes these values end
up correctly being 0.
2022-05-15 00:05:24 +00:00
rin 7d0374d5e7 Introduce NOIEEE80211 option, by which IEEE 802.11 support is dropped from
ifconfig(8) in crunched binaries. This saves ~9KB for, e.g., m68k.
2022-05-11 10:45:48 +00:00
andvar 34df0b3791 remove double "with" in comments and usage text. Also fix one typo. 2022-01-24 09:42:13 +00:00
maya 48cbb9381e Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional
Simplifies logic.
Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html
2021-09-25 21:26:03 +00:00
maya f54624bd74 Move DRM-driver firmware from base to its own set, gpufw
This set is only installed on amd64,i386,evbarm.
This set is installed on minimal installs and on install media, in
case someone needs it for basic driver functionality.

Comments:
Switched to a single MK tunable for it - that is probably unneeded.

An upcoming DRM update will include even fatter firmware, and we'd
like to minimize the impact of it.
2021-09-25 08:54:29 +00:00
jmcneill e5de8b183d bootimage: allow appending additional rc.conf options
If RC_CONF_EXTRA is defined, append the contents of this file to the
target file-system's rc.conf
2021-07-24 13:59:28 +00:00
tsutsui 8f008b4571 Check and remove a stale work file for UEFI images with incorrect size.
Fixes PR/56132 (build.sh target install-image fails in update-mode).
2021-06-04 17:09:36 +00:00
jmcneill e64bf27803 Copy release to /${RELEASEMACHINEDIR} instead of /${MACHINE} to match
sysinst expectations.
2020-10-11 14:10:04 +00:00
jmcneill 4f13f64982 Add support for EC2 and resize root to AMD64 live images. 2020-08-05 01:35:18 +00:00
lukem 08fb4e9235 Makefile.minirootkmod don't have SRCS 2020-07-02 08:48:10 +00:00
jmcneill 3123321d90 Shrink the evbarm install image by not including the live images on the install media 2020-05-28 19:20:57 +00:00
jmcneill 9555656604 Only install gptmbr.bin if USE_GPTMBR=yes 2020-05-28 15:13:21 +00:00
jmcneill 1052b1ffc3 Default USE_MBR to no 2020-05-28 15:12:03 +00:00
roy b19d027e40 We solves the zpool SIGBUS issue by building a threaded libhack. 2020-04-14 12:14:59 +00:00
christos d8e96a2d4f Infrastructure for putting kernel+modules in /netbsd/kernel and
/netbsd/modules respectively instead of /netbsd and
/stand/<arch>/<version>/modules.  This is only supported for x86,
and is turned off by default. To try it, add KERNEL_DIR=yes in your
/mk.conf and install a system from that build.
2020-04-04 19:50:53 +00:00
tsutsui 2b0ec46162 Add "live-image with a FAT partition for bootstrap files" support.
See PR/55075 for more details.
2020-03-21 14:19:26 +00:00
roy 7d5fdd89d0 ramdisk-zfsroot: Remove the module loading magic
It's been determined that it's too magical and it's either the job
of the bootloader or you compile it into the kernel yourself.

This entry works in /boot.cfg:

menu=Boot ZFS Root:load solaris;load zfs;fs /ramdisk-zfsroot.fs;boot
2020-02-25 20:05:10 +00:00
roy a0b4f4b376 ramdisk-zfsroot: We no longer need to have /etc/zfs in mtree
Now that mountall doesn't rely on /etc/zfs/zpool.cache being present.
2020-02-23 10:51:12 +00:00
roy 896ddeb466 zfs: Allow modules to be loaded once in the ZFS chroot
Rather than copying the needed modules from FFS to the ramdisk,
load then directly from FFS instead.

This way, we can symlink ramdisk stand into /altroot and let nature take
it's course like loading firmware.

Set shell exit on error rather than using chained commands.
zpool import seems to SIGBUS randomly on amd64 and if we didn't do the
former then zpool would hang the init. Now at least we exit to the shell.
2020-02-23 05:15:54 +00:00
roy 5403a7a7c1 zfs: build a ramdisk on amd64 with enough to mount rpool/ROOT on /
Until we get ZFS integrated into our boot loader, this is the next best
thing. The idea is simple - have a small FFS partition with a kernel,
modules and this ramdisk. Once the ramdisk boots it will mount the FFS
partition read only, copy the needed ZFS modules to the ramdisk and then
unmount the partition. Then we import the ZFS root pool, mount the
ZFS root filesystem and then pivot to it.

Because the initial FFS partition is not mounted at this point, we
can mount it in /altroot so we can replace the kernel and modules with
newer ones so it's easily maintainable.

This ZFS boot strapper currently makes the following assumptions:
 * The device NAME=boot is the FFS with kernel, modules and this ramdisk.
 * The ZFS root pool and root filesystem are called rpool/ROOT.

A boot.cfg menu entry can then be added like so:
menu=Boot ZFS root:fs /ramdisk-zfsroot.fs;boot
2020-02-22 09:53:47 +00:00
christos 128e5f5e67 1. Remove all the special handling of variables (-d -p -P -s -S) that
were dealing with DBG (-d) LDSTATIC/NOPIE (-p), and the rest with
   disabling/enabling sanitizers.
2. Use emalloc/estrdup for all the allocators instead of only some cases.
3. Add -V varspec which passes variables on the command line (as DBG
   and LDSTATIC used to be passed before) instead of appending them
   to the on-the-fly Makefile using -v varspec.
4. Change the distrib and rescue Makefiles to use -V instead of the removed
   flags.

The motivation of this is to make variable handling consistent, less magical,
and remove the need for changing crunchgen each time we want to add disabling
an option by default.

(as proposed in tech-toolchain)
2019-12-29 18:26:16 +00:00
martin 7c2911b1d1 Do not populate /dev on CD images by default, instead rely on init
doing the tmpfs / MAKEDEV magic.
On images for machines with serious ram shortage (where the additional
tmpfs hurts, like VAX) override this with CDDEV_POPULATE=true.
Should fix PR port-amd64/54776.
2019-12-20 19:46:51 +00:00
alnsn 819cf7d8ba If gpt label "cgd.conf" contains a valid /etc/cgd file system,
try mounting gpt label "cgdroot" as a root filesystem first and
only mount /dev/cgd0a if that gpt label doesn't exist or fails
to mount.

XXX pullup to 8 and 9.
2019-11-22 00:27:30 +00:00
joerg 8e4a7b2e22 Merge amd64's UEFI logic back into the generic bootimage handling. 2019-11-21 22:29:03 +00:00
maya 50f7458533 Split out /rescue to its own set and adapt installers/images to add it.
This is meant to make updates safer: if something goes wrong with updating
base, we still have the old, standalone /rescue to recover from.
2019-10-02 11:15:59 +00:00
christos 7e81d727bc Consistently use ${RELEASEDIR}/${RELEASEMACHINE} instead of
${RELEASEDIR}/${MACHINE} (Paul Ripke)
2019-09-23 13:42:30 +00:00
martin cc1c81924b Allow individual MDSETTARGETS/MDSET_SUFFIXES to define optional dependencies
between themselves.
Use that to make netbsd-RPI_INSTALL.img depend on netbsd-RPI_INSTALL.bin,
resolving the parallel build race.
2019-08-12 08:04:28 +00:00
martin cc08412564 Back out previous, it causes build fallout like:
release ===> etc/dreamcast/cdroms/installcd
shle--netbsdelf-install: .WAIT: stat: No such file or directory
2019-08-11 17:50:26 +00:00
martin 9e5afaa384 Various suffixes for the same kernel image may depend on each
other, so .WAIT after creating one before moving on to the next.
Case at hand: evbarm/installation/instkernel:
netbsd-RPI_INSTALL.bin needs to be complete before netbsd-RPI_INSTALL.img
can be created.
Better solutions welcome...
2019-08-11 13:55:18 +00:00
tsutsui 9541ec522c Reduce diffs between common and amd64 uefi Makefile.bootimage files.
No functional change.
2019-02-22 22:13:58 +00:00
mrg e1052b82ae - clean the .tmp kernel targets as well 2019-02-06 07:33:08 +00:00
alnsn 40546cb8a8 ROOT.a doesn't resolve to a useful partition, hardcode wd0a and ld0a for now. 2018-12-29 13:09:35 +00:00
alnsn c3370b8fb9 Break the loop after a successful mount. 2018-12-29 01:04:38 +00:00
alnsn 043c1f58d6 Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a. 2018-12-29 00:52:11 +00:00
gson c2b3070712 Use the special device name "ROOT." in /etc/fstab not just on the arm
images, but also on the bootable disk images of other ports, so that
they can be booted from differently named devices.  Merge the i386 and
amd64 -live-sd0root and -live-wd0root images into a single live image
per port, bootable both from usb media and in qemu.  Drop the -xx0root
suffixes from image names as they are no longer meaningful.
2018-12-15 18:03:16 +00:00
aymeric 3fb201b9dd Make building boot images work with xz sets on non-NetBSD hosts.
NetBSD gzip is not toolified so we can't assume the host gzip will be able
to decompress xz files. Use the toolified xz instead in the USE_XZ_SETS case.
2018-11-19 20:05:37 +00:00
martin 7b4eb06deb Support .tar.xz sets 2018-10-07 18:07:00 +00:00
martin 333d49613c Fix stupid typo (=+ instead of +=).
Remove hard coded debug sets removal, now that the configurable
variant works.
Prepare for .tar.xz sets.
2018-09-28 15:03:34 +00:00
kre 8baf73d560 Remove use of test ([) -o (and a couple of other trivial cleanups). 2018-09-16 21:49:18 +00:00
kre b1da33596b Remove test ([) -o usage, and make a couple of minor cleanups as well. 2018-09-16 21:41:34 +00:00
martin 67f3e0d165 Do not put debug.tgz and xdebug.tgz onto install CDs (a lot of them
grow out of bounds and for some architectures can not turn into DVDs).
2018-06-25 12:18:22 +00:00
maya 108791360f Make MDSET_NOGZIP behave as documented also if MDSET_SUFFIX is set
MDSET_NOGZIP is documented as intended to apply for all kernels, even if
MDSET_NOGZIP.filename is not set.

From Harold Gutch in PR toolchain/52836
2018-01-16 09:59:37 +00:00
martin 9dfe31c9a3 Introduce CDRELEASE_NODEBUG - if set, avoids putting debug sets in the
ISO image.

Set this for sparc64 install CDs - many of the supported machines have
SCSI CD drives and it is impossible to get DVD replacements for those.

This is a pitty, but in the end a working install medium is more worth
than debug sets (which can be downloaded later).
2017-09-08 09:50:44 +00:00
christos 23fc7b3c92 there is no -f in install 2017-02-16 02:37:32 +00:00
pgoyette 5957cab68c Remove leftover "-f" from when this used to be a cp command.
Unbreak the build for install-image target.
2017-02-11 08:08:00 +00:00
christos 346de06e21 remove extra endif 2017-02-11 04:19:25 +00:00
christos 8a78ba48ab more MKREPRO_TIMESTAMP fixes (for pax/tar generated files) 2017-02-11 03:07:06 +00:00
christos 0cd29ab5b4 Initial pass to be unaffected by build umask on build artifacts
1. ${MKDIR} -> ${MKDIR} ${MKDIRPERM}
2. ${CP} -> ${INSTALL} ${COPY} -m <perm>
2017-02-10 16:43:59 +00:00
christos cac2d2699a use the same logic to compute the timestamp like the other files 2017-01-24 18:01:07 +00:00
christos e0e4dc48e0 Add the ability to specify more sections to strip. 2016-09-20 20:55:54 +00:00