History log of /netbsd-current/sys/arch/i386/stand/bootxx/Makefile.bootxx
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.53 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-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.52 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: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 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.51 25-Jul-2018 kamil

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.50 02-Jun-2018 christos

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


Revision tags: netbsd-8-2-RELEASE 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 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 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.49 20-Aug-2015 uebayasi

branches: 1.49.16;
${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 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.48 15-Jan-2014 joerg

branches: 1.48.6;
Reduce amount of -no-integrated-as on x86 as .code16 is now supported by
LLVM.


# 1.47 12-Jan-2014 tsutsui

Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

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


# 1.46 01-Nov-2013 christos

provide an ldscript to strip the unwind sections
XXX: untested


# 1.45 22-Aug-2013 matt

Add a missing KLINK_MACHINE= i386


# 1.44 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.43 10-Aug-2012 joerg

branches: 1.43.2; 1.43.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-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base jym-xensuspend-nbase jym-xensuspend-base
# 1.42 20-Jun-2011 mrg

branches: 1.42.2;
remove all the code that supported HAVE_GCC=3. mostly from chuq.


# 1.41 16-Jun-2011 joerg

Refactor compiler-specific optimizer flags. Mark bootxx as supported
with clang.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base rmind-uvmplock-base
# 1.40 20-May-2011 joerg

branches: 1.40.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: uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.39 27-May-2010 dholland

branches: 1.39.2;
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.


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

branches: 1.38.2; 1.38.4;
Move relocation address to lower memory (0x1000) further away from the
BIOS 40:0 segment than previously but giving more room for heap that 0x8800.


# 1.37 20-Nov-2009 dsl

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.


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.36 03-Apr-2009 tsutsui

Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.


# 1.35 30-Mar-2009 tsutsui

Remove extra trailing slash in ${S} path.


# 1.34 12-Mar-2009 abs

Prefer MACHINE_ARCH to MACHINE in some tests


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 nick-hppapmap-base2 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.33 20-Oct-2008 christos

branches: 1.33.2; 1.33.8;
disable PIE for boot code.


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

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


Revision tags: wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.31 15-Mar-2008 dsl

branches: 1.31.4; 1.31.6; 1.31.10;
Add -momit-leaf-frame-pointer, saves a few bytes.


Revision tags: nick-net80211-sync-base mjf-devfs-base hpcarm-cleanup-base
# 1.30 31-Jan-2008 sborrill

branches: 1.30.2; 1.30.6;
Add EPIA_HACK so that boot loaders work on EDEN 5000 processors.
This worked in NetBSD 3, but broke by NetBSD 4.

My offer of a development machine to fix this one and for all is still open!


Revision tags: 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 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.29 17-Oct-2007 garbled

branches: 1.29.2;
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.28 27-Sep-2007 ad

Remove -DBOOT_ELF64 to make build on amd64.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.27 27-Jan-2007 cbiere

branches: 1.27.6; 1.27.14; 1.27.22; 1.27.24; 1.27.26;
Don't define UNALIGNED_ACCESS, it's not used anymore.


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3
# 1.26 03-Dec-2006 dsl

Add -DUNALIGNED_ACCESS here, libsa/dosfs.c seems to need it.
Probably it ought to come from some generic .h file, but I've no idea
which - nor if any existing define has the same effect.
In any case this saves oodles of bytes in bootxx_msdos.


Revision tags: netbsd-4-0-1-RELEASE 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 netbsd-4-0-RC1 netbsd-4-base
# 1.25 23-Oct-2006 christos

branches: 1.25.2; 1.25.4;
nuke $DBG, since it contains -O2; suggested by uwe.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 rpaulo-netinet-merge-pcb-base
# 1.24 25-Jun-2006 lukem

branches: 1.24.4; 1.24.6;
Use ${TOOL_STAT} to get the size, instead of ls | tr | cut.


# 1.23 25-Jun-2006 lukem

Use -Wl,-Ttext,foo instead of -Ttext foo when using $(CC)


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

branches: 1.22.4;
Convert to using CC instead of LD, as LDFLAGS is for CC not LD.


# 1.21 13-May-2006 lukem

support MAKEVERBOSE


# 1.20 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.19 11-Dec-2005 christos

branches: 1.19.4; 1.19.6; 1.19.8; 1.19.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.18 17-Sep-2005 chs

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


# 1.17 05-May-2005 christos

branches: 1.17.2;
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.16 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.15 03-Sep-2004 thorpej

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


# 1.14 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.13 15-Oct-2003 gson

branches: 1.13.2;
If a bootxx program already happened to be a multiple of 512 bytes in
length before padding, the shell command to conditionally pad it to
a multiple of 512 bytes returned a nonzero exit status, causing the
build to fail.


# 1.12 13-Oct-2003 lukem

Instead of defining TERSE_ERROR by default (due to space constraints),
define NO_LBA_CHECK. bootxx_msdos still needs TERSE_ERROR because its
BPB is larger than the default.


# 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 -DBOOT_ELF64 for amd64.


# 1.7 30-Aug-2003 fvdl

Add -m elf_i386 to ${LD}, not ${LDFLAGS}, since bsd.lib.mk doesn't
include ${LDFLAGS} when using ld -x on an object file.

XXX what's the point of these ld -x rules anyway?


# 1.6 25-Jul-2003 dsl

Report actual $MACHINE (so it will be amd64, not i386)
and filesystem type (could be useful)
in primary bootstrap banner message.


# 1.5 01-Jul-2003 simonb

branches: 1.5.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.4 12-May-2003 dsl

Install into /usr/mdec


# 1.3 26-Apr-2003 fvdl

x86_64 -> amd64


# 1.2 16-Apr-2003 dsl

Uncomment line that deletes tempory file


# 1.1 16-Apr-2003 dsl

bootxx: bootstrap code - installable by MI installboot.
Loads /boot using filesystem accesses (rather than a list of block numbers)


# 1.52 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 is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 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.51 25-Jul-2018 kamil

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.50 02-Jun-2018 christos

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


Revision tags: netbsd-8-2-RELEASE 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 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 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.49 20-Aug-2015 uebayasi

branches: 1.49.16;
${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 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.48 15-Jan-2014 joerg

branches: 1.48.6;
Reduce amount of -no-integrated-as on x86 as .code16 is now supported by
LLVM.


# 1.47 12-Jan-2014 tsutsui

Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

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


# 1.46 01-Nov-2013 christos

provide an ldscript to strip the unwind sections
XXX: untested


# 1.45 22-Aug-2013 matt

Add a missing KLINK_MACHINE= i386


# 1.44 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.43 10-Aug-2012 joerg

branches: 1.43.2; 1.43.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-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base jym-xensuspend-nbase jym-xensuspend-base
# 1.42 20-Jun-2011 mrg

branches: 1.42.2;
remove all the code that supported HAVE_GCC=3. mostly from chuq.


# 1.41 16-Jun-2011 joerg

Refactor compiler-specific optimizer flags. Mark bootxx as supported
with clang.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base rmind-uvmplock-base
# 1.40 20-May-2011 joerg

branches: 1.40.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: uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.39 27-May-2010 dholland

branches: 1.39.2;
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.


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

branches: 1.38.2; 1.38.4;
Move relocation address to lower memory (0x1000) further away from the
BIOS 40:0 segment than previously but giving more room for heap that 0x8800.


# 1.37 20-Nov-2009 dsl

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.


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.36 03-Apr-2009 tsutsui

Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.


# 1.35 30-Mar-2009 tsutsui

Remove extra trailing slash in ${S} path.


# 1.34 12-Mar-2009 abs

Prefer MACHINE_ARCH to MACHINE in some tests


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 nick-hppapmap-base2 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.33 20-Oct-2008 christos

branches: 1.33.2; 1.33.8;
disable PIE for boot code.


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

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


Revision tags: wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.31 15-Mar-2008 dsl

branches: 1.31.4; 1.31.6; 1.31.10;
Add -momit-leaf-frame-pointer, saves a few bytes.


Revision tags: nick-net80211-sync-base mjf-devfs-base hpcarm-cleanup-base
# 1.30 31-Jan-2008 sborrill

branches: 1.30.2; 1.30.6;
Add EPIA_HACK so that boot loaders work on EDEN 5000 processors.
This worked in NetBSD 3, but broke by NetBSD 4.

My offer of a development machine to fix this one and for all is still open!


Revision tags: 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 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.29 17-Oct-2007 garbled

branches: 1.29.2;
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.28 27-Sep-2007 ad

Remove -DBOOT_ELF64 to make build on amd64.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.27 27-Jan-2007 cbiere

branches: 1.27.6; 1.27.14; 1.27.22; 1.27.24; 1.27.26;
Don't define UNALIGNED_ACCESS, it's not used anymore.


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3
# 1.26 03-Dec-2006 dsl

Add -DUNALIGNED_ACCESS here, libsa/dosfs.c seems to need it.
Probably it ought to come from some generic .h file, but I've no idea
which - nor if any existing define has the same effect.
In any case this saves oodles of bytes in bootxx_msdos.


Revision tags: netbsd-4-0-1-RELEASE 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 netbsd-4-0-RC1 netbsd-4-base
# 1.25 23-Oct-2006 christos

branches: 1.25.2; 1.25.4;
nuke $DBG, since it contains -O2; suggested by uwe.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 rpaulo-netinet-merge-pcb-base
# 1.24 25-Jun-2006 lukem

branches: 1.24.4; 1.24.6;
Use ${TOOL_STAT} to get the size, instead of ls | tr | cut.


# 1.23 25-Jun-2006 lukem

Use -Wl,-Ttext,foo instead of -Ttext foo when using $(CC)


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

branches: 1.22.4;
Convert to using CC instead of LD, as LDFLAGS is for CC not LD.


# 1.21 13-May-2006 lukem

support MAKEVERBOSE


# 1.20 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.19 11-Dec-2005 christos

branches: 1.19.4; 1.19.6; 1.19.8; 1.19.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.18 17-Sep-2005 chs

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


# 1.17 05-May-2005 christos

branches: 1.17.2;
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.16 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.15 03-Sep-2004 thorpej

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


# 1.14 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.13 15-Oct-2003 gson

branches: 1.13.2;
If a bootxx program already happened to be a multiple of 512 bytes in
length before padding, the shell command to conditionally pad it to
a multiple of 512 bytes returned a nonzero exit status, causing the
build to fail.


# 1.12 13-Oct-2003 lukem

Instead of defining TERSE_ERROR by default (due to space constraints),
define NO_LBA_CHECK. bootxx_msdos still needs TERSE_ERROR because its
BPB is larger than the default.


# 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 -DBOOT_ELF64 for amd64.


# 1.7 30-Aug-2003 fvdl

Add -m elf_i386 to ${LD}, not ${LDFLAGS}, since bsd.lib.mk doesn't
include ${LDFLAGS} when using ld -x on an object file.

XXX what's the point of these ld -x rules anyway?


# 1.6 25-Jul-2003 dsl

Report actual $MACHINE (so it will be amd64, not i386)
and filesystem type (could be useful)
in primary bootstrap banner message.


# 1.5 01-Jul-2003 simonb

branches: 1.5.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.4 12-May-2003 dsl

Install into /usr/mdec


# 1.3 26-Apr-2003 fvdl

x86_64 -> amd64


# 1.2 16-Apr-2003 dsl

Uncomment line that deletes tempory file


# 1.1 16-Apr-2003 dsl

bootxx: bootstrap code - installable by MI installboot.
Loads /boot using filesystem accesses (rather than a list of block numbers)


Revision tags: 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.51 25-Jul-2018 kamil

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.50 02-Jun-2018 christos

- Disable MKSANITIZER
- Redo using NOPIE
- Add NORELRO


Revision tags: 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 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 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.49 20-Aug-2015 uebayasi

branches: 1.49.16;
${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 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.48 15-Jan-2014 joerg

branches: 1.48.6;
Reduce amount of -no-integrated-as on x86 as .code16 is now supported by
LLVM.


# 1.47 12-Jan-2014 tsutsui

Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

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


# 1.46 01-Nov-2013 christos

provide an ldscript to strip the unwind sections
XXX: untested


# 1.45 22-Aug-2013 matt

Add a missing KLINK_MACHINE= i386


# 1.44 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.43 10-Aug-2012 joerg

branches: 1.43.2; 1.43.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-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base jym-xensuspend-nbase jym-xensuspend-base
# 1.42 20-Jun-2011 mrg

branches: 1.42.2;
remove all the code that supported HAVE_GCC=3. mostly from chuq.


# 1.41 16-Jun-2011 joerg

Refactor compiler-specific optimizer flags. Mark bootxx as supported
with clang.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base rmind-uvmplock-base
# 1.40 20-May-2011 joerg

branches: 1.40.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: uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.39 27-May-2010 dholland

branches: 1.39.2;
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.


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

branches: 1.38.2; 1.38.4;
Move relocation address to lower memory (0x1000) further away from the
BIOS 40:0 segment than previously but giving more room for heap that 0x8800.


# 1.37 20-Nov-2009 dsl

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.


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.36 03-Apr-2009 tsutsui

Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.


# 1.35 30-Mar-2009 tsutsui

Remove extra trailing slash in ${S} path.


# 1.34 12-Mar-2009 abs

Prefer MACHINE_ARCH to MACHINE in some tests


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 nick-hppapmap-base2 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.33 20-Oct-2008 christos

branches: 1.33.2; 1.33.8;
disable PIE for boot code.


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

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


Revision tags: wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.31 15-Mar-2008 dsl

branches: 1.31.4; 1.31.6; 1.31.10;
Add -momit-leaf-frame-pointer, saves a few bytes.


Revision tags: nick-net80211-sync-base mjf-devfs-base hpcarm-cleanup-base
# 1.30 31-Jan-2008 sborrill

branches: 1.30.2; 1.30.6;
Add EPIA_HACK so that boot loaders work on EDEN 5000 processors.
This worked in NetBSD 3, but broke by NetBSD 4.

My offer of a development machine to fix this one and for all is still open!


Revision tags: 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 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.29 17-Oct-2007 garbled

branches: 1.29.2;
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.28 27-Sep-2007 ad

Remove -DBOOT_ELF64 to make build on amd64.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.27 27-Jan-2007 cbiere

branches: 1.27.6; 1.27.14; 1.27.22; 1.27.24; 1.27.26;
Don't define UNALIGNED_ACCESS, it's not used anymore.


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3
# 1.26 03-Dec-2006 dsl

Add -DUNALIGNED_ACCESS here, libsa/dosfs.c seems to need it.
Probably it ought to come from some generic .h file, but I've no idea
which - nor if any existing define has the same effect.
In any case this saves oodles of bytes in bootxx_msdos.


Revision tags: netbsd-4-0-1-RELEASE 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 netbsd-4-0-RC1 netbsd-4-base
# 1.25 23-Oct-2006 christos

branches: 1.25.2; 1.25.4;
nuke $DBG, since it contains -O2; suggested by uwe.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 rpaulo-netinet-merge-pcb-base
# 1.24 25-Jun-2006 lukem

branches: 1.24.4; 1.24.6;
Use ${TOOL_STAT} to get the size, instead of ls | tr | cut.


# 1.23 25-Jun-2006 lukem

Use -Wl,-Ttext,foo instead of -Ttext foo when using $(CC)


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

branches: 1.22.4;
Convert to using CC instead of LD, as LDFLAGS is for CC not LD.


# 1.21 13-May-2006 lukem

support MAKEVERBOSE


# 1.20 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.19 11-Dec-2005 christos

branches: 1.19.4; 1.19.6; 1.19.8; 1.19.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.18 17-Sep-2005 chs

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


# 1.17 05-May-2005 christos

branches: 1.17.2;
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.16 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.15 03-Sep-2004 thorpej

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


# 1.14 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.13 15-Oct-2003 gson

branches: 1.13.2;
If a bootxx program already happened to be a multiple of 512 bytes in
length before padding, the shell command to conditionally pad it to
a multiple of 512 bytes returned a nonzero exit status, causing the
build to fail.


# 1.12 13-Oct-2003 lukem

Instead of defining TERSE_ERROR by default (due to space constraints),
define NO_LBA_CHECK. bootxx_msdos still needs TERSE_ERROR because its
BPB is larger than the default.


# 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 -DBOOT_ELF64 for amd64.


# 1.7 30-Aug-2003 fvdl

Add -m elf_i386 to ${LD}, not ${LDFLAGS}, since bsd.lib.mk doesn't
include ${LDFLAGS} when using ld -x on an object file.

XXX what's the point of these ld -x rules anyway?


# 1.6 25-Jul-2003 dsl

Report actual $MACHINE (so it will be amd64, not i386)
and filesystem type (could be useful)
in primary bootstrap banner message.


# 1.5 01-Jul-2003 simonb

branches: 1.5.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.4 12-May-2003 dsl

Install into /usr/mdec


# 1.3 26-Apr-2003 fvdl

x86_64 -> amd64


# 1.2 16-Apr-2003 dsl

Uncomment line that deletes tempory file


# 1.1 16-Apr-2003 dsl

bootxx: bootstrap code - installable by MI installboot.
Loads /boot using filesystem accesses (rather than a list of block numbers)