Home | History | Annotate | only in /src/sys/arch/atari/stand
History log of /src/sys/arch/atari/stand
RevisionDateAuthorComments
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 09-Dec-2003  jmc Make libsa build first as other items depend on it (for -j builds)
 1.9 13-Oct-2001  leo branches: 1.9.4; 1.9.20;
Add bootxxx
 1.8 07-Aug-2000  leo branches: 1.8.4;
Add ahdilabel to SUBDIR.
 1.7 28-May-1998  leo branches: 1.7.14; 1.7.24;
Add bootpref subdir.
 1.6 10-Feb-1998  leo Build the library before using it.... (Thomas Gerner).
 1.5 06-Nov-1996  leo Add msconfig to SUBDIRS.
 1.4 22-Jun-1996  leo Add the subdirs: binpatch, keymaps and loadkmap.
 1.3 30-May-1996  leo Add loadkmap
 1.2 16-May-1996  leo branches: 1.2.4;
Add edahdi to the subdirs.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Added to build the bootloader stuff.
 1.1.1.1 16-May-1996  leo edahdi, an AHDI partition-id editor
 1.2.4.1 24-Jun-1996  jtc Pull up Leo's changes to atari keymap handling.
 1.7.24.1 17-Aug-2000  leo Pull up revisions 1.7-1.8 (requested by leo; approved by thorpej).

Log message:
Add ahdilabel to SUBDIR.
 1.7.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.20.1 03-Aug-2004  skrll Sync with HEAD
 1.9.4.2 13-Oct-2001  leo Add bootxxx
 1.9.4.1 13-Oct-2001  leo file Makefile was added on branch nathanw_sa on 2001-10-13 20:40:44 +0000
 1.5 17-Sep-2016  christos kill PIE/SSP
 1.4 12-Aug-2013  joerg branches: 1.4.6; 1.4.10;
Build boot loaders without unwind tables.
 1.3 18-Dec-2011  tsutsui branches: 1.3.6; 1.3.10;
Explicitly specify -m68020-60 to avoid possible 060SP instructions,
especially 64 bit integer mul/div ops in standalone bootloaders. From x68k.
 1.2 15-Mar-2009  tsutsui branches: 1.2.2; 1.2.14; 1.2.18;
Use <bsd.klinks.mk> to create MD include dir symlinks.
 1.1 06-Jan-2009  tsutsui branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.1.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.8.3 28-Apr-2009  skrll Sync with HEAD.
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 06-Jan-2009  skrll file Makefile.booters was added on branch nick-hppapmap on 2009-01-19 13:16:01 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 06-Jan-2009  mjf file Makefile.booters was added on branch mjf-devfs2 on 2009-01-17 13:27:55 +0000
 1.1.4.2 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.1.4.1 06-Jan-2009  bouyer file Makefile.booters was added on branch netbsd-5 on 2009-01-16 22:57:33 +0000
 1.1.2.2 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.1.2.1 06-Jan-2009  bouyer file Makefile.booters was added on branch netbsd-4 on 2009-01-15 23:20:03 +0000
 1.2.18.1 18-Feb-2012  mrg merge to -current.
 1.2.14.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.14.1 17-Apr-2012  yamt sync with head
 1.2.2.2 04-May-2009  yamt sync with head.
 1.2.2.1 15-Mar-2009  yamt file Makefile.booters was added on branch yamt-nfs-mp on 2009-05-04 08:10:48 +0000
 1.3.10.1 28-Aug-2013  rmind sync with head
 1.3.6.2 03-Dec-2017  jdolecek update from HEAD
 1.3.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.4.6.1 05-Oct-2016  skrll Sync with HEAD
 1.3 06-Jan-2009  tsutsui Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.2 01-Dec-2006  he branches: 1.2.2; 1.2.52; 1.2.56; 1.2.64; 1.2.66;
Add -Os to CFLAGS, so that the boot code fits within the constraints
again. Sorry, I've not traced why this fit in the past, or what
changed to make it not fit anymore.
 1.1 01-Apr-2003  he branches: 1.1.18; 1.1.48; 1.1.50;
Undo the last; adding the quad arithmetic caused the boot code to
overflow. Instead do as the mvme68k port, and use 32-bit daddr_t here.
 1.1.50.1 10-Dec-2006  yamt sync with head.
 1.1.48.1 12-Jan-2007  ad Sync with head.
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.2.66.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.2.64.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.56.1 04-May-2009  yamt sync with head.
 1.2.52.1 17-Jan-2009  mjf Sync with HEAD.
 1.2.2.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.2 16-May-1996  leo Remove files commited in the wrong directory. Sorry.
 1.1 16-May-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 16-May-1996  leo edahdi, an AHDI partition-id editor
 1.2 16-May-1996  leo Remove files commited in the wrong directory. Sorry.
 1.1 16-May-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 16-May-1996  leo edahdi, an AHDI partition-id editor
 1.5 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.4 04-Mar-2001  jdc branches: 1.4.4; 1.4.8;
Man page is now in share/man/man8/man8.atari.
 1.3 25-Feb-2001  jdc Make it easier to build with -DDEBUG.
 1.2 22-Aug-2000  leo branches: 1.2.2;
Need to specify BINDIR or the executable ends up in /
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2;
AHDI label editor
 1.1.1.1.2.4 22-Mar-2001  he Pull up revisions 1.3-1.4 (requested by jtb):
Several changes:
o make it easy to compile with -DDEBUG
o move manual page to proper place
 1.1.1.1.2.3 29-Aug-2000  leo Pull up revision 1.2 (requested by leo, approved by thorpej)
Log message:
Need to specify BINDIR or the executable ends up in /
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file Makefile was added on branch netbsd-1-5 on 2000-08-14 07:59:58 +0000
 1.2.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 22-Aug-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.4.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2 04-Mar-2001  jdc Man page moved to share/man/man8/man8.atari.
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4;
AHDI label editor
 1.1.1.1.4.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file ahdilabel.8 was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.1.1.1.2.3 22-Mar-2001  he Pull up file removal (requested by jtb):
Several changes:
o move manual page to proper place
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file ahdilabel.8 was added on branch netbsd-1-5 on 2000-08-14 07:59:58 +0000
 1.12 05-Dec-2021  msaitoh s/partiton/partition/
 1.11 09-Oct-2016  christos PR/51540: Henning Petersen: replace , with ;
 1.10 28-Mar-2014  ozaki-r branches: 1.10.6; 1.10.10;
Fix; cts[0] => cts
 1.9 26-Mar-2014  christos kill sprintf
 1.8 14-Mar-2009  dsl branches: 1.8.12; 1.8.22; 1.8.26;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.7 28-Apr-2008  martin branches: 1.7.8; 1.7.14;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.76; 1.6.78;
merge ktrace-lwp.
 1.5 12-Nov-2004  he Add a cast to unsigned char for an argument to toupper().
 1.4 26-Jul-2001  wiz branches: 1.4.6; 1.4.22;
auxilliary -> auxiliary
 1.3 04-Mar-2001  jdc branches: 1.3.4;
Add enhancements :
boot sector and bad sector list are preserved by default, use 'z' to change
type NNNm to make a partition size NNN megabytes
type `-N' at `root' and `start' prompts to start after partition N
type `-N' at `size' prompt to end before partition N
type `-1' at `size' prompt to end at end of disk
display pauses if 10 or more partitions to display
 1.2 25-Feb-2001  jdc Root sector checksums are not always valid, so ignore them.
From Leo Weppelman.
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4;
AHDI label editor
 1.1.1.1.4.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file ahdilabel.c was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.1.1.1.2.3 22-Mar-2001  he Pull up revisions 1.2-1.3 (requested by jtb):
Several changes:
o ignore sometimes-invalid root sector checksums
o by default preserve boot sector and bad sector list
o improve user interface to specify partitions
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file ahdilabel.c was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.3.4.1 03-Aug-2001  lukem update to -current
 1.4.22.1 14-Nov-2004  skrll Sync with HEAD.
 1.4.6.2 26-Jul-2001  wiz auxilliary -> auxiliary
 1.4.6.1 26-Jul-2001  wiz file ahdilabel.c was added on branch nathanw_sa on 2001-07-26 22:53:14 +0000
 1.6.78.2 04-May-2009  yamt sync with head.
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.26.1 18-May-2014  rmind sync with head
 1.8.22.2 03-Dec-2017  jdolecek update from HEAD
 1.8.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.10.6.1 05-Dec-2016  skrll Sync with HEAD
 1.3 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.130; 1.1.1.1.132; 1.1.1.1.134;
AHDI label editor
 1.1.1.1.134.2 04-May-2009  yamt sync with head.
 1.1.1.1.134.1 16-May-2008  yamt sync with head.
 1.1.1.1.132.1 18-May-2008  yamt sync with head.
 1.1.1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file build.c was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file build.c was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 28-Apr-2008  martin branches: 1.5.8; 1.5.14;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.74; 1.4.76; 1.4.78;
merge ktrace-lwp.
 1.3 11-Feb-2005  simonb White space nit- don't put a space before/after increment/decrement
operators.
 1.2 23-Oct-2000  jdc branches: 1.2.2; 1.2.26; 1.2.34; 1.2.36;
Correct `off by one' error when testing against size of disk.
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2;
AHDI label editor
 1.1.1.1.2.3 26-Oct-2000  tv Pullup 1.2 [jdc]:
Correct `off by one' error when testing against size of disk.
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file check.c was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.2.36.1 12-Feb-2005  yamt sync with head.
 1.2.34.1 29-Apr-2005  kent sync with -current
 1.2.26.1 15-Feb-2005  skrll Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 23-Oct-2000  bouyer file check.c was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.4.78.2 04-May-2009  yamt sync with head.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.3 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.130; 1.1.1.1.132; 1.1.1.1.134;
AHDI label editor
 1.1.1.1.134.2 04-May-2009  yamt sync with head.
 1.1.1.1.134.1 16-May-2008  yamt sync with head.
 1.1.1.1.132.1 18-May-2008  yamt sync with head.
 1.1.1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file cksum.c was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file cksum.c was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.3 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.130; 1.1.1.1.132; 1.1.1.1.134;
AHDI label editor
 1.1.1.1.134.2 04-May-2009  yamt sync with head.
 1.1.1.1.134.1 16-May-2008  yamt sync with head.
 1.1.1.1.132.1 18-May-2008  yamt sync with head.
 1.1.1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file magic.c was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file magic.c was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.3 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.130; 1.1.1.1.132; 1.1.1.1.134;
AHDI label editor
 1.1.1.1.134.2 04-May-2009  yamt sync with head.
 1.1.1.1.134.1 16-May-2008  yamt sync with head.
 1.1.1.1.132.1 18-May-2008  yamt sync with head.
 1.1.1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file openraw.c was added on branch thorpej_scsipi on 2000-11-20 20:05:31 +0000
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file openraw.c was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.4 29-Sep-2020  msaitoh s/parition/partition/
 1.3 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.130; 1.1.1.1.132; 1.1.1.1.134;
AHDI label editor
 1.1.1.1.134.2 04-May-2009  yamt sync with head.
 1.1.1.1.134.1 16-May-2008  yamt sync with head.
 1.1.1.1.132.1 18-May-2008  yamt sync with head.
 1.1.1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file privahdi.h was added on branch thorpej_scsipi on 2000-11-20 20:05:32 +0000
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file privahdi.h was added on branch netbsd-1-5 on 2000-08-14 07:59:59 +0000
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.4 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 25-Feb-2001  jdc branches: 1.2.126; 1.2.128; 1.2.130;
Include <stdio.h> when built with -DDEBUG.
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4;
AHDI label editor
 1.1.1.1.4.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file read.c was added on branch thorpej_scsipi on 2000-11-20 20:05:32 +0000
 1.1.1.1.2.3 22-Mar-2001  he Pull up revision 1.2 (requested by jdc):
Several changes:
o make compile cleanly with -DDEBUG.
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file read.c was added on branch netbsd-1-5 on 2000-08-14 08:00:00 +0000
 1.2.130.2 04-May-2009  yamt sync with head.
 1.2.130.1 16-May-2008  yamt sync with head.
 1.2.128.1 18-May-2008  yamt sync with head.
 1.2.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 28-Apr-2008  martin branches: 1.5.8; 1.5.14;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.74; 1.4.76; 1.4.78;
merge ktrace-lwp.
 1.3 10-Jun-2005  he Add initialization of xgmsec, the assignment to it apparently depends
on the value in one of the data structures passed as arguments.
 1.2 25-Feb-2001  jdc branches: 1.2.24;
Make sure root sector checksum is invalid if we clear it.
Set size of XGM partitions on auxilliary roots correctly.
From Leo Weppelman.
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4;
AHDI label editor
 1.1.1.1.4.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file write.c was added on branch thorpej_scsipi on 2000-11-20 20:05:32 +0000
 1.1.1.1.2.3 22-Mar-2001  he Pull up revision 1.2 (requested by jtb):
Several changes:
o if we clear root sector, make sure the checksum is invalid
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file write.c was added on branch netbsd-1-5 on 2000-08-14 08:00:00 +0000
 1.2.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.78.2 04-May-2009  yamt sync with head.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 28-Apr-2008  martin branches: 1.4.8; 1.4.14;
Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 28-Oct-2003  he Add include of <string.h> to pick up strlen() prototype.
 1.1 07-Aug-2000  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Aug-2000  leo branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.28;
AHDI label editor
 1.1.1.1.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.1.1.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.1.1.28.1 03-Aug-2004  skrll Sync with HEAD
 1.1.1.1.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.1.1.4.1 07-Aug-2000  bouyer file writedtab.c was added on branch thorpej_scsipi on 2000-11-20 20:05:32 +0000
 1.1.1.1.2.2 14-Aug-2000  leo Pullup ahdilabel. Requested by leo, approved by thorpej.

ahdilabel allows to edit AHDI (== the native Atari format) disklabels from
within NetBSD. From Julian Coleman.
 1.1.1.1.2.1 07-Aug-2000  leo file writedtab.c was added on branch netbsd-1-5 on 2000-08-14 08:00:00 +0000
 1.3.78.2 04-May-2009  yamt sync with head.
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.7 10-May-2010  tsutsui Include <bsd.own.mk> before ${NETBSDSRCDIR}.
 1.6 20-Aug-2009  tsutsui branches: 1.6.2; 1.6.4;
Rewrite binpatch(8) utility to add support for ELF binaries,
using implementation of old src/usr.sbin/mdsetimage sources
which supports misc executable formats without LGPL'ed libbfd.

No particular comments on port-atari@.

XXX1: amiga also has the similar utility in amiga/stand/binpatch
but it has slightly different options.
XXX2: Is it worth to put this utility into MI src/usr.sbin to patch
rtc_offset etc. in GENERIC kernel binaries in distribution?
 1.5 12-Dec-2001  tv branches: 1.5.122; 1.5.132; 1.5.140;
MKfoo=no -> NOfoo
 1.4 13-Feb-1999  lukem branches: 1.4.22; 1.4.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 22-Jun-1997  mrg move man pages into share/man.
 1.2 29-Aug-1995  leo Fix rule for manual page.
 1.1 26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.4.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.140.1 21-Apr-2010  matt sync to netbsd-5
 1.5.132.1 04-Oct-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #1056):
share/man/man8/man8.atari/binpatch.8: revision 1.6
sys/arch/atari/stand/binpatch/Makefile: revision 1.6
sys/arch/atari/stand/binpatch/binpatch.c: revision 1.5, 1.6
Rewrite binpatch(8) utility to add support for ELF binaries,
using implementation of old src/usr.sbin/mdsetimage sources
which supports misc executable formats without LGPL'ed libbfd.
No particular comments on port-atari@.
XXX1: amiga also has the similar utility in amiga/stand/binpatch
but it has slightly different options.
XXX2: Is it worth to put this utility into MI src/usr.sbin to patch
rtc_offset etc. in GENERIC kernel binaries in distribution?
 1.5.122.2 11-Aug-2010  yamt sync with head.
 1.5.122.1 16-Sep-2009  yamt sync with head
 1.6.4.1 30-May-2010  rmind sync with head
 1.6.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.7 22-Sep-2016  christos Catch up with mdsetimage changes.
 1.6 20-Aug-2009  tsutsui branches: 1.6.22; 1.6.40; 1.6.44;
Rewrite binpatch(8) utility to add support for ELF binaries,
using implementation of old src/usr.sbin/mdsetimage sources
which supports misc executable formats without LGPL'ed libbfd.

No particular comments on port-atari@.

XXX1: amiga also has the similar utility in amiga/stand/binpatch
but it has slightly different options.
XXX2: Is it worth to put this utility into MI src/usr.sbin to patch
rtc_offset etc. in GENERIC kernel binaries in distribution?
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 04-Aug-2006  mhitch branches: 1.4.62; 1.4.70; 1.4.72; 1.4.76; 1.4.80;
gcc4 fixes: need to include stdlib.h; fix prototype and definition of
local error() function.
 1.3 06-Apr-1999  pk branches: 1.3.52; 1.3.66; 1.3.70;
Duplicate clause number in copyright text.
 1.2 01-Nov-1997  lukem branches: 1.2.8;
getopt returns -1 not EOF
 1.1 26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.2.8.1 07-Apr-1999  pk branches: 1.2.8.1.2;
Pull up from trunk: copyright text warts.
 1.2.8.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.70.1 11-Aug-2006  yamt sync with head
 1.3.66.1 09-Sep-2006  rpaulo sync with head
 1.3.52.1 30-Dec-2006  yamt sync with head.
 1.4.80.1 21-Apr-2010  matt sync to netbsd-5
 1.4.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.72.1 04-Oct-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #1056):
share/man/man8/man8.atari/binpatch.8: revision 1.6
sys/arch/atari/stand/binpatch/Makefile: revision 1.6
sys/arch/atari/stand/binpatch/binpatch.c: revision 1.5, 1.6
Rewrite binpatch(8) utility to add support for ELF binaries,
using implementation of old src/usr.sbin/mdsetimage sources
which supports misc executable formats without LGPL'ed libbfd.
No particular comments on port-atari@.
XXX1: amiga also has the similar utility in amiga/stand/binpatch
but it has slightly different options.
XXX2: Is it worth to put this utility into MI src/usr.sbin to patch
rtc_offset etc. in GENERIC kernel binaries in distribution?
 1.4.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.62.2 16-Sep-2009  yamt sync with head
 1.4.62.1 04-May-2009  yamt sync with head.
 1.6.44.1 04-Nov-2016  pgoyette Sync with HEAD
 1.6.40.1 05-Oct-2016  skrll Sync with HEAD
 1.6.22.1 03-Dec-2017  jdolecek update from HEAD
 1.3 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.2 13-Feb-1999  lukem branches: 1.2.22; 1.2.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.1 28-May-1998  leo branches: 1.1.1;
Initial revision
 1.1.1.1 28-May-1998  leo bootpref(8), set/get bootpreferences by Julian Coleman
 1.2.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2 28-May-1998  leo Moved to usr/share/man/man8/man8.atari.
 1.1 28-May-1998  leo branches: 1.1.1;
Initial revision
 1.1.1.1 28-May-1998  leo bootpref(8), set/get bootpreferences by Julian Coleman
 1.6 17-Mar-2009  he Make a couple of functions conform to the prototype, restoring buildability.
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 17-Jun-1998  leo branches: 1.2.150; 1.2.152; 1.2.154;
Both the values 0 & 3 denote an english language (probably 0 US, 3 GB).
Observed by Witek Wnuk.
 1.1 28-May-1998  leo branches: 1.1.1;
Initial revision
 1.1.1.1 28-May-1998  leo bootpref(8), set/get bootpreferences by Julian Coleman
 1.2.154.2 04-May-2009  yamt sync with head.
 1.2.154.1 16-May-2008  yamt sync with head.
 1.2.152.1 18-May-2008  yamt sync with head.
 1.2.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 17-Jun-1998  leo branches: 1.2.150; 1.2.152; 1.2.154;
Both the values 0 & 3 denote an english language (probably 0 US, 3 GB).
Observed by Witek Wnuk.
 1.1 28-May-1998  leo branches: 1.1.1;
Initial revision
 1.1.1.1 28-May-1998  leo bootpref(8), set/get bootpreferences by Julian Coleman
 1.2.154.1 16-May-2008  yamt sync with head.
 1.2.152.1 18-May-2008  yamt sync with head.
 1.2.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.15 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.14 08-Apr-2002  bjh21 Rather than grovelling around for libsa's objdir by hand, use ${PRINT_OBJDIR},
since that's what it's for.
 1.13 08-Apr-2002  bjh21 Add -Wno-uninitialized to CFLAGS, since it's overly-pessimistic.
 1.12 12-Dec-2001  lukem Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
 1.11 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.10 13-Oct-2001  leo branches: 1.10.4;
Bootxx is no longer the last booting stage. It now handles only the
command line options. If NetBSD should be loaded, bootxx tries to load
the raw binary file '/boot' that resides on the same filesystem as the
kernel to be booted. This 3rd level boot is supposed to actually load the
kernel.
 1.9 22-Sep-2001  tv objcopy -> ${OBJCOPY}; remove redundant definitions of OBJCOPY?= (it is
now in bsd.own.mk).
 1.8 08-Sep-2001  thomas Make the bootloader ELF aware.
It can load either a.out or ELF, depending on compile options.
 1.7 22-Apr-1999  leo branches: 1.7.14; 1.7.16;
Make sure that we can link against the libsa.a library. It looks like a
gross hack, but I don't know how to fix this in another way.
 1.6 19-Feb-1999  leo branches: 1.6.2;
STANDALONE -> _STANDALONE per recent discussion.
 1.5 13-Feb-1999  lukem convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.4 17-Apr-1997  thorpej STRIP -> STRIPFLAG
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.6.2.1 22-Apr-1999  perry branches: 1.6.2.1.2;
pullup 1.6->1.7 (leo)
 1.6.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7.16.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.16.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.16.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.7.14.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.4.3 17-Apr-2002  nathanw Catch up to -current.
 1.10.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.4.1 13-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:23:39 +0000
 1.11 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.10 06-Jul-2010  mrg branches: 1.10.8; 1.10.18; 1.10.22;
remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.9 31-Mar-2009  tsutsui branches: 1.9.2; 1.9.4;
Switch atari standalone bootloaders to using MI libsa and libkern.

Tested by David Ross on port-atari@. Thanks!
 1.8 06-Jan-2009  tsutsui branches: 1.8.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.7 19-Oct-2008  apb branches: 1.7.2; 1.7.4;
Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
 1.6 21-Nov-2006  dsl branches: 1.6.2; 1.6.52; 1.6.56; 1.6.62;
Make the install actually die when the boot code is too big (which it is).
No idea how long it has been bust for.
Other parts of this makefile are deeply sub-optimal.
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 12-Mar-2004  jmc branches: 1.4.16;
Toolize and use install to make mdec/std so it's in METALOG. Now a make release
works once again for atari
 1.3 28-Oct-2003  he Add -ffreestanding to CFLAGS, so that libsa prototypes do not conflict
with otherwise built-in functions and prototypes in the new gcc.
 1.2 28-Jun-2003  he branches: 1.2.2;
Make sure to "mkdir -p" the destination directories under /usr/mdec.
 1.1 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.22.1 10-Dec-2006  yamt sync with head.
 1.5.20.1 12-Jan-2007  ad Sync with head.
 1.6.62.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.6.56.2 11-Aug-2010  yamt sync with head.
 1.6.56.1 04-May-2009  yamt sync with head.
 1.6.52.1 17-Jan-2009  mjf Sync with HEAD.
 1.6.2.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.7.4.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.7.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.7.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.4.1 05-Mar-2011  rmind sync with head
 1.9.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.22.1 18-May-2014  rmind sync with head
 1.10.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17 11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.16 15-Nov-2014  tsutsui branches: 1.16.2;
Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.

Tested on TT030 with 32GB SSD via SATA->IDE->SCSI converters.
Should be pulled up to netbsd-7 and netbsd-6 branches..
 1.15 24-Aug-2009  tsutsui branches: 1.15.18; 1.15.22; 1.15.38;
KNF, ANSIfy etc.
 1.14 18-Mar-2009  cegger bzero -> memset
 1.13 06-Jan-2009  tsutsui branches: 1.13.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.12 11-Dec-2005  christos branches: 1.12.24; 1.12.74; 1.12.78; 1.12.86; 1.12.88;
merge ktrace-lwp.
 1.11 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.10 28-Jun-2005  junyoung ANSIfy, KNF, remove trailing spaces, and etc.
 1.9 18-Apr-2002  leo branches: 1.9.10;
Handle uninitialize warning.
 1.8 24-Oct-2001  leo branches: 1.8.2;
Small changes to the boot system:
- Install boot.atari in both / and /usr/mdec. It looks good to have a
spare copy soemwhere...
- Add '/boot.ata' as a last resort bootname.

All per discussion with Simon Burge, Matthew Green and Soren S. Jorvang.
 1.7 14-Oct-2001  leo branches: 1.7.2;
Change the name of the tertiary boot to /boot.atari. This was a suggestion
from Matthew Green. It would still allow multi-platform boots.
Thus, the second level loader first tries /boot.atari and uses /boot as a
fallback.
 1.6 13-Oct-2001  leo Bootxx is no longer the last booting stage. It now handles only the
command line options. If NetBSD should be loaded, bootxx tries to load
the raw binary file '/boot' that resides on the same filesystem as the
kernel to be booted. This 3rd level boot is supposed to actually load the
kernel.
 1.5 08-Sep-2001  thomas Make the bootloader ELF aware.
It can load either a.out or ELF, depending on compile options.
 1.4 24-Sep-2000  jdolecek branches: 1.4.2; 1.4.4;
add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.3 10-Feb-1998  leo branches: 1.3.14;
Accept an 68060 as cpu-type. (Thomas Gerner).
 1.2 28-Jun-1997  leo branches: 1.2.8;
Add 'libsa/atari_stand.h' that defines atari specific things. This allows
for a removal of our own copy of stand.h which was out-of-date by definition.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.8.1 30-Oct-1998  cgd pull up rev 1.3 from trunk (leo)
 1.3.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.8.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.8.2.1 24-Oct-2001  nathanw file bootxx.c was added on branch nathanw_sa on 2002-06-20 03:38:19 +0000
 1.9.10.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.88.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.12.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.12.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.12.78.2 16-Sep-2009  yamt sync with head
 1.12.78.1 04-May-2009  yamt sync with head.
 1.12.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.12.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.13.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.38.1 14-Dec-2014  martin Pull up following revision(s) (requested by tsutsui in ticket #322):
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.16
Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.
Tested on TT030 with 32GB SSD via SATA->IDE->SCSI converters.
 1.15.22.1 03-Dec-2017  jdolecek update from HEAD
 1.15.18.1 14-Dec-2014  martin Pull up following revision(s) (requested by tsutsui in ticket #1211):
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.16
Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.
Tested on TT030 with 32GB SSD via SATA->IDE->SCSI converters.
 1.16.2.1 09-Jul-2016  skrll Sync with HEAD
 1.2 13-Oct-2001  leo Bootxx is no longer the last booting stage. It now handles only the
command line options. If NetBSD should be loaded, bootxx tries to load
the raw binary file '/boot' that resides on the same filesystem as the
kernel to be booted. This 3rd level boot is supposed to actually load the
kernel.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo branches: 1.1.1.1.44;
NetBSD/Atari bootcode by Waldi Ravens.
 1.1.1.1.44.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8 24-Aug-2009  tsutsui Use __arraycount().
 1.7 11-Dec-2005  christos branches: 1.7.78;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 23-Jun-2005  junyoung Use FS_OPS() macro.
 1.4 23-Jun-2005  junyoung Drop trailing spaces.
 1.3 13-Oct-2001  leo branches: 1.3.4; 1.3.20;
Grr, this file shouldn't have been deleted. I thought I corrected it, in
fact the comments from the commit did not mention it to be deleted, just
'changed'...
 1.2 13-Oct-2001  leo Bootxx is no longer the last booting stage. It now handles only the
command line options. If NetBSD should be loaded, bootxx tries to load
the raw binary file '/boot' that resides on the same filesystem as the
kernel to be booted. This 3rd level boot is supposed to actually load the
kernel.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo branches: 1.1.1.1.44;
NetBSD/Atari bootcode by Waldi Ravens.
 1.1.1.1.44.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.20.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.4.2 13-Oct-2001  leo Grr, this file shouldn't have been deleted. I thought I corrected it, in
fact the comments from the commit did not mention it to be deleted, just
'changed'...
 1.3.4.1 13-Oct-2001  leo file filesystem.c was added on branch nathanw_sa on 2001-10-13 20:26:49 +0000
 1.7.78.1 16-Sep-2009  yamt sync with head
 1.1 06-Jan-2009  tsutsui branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.12;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 06-Jan-2009  yamt file start.S was added on branch yamt-nfs-mp on 2009-05-04 08:10:48 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 06-Jan-2009  skrll file start.S was added on branch nick-hppapmap on 2009-01-19 13:16:01 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 06-Jan-2009  mjf file start.S was added on branch mjf-devfs2 on 2009-01-17 13:27:55 +0000
 1.1.4.2 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.1.4.1 06-Jan-2009  bouyer file start.S was added on branch netbsd-5 on 2009-01-16 22:57:33 +0000
 1.1.2.2 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.1.2.1 06-Jan-2009  bouyer file start.S was added on branch netbsd-4 on 2009-01-15 23:20:02 +0000
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 28-Jun-2003  he branches: 1.3.108; 1.3.128; 1.3.130;
Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3.130.1 05-Mar-2011  rmind sync with head
 1.3.128.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.108.1 11-Aug-2010  yamt sync with head.
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 28-Jun-2003  he branches: 1.3.108; 1.3.128; 1.3.130;
Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3.130.1 05-Mar-2011  rmind sync with head
 1.3.128.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.108.1 11-Aug-2010  yamt sync with head.
 1.8 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.7 23-Apr-2002  tv Use ${INSTALL_FILE} to move /boot.atari into place so it is seen by an
UNPRIVED build.
 1.6 08-Apr-2002  bjh21 Use ${PRINT_OBJDIR} rather than looking for the libsa objdir manually.
 1.5 12-Dec-2001  lukem branches: 1.5.2;
Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
 1.4 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.3 24-Oct-2001  leo branches: 1.3.2;
Small changes to the boot system:
- Install boot.atari in both / and /usr/mdec. It looks good to have a
spare copy soemwhere...
- Add '/boot.ata' as a last resort bootname.

All per discussion with Simon Burge, Matthew Green and Soren S. Jorvang.
 1.2 14-Oct-2001  leo branches: 1.2.2;
Change the name of the tertiary boot to /boot.atari. This was a suggestion
from Matthew Green. It would still allow multi-platform boots.
Thus, the second level loader first tries /boot.atari and uses /boot as a
fallback.
 1.1 13-Oct-2001  leo branches: 1.1.1;
Initial revision
 1.1.1.1 13-Oct-2001  leo 3rd level boot
 1.2.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.3.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.3.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.2.1 24-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:23:39 +0000
 1.5.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1 12-Dec-2001  thorpej file Makefile was added on branch kqueue on 2002-01-10 19:40:12 +0000
 1.9 01-Jul-2020  rin Correct SRCS; bsdstart.S not bsdstart.s.

Fix build with bsd.dep.mk rev 1.87, which requires more strict
filename matching.

Found by martin.
 1.8 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.7 06-Jul-2010  mrg branches: 1.7.8; 1.7.18; 1.7.22;
remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.6 31-Mar-2009  tsutsui branches: 1.6.2; 1.6.4;
Switch atari standalone bootloaders to using MI libsa and libkern.

Tested by David Ross on port-atari@. Thanks!
 1.5 13-Jan-2009  tsutsui branches: 1.5.2;
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.

Problem on default installation with sysinst was reported by David Ross.
 1.4 06-Jan-2009  tsutsui Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.3 11-Dec-2005  christos branches: 1.3.24; 1.3.74; 1.3.78; 1.3.86; 1.3.88;
merge ktrace-lwp.
 1.2 28-Oct-2003  he Add -ffreestanding to CFLAGS, so that libsa prototypes do not conflict
with otherwise built-in functions and prototypes in the new gcc.
 1.1 23-May-2003  leo branches: 1.1.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.88.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.3.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.3.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.78.2 11-Aug-2010  yamt sync with head.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.3.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.3.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.4.1 05-Mar-2011  rmind sync with head
 1.6.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.22.1 18-May-2014  rmind sync with head
 1.7.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.9 26-Jun-2022  tsutsui Consistently use "NetBSD/atari", not "NetBSD/Atari" on tertiary boot.
 1.8 24-Aug-2009  tsutsui KNF, ANSIfy etc.
 1.7 18-Mar-2009  cegger bzero -> memset
 1.6 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.5 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 06-Jan-2009  tsutsui branches: 1.4.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.3 11-Dec-2005  christos branches: 1.3.24; 1.3.74; 1.3.78; 1.3.86; 1.3.88;
merge ktrace-lwp.
 1.2 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.1 13-Oct-2001  leo branches: 1.1.1;
Initial revision
 1.1.1.1 13-Oct-2001  leo branches: 1.1.1.1.4; 1.1.1.1.6; 1.1.1.1.18;
3rd level boot
 1.1.1.1.18.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.1.1.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.1.1.6.1 13-Oct-2001  thorpej file bootxxx.c was added on branch kqueue on 2002-01-10 19:40:13 +0000
 1.1.1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.4.2 11-Jan-2002  nathanw More catchup.
 1.1.1.1.4.1 13-Oct-2001  nathanw file bootxxx.c was added on branch nathanw_sa on 2002-01-11 23:38:13 +0000
 1.3.88.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.3.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.3.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.78.2 16-Sep-2009  yamt sync with head
 1.3.78.1 04-May-2009  yamt sync with head.
 1.3.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.3.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.4.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4 24-Aug-2009  tsutsui Use __arraycount().
 1.3 11-Dec-2005  christos branches: 1.3.78;
merge ktrace-lwp.
 1.2 28-Jun-2005  junyoung - Use FS_OPS() macro.
- #include <lib/libsa/stand.h> rather than <stand.h>. Do the same thingfor
ufs.h as well.
- Remove trailing spaces.
- Some other cosmetic changes.
 1.1 13-Oct-2001  leo branches: 1.1.1;
Initial revision
 1.1.1.1 13-Oct-2001  leo branches: 1.1.1.1.4; 1.1.1.1.6; 1.1.1.1.18;
3rd level boot
 1.1.1.1.18.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.1.1.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.1.1.6.1 13-Oct-2001  thorpej file filesystem.c was added on branch kqueue on 2002-01-10 19:40:14 +0000
 1.1.1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.4.2 11-Jan-2002  nathanw More catchup.
 1.1.1.1.4.1 13-Oct-2001  nathanw file filesystem.c was added on branch nathanw_sa on 2002-01-11 23:38:13 +0000
 1.3.78.1 16-Sep-2009  yamt sync with head
 1.1 06-Jan-2009  tsutsui branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.12;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 06-Jan-2009  yamt file start.S was added on branch yamt-nfs-mp on 2009-05-04 08:10:48 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 06-Jan-2009  skrll file start.S was added on branch nick-hppapmap on 2009-01-19 13:16:01 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 06-Jan-2009  mjf file start.S was added on branch mjf-devfs2 on 2009-01-17 13:27:55 +0000
 1.1.4.2 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.1.4.1 06-Jan-2009  bouyer file start.S was added on branch netbsd-5 on 2009-01-16 22:57:33 +0000
 1.1.2.2 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.1.2.1 06-Jan-2009  bouyer file start.S was added on branch netbsd-4 on 2009-01-15 23:20:02 +0000
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 28-Jun-2003  he branches: 1.3.108; 1.3.128; 1.3.130;
Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3.130.1 05-Mar-2011  rmind sync with head
 1.3.128.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.108.1 11-Aug-2010  yamt sync with head.
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 28-Jun-2003  he branches: 1.3.108; 1.3.128; 1.3.130;
Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3.130.1 05-Mar-2011  rmind sync with head
 1.3.128.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.108.1 11-Aug-2010  yamt sync with head.
 1.7 10-Feb-2010  roy Convert to terminfo so we compile.
 1.6 03-Feb-2010  roy branches: 1.6.2;
Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@
 1.5 12-Dec-2001  tv branches: 1.5.122;
MKfoo=no -> NOfoo
 1.4 13-Feb-1999  lukem branches: 1.4.22; 1.4.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 22-Jun-1997  mrg move man pages into share/man.
 1.2 06-Jun-1997  mikel nuke bad MLINKS line; fixes PR port-atari/3605.
 1.1 16-May-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 16-May-1996  leo edahdi, an AHDI partition-id editor
 1.4.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.122.1 11-Mar-2010  yamt sync with head
 1.6.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 16-May-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 16-May-1996  leo edahdi, an AHDI partition-id editor
 1.11 01-Oct-2011  chs fix build errors with gcc 4.5.
 1.10 10-Feb-2010  roy Convert to terminfo so we compile.
 1.9 18-Mar-2009  cegger branches: 1.9.2;
Ansify function definitions w/o arguments. Generated with sed.
 1.8 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.7 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.6 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.5 11-Dec-2005  christos branches: 1.5.78; 1.5.86; 1.5.92;
merge ktrace-lwp.
 1.4 12-Nov-2004  he Add casts to unsigned char for the arguments to the ctype.h macros/functions.
 1.3 15-Feb-2000  leo branches: 1.3.28;
Nuke the local outc() since the prototype for the second argument of tputs()
now matches putchar().
 1.2 01-Jun-1999  leo branches: 1.2.2;
Fix copyright (exchange clauses 3 & 4).
 1.1 16-May-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 16-May-1996  leo branches: 1.1.1.1.26;
edahdi, an AHDI partition-id editor
 1.1.1.1.26.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.28.1 14-Nov-2004  skrll Sync with HEAD.
 1.5.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.78.2 11-Mar-2010  yamt sync with head
 1.5.78.1 04-May-2009  yamt sync with head.
 1.9.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.11 03-Jul-2022  tsutsui Fix inverted logic. My fault back in 2015..
 1.10 11-May-2022  rin For atari install disk:

- Drop FD support from installboot(8). Reduce ~0.5KB.
- Drop primary boot loaders for FD (2 files, 0.5KB each).

Note that we continue to support these features in base.

OK tsutsui@
 1.9 12-Aug-2015  tsutsui Try to shrink binary size a bit.

- omit usage of options in SMALLPROG case
- use bool instead of int where appropriate
- rely on zero-initialized-bss
 1.8 24-Nov-2014  tsutsui branches: 1.8.2;
Disable "OS bootversion check" on crunched binaries for installation media.

This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.

This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.
 1.7 24-Nov-2014  tsutsui Specify -fno-strict-aliasing as a temporary workaround for gcc48.

The existing abcksum() also violates strict-aliasing rule
(while current gcc48 doesn't warn it) and fixing all violations
strictly requires whole reorganization of boot sector structures.
But it won't happen soon and this MD installboot should be integrated
into MI installboot(8) in future, and it requires whole overhaul anyway.
See long discussion in source-changes-d@ for details.

Should be pulled up to netbsd-7 if we switches m68k to using gcc48.
 1.6 01-Nov-2011  chs branches: 1.6.12; 1.6.28;
use WARNS instead of mucking with CFLAGS directly.
 1.5 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.4 13-Feb-1999  lukem branches: 1.4.22; 1.4.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 09-Jul-1997  leo Introduce 'bootversion' in locore.s. Check this to decide if installing
a bootstrap with the running installboot makes sense.
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.4.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.28.2 29-Mar-2015  snj Pull up following revision(s) (requested by martin in ticket #651):
distrib/atari/floppies/common/list.images: revision 1.10
sys/arch/atari/stand/installboot/Makefile: revision 1.8
sys/arch/atari/stand/installboot/installboot.c: revision 1.34
Disable "OS bootversion check" on crunched binaries for installation media.
This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.
This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.
 1.6.28.1 04-Feb-2015  snj Pull up following revision(s) (requested by chs in ticket #482):
sys/arch/atari/stand/installboot/Makefile: revision 1.7
Specify -fno-strict-aliasing as a temporary workaround for gcc48.
The existing abcksum() also violates strict-aliasing rule
(while current gcc48 doesn't warn it) and fixing all violations
strictly requires whole reorganization of boot sector structures.
But it won't happen soon and this MD installboot should be integrated
into MI installboot(8) in future, and it requires whole overhaul anyway.
See long discussion in source-changes-d@ for details.
Should be pulled up to netbsd-7 if we switches m68k to using gcc48.
 1.6.12.1 03-Dec-2017  jdolecek update from HEAD
 1.8.2.1 22-Sep-2015  skrll Sync with HEAD
 1.7 13-Mar-2016  tsutsui Misc KNF and ANSIfy.
 1.6 01-Oct-2011  chs branches: 1.6.12; 1.6.30;
fix build errors with gcc 4.5.
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 06-Jan-2009  tsutsui branches: 1.3.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.2 22-Jul-1998  leo branches: 1.2.100; 1.2.150; 1.2.154; 1.2.162; 1.2.164;
Add '<ufs/ufs/dinode.h>' to the include list. (Julian Coleman)
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.164.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.2.162.2 28-Apr-2009  skrll Sync with HEAD.
 1.2.162.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.154.1 04-May-2009  yamt sync with head.
 1.2.150.1 17-Jan-2009  mjf Sync with HEAD.
 1.2.100.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.3.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.30.1 19-Mar-2016  skrll Sync with HEAD
 1.6.12.1 03-Dec-2017  jdolecek update from HEAD
 1.3 22-Jun-1997  mrg move man pages into share/man.
 1.2 20-Jun-1996  leo Some minor nits.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.39 03-Jul-2022  tsutsui Fix inverted logic. My fault back in 2015..
 1.38 11-May-2022  rin Make FD support optional (intended for install media).
 1.37 11-May-2022  rin Refactor install_[sw]d() into install_hd().

Shave off ~0.5KB from install floppy, and dedup codes a lot.

Thanks tsutsui@ for kind review!
 1.36 11-Jan-2017  christos need <sys/stat.h>
 1.35 12-Aug-2015  tsutsui branches: 1.35.2;
Try to shrink binary size a bit.

- omit usage of options in SMALLPROG case
- use bool instead of int where appropriate
- rely on zero-initialized-bss
 1.34 24-Nov-2014  tsutsui branches: 1.34.2;
Disable "OS bootversion check" on crunched binaries for installation media.

This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.

This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.
 1.33 24-Nov-2014  tsutsui Revert previous again.

There are claims that it still violates strict-aliasing rule and
it is no sense to just appease compiler by incorrect implementation.
 1.32 16-Nov-2014  tsutsui Appease gcc48 -Werror=strict-aliasing warning by filling cksum via union.

Discussed in source-changes-d@ thread and tested on TT030.
Should be pulled up to netbsd-7 (if NetBSD/m68k 7.0 will switch to gcc48).
 1.31 16-Nov-2014  tsutsui Revert revs 1.29 and 1.30, to make it easier to pullup an alternative fix.

Ok'ed by christos@
http://mail-index.netbsd.org/source-changes-d/2014/11/15/msg007338.html
 1.30 13-Nov-2014  christos move to the right offset
 1.29 13-Nov-2014  christos fix strict aliasing violations
 1.28 31-Mar-2014  ozaki-r branches: 1.28.4;
Fix typo
 1.27 29-Mar-2014  ozaki-r Fix typos
 1.26 26-Mar-2014  christos kill sprintf
 1.25 05-Nov-2011  christos branches: 1.25.10; 1.25.14;
make this compile again.
 1.24 14-Mar-2009  dsl branches: 1.24.12;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.23 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.22 06-Jan-2009  tsutsui branches: 1.22.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.21 15-Nov-2008  abs Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
 1.20 11-Dec-2005  christos branches: 1.20.24; 1.20.68; 1.20.74; 1.20.78; 1.20.84; 1.20.86; 1.20.88;
merge ktrace-lwp.
 1.19 11-Mar-2004  jmc daddr_t is forced to int32_t in sys/arch/atari/stand/Makefile.inc so correct
the printf formats to match this
 1.18 09-Mar-2004  jdc Catch up to the bootblock split into std and milan directories.
 1.17 01-Apr-2003  he branches: 1.17.2;
Undo the last; adding the quad arithmetic caused the boot code to
overflow. Instead do as the mvme68k port, and use 32-bit daddr_t here.
 1.16 01-Apr-2003  he Adapt to daddr_t being bumped to 64 bits. This required us to add
div/mod quad operations to libsa, and adjusting a pair of format specifiers.
 1.15 09-Aug-2002  soren Remove extraneous \n's in {err,warn}{,x}.
 1.14 20-Jul-2002  grant sweep of errx/warnx, remove unnecessary trailing \n
 1.13 12-Apr-2002  leo branches: 1.13.2;
Don't bail out when /netbsd is not present. We don't really need it
anyway.
 1.12 14-Oct-2001  leo branches: 1.12.4;
Just use '_bootversion', don't use C_LABEL macros. From RTSL, I found out
that kvm_nlist adds an underscore when the binary format is ELF.
 1.11 06-Sep-2001  leo Make this finally compile again. It hasn't worked since the C_LABEL() got in.
 1.10 30-Sep-2000  leo branches: 1.10.4;
Add include of <machine/asm.h>. C_LABEL is defined there.
 1.9 08-Jul-2000  jdolecek use _C_LABEL() for bootversion, instead of hardcoding the reference as _bootversion
 1.8 01-Dec-1998  leo branches: 1.8.10;
Make this compile again... ('maximum entropy').
 1.7 09-Jul-1997  leo Introduce 'bootversion' in locore.s. Check this to decide if installing
a bootstrap with the running installboot makes sense.
 1.6 08-Jan-1997  leo Handle DTYPE_ESDI like ST506.
 1.5 08-Jan-1997  leo Bump version.
 1.4 29-Jun-1996  leo Update to match NetBSD version.
 1.3 14-May-1996  leo branches: 1.3.4;
Update to make this work correctly when using an obj-directory.
 1.2 28-Mar-1996  leo Drop in a more interlligent version check.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.3.4.1 30-Jun-1996  jtc Pulled up rev 1.4 by request from Leo Weppelman
 1.8.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.4.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.10.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.12.4.3 01-Aug-2002  nathanw Catch up to -current.
 1.12.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.12.4.1 14-Oct-2001  nathanw file installboot.c was added on branch nathanw_sa on 2002-04-17 00:02:43 +0000
 1.13.2.1 30-Aug-2002  gehenna catch up with -current.
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.88.2 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.20.88.1 08-Jan-2009  snj Pull up following revision(s) (requested by abs in ticket #228):
sys/arch/atari/stand/installboot/installboot.c: revision 1.21
Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
 1.20.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.20.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.84.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.78.1 04-May-2009  yamt sync with head.
 1.20.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.68.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by abs in ticket #1257):
distrib/atari/miniroot/Makefile.inc: file removal
distrib/atari/floppies/prepare/list: revision 1.5
distrib/atari/miniroot/dot.profile: file removal
distrib/atari/miniroot/install.md: file removal
distrib/atari/floppies/install/list: revision 1.8
distrib/atari/miniroot/disktab.shadow: file removal
distrib/atari/miniroot/termcap.vt: file removal
distrib/atari/floppies/prepare/install.md: revision 1.3
sys/arch/atari/stand/installboot/installboot.c: revision 1.21
distrib/atari/floppies/common/dot.profile: revision 1.3
distrib/atari/miniroot/list: file removal
Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
Fix atari sysinst based miniroot image, and retire old (unreferenced)
miniroot.
 1.20.24.2 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.20.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by abs in ticket #1257):
distrib/atari/miniroot/Makefile.inc: file removal
distrib/atari/floppies/prepare/list: revision 1.5
distrib/atari/miniroot/dot.profile: file removal
distrib/atari/miniroot/install.md: file removal
distrib/atari/floppies/install/list: revision 1.8
distrib/atari/miniroot/disktab.shadow: file removal
distrib/atari/miniroot/termcap.vt: file removal
distrib/atari/floppies/prepare/install.md: revision 1.3
sys/arch/atari/stand/installboot/installboot.c: revision 1.21
distrib/atari/floppies/common/dot.profile: revision 1.3
distrib/atari/miniroot/list: file removal
Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
Fix atari sysinst based miniroot image, and retire old (unreferenced)
miniroot.
 1.22.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.24.12.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24.12.1 10-Nov-2011  yamt sync with head
 1.25.14.1 18-May-2014  rmind sync with head
 1.25.10.2 03-Dec-2017  jdolecek update from HEAD
 1.25.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.4.1 29-Mar-2015  snj Pull up following revision(s) (requested by martin in ticket #651):
distrib/atari/floppies/common/list.images: revision 1.10
sys/arch/atari/stand/installboot/Makefile: revision 1.8
sys/arch/atari/stand/installboot/installboot.c: revision 1.34
Disable "OS bootversion check" on crunched binaries for installation media.
This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.
This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.
 1.34.2.2 05-Feb-2017  skrll Sync with HEAD
 1.34.2.1 22-Sep-2015  skrll Sync with HEAD
 1.35.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11 13-Mar-2016  tsutsui Misc KNF and ANSIfy.
 1.10 14-Mar-2009  dsl branches: 1.10.22; 1.10.40;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.9 06-Jan-2009  tsutsui branches: 1.9.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.8 11-Dec-2005  christos branches: 1.8.24; 1.8.74; 1.8.78; 1.8.86; 1.8.88;
merge ktrace-lwp.
 1.7 09-Mar-2004  jdc Catch up to the bootblock split into std and milan directories.
 1.6 24-Sep-2000  jdolecek branches: 1.6.24;
add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.5 09-Jul-1997  leo branches: 1.5.20;
Introduce 'bootversion' in locore.s. Check this to decide if installing
a bootstrap with the running installboot makes sense.
 1.4 25-Oct-1996  leo Make installboot work for 1.2 & 1.2A (should be part of 1.2 patches).
 1.3 29-Jun-1996  leo Update to match NetBSD version.
 1.2 28-Mar-1996  leo branches: 1.2.4;
Drop in a more interlligent version check.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.2 05-Dec-1996  rat Pullup revision 1.4 by request from Leo Weppelman <leo@wau.mis.ah.nl>

>Corrected the verions-string so it will actually work on NetBSD1.2[A]
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.5.20.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.24.1 03-Aug-2004  skrll Sync with HEAD
 1.8.88.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.8.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.8.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.78.1 04-May-2009  yamt sync with head.
 1.8.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.8.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.9.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.40.1 19-Mar-2016  skrll Sync with HEAD
 1.10.22.1 03-Dec-2017  jdolecek update from HEAD
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2;
Atari keyboard maps
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file Makefile was added on branch netbsd-1-2 on 1996-06-22 20:14:10 +0000
 1.8 29-May-2021  tsutsui Appease compiler warnings derived from ancient HOST files. PR/56187

Also fix misc styles and formats per KNF.
 1.7 04-May-2002  bjh21 branches: 1.7.218; 1.7.220;
<bsd.hostprog.mk> and <bsd.prog.mk> don't play nicely together. Since
<bsd.hostprog.mk> includes <bsd.files.mk> anyway, drop <bsd.prog.mk>.
 1.6 24-Apr-2002  lukem - in <bsd.files.mk>, don't clear FILES after using it, as that prevents
make -V FILES
from being useful (and given that every other variable can be
extracted using make -V, the behaviour was unusually inconsistent
given that the original reason for clearing it doesn't seem to be
relevant anymore)
- use <bsd.prog.mk> instead of directly including <bsd.files.mk>
(and possibly <bsd.man.mk> or <bsd.own.mk>)
- remove obsolete NOPROG
 1.5 15-Apr-2002  bjh21 Build the keymap-generating programs as hostprogs, since they're only run
on the host system and never installed.

Install the generated keymaps using <bsd.files.mk> rather than by hand, so
that all the UNPRIVED magic can work.
 1.4 15-Jul-1997  leo branches: 1.4.34; 1.4.38;
Install key-maps only and forget about the program generating them.
 1.3 15-Jul-1996  leo keymap -> keymaps
 1.2 22-Jun-1996  leo branches: 1.2.2;
s/keymaps/keymap/
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo Atari keyboard maps
 1.2.2.2 16-Jul-1996  jtc Pulled up from rev 1.3 by request from Leo Weppelman
 1.2.2.1 22-Jun-1996  jtc file Makefile.inc was added on branch netbsd-1-2 on 1996-07-16 01:02:18 +0000
 1.4.38.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.38.1 17-Apr-2002  nathanw Catch up to -current.
 1.4.34.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.220.1 31-May-2021  cjep sync with head
 1.7.218.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.4 04-May-2018  christos remove bsd.hostinit.mk
 1.3 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.2 15-Apr-2002  bjh21 branches: 1.2.200;
Build the keymap-generating programs as hostprogs, since they're only run
on the host system and never installed.

Install the generated keymaps using <bsd.files.mk> rather than by hand, so
that all the UNPRIVED magic can work.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.44; 1.1.1.1.48;
Atari keyboard maps
 1.1.1.1.48.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file Makefile was added on branch netbsd-1-2 on 1996-06-22 20:14:13 +0000
 1.2.200.2 21-May-2018  pgoyette Sync with HEAD
 1.2.200.1 02-May-2018  pgoyette Synch with HEAD
 1.4 29-May-2021  tsutsui Appease compiler warnings derived from ancient HOST files. PR/56187

Also fix misc styles and formats per KNF.
 1.3 18-Mar-2009  cegger branches: 1.3.80; 1.3.82;
Ansify function definitions w/o arguments. Generated with sed.
 1.2 07-Sep-2001  thomas branches: 1.2.4; 1.2.126; 1.2.134; 1.2.140;
Return a useful exit status.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.42; 1.1.1.1.44;
Atari keyboard maps
 1.1.1.1.44.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.1.1.42.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file de-kbdmap.c was added on branch netbsd-1-2 on 1996-06-22 20:14:13 +0000
 1.2.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.126.1 04-May-2009  yamt sync with head.
 1.2.4.2 07-Sep-2001  thomas Return a useful exit status.
 1.2.4.1 07-Sep-2001  thomas file de-kbdmap.c was added on branch nathanw_sa on 2001-09-07 23:09:37 +0000
 1.3.82.1 31-May-2021  cjep sync with head
 1.3.80.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.4 04-May-2018  christos remove bsd.hostinit.mk
 1.3 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.2 15-Apr-2002  bjh21 branches: 1.2.200;
Build the keymap-generating programs as hostprogs, since they're only run
on the host system and never installed.

Install the generated keymaps using <bsd.files.mk> rather than by hand, so
that all the UNPRIVED magic can work.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.44; 1.1.1.1.48;
Atari keyboard maps
 1.1.1.1.48.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file Makefile was added on branch netbsd-1-2 on 1996-06-22 20:14:12 +0000
 1.2.200.2 21-May-2018  pgoyette Sync with HEAD
 1.2.200.1 02-May-2018  pgoyette Synch with HEAD
 1.4 29-May-2021  tsutsui Appease compiler warnings derived from ancient HOST files. PR/56187

Also fix misc styles and formats per KNF.
 1.3 18-Mar-2009  cegger branches: 1.3.80; 1.3.82;
Ansify function definitions w/o arguments. Generated with sed.
 1.2 07-Sep-2001  thomas branches: 1.2.4; 1.2.126; 1.2.134; 1.2.140;
Return a useful exit status.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.42; 1.1.1.1.44;
Atari keyboard maps
 1.1.1.1.44.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.1.1.42.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file fr-kbdmap.c was added on branch netbsd-1-2 on 1996-06-22 20:14:12 +0000
 1.2.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.126.1 04-May-2009  yamt sync with head.
 1.2.4.2 07-Sep-2001  thomas Return a useful exit status.
 1.2.4.1 07-Sep-2001  thomas file fr-kbdmap.c was added on branch nathanw_sa on 2001-09-07 23:09:38 +0000
 1.3.82.1 31-May-2021  cjep sync with head
 1.3.80.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.4 04-May-2018  christos remove bsd.hostinit.mk
 1.3 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.2 15-Apr-2002  bjh21 branches: 1.2.200;
Build the keymap-generating programs as hostprogs, since they're only run
on the host system and never installed.

Install the generated keymaps using <bsd.files.mk> rather than by hand, so
that all the UNPRIVED magic can work.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.44; 1.1.1.1.48;
Atari keyboard maps
 1.1.1.1.48.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file Makefile was added on branch netbsd-1-2 on 1996-06-22 20:14:11 +0000
 1.2.200.2 21-May-2018  pgoyette Sync with HEAD
 1.2.200.1 02-May-2018  pgoyette Synch with HEAD
 1.4 29-May-2021  tsutsui Appease compiler warnings derived from ancient HOST files. PR/56187

Also fix misc styles and formats per KNF.
 1.3 18-Mar-2009  cegger branches: 1.3.80; 1.3.82;
Ansify function definitions w/o arguments. Generated with sed.
 1.2 07-Sep-2001  thomas branches: 1.2.4; 1.2.126; 1.2.134; 1.2.140;
Return a useful exit status.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.42; 1.1.1.1.44;
Atari keyboard maps
 1.1.1.1.44.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.1.1.42.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file uk-kbdmap.c was added on branch netbsd-1-2 on 1996-06-22 20:14:11 +0000
 1.2.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.126.1 04-May-2009  yamt sync with head.
 1.2.4.2 07-Sep-2001  thomas Return a useful exit status.
 1.2.4.1 07-Sep-2001  thomas file uk-kbdmap.c was added on branch nathanw_sa on 2001-09-07 23:09:38 +0000
 1.3.82.1 31-May-2021  cjep sync with head
 1.3.80.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.4 04-May-2018  christos remove bsd.hostinit.mk
 1.3 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.2 15-Apr-2002  bjh21 branches: 1.2.200;
Build the keymap-generating programs as hostprogs, since they're only run
on the host system and never installed.

Install the generated keymaps using <bsd.files.mk> rather than by hand, so
that all the UNPRIVED magic can work.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.44; 1.1.1.1.48;
Atari keyboard maps
 1.1.1.1.48.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file Makefile was added on branch netbsd-1-2 on 1996-06-22 20:14:12 +0000
 1.2.200.2 21-May-2018  pgoyette Sync with HEAD
 1.2.200.1 02-May-2018  pgoyette Synch with HEAD
 1.4 29-May-2021  tsutsui Appease compiler warnings derived from ancient HOST files. PR/56187

Also fix misc styles and formats per KNF.
 1.3 18-Mar-2009  cegger branches: 1.3.80; 1.3.82;
Ansify function definitions w/o arguments. Generated with sed.
 1.2 07-Sep-2001  thomas branches: 1.2.4; 1.2.126; 1.2.134; 1.2.140;
Return a useful exit status.
 1.1 22-Jun-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 22-Jun-1996  leo branches: 1.1.1.1.2; 1.1.1.1.42; 1.1.1.1.44;
Atari keyboard maps
 1.1.1.1.44.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.1.1.42.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.1.1.2.2 22-Jun-1996  leo Atari keyboard maps
 1.1.1.1.2.1 22-Jun-1996  leo file us-kbdmap.c was added on branch netbsd-1-2 on 1996-06-22 20:14:12 +0000
 1.2.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.126.1 04-May-2009  yamt sync with head.
 1.2.4.2 07-Sep-2001  thomas Return a useful exit status.
 1.2.4.1 07-Sep-2001  thomas file us-kbdmap.c was added on branch nathanw_sa on 2001-09-07 23:09:38 +0000
 1.3.82.1 31-May-2021  cjep sync with head
 1.3.80.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.31 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.30 31-Mar-2009  tsutsui branches: 1.30.2; 1.30.4;
Switch atari standalone bootloaders to using MI libsa and libkern.

Tested by David Ross on port-atari@. Thanks!
 1.29 19-Mar-2009  tsutsui Remove bcmp() from MD libsa.

XXX: These ports should be rewritten to use MI libsa for maintainability.
 1.28 06-Jan-2009  tsutsui branches: 1.28.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.27 30-Dec-2005  he branches: 1.27.24; 1.27.74; 1.27.78; 1.27.86; 1.27.88;
Make this build again by using ${S}/../common/lib/libc/Makefile.inc.
 1.26 11-Dec-2005  christos merge ktrace-lwp.
 1.25 28-Jun-2005  junyoung branches: 1.25.2;
Sync comment with reality.
While here, remove trailing spaces.
 1.24 14-Jun-2005  jmc add memcmp. Why doesn't this use the regular libsa pullover?
 1.23 28-Oct-2003  he Add -ffreestanding to CFLAGS, so that libsa prototypes do not conflict
with otherwise built-in functions and prototypes in the new gcc.
 1.22 29-Aug-2003  dsl libsa/bcmp.c now defines both bcmp and memcmp
 1.21 24-Aug-2003  he The new ufs.o also needs memset, so add it.
 1.20 21-Aug-2003  he Add memcmp, memmove and bcmp to handle the new ufs.c.
 1.19 01-Apr-2003  he branches: 1.19.2;
Undo the last; adding the quad arithmetic caused the boot code to
overflow. Instead do as the mvme68k port, and use 32-bit daddr_t here.
 1.18 01-Apr-2003  he Adapt to daddr_t being bumped to 64 bits. This required us to add
div/mod quad operations to libsa, and adjusting a pair of format specifiers.
 1.17 05-May-2002  jdolecek also don't make the machine symlinks for 'clean' target
move the CLEANFILES update out of the .if, so that the files get removed
for 'clean' or 'cleandir'
 1.16 05-May-2002  jdolecek Don't make the machine symlinks for 'cleandir' target either. This
should fix read-only source builds.

XXX Perhaps the condition should be changed to
XXX .if make(depend) || make(all) || make(dependall)
XXX similarily to bsd.kmod.mk?
 1.15 08-Apr-2002  bjh21 Add files.c to SRCS, since other bits of libsa want it.
 1.14 11-Mar-2002  leo Take care of the 'machine' and 'm68k' include paths.
Copied verbatim from the x68k/stand/libsa/Makefile.
 1.13 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.12 14-Nov-2001  tv Work around <bsd.lib.mk> used for kernel libs in other places. Clean up
include paths.
 1.11 13-Oct-2001  leo branches: 1.11.4;
We need a configurable heap now (that implies we need panic.c too....).
 1.10 02-Oct-2001  chs add ashldi3.c, needed by ufs.c due to added cast in lblktosize().
 1.9 08-Sep-2001  thomas ELF adaption.
 1.8 15-Mar-1999  leo branches: 1.8.20; 1.8.22;
We need more 'stand' functions (From Julian Coleman).
 1.7 19-Feb-1999  leo STANDALONE -> _STANDALONE per recent discussion.
 1.6 13-Feb-1999  lukem convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.5 31-May-1997  cjs Back out BUILDDIR and NOINSTALL changes.
 1.4 30-May-1997  cjs Remove empty libinstall target and add NOINSTALL=1.
 1.3 07-May-1997  mycroft Use libinstall::, not install:, to prevent instaling LIB.
 1.2 14-May-1996  leo Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.8.22.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.22.3 16-Mar-2002  jdolecek Catch up with -current.
 1.8.22.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.8.20.2 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.8.20.1 01-Oct-2001  fvdl Catch up with -current.
 1.11.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.11.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.11.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.11.4.1 13-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:23:40 +0000
 1.19.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.2.1 21-Jun-2006  yamt sync with head.
 1.27.88.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.27.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.27.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.27.78.2 11-Aug-2010  yamt sync with head.
 1.27.78.1 04-May-2009  yamt sync with head.
 1.27.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.27.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.28.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.4.1 30-May-2010  rmind sync with head
 1.30.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3 12-Aug-2015  tsutsui No need to have errno in a MD file. It's in MI src/sys/lib/libsa/errno.c.
 1.2 30-Jun-2011  wiz branches: 1.2.12; 1.2.30;
dependant -> dependent
 1.1 31-Mar-2009  tsutsui branches: 1.1.2; 1.1.4; 1.1.6;
Switch atari standalone bootloaders to using MI libsa and libkern.

Tested by David Ross on port-atari@. Thanks!
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 31-Mar-2009  jym file Makefile.inc was added on branch jym-xensuspend on 2009-05-13 17:16:32 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 31-Mar-2009  yamt file Makefile.inc was added on branch yamt-nfs-mp on 2009-05-04 08:10:49 +0000
 1.1.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.1.2.1 31-Mar-2009  skrll file Makefile.inc was added on branch nick-hppapmap on 2009-04-28 07:33:54 +0000
 1.2.30.1 22-Sep-2015  skrll Sync with HEAD
 1.2.12.1 03-Dec-2017  jdolecek update from HEAD
 1.3 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.2 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.1 28-Jun-1997  leo branches: 1.1.162; 1.1.170; 1.1.176;
Add 'libsa/atari_stand.h' that defines atari specific things. This allows
for a removal of our own copy of stand.h which was out-of-date by definition.
 1.1.176.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.170.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.162.2 11-Mar-2010  yamt sync with head
 1.1.162.1 04-May-2009  yamt sync with head.
 1.1 08-Sep-2001  thomas branches: 1.1.2; 1.1.4; 1.1.8;
ELF adaption.
 1.1.8.2 08-Sep-2001  thomas ELF adaption.
 1.1.8.1 08-Sep-2001  thomas file consio.S was added on branch nathanw_sa on 2001-09-08 11:21:03 +0000
 1.1.4.2 01-Oct-2001  fvdl Catch up with -current.
 1.1.4.1 08-Sep-2001  fvdl file consio.S was added on branch thorpej-devvp on 2001-10-01 12:38:17 +0000
 1.1.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.1 08-Sep-2001  thorpej file consio.S was added on branch kqueue on 2001-09-13 01:13:22 +0000
 1.2 08-Sep-2001  thomas ELF adaption.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo branches: 1.1.1.1.42; 1.1.1.1.44;
NetBSD/Atari bootcode by Waldi Ravens.
 1.1.1.1.44.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.1.1.42.1 01-Oct-2001  fvdl Catch up with -current.
 1.5 12-Aug-2015  tsutsui No need to have errno in a MD file. It's in MI src/sys/lib/libsa/errno.c.
 1.4 11-Dec-2005  christos branches: 1.4.122; 1.4.142;
merge ktrace-lwp.
 1.3 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo branches: 1.1.1.1.64;
NetBSD/Atari bootcode by Waldi Ravens.
 1.1.1.1.64.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.1.1.64.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.1.1.64.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.1.1.64.1 03-Aug-2004  skrll Sync with HEAD
 1.4.142.1 22-Sep-2015  skrll Sync with HEAD
 1.4.122.1 03-Dec-2017  jdolecek update from HEAD
 1.9 17-May-2021  mrg include libkern.h to get moved dkcksum() definition.
 1.8 17-Mar-2009  he branches: 1.8.80; 1.8.82;
Make a couple of functions conform to the prototype, restoring buildability.
 1.7 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.6 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.5 04-Aug-2006  mhitch branches: 1.5.62; 1.5.70; 1.5.76;
gcc4 fix: static devsw didn't match the prototype.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8;
merge ktrace-lwp.
 1.3 28-Jun-2005  junyoung branches: 1.3.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.2 28-Jun-1997  leo branches: 1.2.56;
Add 'libsa/atari_stand.h' that defines atari specific things. This allows
for a removal of our own copy of stand.h which was out-of-date by definition.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.56.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.1 30-Dec-2006  yamt sync with head.
 1.4.8.1 11-Aug-2006  yamt sync with head
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.5.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.62.1 04-May-2009  yamt sync with head.
 1.8.82.1 31-May-2021  cjep sync with head
 1.8.80.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.2 28-Jun-1997  leo Add 'libsa/atari_stand.h' that defines atari specific things. This allows
for a removal of our own copy of stand.h which was out-of-date by definition.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.3 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.2 13-Feb-1999  lukem branches: 1.2.22; 1.2.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.1 22-Jun-1996  leo branches: 1.1.2;
Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
 1.1.2.2 22-Jun-1996  leo Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
 1.1.2.1 22-Jun-1996  leo file Makefile was added on branch netbsd-1-2 on 1996-06-22 20:21:56 +0000
 1.2.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2 22-Jun-1996  leo Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
 1.1 15-May-1996  leo branches: 1.1.4;
French keyboard map (Cedric Moreau).
 1.1.4.1 24-Jun-1996  jtc Pull up Leo's changes to atari keymap handling.
 1.3 22-Jun-1996  leo Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
 1.2 23-Sep-1995  leo branches: 1.2.6;
Correct mapping for new (iso-8859-1) fontsets (Thomas Gerner).
 1.1 19-Jul-1995  leo The mappings for the german keyboard layout.
 1.2.6.1 24-Jun-1996  jtc Pull up Leo's changes to atari keymap handling.
 1.12 29-Jun-2019  tsutsui Misc KNF and cleanup.
 1.11 12-Aug-2015  tsutsui branches: 1.11.18;
Make local functions static.
 1.10 20-May-2011  christos branches: 1.10.14; 1.10.32;
add missing include
 1.9 19-May-2011  christos include missing includes
 1.8 18-Mar-2009  cegger branches: 1.8.4; 1.8.6;
Ansify function definitions w/o arguments. Generated with sed.
 1.7 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.6 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.5 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 04-Aug-2006  mhitch branches: 1.4.62; 1.4.70; 1.4.76;
gcc4 fix: needs stdlib.h
 1.3 12-Apr-2002  leo branches: 1.3.26; 1.3.40; 1.3.44;
Make the exitcode != 0 when the ioctl fails.
 1.2 24-Jul-1995  leo branches: 1.2.46; 1.2.50;
Added -f option to reload system-wide keymap (instead of current screen one).
 1.1 03-Jul-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 03-Jul-1995  leo NetBSD/Atari keyboard mappings
 1.2.50.1 17-Apr-2002  nathanw Catch up to -current.
 1.2.46.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.44.1 11-Aug-2006  yamt sync with head
 1.3.40.1 09-Sep-2006  rpaulo sync with head
 1.3.26.1 30-Dec-2006  yamt sync with head.
 1.4.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.62.1 04-May-2009  yamt sync with head.
 1.8.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.4.1 31-May-2011  rmind sync with head
 1.10.32.1 22-Sep-2015  skrll Sync with HEAD
 1.10.14.1 03-Dec-2017  jdolecek update from HEAD
 1.11.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 22-Jun-1996  leo Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
 1.1 03-Jul-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 03-Jul-1995  leo branches: 1.1.1.1.6;
NetBSD/Atari keyboard mappings
 1.1.1.1.6.1 24-Jun-1996  jtc Pull up Leo's changes to atari keymap handling.
 1.3 22-Jun-1996  leo Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
 1.2 24-Jul-1995  leo branches: 1.2.6;
Use the right includes
 1.1 03-Jul-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 03-Jul-1995  leo NetBSD/Atari keyboard mappings
 1.2.6.1 24-Jun-1996  jtc Pull up Leo's changes to atari keymap handling.
 1.4 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.3 13-Feb-1999  lukem branches: 1.3.22; 1.3.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 06-Nov-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 06-Nov-1996  leo mouse configuration, by Thomas Gerner.
 1.3.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2 06-Nov-1996  leo These shouldn't have been imported...
 1.1 06-Nov-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 06-Nov-1996  leo mouse configuration, by Thomas Gerner.
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 06-Nov-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 06-Nov-1996  leo mouse configuration, by Thomas Gerner.
 1.6 21-Oct-2009  snj Drop 3rd and 4th clauses. Approved by thomas@ (copyright holder).
 1.5 11-Dec-2005  christos branches: 1.5.78;
merge ktrace-lwp.
 1.4 28-Oct-2003  he Include <stdlib.h> to pick up exit() prototype.
 1.3 11-Jan-1999  kleink branches: 1.3.42;
Pull in <errno.h> instead of <sys/errno.h> for declaration of errno.
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 06-Nov-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 06-Nov-1996  leo mouse configuration, by Thomas Gerner.
 1.3.42.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.42.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.42.1 03-Aug-2004  skrll Sync with HEAD
 1.5.78.1 11-Mar-2010  yamt sync with head
 1.3 27-Feb-2002  leo Also visit the file2swp subdir.
 1.2 30-Aug-2000  jhawk branches: 1.2.4; 1.2.8;
Use
${MAKE}
instead of
make
 1.1 07-Jan-1996  leo branches: 1.1.30;
Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.1.30.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3 25-Oct-2008  apb Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.2 11-Oct-2001  leo branches: 1.2.4; 1.2.122; 1.2.126; 1.2.132;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1 07-Jan-1996  leo branches: 1.1.44;
Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.1.44.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.132.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.2.126.1 04-May-2009  yamt sync with head.
 1.2.122.1 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.2.4.1 11-Oct-2001  leo file Makefile.inc was added on branch nathanw_sa on 2001-10-11 07:07:42 +0000
 1.4 19-Oct-2008  apb Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
 1.3 24-Feb-2002  leo branches: 1.3.118; 1.3.122; 1.3.128;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.2 16-Jan-1996  leo branches: 1.2.44; 1.2.48;
Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.2.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.44.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3.128.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.3.122.1 04-May-2009  yamt sync with head.
 1.3.118.1 17-Jan-2009  mjf Sync with HEAD.
 1.5 01-Oct-2011  chs fix build errors with gcc 4.5.
 1.4 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.3 26-Jul-2001  wiz branches: 1.3.6; 1.3.128;
auxilary -> auxiliary
 1.2 09-Feb-1996  leo branches: 1.2.44;
Catchup with the future.
 1.1 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.2.44.1 03-Aug-2001  lukem update to -current
 1.3.128.1 11-Mar-2010  yamt sync with head
 1.3.6.2 26-Jul-2001  wiz auxilary -> auxiliary
 1.3.6.1 26-Jul-2001  wiz file ahdilbl.h was added on branch nathanw_sa on 2001-07-26 23:07:58 +0000
 1.3 24-Feb-2002  leo Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.2 26-Jul-2001  wiz branches: 1.2.6;
auxilary -> auxiliary
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.44;
Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.1.1.1.44.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.1.1.44.1 03-Aug-2001  lukem update to -current
 1.2.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.1 26-Jul-2001  nathanw file aptck.h was added on branch nathanw_sa on 2002-02-28 04:08:30 +0000
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.2 24-Feb-2002  leo Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.44; 1.1.1.1.48;
Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.1.1.1.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6 26-Mar-2014  christos kill sprintf
 1.5 18-Mar-2009  cegger branches: 1.5.12; 1.5.22; 1.5.26;
Ansify function definitions w/o arguments. Generated with sed.
 1.4 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.3 09-Feb-1996  leo branches: 1.3.170; 1.3.178; 1.3.184;
Catchup with the future.
 1.2 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.3.184.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.178.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.170.1 04-May-2009  yamt sync with head.
 1.5.26.1 18-May-2014  rmind sync with head
 1.5.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.2 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.4 26-Jul-2001  wiz branches: 1.4.6; 1.4.128; 1.4.136; 1.4.142;
auxilary -> auxiliary
 1.3 09-Feb-1996  leo branches: 1.3.44;
Catchup with the future.
 1.2 20-Jan-1996  leo BBSIZE -> BBMINSIZE
 1.1 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.3.44.1 03-Aug-2001  lukem update to -current
 1.4.142.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.136.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.128.1 04-May-2009  yamt sync with head.
 1.4.6.2 26-Jul-2001  wiz auxilary -> auxiliary
 1.4.6.1 26-Jul-2001  wiz file disklbl.c was added on branch nathanw_sa on 2001-07-26 23:07:58 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 16-Jan-1996  leo branches: 1.1.64;
Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.1.64.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.64.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.64.1 03-Aug-2004  skrll Sync with HEAD
 1.1 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.2 16-Jan-1996  leo Move things around a bit to make all names fit into the [8.3] namespace
of msdosfs.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Atari partion table checker. Checks the validity of AHDI and/or NetBSD/Atari
partition tables. (Waldi Ravens)
 1.1 07-Jan-1996  leo Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.9 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.8 31-Mar-2009  tsutsui Remove extra whitespace added by a dumb tool.
 1.7 18-Mar-2009  cegger bcopy -> memcpy
 1.6 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 01-Nov-1997  lukem branches: 1.4.154; 1.4.162; 1.4.168;
getopt returns -1 not EOF
 1.3 09-Jan-1996  leo Fix the same typo in all files. Yanking is soooo beautiful....
 1.2 07-Jan-1996  leo Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.1 26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.4.168.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.162.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.154.2 11-Mar-2010  yamt sync with head
 1.4.154.1 04-May-2009  yamt sync with head.
 1.1 27-Feb-2002  leo branches: 1.1.1;
Initial revision
 1.1.1.1 27-Feb-2002  leo branches: 1.1.1.1.2; 1.1.1.1.14;
copy a file to a 'SWP' partition
 1.1.1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.1.1.14.1 27-Feb-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:35:21 +0000
 1.1.1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.2.1 27-Feb-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-02-28 04:08:31 +0000
 1.9 12-Mar-2016  dholland Remove unused variable, found by gcc.
 1.8 12-Mar-2016  dholland Fix syntax error in previous. Hi christos :-)
(PR 50944)
 1.7 11-Mar-2016  christos PR/50944: David Binderman: sprinkle parens
 1.6 18-Mar-2009  cegger branches: 1.6.22; 1.6.40;
Ansify function definitions w/o arguments. Generated with sed.
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 22-Mar-2002  leo branches: 1.2.6; 1.2.114; 1.2.116; 1.2.118;
Also find swap partitions in a (possibly embedded in AHDI) NetBSD label on
the disk.
 1.1 27-Feb-2002  leo branches: 1.1.1;
Initial revision
 1.1.1.1 27-Feb-2002  leo branches: 1.1.1.1.2;
copy a file to a 'SWP' partition
 1.1.1.1.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.2.1 27-Feb-2002  nathanw file file2swp.c was added on branch nathanw_sa on 2002-02-28 04:08:31 +0000
 1.2.118.2 04-May-2009  yamt sync with head.
 1.2.118.1 16-May-2008  yamt sync with head.
 1.2.116.1 18-May-2008  yamt sync with head.
 1.2.114.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 22-Mar-2002  jdolecek file file2swp.c was added on branch kqueue on 2002-06-23 17:35:21 +0000
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.40.1 19-Mar-2016  skrll Sync with HEAD
 1.6.22.1 03-Dec-2017  jdolecek update from HEAD
 1.7 25-Sep-2024  rin atari/stand: Rework sysinfo.c v.s. GCC12 -Warray-bounds

sysinfo.c is also used for bootxxx. Convert `-Wno-error=...` into
`#pragma gcc diagnostic ...` to the source file, although this
does not narrow down scope of hack.

Fix atari build this time for sure ;)
 1.6 24-Sep-2024  rin atari: libtos: Silence GCC12 -Warray-bounds for sysinfo.c

ADDR_* defined in tosdefs.h are in the 0-th page, even if 4KB page,
i.e., [0, 0x1000). This causes -Warray-bounds for GCC12 and later.

Fix atari build with GCC12.
 1.5 22-Mar-2002  leo branches: 1.5.238;
Add code for reading NetBSD disklabels.
 1.4 24-Feb-2002  leo Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.3 11-Oct-2001  leo branches: 1.3.4;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.2 10-Oct-2001  leo Check-point my work on the bootcode.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.44;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.44.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.1.1.44.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.1.1.44.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 11-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-02-28 04:08:31 +0000
 1.5.238.1 02-Aug-2025  perseant Sync with HEAD
 1.1 24-Feb-2002  leo branches: 1.1.2; 1.1.8;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file ahdi.c was added on branch kqueue on 2002-03-16 15:56:56 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file ahdi.c was added on branch nathanw_sa on 2002-02-28 04:08:31 +0000
 1.2 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.1 24-Feb-2002  leo branches: 1.1.2; 1.1.8; 1.1.126;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1.126.1 11-Mar-2010  yamt sync with head
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file ahdi.h was added on branch kqueue on 2002-03-16 15:56:56 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file ahdi.h was added on branch nathanw_sa on 2002-02-28 04:08:32 +0000
 1.4 01-Oct-2011  chs fix build errors with gcc 4.5.
 1.3 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.2 22-Mar-2002  leo branches: 1.2.116;
Add code for reading NetBSD disklabels.
 1.1 24-Feb-2002  leo branches: 1.1.2; 1.1.8;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file ahdilbl.h was added on branch kqueue on 2002-03-16 15:56:57 +0000
 1.1.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file ahdilbl.h was added on branch nathanw_sa on 2002-02-28 04:08:32 +0000
 1.2.116.1 11-Mar-2010  yamt sync with head
 1.12 18-Mar-2009  cegger bzero -> memset
 1.11 06-Jan-2009  tsutsui branches: 1.11.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.10 28-Apr-2008  martin branches: 1.10.8; 1.10.10;
Remove clause 3 and 4 from TNF licenses
 1.9 11-Dec-2005  christos branches: 1.9.24; 1.9.74; 1.9.76; 1.9.78;
merge ktrace-lwp.
 1.8 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.7 28-Jun-2005  junyoung ANSI & KNF.
 1.6 10-Dec-2002  thorpej branches: 1.6.6;
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.5 24-Feb-2002  leo Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.4 14-Oct-2001  leo branches: 1.4.4; 1.4.6;
TOS/MiNT needs unistd.h.
 1.3 13-Oct-2001  leo Arrange include files section in such a way that we can use this code in
the MiNT and NetBSD/libsa environment.
 1.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1 10-Oct-2001  leo Check-point my work on the bootcode.
 1.4.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.6.1 14-Oct-2001  thorpej file aout.c was added on branch kqueue on 2002-01-10 19:40:22 +0000
 1.4.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.4.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.1 14-Oct-2001  nathanw file aout.c was added on branch nathanw_sa on 2002-02-28 04:08:32 +0000
 1.6.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.78.2 04-May-2009  yamt sync with head.
 1.9.78.1 16-May-2008  yamt sync with head.
 1.9.76.1 18-May-2008  yamt sync with head.
 1.9.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.10.10.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.10.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.10.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1 24-Feb-2002  leo branches: 1.1.2; 1.1.8;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file biosrw.s was added on branch kqueue on 2002-03-16 15:56:57 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file biosrw.s was added on branch nathanw_sa on 2002-02-28 04:08:32 +0000
 1.4 31-Mar-2009  tsutsui Remove extra whitespace added by a dumb tool.
 1.3 18-Mar-2009  cegger bcopy -> memcpy
 1.2 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.1 22-Mar-2002  leo branches: 1.1.2; 1.1.8; 1.1.120; 1.1.128; 1.1.134;
Add code for reading NetBSD disklabels.
 1.1.134.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.128.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.120.1 04-May-2009  yamt sync with head.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 22-Mar-2002  jdolecek file bsdlabel.c was added on branch kqueue on 2002-06-23 17:35:22 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 22-Mar-2002  nathanw file bsdlabel.c was added on branch nathanw_sa on 2002-04-01 07:39:35 +0000
 1.3 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.2 11-Dec-2005  christos branches: 1.2.78;
merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file bsdstart.S was added on branch ktrace-lwp on 2004-08-03 10:33:26 +0000
 1.2.78.1 11-Mar-2010  yamt sync with head
 1.8 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.7 10-Oct-2001  leo branches: 1.7.4; 1.7.20;
Check-point my work on the bootcode.
 1.6 08-Sep-2001  thomas ELF adaption.
 1.5 04-Dec-1997  leo branches: 1.5.26; 1.5.28;
Preserve the bootflags in the processor-type test (== make the loader
work again for the TT030).
 1.4 27-May-1997  leo branches: 1.4.8;
Make the bootloader 68060 aware.
 1.3 26-Dec-1996  leo Make sure that the caches are pushed and turned off before jumping into
the kernel image. This makes booting a 040 kernel finally reliable.
 1.2 23-Jan-1996  leo STANDALONE -> TOSTOOLS
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Common library for all tostools. (Waldi Ravens and myself)
 1.4.8.1 15-Dec-1997  mellon Pull rev 1.5 up from trunk (leo)
 1.5.28.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.26.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.20.1 03-Aug-2004  skrll Sync with HEAD
 1.7.4.2 10-Oct-2001  leo Check-point my work on the bootcode.
 1.7.4.1 10-Oct-2001  leo file bsdstart.s was added on branch nathanw_sa on 2001-10-10 14:19:51 +0000
 1.10 31-Mar-2009  tsutsui Remove extra whitespace added by a dumb tool.
 1.9 18-Mar-2009  cegger bcopy -> memcpy
 1.8 18-Mar-2009  cegger bzero -> memset
 1.7 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.6 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.5 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.86; 1.4.92;
merge ktrace-lwp.
 1.3 24-Mar-2004  drochner remove license clauses 3 and 4 from my cpoyright notices
 1.2 24-Feb-2002  leo branches: 1.2.16;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1 11-Oct-2001  leo branches: 1.1.4; 1.1.6;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 11-Oct-2001  thorpej file cread.c was added on branch kqueue on 2002-01-10 19:40:24 +0000
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 11-Oct-2001  nathanw file cread.c was added on branch nathanw_sa on 2002-02-28 04:08:32 +0000
 1.2.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.16.1 03-Aug-2004  skrll Sync with HEAD
 1.4.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.78.1 04-May-2009  yamt sync with head.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 24-Feb-2002  leo branches: 1.2.118; 1.2.120; 1.2.122;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1 11-Oct-2001  leo branches: 1.1.4; 1.1.6;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 11-Oct-2001  thorpej file cread.h was added on branch kqueue on 2002-01-10 19:40:24 +0000
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 11-Oct-2001  nathanw file cread.h was added on branch nathanw_sa on 2002-02-28 04:08:33 +0000
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 26-Mar-2014  christos kill sprintf
 1.3 18-Mar-2009  cegger branches: 1.3.12; 1.3.22; 1.3.26;
Ansify function definitions w/o arguments. Generated with sed.
 1.2 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.1 24-Feb-2002  leo branches: 1.1.2; 1.1.8; 1.1.126; 1.1.134; 1.1.140;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.126.1 04-May-2009  yamt sync with head.
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file diskio.c was added on branch kqueue on 2002-03-16 15:56:58 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file diskio.c was added on branch nathanw_sa on 2002-02-28 04:08:33 +0000
 1.3.26.1 18-May-2014  rmind sync with head
 1.3.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 24-Feb-2002  leo branches: 1.1.2; 1.1.8;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file diskio.h was added on branch kqueue on 2002-03-16 15:56:58 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file diskio.h was added on branch nathanw_sa on 2002-02-28 04:08:33 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 22-Mar-2002  leo branches: 1.1.2; 1.1.8; 1.1.14;
Add code for reading NetBSD disklabels.
 1.1.14.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.14.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.14.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 22-Mar-2002  jdolecek file disklbl.h was added on branch kqueue on 2002-06-23 17:35:22 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 22-Mar-2002  nathanw file disklbl.h was added on branch nathanw_sa on 2002-04-01 07:39:36 +0000
 1.14 01-Oct-2011  chs fix build errors with gcc 4.5.
 1.13 31-Mar-2009  tsutsui Remove extra whitespace added by a dumb tool.
 1.12 18-Mar-2009  cegger bcopy -> memcpy
 1.11 18-Mar-2009  cegger bzero -> memset
 1.10 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.9 06-Jan-2009  tsutsui branches: 1.9.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.8 28-Apr-2008  martin branches: 1.8.8; 1.8.10;
Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.24; 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 24-Feb-2002  leo branches: 1.5.16;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.4 14-Oct-2001  leo branches: 1.4.4; 1.4.6;
TOS/MiNT needs unistd.h.
 1.3 13-Oct-2001  leo Arrange include files section in such a way that we can use this code in
the MiNT and NetBSD/libsa environment.
 1.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1 10-Oct-2001  leo Check-point my work on the bootcode.
 1.4.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.6.1 14-Oct-2001  thorpej file elf.c was added on branch kqueue on 2002-01-10 19:40:25 +0000
 1.4.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.1 14-Oct-2001  nathanw file elf.c was added on branch nathanw_sa on 2002-02-28 04:08:33 +0000
 1.5.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.78.2 04-May-2009  yamt sync with head.
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.8.10.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.8.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.8.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.170; 1.1.1.1.178; 1.1.1.1.184;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.184.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.1.1.178.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.1.1.170.1 04-May-2009  yamt sync with head.
 1.3 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.2 24-Feb-2002  leo branches: 1.2.122; 1.2.130; 1.2.136;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.44; 1.1.1.1.48;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.136.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.130.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.122.1 04-May-2009  yamt sync with head.
 1.8 10-Oct-2020  thorpej Rename:
- EM_ALPHA (41) -> EM_OLD_ALPHA
- EM_ALPHA_EXP (36902) -> EM_ALPHA

36902 has been the value in common usage for a long time, and this naming
aligns with binutils, etc.

PR port-alpha/51926
 1.7 03-Jan-2014  dsl Remove the _KERNEL part of these two clones of sys/exec_elf.h
Remove the incorrect (and completely unused everywhere) Elf64_Shalf.
Put a better include guard on arch/epoc32/stand/e32boot/include/elf.h
Should be ok because I can't find any references to KERNEL in these
source trees.
 1.6 28-Aug-2010  joerg branches: 1.6.8; 1.6.18; 1.6.22;
Replace the current usage of Elf64_Half with Elf64_Word and rename
NetBSD specific Elf64_Quarter to Elf64_Half. This restores compatibility
with the common ELF specifications.
 1.5 28-Apr-2008  martin branches: 1.5.20; 1.5.22;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.74; 1.4.76; 1.4.78;
merge ktrace-lwp.
 1.3 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.2 11-Oct-2001  leo branches: 1.2.4; 1.2.6; 1.2.22;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1 10-Oct-2001  leo Check-point my work on the bootcode.
 1.2.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.22.1 03-Aug-2004  skrll Sync with HEAD
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 11-Oct-2001  thorpej file exec_elf.h was added on branch kqueue on 2002-01-10 19:40:27 +0000
 1.2.4.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.2.4.1 11-Oct-2001  leo file exec_elf.h was added on branch nathanw_sa on 2001-10-11 07:07:43 +0000
 1.4.78.2 09-Oct-2010  yamt sync with head
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.22.1 05-Mar-2011  rmind sync with head
 1.5.20.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.6.22.1 18-May-2014  rmind sync with head
 1.6.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.170; 1.1.1.1.178; 1.1.1.1.184;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.184.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.1.1.178.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.1.1.170.1 04-May-2009  yamt sync with head.
 1.8 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.7 11-Oct-2001  leo branches: 1.7.4; 1.7.126;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.6 10-Oct-2001  leo Check-point my work on the bootcode.
 1.5 07-Jan-2001  leo branches: 1.5.4;
Sync machine types with atari/include/cpu.h
 1.4 19-Feb-1999  leo branches: 1.4.8;
STANDALONE -> _STANDALONE per recent discussion.
 1.3 27-May-1997  leo Make the bootloader 68060 aware.
 1.2 19-Jan-1996  leo Use symbolic constants for ATARI_ANYCPU instead of dropping in a hex-value.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Common library for all tostools. (Waldi Ravens and myself)
 1.4.8.1 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.126.1 11-Mar-2010  yamt sync with head
 1.7.4.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.7.4.1 11-Oct-2001  leo file kparamb.h was added on branch nathanw_sa on 2001-10-11 07:07:43 +0000
 1.7 07-Nov-2018  maya Don't provide these definitions on netbsd as before, but without relying
on int8_t being a macro.
 1.6 17-Jul-2011  joerg branches: 1.6.52; 1.6.54;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.5 06-Jan-2009  tsutsui Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.4 24-Feb-2002  leo branches: 1.4.68; 1.4.118; 1.4.122; 1.4.130; 1.4.132;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.3 11-Oct-2001  leo branches: 1.3.4;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.2 10-Oct-2001  leo Check-point my work on the bootcode.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.44;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.44.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.1.1.44.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 11-Oct-2001  nathanw file libtos.h was added on branch nathanw_sa on 2002-02-28 04:08:34 +0000
 1.4.132.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.4.130.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.122.1 04-May-2009  yamt sync with head.
 1.4.118.1 17-Jan-2009  mjf Sync with HEAD.
 1.4.68.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.6.54.1 10-Jun-2019  christos Sync with HEAD
 1.6.52.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.10 25-Sep-2024  rin atari/stand: Rework sysinfo.c v.s. GCC12 -Warray-bounds

sysinfo.c is also used for bootxxx. Convert `-Wno-error=...` into
`#pragma gcc diagnostic ...` to the source file, although this
does not narrow down scope of hack.

Fix atari build this time for sure ;)
 1.9 14-Mar-2009  dsl branches: 1.9.100;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.8 06-Jan-2009  tsutsui branches: 1.8.2;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.7 28-Apr-2008  martin branches: 1.7.8; 1.7.10;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.24; 1.6.74; 1.6.76; 1.6.78;
merge ktrace-lwp.
 1.5 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.4 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.3 24-Feb-2002  leo branches: 1.3.16;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.2 13-Oct-2001  leo branches: 1.2.4; 1.2.6;
Arrange include files section in such a way that we can use this code in
the MiNT and NetBSD/libsa environment.
 1.1 10-Oct-2001  leo Check-point my work on the bootcode.
 1.2.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 13-Oct-2001  thorpej file sysinfo.c was added on branch kqueue on 2002-01-10 19:40:29 +0000
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 13-Oct-2001  nathanw file sysinfo.c was added on branch nathanw_sa on 2002-02-28 04:08:34 +0000
 1.3.16.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.6.78.2 04-May-2009  yamt sync with head.
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.7.10.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.7.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.7.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.100.1 02-Aug-2025  perseant Sync with HEAD
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 24-Feb-2002  leo branches: 1.3.118; 1.3.120; 1.3.122;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.2 11-Oct-2001  leo branches: 1.2.4; 1.2.6;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1 10-Oct-2001  leo Check-point my work on the bootcode.
 1.2.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 11-Oct-2001  thorpej file tosdefs.h was added on branch kqueue on 2002-01-10 19:40:30 +0000
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 11-Oct-2001  nathanw file tosdefs.h was added on branch nathanw_sa on 2002-02-28 04:08:34 +0000
 1.3.122.1 16-May-2008  yamt sync with head.
 1.3.120.1 18-May-2008  yamt sync with head.
 1.3.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.2 24-Feb-2002  leo branches: 1.2.122; 1.2.130; 1.2.136;
Move some disk I/O and disklabel functions into the library. The code
mostly originated from aptck. Need an extra pass over aptck to cut out all
functionality now moved to the library...
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.44; 1.1.1.1.48;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.44.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.136.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.130.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.122.1 04-May-2009  yamt sync with head.
 1.3 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.2 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo branches: 1.1.1.1.170; 1.1.1.1.178; 1.1.1.1.184;
Common library for all tostools. (Waldi Ravens and myself)
 1.1.1.1.184.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.1.1.178.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.1.1.170.1 04-May-2009  yamt sync with head.
 1.4 14-Oct-2001  leo branches: 1.4.4;
cread.o now comes from libtos.a
 1.3 10-Oct-2001  leo Check-point my work on the bootcode.
 1.2 23-Jun-1999  leo branches: 1.2.16;
Allow the loading of compressed kernels. This makes it again possible
to make a 'system disk' on a 720KB floppy that is usable.
 1.1 07-Jan-1996  leo branches: 1.1.26;
Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.1.26.1 01-Jul-1999  thorpej Sync w/ -current.
 1.2.16.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.2 14-Oct-2001  leo cread.o now comes from libtos.a
 1.4.4.1 14-Oct-2001  leo file Makefile was added on branch nathanw_sa on 2001-10-14 19:47:59 +0000
 1.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.1 23-Jun-1999  leo branches: 1.1.2; 1.1.18;
Allow the loading of compressed kernels. This makes it again possible
to make a 'system disk' on a 720KB floppy that is usable.
 1.1.18.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.1.2.1 23-Jun-1999  thorpej file cread.c was added on branch chs-ubc2 on 1999-07-01 23:03:49 +0000
 1.22 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.21 20-Oct-2009  snj branches: 1.21.22;
Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.20 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.19 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.18 11-Oct-2001  leo branches: 1.18.4; 1.18.126; 1.18.134; 1.18.140;
Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.17 10-Oct-2001  leo Check-point my work on the bootcode.
 1.16 27-Sep-2001  leo Add ELF stuff to loader. This is a combined effort from Thomas Gerner and
myself.
 1.15 23-Jun-1999  leo branches: 1.15.14; 1.15.16;
Allow the loading of compressed kernels. This makes it again possible
to make a 'system disk' on a 720KB floppy that is usable.
 1.14 27-May-1999  leo Add support for the memory on the CT2 board. Info from Thomas Goirand.
 1.13 01-Nov-1997  lukem branches: 1.13.10;
getopt returns -1 not EOF
 1.12 27-May-1997  leo Make the bootloader 68060 aware.
 1.11 09-Jan-1996  leo Fix the same typo in all files. Yanking is soooo beautiful....
 1.10 07-Jan-1996  leo Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.9 23-Sep-1995  leo Add support for the FX-card - Falcon mem. extension - (Nat!)
 1.8 29-Aug-1995  leo Remove FPU detection and report on stdout instead of stderr.
 1.7 28-May-1995  leo Check for a different year-base in the RTC.
 1.6 05-May-1995  leo Fix error in handling FPU types.
 1.5 02-May-1995  leo Added -T option.
 1.4 16-Apr-1995  leo Get TT-RAM sizes right, some more debug output added with -D option.
 1.3 08-Apr-1995  leo Added '\r' chars in printf, so output under TOS becomes readable. Also
added some extra options for debugging.
 1.2 28-Mar-1995  leo Capitalisation of NetBSD fixed.
 1.1 26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.13.10.2 01-Jul-1999  thorpej Sync w/ -current.
 1.13.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.15.16.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.15.14.1 01-Oct-2001  fvdl Catch up with -current.
 1.18.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.126.2 11-Mar-2010  yamt sync with head
 1.18.126.1 04-May-2009  yamt sync with head.
 1.18.4.2 11-Oct-2001  leo Second pass of the bootloader reworking. Everything works from the
TOS/MiNT side now.
 1.18.4.1 11-Oct-2001  leo file loadbsd.c was added on branch nathanw_sa on 2001-10-11 07:07:44 +0000
 1.21.22.1 03-Dec-2017  jdolecek update from HEAD
 1.8 10-Oct-2001  leo Check-point my work on the bootcode.
 1.7 27-May-1999  leo branches: 1.7.16;
Add support for the memory on the CT2 board. Info from Thomas Goirand.
 1.6 07-Jan-1996  leo branches: 1.6.26;
Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.5 29-Aug-1995  leo Remove FPU detection and report on stdout instead of stderr.
 1.4 28-May-1995  leo Check for a different year-base in the RTC.
 1.3 16-Apr-1995  leo Get TT-RAM sizes right, some more debug output added with -D option.
 1.2 28-Mar-1995  leo Capitalisation of NetBSD fixed.
 1.1 26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.6.26.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7.16.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1 07-Jan-1996  leo Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.11 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.10 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.9 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.8 26-Mar-1999  leo branches: 1.8.148; 1.8.156; 1.8.162;
Fix typo noticed by James Boulton.
 1.7 16-Jan-1998  leo Be more accurate with errors on read(2) (as suggested by Ted Lemon).
 1.6 15-Dec-1997  leo Correct size of brwrite():trbuf[] (Mellon).
 1.5 10-Dec-1997  leo Add '-H' option for writing High density floppies.
 1.4 01-Nov-1997  lukem getopt returns -1 not EOF
 1.3 09-Jan-1996  leo branches: 1.3.16;
Fix the same typo in all files. Yanking is soooo beautiful....
 1.2 07-Jan-1996  leo Part of the tostools reorganization. All directories now contain a Makefile
and the user interface to the various tools has been standarized.
 1.1 07-Jan-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 07-Jan-1996  leo Reorganization of the stand-directory. All tools that are TOS specific and
can (probably) only be compiled under TOS are now being grouped in the
sub-directory 'tostools'.
 1.3.16.1 15-Dec-1997  mellon Pull revs 1.3, 1.4 and 1.5 up from trunk (leo)
 1.8.162.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.156.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.148.2 11-Mar-2010  yamt sync with head
 1.8.148.1 04-May-2009  yamt sync with head.
 1.3 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.2 13-Oct-2001  leo branches: 1.2.4;
Add an address for the 3rd level boot.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo branches: 1.1.1.1.44;
NetBSD/Atari bootcode by Waldi Ravens.
 1.1.1.1.44.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 13-Oct-2001  leo Add an address for the 3rd level boot.
 1.2.4.1 13-Oct-2001  leo file LOADADDR was added on branch nathanw_sa on 2001-10-13 19:55:08 +0000
 1.1 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.8 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.7 13-Aug-2002  leo For some reason, things stopped working without explicitely adding a rule
to link the bootblocks... Found and fix provided by Thomas Gerner.
 1.6 15-Apr-2002  leo branches: 1.6.2; 1.6.4;
Fix PR-16305. Make the 'end' symbol local.
 1.5 22-Sep-2001  tv branches: 1.5.4;
objcopy -> ${OBJCOPY}; remove redundant definitions of OBJCOPY?= (it is
now in bsd.own.mk).
 1.4 05-Sep-2001  thomas branches: 1.4.2;
Make the bootblocks build with ELF assembler.
 1.3 09-May-1997  mycroft branches: 1.3.36;
Eliminate bogus redefinitions of standard targets.
 1.2 17-Apr-1997  thorpej STRIP -> STRIPFLAG
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.3.36.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.36.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.36.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.36.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.5.4.3 27-Aug-2002  nathanw Catch up to -current.
 1.5.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.5.4.1 22-Sep-2001  nathanw file Makefile.inc was added on branch nathanw_sa on 2002-04-17 00:02:46 +0000
 1.6.4.1 17-Aug-2002  lukem Pull up revision 1.7 (requested by leo in ticket #672):
For some reason, things stopped working without explicitely adding a rule
to link the bootblocks... Found and fix provided by Thomas Gerner.
 1.6.2.1 30-Aug-2002  gehenna catch up with -current.
 1.6 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.5 06-Jan-2009  tsutsui branches: 1.5.14; 1.5.24; 1.5.28;
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
 1.4 11-Dec-2005  christos branches: 1.4.24; 1.4.74; 1.4.78; 1.4.86; 1.4.88;
merge ktrace-lwp.
 1.3 12-Mar-2004  jmc Toolize and use install to make mdec/std so it's in METALOG. Now a make release
works once again for atari
 1.2 28-Jun-2003  he branches: 1.2.2;
Use ${.CURDIR} when referring to source tree include directories.
 1.1 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.88.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #274):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4, 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
sys/arch/atari/stand/Makefile.inc: file removal
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.4.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.78.1 04-May-2009  yamt sync with head.
 1.4.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.4.24.1 15-Jan-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1263):
sys/arch/atari/stand/xxboot/Makefile.xxboot: revision 1.5
sys/arch/atari/stand/tostools/libtos/libtos.h: revision 1.5
sys/arch/atari/stand/installboot/disklabel.c: revision 1.3
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.4
sys/arch/atari/stand/bootxxx/Makefile.bootxxx: revision 1.5
sys/arch/atari/stand/libsa/Makefile: revision 1.28
sys/arch/atari/stand/bootxx/start.S: revision 1.1
distrib/utils/sysinst/arch/atari/md.c: revision 1.23
sys/arch/atari/stand/bootxx/Makefile.bootxx: revision 1.8
sys/arch/atari/stand/tostools/libtos/aout.c: revision 1.11
sys/arch/atari/stand/installboot/installboot.h: revision 1.9
sys/arch/atari/stand/bootxxx/bootxxx.c: revision 1.4
distrib/sets/lists/base/md.atari: revision 1.50
sys/arch/atari/stand/Makefile.booters: revision 1.1
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.13
sys/arch/atari/stand/installboot/installboot.c: revision 1.22
sys/arch/atari/stand/tostools/libtos/elf.c: revision 1.9
sys/arch/atari/stand/tostools/libtos/sysinfo.c: revision 1.8
sys/arch/atari/stand/bootxxx/start.S: revision 1.1
Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
because modern aggressive gcc4 may reorder functions in the same source
and the first function in a C source won't always appear at the beginning
in its object.
Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
explicitly include it from each Makefile because the stand
directory contains non standalone programs like installboot and
Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
- create machine and m68k symlinks in ${.OBJDIR} in all boot programs
- set appropriate make environments to suppress errors and warnings
- <string.h> isn't there in _STANDALONE case
- put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
to some files in stand/tostools
- use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
in all boot programs
(XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
support 64 bit block numbers
Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.
Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.
Problem on default installation with sysinst was reported by David Ross.
Remove /boot.atari, which is no longer installed during build
and removed from base.tgz.
Note we must not mark this obsolete because this tertiary bootloader
will be copied into / during installation and it shouldn't be removed
by postinstall(8).
Before installboot(8), check running machine types (milan or others)
via sysctl(3) and copy appropriate tertiary boot.atari loader
from /usr/mdec/{std,milan} into targetroot.
Full fresh installations of 5.0_BETA and 4.0_STABLE with the same change
have been tested by David Ross on port-atari.
Fixes the final portion of PR port-atari/40315, and
pullup requests to both netbsd-4 and netbsd-5 will be sent shortly.
 1.5.28.1 18-May-2014  rmind sync with head
 1.5.24.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.14.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.5 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.4 28-Dec-1996  leo - The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.3 26-Dec-1996  leo Correct the IDE port-addresses and data transfer method so this will work
both Hades & Falcon.
 1.2 20-Mar-1996  leo Belongs to the last changes made to the ??boot/??boot.s files I did
yesterday.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.7 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.6 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.5 23-Jul-2000  jdc branches: 1.5.4; 1.5.8;
Make these work with obj directories.
 1.4 13-Feb-1999  lukem branches: 1.4.8; 1.4.18;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.4.18.1 24-Jul-2000  jdc Make these work with obj directories.
Agreed with Leo Weppelman.
Approved by Jason R Thorpe.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4 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.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122; 1.3.128;
merge ktrace-lwp.
 1.2 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1 23-May-2003  leo branches: 1.1.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.128.1 18-May-2014  rmind sync with head
 1.3.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file sdb00t.ahdi.S was added on branch ktrace-lwp on 2004-08-03 10:33:27 +0000
 1.6 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.5 23-May-2003  leo branches: 1.5.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.4 15-Apr-2002  leo Fix PR-16305. Make the 'end' symbol local.
 1.3 05-Sep-2001  thomas branches: 1.3.6;
Make the bootblocks build with ELF assembler.
 1.2 28-Dec-1996  leo branches: 1.2.42;
- The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.42.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.3.6.1 05-Sep-2001  nathanw file sdb00t.ahdi.s was added on branch nathanw_sa on 2002-04-17 00:02:46 +0000
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3 28-Jun-2003  he Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3 28-Jun-2003  he Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.10 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.9 11-Dec-2005  christos branches: 1.9.112; 1.9.122; 1.9.128;
merge ktrace-lwp.
 1.8 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.7 23-May-2003  leo branches: 1.7.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.6 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.5 23-Jul-2000  jdc branches: 1.5.4; 1.5.8;
Make these work with obj directories.
 1.4 13-Feb-1999  lukem branches: 1.4.8; 1.4.18;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.4.18.1 24-Jul-2000  jdc Make these work with obj directories.
Agreed with Leo Weppelman.
Approved by Jason R Thorpe.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.128.1 18-May-2014  rmind sync with head
 1.9.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file wdb00t.ahdi.S was added on branch ktrace-lwp on 2004-08-03 10:33:27 +0000
 1.6 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.5 15-Apr-2002  leo branches: 1.5.10;
Fix PR-16305. Make the 'end' symbol local.
 1.4 05-Sep-2001  thomas branches: 1.4.6;
Make the bootblocks build with ELF assembler.
 1.3 28-Dec-1996  leo branches: 1.3.42;
- The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.2 26-Dec-1996  leo Correct the IDE port-addresses and data transfer method so this will work
both Hades & Falcon.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.3.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.42.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.4.6.1 05-Sep-2001  nathanw file wdb00t.ahdi.s was added on branch nathanw_sa on 2002-04-17 00:02:46 +0000
 1.5.10.1 03-Aug-2004  skrll Sync with HEAD
 1.7 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.6 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.5 23-Jul-2000  jdc branches: 1.5.4; 1.5.8;
Make these work with obj directories.
 1.4 13-Feb-1999  lukem branches: 1.4.8; 1.4.18;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.4.18.1 24-Jul-2000  jdc Make these work with obj directories.
Agreed with Leo Weppelman.
Approved by Jason R Thorpe.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4 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.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122; 1.3.128;
merge ktrace-lwp.
 1.2 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1 23-May-2003  leo branches: 1.1.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.128.1 18-May-2014  rmind sync with head
 1.3.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file xxboot.ahdi.S was added on branch ktrace-lwp on 2004-08-03 10:33:27 +0000
 1.7 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.6 15-Apr-2002  leo branches: 1.6.10;
Fix PR-16305. Make the 'end' symbol local.
 1.5 05-Sep-2001  thomas branches: 1.5.6;
Make the bootblocks build with ELF assembler.
 1.4 08-Jan-1997  leo branches: 1.4.42;
Adjust 'fill'.
 1.3 28-Dec-1996  leo - The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.2 18-Mar-1996  leo Take care of the case that <start_of_video> < <memtop>
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.4.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.42.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.5.6.1 05-Sep-2001  nathanw file xxboot.ahdi.s was added on branch nathanw_sa on 2002-04-17 00:02:47 +0000
 1.6.10.1 03-Aug-2004  skrll Sync with HEAD
 1.4 04-Mar-2018  tsutsui Provide wdboot as a copy of sdboot for Milan.

It looks Milan's bootloader ROM emulates IDE disks as SCSI disks
so sdboot works for them, but atari's installboot checks a specified
device name and requires wdboot for wd(4) devices.
 1.3 28-Jun-2003  he branches: 1.3.188;
Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3.188.1 13-Mar-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #624):
sys/arch/atari/stand/xxboot/sdboot/milan/Makefile: revision 1.4
sys/arch/atari/dev/nvram.c: revision 1.21
sys/arch/atari/conf/MILAN.in: revision 1.28
sys/arch/atari/atari/pmap_bootstrap.c: revision 1.9
sys/dev/isa/fd.c: revision 1.111
sys/arch/atari/atari/bus.c: revision 1.60
sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile: revision 1.4
sys/arch/atari/atari/locore.s: revision 1.111
sys/arch/atari/isa/isa_machdep.c: revision 1.41
distrib/sets/lists/base/md.atari: revision 1.55
sys/arch/atari/pci/pci_machdep.c: revision 1.55
sys/arch/atari/pci/pci_machdep.c: revision 1.56
sys/arch/atari/include/vmparam.h: revision 1.32
sys/arch/atari/isa/isa_milan.c: revision 1.15
sys/arch/atari/isa/isa_milan.c: revision 1.16
sys/arch/atari/atari/bus.c: revision 1.59
sys/arch/atari/atari/atari_init.c: revision 1.101
sys/arch/atari/pci/pci_milan.c: revision 1.15
Fix I/O access failures for regions allocated by bus_space_map(9) on Milan.

Passing to PMAP_WIRED against I/O spaces seems problematic,
probably after yamt-km branch merge, which was committed
between NetBSD 3.0 and NetBSD 4.0.
(i.e. ISA and PCI devices on Milan didn't work after 4.0 release)

XXX:
According to pmap(9) man page, the "flags" arg for pmap_enter(9)
doesn't take VM_PROT_READ and VM_PROT_WRITE, but pmap_enter()
implementation in sys/arch/m68k/m68k/pmap_motolora.c historically
checks them.

Fix silent hang during config_console() (before consinit()) on Milan.
config_console() was a dirty hack used by ancient m68k ports
to probe and initialize console devices before "real" configure(9),
using subset of configure(9) functions.

In that case, most device specific data (except I/O access method)
are not initialized so we must not access device specific device_t and
softc structures in config_console() cases.

Fix silent hang after isa_intr_establish() on Milan.
The problems (wrong macro replacements) were slipped in rev 1.107:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/atari/atari/locore.s#rev1.107
Handle yet another atari specific quirk in the MI ISA fdc(4)/fd(4) driver.
This makes fd(4) drive(s) (which is necessary for installation)
properly attached on Milan.
atari uses "fdcisa" and "fdisa" for ISA fdc to co-exist other fd(4)
drivers, on-board (atari/dev/fd.c) one and Hades (atari/dev/hdfd.c) one.

Use a proper PSL value to be passed to splx(9) functions.
This should have been changed on yamt-splraiseipl branch merge
back in 2006, which made MI IPL_xxx values independent from
m68k MD PSL values for the %sr register.

Restore piixide(4) for Milan and disable other pciide devices.
piixide was removed in rev 1.18 and the log message said
"because Intel IDE disk controllers only exist as part of
Intel chipsets for x86 systems" but the Milan actually has
the Intel 82371FB southbridge on its board.
Other pciide devices are unlikely necessary for the default
kernel for such a rare machine.
Also fix pasto in comment.

Skip NVRAM checksum check and re-initialization on Milan.
Milan's firmware seems to use different check method.

Ack EOI for IRQ_SLAVE of the master PIC after ack for IRQ of the slave PIC.
I'm not sure if there are possible races in the original code, but
this is what i8259_asm_ack2() in sys/arch/x86/include/i8259.h does
and it looks this change makes a Milan kernel a bit stable.
Replace CRTC register values with ones taken from sys/dev/ic/vga_subr.c.
This fixes noise around column 3 and 4 and makes screen output clearer
on Milan with S3 Trio64V.

Explicitly setup the secondary IDE interrupt of PIIX on Milan.
The secondary IDE interrupt is connected to MBIRQ0 on PIIX, but
the Milan's ROM bootloader (at least version 0.99.7) doesn't seem
to setup the MBIRQ0 register to route it to IRQ15.

On Milan, also explicitly disable MBIRQ1 on PIIX.
Milan's ROM bootloader v1.2 and v1.4 incorrectly set MBIRQ0 connected
to the secondary IDE to IRQ14 (not 15) and unused MBIRQ1 to IRQ15,
so both IDE channels don't work properly.

Add dumb memory probe routines for Milan to use all available memory.
Tested on Milan with 32Mx1, 32Mx4, 128MBx1, and 128MBx3.
(bootloader ROM fails to load TOS with 128MBx4)
No particular comment on port-atari@:
http://mail-index.netbsd.org/port-atari/2018/02/09/msg000580.html

Provide wdboot as a copy of sdboot for Milan.
It looks Milan's bootloader ROM emulates IDE disks as SCSI disks
so sdboot works for them, but atari's installboot checks a specified
device name and requires wdboot for wd(4) devices.

Fix another possible out of bounds.

Replace bus_dmamap_sync(9) op with a newer one taken from m68k/bus_dma.c.
This could fix memory corruption issue caused by PREREAD ops with regions
whose boundaries are not aligned at cacheline size.
 1.3 28-Jun-2003  he Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.7 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.6 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.5 23-Jul-2000  jdc branches: 1.5.4; 1.5.8;
Make these work with obj directories.
 1.4 13-Feb-1999  lukem branches: 1.4.8; 1.4.18;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.4.18.1 24-Jul-2000  jdc Make these work with obj directories.
Agreed with Leo Weppelman.
Approved by Jason R Thorpe.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4 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.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122; 1.3.128;
merge ktrace-lwp.
 1.2 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1 23-May-2003  leo branches: 1.1.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.128.1 18-May-2014  rmind sync with head
 1.3.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file fdboot.S was added on branch ktrace-lwp on 2004-08-03 10:33:27 +0000
 1.6 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.5 15-Apr-2002  leo branches: 1.5.10;
Fix PR-16305. Make the 'end' symbol local.
 1.4 05-Sep-2001  thomas branches: 1.4.6;
Make the bootblocks build with ELF assembler.
 1.3 28-Dec-1996  leo branches: 1.3.42;
- The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.2 18-Mar-1996  leo Take care of the case that <start_of_video> < <memtop>
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.3.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.42.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.4.6.1 05-Sep-2001  nathanw file fdboot.s was added on branch nathanw_sa on 2002-04-17 00:02:47 +0000
 1.5.10.1 03-Aug-2004  skrll Sync with HEAD
 1.3 28-Jun-2003  he Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3 28-Jun-2003  he Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.7 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.6 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.5 23-Jul-2000  jdc branches: 1.5.4; 1.5.8;
Make these work with obj directories.
 1.4 13-Feb-1999  lukem branches: 1.4.8; 1.4.18;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.4.18.1 24-Jul-2000  jdc Make these work with obj directories.
Agreed with Leo Weppelman.
Approved by Jason R Thorpe.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4 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.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122; 1.3.128;
merge ktrace-lwp.
 1.2 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1 23-May-2003  leo branches: 1.1.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.128.1 18-May-2014  rmind sync with head
 1.3.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file sdboot.S was added on branch ktrace-lwp on 2004-08-03 10:33:27 +0000
 1.6 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.5 15-Apr-2002  leo branches: 1.5.10;
Fix PR-16305. Make the 'end' symbol local.
 1.4 05-Sep-2001  thomas branches: 1.4.6;
Make the bootblocks build with ELF assembler.
 1.3 28-Dec-1996  leo branches: 1.3.42;
- The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.2 18-Mar-1996  leo Take care of the case that <start_of_video> < <memtop>
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.3.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.42.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.4.6.1 05-Sep-2001  nathanw file sdboot.s was added on branch nathanw_sa on 2002-04-17 00:02:47 +0000
 1.5.10.1 03-Aug-2004  skrll Sync with HEAD
 1.4 04-Mar-2018  tsutsui Provide wdboot as a copy of sdboot for Milan.

It looks Milan's bootloader ROM emulates IDE disks as SCSI disks
so sdboot works for them, but atari's installboot checks a specified
device name and requires wdboot for wd(4) devices.
 1.3 28-Jun-2003  he branches: 1.3.188;
Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.3.188.1 13-Mar-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #624):
sys/arch/atari/stand/xxboot/sdboot/milan/Makefile: revision 1.4
sys/arch/atari/dev/nvram.c: revision 1.21
sys/arch/atari/conf/MILAN.in: revision 1.28
sys/arch/atari/atari/pmap_bootstrap.c: revision 1.9
sys/dev/isa/fd.c: revision 1.111
sys/arch/atari/atari/bus.c: revision 1.60
sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile: revision 1.4
sys/arch/atari/atari/locore.s: revision 1.111
sys/arch/atari/isa/isa_machdep.c: revision 1.41
distrib/sets/lists/base/md.atari: revision 1.55
sys/arch/atari/pci/pci_machdep.c: revision 1.55
sys/arch/atari/pci/pci_machdep.c: revision 1.56
sys/arch/atari/include/vmparam.h: revision 1.32
sys/arch/atari/isa/isa_milan.c: revision 1.15
sys/arch/atari/isa/isa_milan.c: revision 1.16
sys/arch/atari/atari/bus.c: revision 1.59
sys/arch/atari/atari/atari_init.c: revision 1.101
sys/arch/atari/pci/pci_milan.c: revision 1.15
Fix I/O access failures for regions allocated by bus_space_map(9) on Milan.

Passing to PMAP_WIRED against I/O spaces seems problematic,
probably after yamt-km branch merge, which was committed
between NetBSD 3.0 and NetBSD 4.0.
(i.e. ISA and PCI devices on Milan didn't work after 4.0 release)

XXX:
According to pmap(9) man page, the "flags" arg for pmap_enter(9)
doesn't take VM_PROT_READ and VM_PROT_WRITE, but pmap_enter()
implementation in sys/arch/m68k/m68k/pmap_motolora.c historically
checks them.

Fix silent hang during config_console() (before consinit()) on Milan.
config_console() was a dirty hack used by ancient m68k ports
to probe and initialize console devices before "real" configure(9),
using subset of configure(9) functions.

In that case, most device specific data (except I/O access method)
are not initialized so we must not access device specific device_t and
softc structures in config_console() cases.

Fix silent hang after isa_intr_establish() on Milan.
The problems (wrong macro replacements) were slipped in rev 1.107:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/atari/atari/locore.s#rev1.107
Handle yet another atari specific quirk in the MI ISA fdc(4)/fd(4) driver.
This makes fd(4) drive(s) (which is necessary for installation)
properly attached on Milan.
atari uses "fdcisa" and "fdisa" for ISA fdc to co-exist other fd(4)
drivers, on-board (atari/dev/fd.c) one and Hades (atari/dev/hdfd.c) one.

Use a proper PSL value to be passed to splx(9) functions.
This should have been changed on yamt-splraiseipl branch merge
back in 2006, which made MI IPL_xxx values independent from
m68k MD PSL values for the %sr register.

Restore piixide(4) for Milan and disable other pciide devices.
piixide was removed in rev 1.18 and the log message said
"because Intel IDE disk controllers only exist as part of
Intel chipsets for x86 systems" but the Milan actually has
the Intel 82371FB southbridge on its board.
Other pciide devices are unlikely necessary for the default
kernel for such a rare machine.
Also fix pasto in comment.

Skip NVRAM checksum check and re-initialization on Milan.
Milan's firmware seems to use different check method.

Ack EOI for IRQ_SLAVE of the master PIC after ack for IRQ of the slave PIC.
I'm not sure if there are possible races in the original code, but
this is what i8259_asm_ack2() in sys/arch/x86/include/i8259.h does
and it looks this change makes a Milan kernel a bit stable.
Replace CRTC register values with ones taken from sys/dev/ic/vga_subr.c.
This fixes noise around column 3 and 4 and makes screen output clearer
on Milan with S3 Trio64V.

Explicitly setup the secondary IDE interrupt of PIIX on Milan.
The secondary IDE interrupt is connected to MBIRQ0 on PIIX, but
the Milan's ROM bootloader (at least version 0.99.7) doesn't seem
to setup the MBIRQ0 register to route it to IRQ15.

On Milan, also explicitly disable MBIRQ1 on PIIX.
Milan's ROM bootloader v1.2 and v1.4 incorrectly set MBIRQ0 connected
to the secondary IDE to IRQ14 (not 15) and unused MBIRQ1 to IRQ15,
so both IDE channels don't work properly.

Add dumb memory probe routines for Milan to use all available memory.
Tested on Milan with 32Mx1, 32Mx4, 128MBx1, and 128MBx3.
(bootloader ROM fails to load TOS with 128MBx4)
No particular comment on port-atari@:
http://mail-index.netbsd.org/port-atari/2018/02/09/msg000580.html

Provide wdboot as a copy of sdboot for Milan.
It looks Milan's bootloader ROM emulates IDE disks as SCSI disks
so sdboot works for them, but atari's installboot checks a specified
device name and requires wdboot for wd(4) devices.

Fix another possible out of bounds.

Replace bus_dmamap_sync(9) op with a newer one taken from m68k/bus_dma.c.
This could fix memory corruption issue caused by PREREAD ops with regions
whose boundaries are not aligned at cacheline size.
 1.3 28-Jun-2003  he Somehow all these tiny Makefiles had their contents replicated.
Pare back down to just one copy.
 1.2 23-May-2003  leo usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.1 23-May-2003  leo branches: 1.1.1;
Initial revision
 1.1.1.1 23-May-2003  leo usr/mdec reorg for Milan support
 1.10 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.9 11-Dec-2005  christos branches: 1.9.112; 1.9.122; 1.9.128;
merge ktrace-lwp.
 1.8 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.7 23-May-2003  leo branches: 1.7.2;
usr/mdec reorg for Milan support.
Note that installboot needs reworking too. Installing bootblocks on -current
is no longer possible until this is done.
nolonger
 1.6 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.5 23-Jul-2000  jdc branches: 1.5.4; 1.5.8;
Make these work with obj directories.
 1.4 13-Feb-1999  lukem branches: 1.4.8; 1.4.18;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 29-Jun-1996  leo Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
 1.2 14-May-1996  leo branches: 1.2.4;
Update to make this work correctly when using an obj-directory.
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.2.4.1 30-Jun-1996  jtc Pulled up rev 1.3 by request from Leo Weppelman
 1.4.18.1 24-Jul-2000  jdc Make these work with obj directories.
Agreed with Leo Weppelman.
Approved by Jason R Thorpe.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.128.1 18-May-2014  rmind sync with head
 1.9.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 26-Jun-2022  tsutsui Unifdef __ELF__.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Oct-2003  he branches: 1.1.4;
Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Oct-2003  skrll file wdboot.S was added on branch ktrace-lwp on 2004-08-03 10:33:35 +0000
 1.7 28-Oct-2003  he Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
 1.6 15-Apr-2002  leo branches: 1.6.10;
Fix PR-16305. Make the 'end' symbol local.
 1.5 05-Sep-2001  thomas branches: 1.5.6;
Make the bootblocks build with ELF assembler.
 1.4 28-Dec-1996  leo branches: 1.4.42;
- The Hades bios does not pass a 'bootpreference' in d5. Deal with it by
getting the 'bootpreference' ourselves when it is not set to any legal
value.
- Because the relation between memtop/membot and the video base does not
hold on the Hades, skip testing on it.
 1.3 26-Dec-1996  leo Correct the IDE port-addresses and data transfer method so this will work
both Hades & Falcon.
 1.2 18-Mar-1996  leo Take care of the case that <start_of_video> < <memtop>
 1.1 29-Feb-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1 29-Feb-1996  leo NetBSD/Atari bootcode by Waldi Ravens.
 1.4.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.42.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.5.6.1 05-Sep-2001  nathanw file wdboot.s was added on branch nathanw_sa on 2002-04-17 00:02:48 +0000
 1.6.10.1 03-Aug-2004  skrll Sync with HEAD

RSS XML Feed