Commit Graph

285 Commits

Author SHA1 Message Date
isaki 5c224896bc Copy with -f.
On x68k, CDEXTRA has /usr/mdec/boot and its permission is 444.
So this copy was failed from second time.
2016-06-19 08:44:34 +00:00
christos c8a3c6fbe2 Don't build PIE binaries for install media 2016-05-29 16:12:31 +00:00
christos 6c7efc78fb Add MKREPRO_TIMESTAMP support to the makefs invocation. 2015-12-20 22:47:59 +00:00
christos d038424332 Use MKREPRO_TIMESTAMP 2015-12-20 22:42:04 +00:00
christos f7d3cc6004 PR/50360: Thomas Klausner: if MKREPRO is set, provide a consistent timestamp
for the files in the cdroms to be built. For now we copy the timestamp of
<sys/param.h>. We could set an absolute timestamp too like -T 0 for the epoch.
2015-11-25 00:50:57 +00:00
martin b581f3b106 Put a full "init" /dev on the CD, not just "all". The install environment
relies on it currently. (XXX fix that and revert this)
2015-05-29 06:28:50 +00:00
martin 62f7d89400 Deal with WORKSPECFILE not existing for many cd images 2015-05-27 15:17:59 +00:00
martin 3cf95378a5 Do not default any CD_SETS - let the MD makefiles request them specifically. 2015-05-27 09:44:40 +00:00
martin 07d3d9969e Pass -U to maketars if we are not building as root. 2015-05-27 09:27:40 +00:00
martin 9565aae1bf 2nd try: make amd64, i386, sparc64 and vax iso images use full sets.
While there fix an old bug that makefs used the build hosts /etc/group
and passwd information when creating the image.
Thanks to Andreas Gustafsson for extensive testing.
2015-05-25 15:38:33 +00:00
martin dd29c6c2e1 Revert previous untill fallout has been fixed. 2015-05-19 06:58:52 +00:00
martin 0298cca26c Add a new simple method to put whole sets on CD images (instead of
listing single binaries or patterns) and use those for the existing
ISO images.
2015-05-18 06:25:04 +00:00
riastradh c6f6be16c2 Fix ytpo: INSTALLBOOTOPTIONS, not INSTALLBOOTOPTOINS.
From qjsgkem on Freenode.
2015-05-08 17:46:03 +00:00
snj 186287030e unbreak amd64 install images by passing ipty to MAKEDEV. revision 1.21
of etc/etc.amd64/MAKEDEV.conf removed them from 'all'.  (hi christos!)
2015-03-12 04:41:23 +00:00
roy ec4a0efb33 Use the 20-resolv.conf hook from dhcpcd rather than the minimal one.
Extract configured information from resolv.conf and hostname instead
of scraping the last dhcpcd script run.
This will allow the use of DHCPv6 and IPv6RA DNS details in the future.
2014-09-12 20:42:13 +00:00
nonaka 953d3a57a3 Remove rtsol. 2014-09-12 14:39:49 +00:00
martin d4a4ba1584 Add a IMAGEPREBUILD option for makefiles to ovveride (e.g. to additionally
add files to the staging directory)
2014-08-12 11:48:22 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
apb 9e8101899d To make pax use ${TOOL_GZIP}, we need to pass "--use-compress-program
${TOOL_GZIP}" on the command line, and refrain from passing "-z".  If
passed "-z", pax will use plain "gzip", ignoring --use-compress-program.
2014-08-06 11:41:18 +00:00
apb e4ed3c4254 Introduce and use GZIP_FLAGS variable.
The previous use of GZIP="-9 ${GZIP_N_FLAG}" happened to work, but
the new use of GZIP=${GZIP_FLAGS:Q} is safer.

For consistency, also use GZIP_FLAGS elesehere in this file.
2014-08-06 10:41:13 +00:00
apb f78c710fb2 Pass GZIP="-9 ${GZIP_N_FLAG}" instead of GZIP=-9n
in the environmentto commands that invoke ${TOOL_GZIP}.
This will allow them to use -nT instead of just -n with pigz.
2014-08-05 15:43:50 +00:00
apb 71da667fc9 Use ${TOOL_GZIP_N} instead of ${TOOL_GZIP} -n, and similarly
use ${TOOL_GZIP_N} -9 instead of ${TOOL_GZIP} -9n, etc.

This will pass -nT instead of just -n if the gzip program is
actually pigz.
2014-08-05 15:40:58 +00:00
dholland 779842189d Adjust for sysinst move. 2014-07-26 19:34:08 +00:00
martin 836e302df5 Add a variable CDMAKEFSEXTRAOPTS to provide additional parameters to the
makefs invocation that do not belong in the image option list (CDMAKEFSOPTIONS)
2014-05-31 10:18:47 +00:00
dsl ec9cf4df7b If MAKEVERBOSE < 2 remove the -v from pax command lines. 2014-02-15 09:43:02 +00:00
matt 53a841187b Pass DBG to crunchgen so it can get into the created mk file. 2014-02-01 21:05:54 +00:00
apb a452d8c9e2 Pass the -n flag to gzip invocations.
This prevents it from embedding a timestamp in the output.  We pass
"-n" unconditionally, not conditional on MKREPRO, because many other
invocations of gzip already passed the -n flag unconditionally.
2014-01-27 21:37:17 +00:00
apb 36ef98548b Use ${TOOL_GZIP} instead of just gzip in all Makefiles
outside */dist/* subdirectories.

When USE_PIGZGZIP=yes, bsd.own.mk sets TOOL_GZIP=${TOOL_PIGZ},
so there's no need to test USE_PIGZGZIP in these Makefiles.
2014-01-27 08:18:07 +00:00
christos dbc15d6fe0 don't include bsd.files.mk here, it is intended as a fragment 2014-01-22 00:52:56 +00:00
christos 2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
joerg c25bfae0c4 Save space and strip .eh_frame sections for the ramdisks as well. 2013-08-15 12:39:28 +00:00
khorben 7e7403a7ed Common definitions for full-disk encryption support, including the rc script responsible for asking the passphrase and chrooting. wsconsctl is also built and used in case a splash screen is enabled. 2013-07-15 00:25:38 +00:00
christos 22e0a3bf24 Add IMGMAKEFSOPTIONS like in the bootimage Makefile 2013-05-24 21:34:19 +00:00
he 36984c64cc Fix the ALL_KERNELS default value assignment, so that the double
quotes don't become a part of the value, causing all the targets
to be skipped by default.
2013-01-30 13:47:36 +00:00
christos 9a9b8c8de6 revert previous, it was an unintended side effect. fixed in makefs 2013-01-29 19:48:41 +00:00
he e10de0f72f The rockridge option of makefs now requires a =1, follow suit. 2013-01-29 18:17:29 +00:00
mlelstv 3bc93874c5 build.sh lets you build releases with a limited set of kernels by
using the ALL_KERNELS environment variable to override the arch default.

Fix this mechanism for evbarm by limiting the generated boot images
accordingly.
2013-01-13 14:43:23 +00:00
jakllsch d57a76d195 Don't enable WAPBL in images. 2012-11-20 20:16:03 +00:00
tsutsui 7be7385533 Allow overriding live-image and install-image sizes by
INSTIMAGEMB (for install-images), USBIMAGEMB (for x86 sd0root liveimages),
and EMUIMAGEMB (for other liveimages) variables.
Per discussion on current-users@:
http://mail-index.NetBSD.org/current-users/2012/10/29/msg021368.html
2012-11-03 14:25:32 +00:00
apb 8d127e2f7d Add distrib/common/Makefile.minirootkmod. Apart from comments and the
conversion of some constants to variables, this is identical to the code
that was previously present in both distrib/amd64/kmod/Makefile and
distrib/i386/kmod/Makefile.

Change distrib/amd64/kmod/Makefile and distrib/i386/kmod/Makefile to just
set some variables and .include "../../common/Makefile.minirootkmod".
2012-10-16 08:19:36 +00:00
riz 81f27d3683 Install fully-populated .iso images in ${RELEASEDIR}/images instead
of ${RELEASEDIR}/iso, since we'll be putting non-iso images in there too.
2012-08-17 16:57:59 +00:00
matt e63fd2b971 Add a dependency on etc.${MACHINE}/MAKEDEV.conf 2012-08-10 05:22:22 +00:00
matt 034cfa7ab5 Add a dependency for Makefile so that when you add device to the Makefile
it will automatically regenerate the device mtree file and cause the ramdisk
to be updated.
2012-07-20 11:19:03 +00:00
tsutsui f5e4f3d0bd Fix typo in comments. 2012-04-22 07:23:42 +00:00
tsutsui e70f6aa789 Add two optional variables for liveimage/installimage builds:
---
	MBR_BOOTCODE
		optional MBR bootcode which should be installed by fdisk(8)
		(default: empty)
		- specified MBR_BOOTCODE must exist in ${DESTDIR}/usr/mdec
		- if MBR_BOOTCODE is not specified,
		  MBR_DEFAULT_BOOTCODE (default: mbr) will be used
		  if the target ${MACHINE} has the one in /usr/mdec

	INSTALLBOOTOPTIONS
		options passed to installboot(8), e.g., -o console=com0
		(default: empty)
---
Proposed by Brook Milligan on current-users@:
http://mail-index.NetBSD.org/current-users/2012/04/16/msg019892.html

Also make USE_MBR work on ${MACHINE}s which don't have the default
/usr/mdec/mbr bootcode. (no such port has the liveimage target yet though)

XXX: tools fdisk(8) implicitly uses host's /usr/mdec/mbr for the default
XXX: bootcode even for non-x86 targets if host is x86
2012-04-22 05:24:39 +00:00
riz a59062a175 s/Createing/Creating/ 2012-04-09 19:22:49 +00:00
martin 550cdc2ff9 Fix typo in usage 2012-02-22 16:12:34 +00:00
njoly e46cff4057 Tweak MAKEDEVSPEC target to properly report MAKEDEV failures:
- No need to ignore `rm -f' failures which should not happen.
- Do not pipe MAKEDEV output, but use a temp file.
2012-02-18 14:26:27 +00:00
riz d77699356b Use a new variable, MODULEVER, for kernel modules, tracking what's been
done elsewhere.
2012-02-17 00:33:24 +00:00
tsutsui 02828259e9 Appease warnings `"expr 0 \* 1024 \* 1024 / 512" returned non-zero status.'
SWAPMB could be zero (in install-image case) and
expr(1) returns exit status 1 in that case.  Umm.
2012-01-22 16:56:22 +00:00
tsutsui 99c3f09a00 Fix checks for RELEASEDIR (and xxxxIMGBASE) variables to perform it
only on live_image or install_image targets.  PR toolchain/45864
2012-01-22 16:50:00 +00:00
tsutsui 3cf69f27e2 Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
 msdosfs or partitioning MD label structures) support this target.

"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.

For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html

No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.

Closes PR toolchain/45153 and PR misc/45155.
2012-01-22 03:53:29 +00:00
jmcneill ce4646dd28 PR# install/44593: Please give release ISO's more meaningful names
Change release ISO filenames, what was once 'i386cd.iso' will now look
like 'NetBSD-5.99.60-i386.iso'.

ok snj@
2012-01-14 22:56:30 +00:00
christos c5a15770f9 SRCDIRS is not the way to do this; some testing would have been nice. 2011-05-31 06:19:11 +00:00
jym 8d179afa97 Document MDSET_NOIMAGE. 2011-01-01 16:56:18 +00:00
snj a3e31bf1fb Update version number examples for the post-2.0I world. 2010-02-07 18:50:49 +00:00
roy bb3a353864 Use the rescue terminfo.db in our images instead of termcap. 2010-02-05 10:01:16 +00:00
abs b5fa4b8f63 update to generate something closer to common/termcap 2009-10-21 11:35:19 +00:00
christos 6964e246ca Exit with 1 so that we stay in single user mode when sysinst exits with 'x'.
Otherwise things get messed up (no /dev). From Anon Ymous
2009-09-25 14:09:27 +00:00
abs 2108b54359 34 different termcap subsets, plus a couple of ports still using
the full termcap distfile. In an attempt to reduce the madness
switch everyone (except the i386 cd install which does its own
thing) to the same (under 8K) termcap subset:

ansi			ansi/pc-term compatible with color
dumb|unknown		80-column dumb tty
hp300h			HP Catseye console
iris-ansi-ap		IRIS ANSI in application-keypad mode
iris-ansi|iris-ansi-net	IRIS emulating 40 line ANSI terminal (almost VT100)
sun|sun1|sun2|sun-il	Sun Microsystems Inc. console with working insert-line
vt100|vt100-am		DEC VT100 (w/advanced video)
vt220-8			DEC VT220 8 bit terminal
vt220|vt200|vt300	DEC VT220 in vt100 emulation mode
wsvt25			NetBSD wscons in 25 line DEC VT220 mode
wsvt25m			NetBSD wscons in 25 line DEC VT220 mode with Meta
x68k|x68k-ite		NetBSD/x68k ITE
xterm|vs100		xterm terminal emulator (X Window System)

Trying to provide similar functionality across all ports? It'll never
catch on...
2009-09-20 23:19:50 +00:00
abs 2383b0ce8e Ten identical list.inet6 files, or one common/list.inet6?
Not a difficult choice.
2009-09-20 22:50:50 +00:00
abs 52f8f0673d Move sun2, sun3 & x68k across to the common distrib etc/services, and
while here reduce it from 1180 to 794 bytes (whitespace & comment cleanup)
2009-09-20 19:41:35 +00:00
abs d2e3664387 Merge four separate copies of list2sh.awk runlist.sh (three identical
and one with slightly less options). Release build verified on amiga,
bebox and evbsh3. Vax build fails for unrelated reason.
2009-09-18 09:24:58 +00:00
apb 91fe922f05 Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links.  They have no effect except when using a
metalog, in which case the information is added to the metalog.  In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg.  This should fix PR 24457 and PR 41155.
2009-04-10 16:16:12 +00:00
joerg 4764c235e5 Change ramdisks from dhclient to dhcpcd and add corresponding glue to
sysinst. For amd64, the crunchgen binary shrinks by 150KB uncompresssed,
60KB compressed.
2009-04-07 11:49:16 +00:00
perry 58e0c54cf3 Consistently use gzip with the -n flag so dates are not embedded.
Not tested on all platforms.
2009-04-03 22:36:34 +00:00
christos 41a1a6cc14 reduce syscalls 2008-12-22 18:58:22 +00:00
tsutsui 0e53a56713 Regen (add RCS Id). 2008-12-22 18:46:41 +00:00
tsutsui dbaf5f36b6 - add RCS Id
- put RCS Id strings to output
- generate termcap.mini directly rather than via stdout
2008-12-22 18:46:02 +00:00
hubertf 2aea62cc33 Work around another bunch of places where Solaris' /usr/xpg4/bin/sh
can't handle for-loops with no arguments ("for foo in") which result
from empty make-variables.

One step further in getting NetBSD cross-compiling from Solaris 10/x86.

Tested on the netbsd-5 branch.
2008-12-02 10:06:00 +00:00
ad b58caf3fac - Add CDRUNTIME variable that copies files from ${DESTDIR} onto the CD.
- Add image_md_pre target.
2008-11-21 14:49:45 +00:00
apb 9d00c955d4 In buildfloppies.sh:
* Add a "-N etcdir" command line option, defaulting to /etc.
* Use pax in mtree mode.  This is the same idea as the change made in
  revision 1.14, with the following changes:
    + use ". type=dir optional" instead of just ". type=dir", so the
      output will not contain an explicit entry for the directory.
    + Explicitly set type=file and mode=0444 in the mtree lines.
    + Pass "-N ${etcdir}" to pax to make it use the correct passwd and
      group files.
    + Pass "-s^./,," to pax to make it strip the leading "./" from file
      names.

In Makefile.tarfloppy:
* Pass "-N ${DESTDIR}/etc" to buildfloppies.sh.

The resulting flopies have been verified to be identical to those
produced by version 1.13 of buildfloppies.sh, except that file owners
and modes are changed.
2008-11-12 14:22:16 +00:00
dbj 5050c64459 roll back to revision 1.13 until problems mentioned in
PR 39894
can be figured out.
i suspect we can add "boot" to the mtree input, but experimentation
needs to happen first.
2008-11-11 19:55:21 +00:00
dogcow f3440efb4c If you really want to hardcode to a gid/uid, then use the numeric ones;
"wheel" doesn't exist across all unix-like systems.
2008-11-10 02:10:52 +00:00
dbj 35bfa1ebbd avoid full path to boot.cfg file when building amd64 boot floppy
share code with i386
2008-11-04 23:02:52 +00:00
dbj 23fafc624b use an mtree template when building floppies to avoid local uid/gid in image 2008-11-04 23:01:04 +00:00
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
agc 1aa0a071e2 Implement, and document, an ugly hack which allows cross-building of
NetBSD on Darwin - Mac OS X Leopard - to complete successfully

	hack   cross-building hack on Darwin
	mdate  20 July 2008
	who    agc
	file   src/distrib/common/Makefile.mdset       : 1.33
	descr
	       Darwin has problems with getopt() when used in mdsetimage -v,
	       due to the difference between BSD and libiberty() getopt
	       implementations, more fully described in
	       http://mail-index.netbsd.org/current-users/2008/06/27/msg003242.html
	       and the subsequent thread.  For just now, we just have an ugly
	       workaround not to call mdsetimage with the -v argument on Darwin
	kcah
2008-07-21 10:00:51 +00:00
matt 7cd6f44757 Change remaining instances of ${RELEASEDIR}/${MACHINES} to
${RELEASEDIR}/${RELEASEMACHINEDIR}
2008-06-23 02:16:53 +00:00
matt b3139d33db Change MACHINE to RELEASEMACHINEDIR 2008-06-23 02:09:29 +00:00
rafal 6dfc4ff323 Add 'xterm' and 'ansi' to termcap.mini (and the mktermcap script which is
used to generate it), use termcap.mini in evbarm ramdisk (vs. the full
termap DB) which frees up a bit of room to add dhclient and cu.
2008-05-21 18:05:29 +00:00
tsutsui 44aaaba704 Fix tyop. 2008-05-03 05:08:45 +00:00
ad 59978d093b Put the GENERIC kernel onto i386 installation CDs and load a kernel module
from the boot loader to provide the miniroot.
2008-05-02 23:13:05 +00:00
garbled 890832bb43 Add a stripped down protocols file, similar to how services was done. If
you use this instead, you save about 21k on the install media.
2008-05-01 22:02:54 +00:00
garbled 9ce0927805 Create a litle script to generate a stripped down protocols file. 2008-05-01 22:01:16 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
rafal 86e129f0e6 Add 'sunrpc' so mount_nfs from an install ramdisk works. Otherwise, you get
a silent failure from the ramdisk mount_nfs binary.
2008-04-11 12:54:35 +00:00
christos 6ad6f673b0 add a script to generate the mini-termcap and use it. 2008-02-02 21:02:29 +00:00
tsutsui 8dcb83c8d0 Remove an entry for obsolete pccons. 2008-02-01 13:46:26 +00:00
tsutsui d92ad10bca Move and share a common termcap.mini file. 2008-02-01 13:43:11 +00:00
sborrill 14df52fe64 Add support for CDBUILDEXTRA which acts like CDEXTRA to add extra items
to the CD-ROM image.
Make CDEXTRA and CDBUILDEXTRA be able to contain lists of files and directories
which are added in turn.
Add support for CDEXTRA_SKIP which contains a list of fnmatch(3) items to
skip during the copy. This is _very_ useful for skipping CVS dirs for example.
CDBUILDEXTRA and CDEXTRA_SKIP are to be used in Makefiles creating the images,
CDEXTRA remains to be used from build.sh.
Update documentation and build.sh help text to show that -C can be used to
specify a list of files and directories rather than just a single dir.
2007-11-23 16:19:28 +00:00
sborrill e14a5d3249 Fix some typos and note that bootxx_cd9660 can load from a path name longer
than 8 chars.
2007-11-20 16:12:50 +00:00
chris 5e02e37306 Fix bug which causes cats builds to not produce an a.out install kernels,
which are needed to boot from Cyclone firmware.

Bug reported on port-cats mailing list:
http://mail-index.netbsd.org/port-cats/2007/09/08/0000.html
2007-09-08 14:25:09 +00:00
jnemeth 28af2a6c6b add CDEXTRA for specifying a directory of extra stuff to put on a CD 2007-08-31 14:20:29 +00:00
jnemeth 44f91e0e38 cd to previous directory after copying files so subsequent copies won't fail 2007-08-30 04:27:04 +00:00
skd 1e30d70843 /libexec, not /usr/libexec. 2007-08-24 17:11:58 +00:00
skd e066a10613 Enable LFS from sysinstall. 2007-08-21 02:20:55 +00:00
he 9f3262d205 After ${_FILENAME} got assigned its value when it's "-", we can
no longer use it as a copy of ${_F} in the subsequent test for
additional targets under the MDSET_SUFFIXES test.

This brings back builds of srec & bin files for evbarm and img
files for evbppc.
2007-06-07 15:12:34 +00:00
dogcow 107a17be60 As Jukka Salmi pointed out, the previous version had duplicated lines;
this is because I committed the wrong (and much larger) version of the file.
Oops.
2007-05-11 18:52:46 +00:00