Commit Graph

309 Commits

Author SHA1 Message Date
christos 3c6141f6f3 include all extra flavors of the kernel and use the proper variable for
the machine dependent installation directory.
2024-05-18 02:03:17 +00:00
christos 9a57126d1c use IMAGESPECEXTRA to include libdata and don't include IMAGERUNTIME 2024-05-17 21:31:10 +00:00
christos d308a2f4e0 Add IMAGERUNTIME and IMAGESPECEXTRA variables 2024-05-17 19:54:28 +00:00
christos f9a956b234 Add more extra stuff on the cds 2024-05-16 17:55:48 +00:00
christos f2a4ad5a9b Apply the -xx treatment to the rest of the ffs makefs invocations. 2024-05-16 15:46:42 +00:00
christos 1a4228f94c check if the ${MACHINE} directory exists 2024-05-14 17:17:13 +00:00
christos aa283a51b7 Put back -xx (this will break some archs but we'll fix them) and automatically
generate the spec for the machine-specific portions of the cdrom.
2024-05-14 14:58:05 +00:00
christos d2d9aaf4f8 Remove the -xx, now we have the list of 20 platforms that have incomplete
fspecs. Instead of augmenting the platform spec with an autogenerated one,
we should understand why we have missing entries in the first place.
2024-05-09 16:09:03 +00:00
kre 966af04570 No point testing if the spec file is empty before running makespec,
the previous commands guarantee that cannot be the case, so makespec
was never being run.   Just run it unconditionally.

Seems to fix the build for me.
2024-05-09 03:41:05 +00:00
christos 4967e4351f Fail on incomplete mtree specs 2024-05-08 16:08:08 +00:00
christos 27fb837206 PR/58196: Jan-Benedict Glaw: If there was no spec file specified, generate
one on the fly. Should fix reproducible builds where the mode and the
ownership/group is not fixed and picked up from the filesystem.
2024-05-07 20:33:20 +00:00
nia 0c706886a9 remove redundant kernels and floppies from the space-starved i386 ISO 2024-04-25 11:56:51 +00:00
nia 6c62cea2ba Add "DVD" ISOs for x86 that don't have to follow CD size limitations.
These include all available sets.
2024-04-24 11:29:34 +00:00
christos 1b36f85ce6 `nm`: Generate a stable symbol table (Jan-Benedict Glaw)
Release artifacts may contain symbol lists. Binutils's `nm` sorts them by
symbol name, locale based. Inserting a plain `sort` (with `LC_ALL=C`) here
sorts them by address, and (with several symbols pointing to the same address)
sorting by name is also stable (think of embedded '_'.)
2024-04-23 21:58:57 +00:00
nia 50dd28a100 Reduce the size of the i386 ISO to help it fit on a CD-ROM
Exclude tests and html man pages.
2024-04-23 20:37:07 +00:00
nia 9afa3b4167 Exclude compat sets from ISO images that struggle to fit on a CD-ROM
When debug is excluded, also exclude the compat debug sets.
2024-04-23 12:25:57 +00:00
nia f7dfb79875 Move MIPS N64 compat out of {base,debug}32 into {base,debug}64
martin requested separation by ABI and it doesn't make much sense
to have 64-bit binaries in a set called 32.
2024-04-22 14:41:24 +00:00
christos 2ab201d46f Set LC_ALL=C before calling sort so that it works consistently. Unfortunately
ENVIRON["LC_ALL"] = "C"; does not work like in gawk (Jan-Benedict Glaw)
2024-04-16 23:40:36 +00:00
nia 545236f400 Add new sets: base32, debug32, manhtml
- base32 contains (when MKCOMPAT=yes) shared libraries for 32-bit
  compatibility, previously included in base

- debug32 contains (when MKCOMPAT=yes) debug symbols and static libraries
  containing debug symbols for 32-bit compatiblity, previously included
  in debug

- manhtml contains (when MKHTML=yes) the HTML files previously included
  in 'man', which are of limited utility without third-party software.

The motivation for this change is to be able to easily exclude sets
from CD-ROM images that go over the size limit without xz compression
(which many NetBSD platforms struggle to extract at acceptable speeds).
2024-04-09 15:17:21 +00:00
christos a47d0a4f5e Fix reproducible builds (Jan-Benedict Glaw) 2024-03-20 00:31:54 +00:00
christos 40f2c3cc74 PR/57910: Jan-Benedict Glaw: Fix typo preventing reproducible builds 2024-02-08 18:14:02 +00:00
tsutsui 7b628e9e33 Use defined ${GPTSECTORS} rather than hardcoded 2048. 2023-12-03 07:20:23 +00:00
tsutsui 2701e1fd91 Document USE_GPTMBR and GPTSECTORS. 2023-12-03 07:17:11 +00:00
maya 11fbdb110b Make sure to mount /var/shm
Programs such as firefox seem to require it,
and this file is used by the live image as well.
2023-01-29 22:12:25 +00:00
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