History log of /src/sys/arch/i386/stand/boot/Makefile.boot
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
# 1.76 03-Jun-2023 lukem

bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
CLANG_NO_ADDR_OF_PACKED_MEMBER
CC_NO_ADDR_OF_PACKED_MEMBER
GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.75 06-Sep-2020 mrg

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.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base phil-wifi-20200406
# 1.74 04-Apr-2020 christos

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.


Revision tags: is-mlppp-base ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.73 13-Sep-2019 manu

Add multiboot 2 support to x86 bootloaders

multiboot 2 is required to boot Xen on an EFI system.
This also require a kernel patch for properly discovering
the ACPI RSDP, which is available after 20190912, in
src/sys/arch/x86/acpi/acpi_machdep.c 1.26-1.28

There are a few missing bit in this multiboot 2 implementation
(which are unused by Xen):
- Header tags Address, Freambuffer, and Relocatable are ignored
- Tags APM and Network are not provided
- Tags ACPI old and ACP new are only provided for ACPI boot
- Tag boot device does not provides the subpart (BSD disklabel partition)

Notes:
- multiboot2 is disabled in dosboot, otherwise the binary
gets too big and build fails.
- in src/sys/arch/i386/stand/efiboot, consinit() is renamed
as efi_consinit() to avoid prototype conflicts in src/sys/sys/systm.h


Revision tags: netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728
# 1.72 25-Jul-2018 kamil

branches: 1.72.4;
Specify NOLIBCSANITIZER in x86 bootloader-like code under sys/arch/

Set NOLIBCSANITIZER for i386 and amd64 specific bootloader-like code.


Revision tags: phil-wifi-base pgoyette-compat-0625
# 1.71 02-Jun-2018 christos

branches: 1.71.2;
- Disable MKSANITIZER
- Redo using NOPIE
- Add NORELRO


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base
# 1.70 08-Apr-2017 christos

branches: 1.70.6; 1.70.12;
centralize vers.c building for standalone programs.


Revision tags: pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319
# 1.69 23-Jan-2016 christos

branches: 1.69.2; 1.69.4;
We'll define the kernel types for standalone code.


# 1.68 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


Revision tags: nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.67 20-Aug-2015 uebayasi

${PROG} depends on ${LDSCRIPT}.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.66 14-Apr-2014 uebayasi

branches: 1.66.4;
Use ldscript. Identical output confirmed.


# 1.65 14-Apr-2014 uebayasi

Other boot loaders name ELF *.sym, not *.syms. Follow that convention.


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.64 12-Jan-2014 tsutsui

branches: 1.64.2;
Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.


# 1.63 04-Jan-2014 christos

undo the linker script hack now that the linker scripts do this.


# 1.62 01-Jan-2014 christos

remove commented out -fno-reorder-functions


# 1.61 01-Jan-2014 christos

Use a custom ldscript so that we can keep boot_start at 0.


# 1.60 21-Aug-2013 matt

Add KLINK_MACHINE= i386


# 1.59 21-Aug-2013 matt

Use <bsd.klinks.mk>


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.58 10-Aug-2012 joerg

branches: 1.58.2; 1.58.4;
Don't depend on HAVE_GCC being always present.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.57 16-Jan-2012 christos

PR/45796: Evgeniy Ivanov minixfs3 support.


# 1.56 25-Dec-2011 tsutsui

Apply the following patch submitted by Evgeniy Ivanov:
http://mail-index.NetBSD.org/tech-kern/2011/12/15/msg012226.html
http://mail-index.NetBSD.org/tech-kern/2011/12/17/msg012229.html

- add 'ls' op to struct fs_ops to support ls command on each fs,
enabled by -DLIBSA_ENABLE_LS_OP and SAMISCMAKEFLAGS+="SA_ENABLE_LS_OP=yes"
in libsa
- split sys/lib/libsa/ufs_ls.c into UFS specific part and MI part (ls.c)
that opens the target fs and calls fs-depedent XXX_ls() functions
- add a ls op for ext2fs
(all other fs than ufs and ext2fs don't have actual ls ops yet)
- replace existing MD ufs_ls() calls with this new MI ls()

The original patch was written for i386 and ext2fs.
zaurus zboot has been tested by nonaka@.
ews4800mips and x68k loaders have been tested by me (with several fixes).
landisk might be okay since it was almost copied from i386.

XXX1: "ls" op in fs_ops looks a bit inconsistent, but we will be able to
replace it with real fs ops like readdir if it's really worth
XXX2: someone might have to check sys/arch/ia64/stand/efi/libefi/efifs_ls.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base jym-xensuspend-nbase jym-xensuspend-base
# 1.55 22-Aug-2011 mrg

branches: 1.55.2; 1.55.6;
disable mmx/sse here too. hopefully fixes amd64 /boot issues.
certainly changes the output in ways that gcc 4.1 doesn't.


# 1.54 01-Jul-2011 mrg

remove HAVE_GCC == 4 conditional


# 1.53 20-Jun-2011 mrg

remove all the code that supported HAVE_GCC=3. mostly from chuq.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.52 02-Jun-2011 dsl

Put all the 'CFLAGS+= -Dxxx' together.


Revision tags: cherry-xenmp-base
# 1.51 20-May-2011 joerg

branches: 1.51.2;
Disable integrated assembler for files that use .code16 or .code32 for
now. Disable Clang completely for bootxx and netboot for now until the
size issue has been sorted out.


Revision tags: bouyer-quota2-nbase
# 1.50 26-Feb-2011 jakllsch

Enable LIBSA_PRINTF_LONGLONG_SUPPORT.
Useful in any of the cases where we already print a (64-bit) daddr_t.


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.49 22-Jan-2011 joerg

Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.


Revision tags: jruoho-x86intr-base
# 1.48 05-Jan-2011 jakllsch

branches: 1.48.2; 1.48.4;
Pass a 64-bit boot partition base LBA into x86 /boot,
while maintaining compatibility with existing bootxx code.


Revision tags: matt-mips64-premerge-20101231
# 1.47 20-Dec-2010 jakllsch

Move the bottom of the heap off the top of the stack. Also, increase the heap
size by 64KiB. These changes allows gzipped Xen with gzipped Dom0 kernels
to successfully boot. I also suspect this will cure the amd64 CD boot issue
without disabling ext2fs support.


# 1.46 11-Dec-2010 mrg

disable ext2fs support in /boot on amd64 for now. it breaks cd booting.

XXX: i don't know why, or plan to figure it out, but at least now amd64
XXX: isos boot again.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11
# 1.45 11-Sep-2010 tsutsui

Enable SUPPORT_EXT2FS. Tested on i386 that has root on ext2fs
with 128 byte and 256 byte inode sizes on QEMU.

Note for netbsd-5, this also requires HEAP_START=0x30000
as applied in rev 1.37, and this might also get another limit
on cdboot as described in PR install/42202.


Revision tags: uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.44 27-May-2010 dholland

Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.


# 1.43 23-May-2010 veego

Add ${PROG}.syms to CLEANFILES


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.42 20-Nov-2009 dsl

branches: 1.42.2; 1.42.4;
Change relay address for mbr and bootxx code to be 0x8800.
I'm not sure why I used 0x600, but I have a feeling that might
sometimes corrupt bios data.
0x8800 is far enough above 0x7e00 for a sector read to the latter address.


# 1.41 18-Nov-2009 dsl

Keep the output of 'ld' prior to extracting the image.
Useful for debugging (etc) since it contains the symbols.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.40 30-Mar-2009 tsutsui

Remove extra trailing slash in ${S} path.


# 1.39 12-Mar-2009 abs

Prefer MACHINE_ARCH to MACHINE in some tests


Revision tags: nick-hppapmap-base2
# 1.38 01-Mar-2009 isaki

Remove duplicated definitions.


# 1.37 16-Feb-2009 jmcneill

Bootloader modifications for generic framebuffer console support on i386
and amd64 where VESA VBE 2.0+ is available.

* Add helper library and stubs to invoke VBE bioscalls.
* Bump HEAP_START as we were already dangerously close to our limits.
* bootdataseg now allows access > 16MB so in the future we can scribble
on the framebuffer.
* Pass BTINFO_FRAMEBUFFER parameters to kernel when configured.
* VBE modes are configured with the new 'vesa' command. Usage, when present:
* vesa {enabled|disabled}
Enable / disable linear framebuffer, default mode is 640x480x8. May
be changed in the future to determine mode based on VBE/DDC where
available.
* vesa list
List modes supported by the firmware that meet the following criteria:
* linear framebuffer
* packed pixel or direct colour mode
* vesa {modenum|modestr}
Enable specific VBE mode. The mode can be specified either as a
VBE mode number (eg. 0x101) or as a string (eg. 800x600x16).


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base mjf-devfs2-base
# 1.36 20-Oct-2008 christos

branches: 1.36.2; 1.36.8;
disable PIE for boot code.


# 1.35 19-Oct-2008 snj

s/explicitely/explicitly/


Revision tags: haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 1.34 29-Aug-2008 gmcgarry

Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.


Revision tags: simonb-wapbl-nbase simonb-wapbl-base
# 1.33 16-Jul-2008 perry

Add -DM to the newvers_stand.h invocation.

Why is there a "Makefile.boot" used here, and a "Makefile.booters"
used one level up, with redundant stuff between both of them? This all
used to be so clean...


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.32 05-Apr-2008 tsutsui

branches: 1.32.4; 1.32.6; 1.32.8; 1.32.10;
Add commented out ext2fs definitions.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.31 17-Oct-2007 garbled

branches: 1.31.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: yamt-x86pmap-base3 yamt-x86pmap-base2 ppcoea-renovation-base vmlocking-base
# 1.30 27-Sep-2007 ad

Remove -DBOOT_ELF64 to make build on amd64.


# 1.29 27-Sep-2007 ad

- Make i386 bootblocks boot amd64 kernels, and change to say "NetBSD/x86..."
- Don't bother booting a.out kernels any more.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase nick-csl-alignment-base5 wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 wrstuden-fixsa-base thorpej-atomic-base mjf-ufs-trans-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 rpaulo-netinet-merge-pcb-base
# 1.28 25-Jun-2006 lukem

branches: 1.28.14; 1.28.22; 1.28.32; 1.28.34; 1.28.36;
Convert to using CC instead of LD, as LDFLAGS is for CC not LD.


Revision tags: chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.27 13-May-2006 lukem

branches: 1.27.4;
support MAKEVERBOSE


# 1.26 12-May-2006 mrg

- -mcpu=i386 is gone in GCC4
- we need -Wno-attributes (to avoid __packed__ warnings)
- use -Wno-pointer-sign
- remove some redundancy from pxeboot/Makefile


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.25 11-Dec-2005 christos

branches: 1.25.4; 1.25.6; 1.25.8; 1.25.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.24 17-Sep-2005 chs

use a .BEGIN target to make the various symlinks,
the previous way had problems with parallel make.


# 1.23 22-Jun-2005 junyoung

branches: 1.23.2;
Add support for cd9660 file system to the i386 BIOS bootloader.


# 1.22 21-Jun-2005 junyoung

If any of libraries needed by the "boot" is rebuilt vers.c should be
regenerated so that the build date is updated accordingly.


# 1.21 27-May-2005 gavan

Workaround for issues seen on VIA C3-based systems. PR port-i386/26007

Tested on ML5000 board. This may not fix the problem on all variations of the
hardware, but it's likely that variations on the theme will. This workaround
is non-intrusive and should not affect any other CPUs.


# 1.20 05-May-2005 christos

add dependall and realdepend to the targets that we need to call in the
beginning. XXX: The real fix (handle dependencies in .BEGIN) is forthcoming.


# 1.19 01-May-2005 christos

More .BEGIN lossage.


Revision tags: yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base kent-audio1-beforemerge kent-audio1-base
# 1.18 03-Sep-2004 thorpej

branches: 1.18.10;
More complete fix for overriding CPUFLAGS and also apply fix to bootxx,
from Valeriy Ushakov.


# 1.17 03-Sep-2004 thorpej

Override CPUFLAGS to empty so that a CPUFLAGS setting in the user's
mk.conf don't affect the C options we need to build the boot loader.


# 1.16 15-Aug-2004 dsl

Define CONSADDR for pcio.c (continuing the same hack use for the other
parameters).


# 1.15 21-Jun-2004 jmc

Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022


Revision tags: netbsd-2-0-base
# 1.14 13-Mar-2004 dsl

branches: 1.14.2;
Translate ascii keycode to help those with azerty keyboard type straight.


# 1.13 08-Nov-2003 dsl

Remove depencency of vers.c on ${LIBLIST} - it messes up the depends and
I'm not sure why I added it now!
Default NWEVERSWHAT back to "BIOS Boot" - look better on boot banner page.


# 1.12 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.11 09-Oct-2003 dsl

Pick up X86_BOOT_MAGIC_* from bootblock.h
Move boot_params.S to lib (seems useful to use it in pxeboot).


# 1.10 08-Oct-2003 dsl

Change the way the shared lib directory is handled.
Should now work if ${.OBJDIR} = ${.CURDIR}/obj.


# 1.9 08-Oct-2003 lukem

Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).


# 1.8 30-Aug-2003 fvdl

Add another -DBOOT_ELF64 for amd64.


# 1.7 30-Aug-2003 fvdl

Add -m elf_i386 (for amd64) to LD.


# 1.6 01-Jul-2003 simonb

branches: 1.6.2;
Make this work without a populated destdir:
machine and x86 symlinks.
Include from right places.
Don't depend on LIBCRT0,etc.

Also for the bootxx programs, keep the ELF object during the build
process.


# 1.5 30-Jun-2003 thorpej

Allow SOURCES to be overridden.


# 1.4 24-May-2003 thorpej

Comment out DEBUG_MEMSIZE.


# 1.3 12-May-2003 dsl

Don't override PROG from subdir Makefile
Install into /usr/mdec


# 1.2 26-Apr-2003 fvdl

x86_64 -> amd64


# 1.1 16-Apr-2003 dsl

Add files for 2nd stage boot loader