History log of /openbsd-current/sys/arch/alpha/stand/netboot/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.20 28-Jan-2024 deraadt

Force -fno-stack-protector on "boot block" that absolutely can't have
a stack protector (probably not even a -fstack-protector-strong) because
the bloat would render them unuseable. This also means the system
compiler can now take on any more it wants, and all the pieces which
can't use the stack protector are properly marked.
ok kettenis


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.19 11-Mar-2023 miod

Allow strip and objcopy to be overrridden, for easier cross-buildability. NFC


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.18 02-Jul-2021 deraadt

__remq.S will be needed soon.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 29-Oct-2019 deraadt

Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdata
section, which has grown a fair bit with the introduction of retguard.
Mortimer discovered the repeated 512-byte sequence as retguard keys, and
this resolves the issue. (Chacha does not fit on the media, so 1.5K early
drop RC4 is hopefully sufficient in our KARL link universe)
Version crank the bootblocks. sysupgrade -s will install new bootblocks.
ok djm mortimer


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.16 24-Feb-2019 kn

Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.15 12-Jun-2017 espie

destroy lint remnants.
okay millert@ deraadt@


Revision tags: OPENBSD_6_1_BASE
# 1.14 30-Jul-2016 guenther

Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.13 13-Dec-2014 miod

Create a MOP version of the network boot loader; verified to boot on DEC 3000.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.12 01-Sep-2012 pascal

Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.

tested by naddy@; ok deraadt@


# 1.11 21-Aug-2012 pascal

Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...

ok deraadt@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.10 05-Jun-2011 miod

Update alpha bootblocks to use MI loadfile code instead of rolling our own;
also print a meaningful message if the kernel load address conflicts with the
SRM memory areas, so that we can know which kernel load address to use.

Requires `make includes' before attempting to build bootblocks.

Tweaks mk@, `nice' deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 25-Nov-2007 martin

we want strlen.c


# 1.8 25-Nov-2007 deraadt

libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.

There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.

Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.7 15-Feb-2006 mickey

enable -DSUN_BOOTPARAMS; henning@ martin@ miod@ ok


Revision tags: OPENBSD_3_8_BASE
# 1.6 10-Aug-2005 todd

suggested by art, go for it deraadt, ok miod@
remove ECOFF support


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE SMP_SYNC_A SMP_SYNC_B UBC_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 16-Jan-2001 art

Use objcopy to build the bootblocks instead of a hairy dd.
Bootblock built with elf utils work now.


# 1.4 14-Dec-2000 art

Enable loading of ELF kernels.


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE SMP_BASE kame_19991208
# 1.3 05-May-1997 millert

branches: 1.3.14;
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate,
and don't build the various sources into objs locally by specifying
them directly in the Makefiles.
- move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT
so that we don't exhaust our bootstrap address space (when using the new,
not yet checked in, memory allocator).
- clean up installboot, deal with secondary bootstrap programs not on
'a' partition or 'a' partition not starting at 0.
- add padding to structures in bbinfo.h for future expansion. Add a
netbbinfo structure to allow netboot information to be hard-coded in
network boot blocks, so that they can be made to work even on systems
with firmware which doesn't support the new "ethernet address in boot
device" convention.
- move the sync() calls to the correct place in installboot.c
- remove a kludge in disk.c which was breaking multiple opens/closes
of the disk
- allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
- Add setnetbootinfo, a program to hard code an ethernet address into
a network boot.
- move an 'int debug;' into boot.c (it was the only diff between boot.c and
netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks).
- add cd9660 file system ops to the file system ops table in filesystem.c
- if a file name is given (i.e. BOOTED_FILE) is set, boot only that file,
but if not then try to boot "bsd", "bsd.bak", "bsd.old", and
"obsd" (in that order) until one is found or until the list of names
is exhausted.
- add support for reading gzipped kernels.
- use strerror() to print errors, rather than just printing error numbers
- if no disk label exists, fake one up
- slightly relax the block size checks in bootxx.c; they were a bit to paranoid

And local changes:
- don't build a copy of libsa/libkern/libz for each boot prog,
just build a single copy and use it for everything.


# 1.2 27-Nov-1996 niklas

Make compilable in our env. Involved disabling ELF support,
reordering includes (due to -Wstrict-prototypes) and other -Wall goo


# 1.1 30-Oct-1996 niklas

Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.


# 1.19 11-Mar-2023 miod

Allow strip and objcopy to be overrridden, for easier cross-buildability. NFC


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.18 02-Jul-2021 deraadt

__remq.S will be needed soon.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 29-Oct-2019 deraadt

Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdata
section, which has grown a fair bit with the introduction of retguard.
Mortimer discovered the repeated 512-byte sequence as retguard keys, and
this resolves the issue. (Chacha does not fit on the media, so 1.5K early
drop RC4 is hopefully sufficient in our KARL link universe)
Version crank the bootblocks. sysupgrade -s will install new bootblocks.
ok djm mortimer


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.16 24-Feb-2019 kn

Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.15 12-Jun-2017 espie

destroy lint remnants.
okay millert@ deraadt@


Revision tags: OPENBSD_6_1_BASE
# 1.14 30-Jul-2016 guenther

Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.13 13-Dec-2014 miod

Create a MOP version of the network boot loader; verified to boot on DEC 3000.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.12 01-Sep-2012 pascal

Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.

tested by naddy@; ok deraadt@


# 1.11 21-Aug-2012 pascal

Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...

ok deraadt@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.10 05-Jun-2011 miod

Update alpha bootblocks to use MI loadfile code instead of rolling our own;
also print a meaningful message if the kernel load address conflicts with the
SRM memory areas, so that we can know which kernel load address to use.

Requires `make includes' before attempting to build bootblocks.

Tweaks mk@, `nice' deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 25-Nov-2007 martin

we want strlen.c


# 1.8 25-Nov-2007 deraadt

libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.

There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.

Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.7 15-Feb-2006 mickey

enable -DSUN_BOOTPARAMS; henning@ martin@ miod@ ok


Revision tags: OPENBSD_3_8_BASE
# 1.6 10-Aug-2005 todd

suggested by art, go for it deraadt, ok miod@
remove ECOFF support


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE SMP_SYNC_A SMP_SYNC_B UBC_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 16-Jan-2001 art

Use objcopy to build the bootblocks instead of a hairy dd.
Bootblock built with elf utils work now.


# 1.4 14-Dec-2000 art

Enable loading of ELF kernels.


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE SMP_BASE kame_19991208
# 1.3 05-May-1997 millert

branches: 1.3.14;
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate,
and don't build the various sources into objs locally by specifying
them directly in the Makefiles.
- move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT
so that we don't exhaust our bootstrap address space (when using the new,
not yet checked in, memory allocator).
- clean up installboot, deal with secondary bootstrap programs not on
'a' partition or 'a' partition not starting at 0.
- add padding to structures in bbinfo.h for future expansion. Add a
netbbinfo structure to allow netboot information to be hard-coded in
network boot blocks, so that they can be made to work even on systems
with firmware which doesn't support the new "ethernet address in boot
device" convention.
- move the sync() calls to the correct place in installboot.c
- remove a kludge in disk.c which was breaking multiple opens/closes
of the disk
- allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
- Add setnetbootinfo, a program to hard code an ethernet address into
a network boot.
- move an 'int debug;' into boot.c (it was the only diff between boot.c and
netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks).
- add cd9660 file system ops to the file system ops table in filesystem.c
- if a file name is given (i.e. BOOTED_FILE) is set, boot only that file,
but if not then try to boot "bsd", "bsd.bak", "bsd.old", and
"obsd" (in that order) until one is found or until the list of names
is exhausted.
- add support for reading gzipped kernels.
- use strerror() to print errors, rather than just printing error numbers
- if no disk label exists, fake one up
- slightly relax the block size checks in bootxx.c; they were a bit to paranoid

And local changes:
- don't build a copy of libsa/libkern/libz for each boot prog,
just build a single copy and use it for everything.


# 1.2 27-Nov-1996 niklas

Make compilable in our env. Involved disabling ELF support,
reordering includes (due to -Wstrict-prototypes) and other -Wall goo


# 1.1 30-Oct-1996 niklas

Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.


# 1.18 02-Jul-2021 deraadt

__remq.S will be needed soon.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 29-Oct-2019 deraadt

Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdata
section, which has grown a fair bit with the introduction of retguard.
Mortimer discovered the repeated 512-byte sequence as retguard keys, and
this resolves the issue. (Chacha does not fit on the media, so 1.5K early
drop RC4 is hopefully sufficient in our KARL link universe)
Version crank the bootblocks. sysupgrade -s will install new bootblocks.
ok djm mortimer


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.16 24-Feb-2019 kn

Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.15 12-Jun-2017 espie

destroy lint remnants.
okay millert@ deraadt@


Revision tags: OPENBSD_6_1_BASE
# 1.14 30-Jul-2016 guenther

Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.13 13-Dec-2014 miod

Create a MOP version of the network boot loader; verified to boot on DEC 3000.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.12 01-Sep-2012 pascal

Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.

tested by naddy@; ok deraadt@


# 1.11 21-Aug-2012 pascal

Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...

ok deraadt@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.10 05-Jun-2011 miod

Update alpha bootblocks to use MI loadfile code instead of rolling our own;
also print a meaningful message if the kernel load address conflicts with the
SRM memory areas, so that we can know which kernel load address to use.

Requires `make includes' before attempting to build bootblocks.

Tweaks mk@, `nice' deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 25-Nov-2007 martin

we want strlen.c


# 1.8 25-Nov-2007 deraadt

libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.

There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.

Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.7 15-Feb-2006 mickey

enable -DSUN_BOOTPARAMS; henning@ martin@ miod@ ok


Revision tags: OPENBSD_3_8_BASE
# 1.6 10-Aug-2005 todd

suggested by art, go for it deraadt, ok miod@
remove ECOFF support


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE SMP_SYNC_A SMP_SYNC_B UBC_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 16-Jan-2001 art

Use objcopy to build the bootblocks instead of a hairy dd.
Bootblock built with elf utils work now.


# 1.4 14-Dec-2000 art

Enable loading of ELF kernels.


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE SMP_BASE kame_19991208
# 1.3 05-May-1997 millert

branches: 1.3.14;
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate,
and don't build the various sources into objs locally by specifying
them directly in the Makefiles.
- move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT
so that we don't exhaust our bootstrap address space (when using the new,
not yet checked in, memory allocator).
- clean up installboot, deal with secondary bootstrap programs not on
'a' partition or 'a' partition not starting at 0.
- add padding to structures in bbinfo.h for future expansion. Add a
netbbinfo structure to allow netboot information to be hard-coded in
network boot blocks, so that they can be made to work even on systems
with firmware which doesn't support the new "ethernet address in boot
device" convention.
- move the sync() calls to the correct place in installboot.c
- remove a kludge in disk.c which was breaking multiple opens/closes
of the disk
- allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
- Add setnetbootinfo, a program to hard code an ethernet address into
a network boot.
- move an 'int debug;' into boot.c (it was the only diff between boot.c and
netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks).
- add cd9660 file system ops to the file system ops table in filesystem.c
- if a file name is given (i.e. BOOTED_FILE) is set, boot only that file,
but if not then try to boot "bsd", "bsd.bak", "bsd.old", and
"obsd" (in that order) until one is found or until the list of names
is exhausted.
- add support for reading gzipped kernels.
- use strerror() to print errors, rather than just printing error numbers
- if no disk label exists, fake one up
- slightly relax the block size checks in bootxx.c; they were a bit to paranoid

And local changes:
- don't build a copy of libsa/libkern/libz for each boot prog,
just build a single copy and use it for everything.


# 1.2 27-Nov-1996 niklas

Make compilable in our env. Involved disabling ELF support,
reordering includes (due to -Wstrict-prototypes) and other -Wall goo


# 1.1 30-Oct-1996 niklas

Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.


# 1.17 29-Oct-2019 deraadt

Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdata
section, which has grown a fair bit with the introduction of retguard.
Mortimer discovered the repeated 512-byte sequence as retguard keys, and
this resolves the issue. (Chacha does not fit on the media, so 1.5K early
drop RC4 is hopefully sufficient in our KARL link universe)
Version crank the bootblocks. sysupgrade -s will install new bootblocks.
ok djm mortimer


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.16 24-Feb-2019 kn

Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.15 12-Jun-2017 espie

destroy lint remnants.
okay millert@ deraadt@


Revision tags: OPENBSD_6_1_BASE
# 1.14 30-Jul-2016 guenther

Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.13 13-Dec-2014 miod

Create a MOP version of the network boot loader; verified to boot on DEC 3000.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.12 01-Sep-2012 pascal

Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.

tested by naddy@; ok deraadt@


# 1.11 21-Aug-2012 pascal

Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...

ok deraadt@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.10 05-Jun-2011 miod

Update alpha bootblocks to use MI loadfile code instead of rolling our own;
also print a meaningful message if the kernel load address conflicts with the
SRM memory areas, so that we can know which kernel load address to use.

Requires `make includes' before attempting to build bootblocks.

Tweaks mk@, `nice' deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 25-Nov-2007 martin

we want strlen.c


# 1.8 25-Nov-2007 deraadt

libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.

There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.

Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.7 15-Feb-2006 mickey

enable -DSUN_BOOTPARAMS; henning@ martin@ miod@ ok


Revision tags: OPENBSD_3_8_BASE
# 1.6 10-Aug-2005 todd

suggested by art, go for it deraadt, ok miod@
remove ECOFF support


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE SMP_SYNC_A SMP_SYNC_B UBC_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 16-Jan-2001 art

Use objcopy to build the bootblocks instead of a hairy dd.
Bootblock built with elf utils work now.


# 1.4 14-Dec-2000 art

Enable loading of ELF kernels.


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE SMP_BASE kame_19991208
# 1.3 05-May-1997 millert

branches: 1.3.14;
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate,
and don't build the various sources into objs locally by specifying
them directly in the Makefiles.
- move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT
so that we don't exhaust our bootstrap address space (when using the new,
not yet checked in, memory allocator).
- clean up installboot, deal with secondary bootstrap programs not on
'a' partition or 'a' partition not starting at 0.
- add padding to structures in bbinfo.h for future expansion. Add a
netbbinfo structure to allow netboot information to be hard-coded in
network boot blocks, so that they can be made to work even on systems
with firmware which doesn't support the new "ethernet address in boot
device" convention.
- move the sync() calls to the correct place in installboot.c
- remove a kludge in disk.c which was breaking multiple opens/closes
of the disk
- allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
- Add setnetbootinfo, a program to hard code an ethernet address into
a network boot.
- move an 'int debug;' into boot.c (it was the only diff between boot.c and
netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks).
- add cd9660 file system ops to the file system ops table in filesystem.c
- if a file name is given (i.e. BOOTED_FILE) is set, boot only that file,
but if not then try to boot "bsd", "bsd.bak", "bsd.old", and
"obsd" (in that order) until one is found or until the list of names
is exhausted.
- add support for reading gzipped kernels.
- use strerror() to print errors, rather than just printing error numbers
- if no disk label exists, fake one up
- slightly relax the block size checks in bootxx.c; they were a bit to paranoid

And local changes:
- don't build a copy of libsa/libkern/libz for each boot prog,
just build a single copy and use it for everything.


# 1.2 27-Nov-1996 niklas

Make compilable in our env. Involved disabling ELF support,
reordering includes (due to -Wstrict-prototypes) and other -Wall goo


# 1.1 30-Oct-1996 niklas

Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.


# 1.16 24-Feb-2019 kn

Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.15 12-Jun-2017 espie

destroy lint remnants.
okay millert@ deraadt@


Revision tags: OPENBSD_6_1_BASE
# 1.14 30-Jul-2016 guenther

Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.13 13-Dec-2014 miod

Create a MOP version of the network boot loader; verified to boot on DEC 3000.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.12 01-Sep-2012 pascal

Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.

tested by naddy@; ok deraadt@


# 1.11 21-Aug-2012 pascal

Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...

ok deraadt@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.10 05-Jun-2011 miod

Update alpha bootblocks to use MI loadfile code instead of rolling our own;
also print a meaningful message if the kernel load address conflicts with the
SRM memory areas, so that we can know which kernel load address to use.

Requires `make includes' before attempting to build bootblocks.

Tweaks mk@, `nice' deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 25-Nov-2007 martin

we want strlen.c


# 1.8 25-Nov-2007 deraadt

libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.

There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.

Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.7 15-Feb-2006 mickey

enable -DSUN_BOOTPARAMS; henning@ martin@ miod@ ok


Revision tags: OPENBSD_3_8_BASE
# 1.6 10-Aug-2005 todd

suggested by art, go for it deraadt, ok miod@
remove ECOFF support


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE SMP_SYNC_A SMP_SYNC_B UBC_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 16-Jan-2001 art

Use objcopy to build the bootblocks instead of a hairy dd.
Bootblock built with elf utils work now.


# 1.4 14-Dec-2000 art

Enable loading of ELF kernels.


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE SMP_BASE kame_19991208
# 1.3 05-May-1997 millert

branches: 1.3.14;
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate,
and don't build the various sources into objs locally by specifying
them directly in the Makefiles.
- move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT
so that we don't exhaust our bootstrap address space (when using the new,
not yet checked in, memory allocator).
- clean up installboot, deal with secondary bootstrap programs not on
'a' partition or 'a' partition not starting at 0.
- add padding to structures in bbinfo.h for future expansion. Add a
netbbinfo structure to allow netboot information to be hard-coded in
network boot blocks, so that they can be made to work even on systems
with firmware which doesn't support the new "ethernet address in boot
device" convention.
- move the sync() calls to the correct place in installboot.c
- remove a kludge in disk.c which was breaking multiple opens/closes
of the disk
- allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
- Add setnetbootinfo, a program to hard code an ethernet address into
a network boot.
- move an 'int debug;' into boot.c (it was the only diff between boot.c and
netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks).
- add cd9660 file system ops to the file system ops table in filesystem.c
- if a file name is given (i.e. BOOTED_FILE) is set, boot only that file,
but if not then try to boot "bsd", "bsd.bak", "bsd.old", and
"obsd" (in that order) until one is found or until the list of names
is exhausted.
- add support for reading gzipped kernels.
- use strerror() to print errors, rather than just printing error numbers
- if no disk label exists, fake one up
- slightly relax the block size checks in bootxx.c; they were a bit to paranoid

And local changes:
- don't build a copy of libsa/libkern/libz for each boot prog,
just build a single copy and use it for everything.


# 1.2 27-Nov-1996 niklas

Make compilable in our env. Involved disabling ELF support,
reordering includes (due to -Wstrict-prototypes) and other -Wall goo


# 1.1 30-Oct-1996 niklas

Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.


Revision tags: OPENBSD_6_2_BASE
# 1.15 12-Jun-2017 espie

destroy lint remnants.
okay millert@ deraadt@


Revision tags: OPENBSD_6_1_BASE
# 1.14 30-Jul-2016 guenther

Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.13 13-Dec-2014 miod

Create a MOP version of the network boot loader; verified to boot on DEC 3000.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.12 01-Sep-2012 pascal

Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.

tested by naddy@; ok deraadt@


# 1.11 21-Aug-2012 pascal

Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...

ok deraadt@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.10 05-Jun-2011 miod

Update alpha bootblocks to use MI loadfile code instead of rolling our own;
also print a meaningful message if the kernel load address conflicts with the
SRM memory areas, so that we can know which kernel load address to use.

Requires `make includes' before attempting to build bootblocks.

Tweaks mk@, `nice' deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 25-Nov-2007 martin

we want strlen.c


# 1.8 25-Nov-2007 deraadt

libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.

There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.

Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.7 15-Feb-2006 mickey

enable -DSUN_BOOTPARAMS; henning@ martin@ miod@ ok


Revision tags: OPENBSD_3_8_BASE
# 1.6 10-Aug-2005 todd

suggested by art, go for it deraadt, ok miod@
remove ECOFF support


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE SMP_SYNC_A SMP_SYNC_B UBC_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 16-Jan-2001 art

Use objcopy to build the bootblocks instead of a hairy dd.
Bootblock built with elf utils work now.


# 1.4 14-Dec-2000 art

Enable loading of ELF kernels.


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE SMP_BASE kame_19991208
# 1.3 05-May-1997 millert

branches: 1.3.14;
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate,
and don't build the various sources into objs locally by specifying
them directly in the Makefiles.
- move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT
so that we don't exhaust our bootstrap address space (when using the new,
not yet checked in, memory allocator).
- clean up installboot, deal with secondary bootstrap programs not on
'a' partition or 'a' partition not starting at 0.
- add padding to structures in bbinfo.h for future expansion. Add a
netbbinfo structure to allow netboot information to be hard-coded in
network boot blocks, so that they can be made to work even on systems
with firmware which doesn't support the new "ethernet address in boot
device" convention.
- move the sync() calls to the correct place in installboot.c
- remove a kludge in disk.c which was breaking multiple opens/closes
of the disk
- allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
- Add setnetbootinfo, a program to hard code an ethernet address into
a network boot.
- move an 'int debug;' into boot.c (it was the only diff between boot.c and
netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks).
- add cd9660 file system ops to the file system ops table in filesystem.c
- if a file name is given (i.e. BOOTED_FILE) is set, boot only that file,
but if not then try to boot "bsd", "bsd.bak", "bsd.old", and
"obsd" (in that order) until one is found or until the list of names
is exhausted.
- add support for reading gzipped kernels.
- use strerror() to print errors, rather than just printing error numbers
- if no disk label exists, fake one up
- slightly relax the block size checks in bootxx.c; they were a bit to paranoid

And local changes:
- don't build a copy of libsa/libkern/libz for each boot prog,
just build a single copy and use it for everything.


# 1.2 27-Nov-1996 niklas

Make compilable in our env. Involved disabling ELF support,
reordering includes (due to -Wstrict-prototypes) and other -Wall goo


# 1.1 30-Oct-1996 niklas

Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.