Home | History | Annotate | only in /src/sys/arch/x68k/stand/libsa
History log of /src/sys/arch/x68k/stand/libsa
RevisionDateAuthorComments
 1.31 17-Jan-2016  tsutsui Enable LIBSA_CREAD_NOCRC. PR/50638

Bump version to denote user visible change.
XXX: recent visible changes (memsize probe, SRAM switch command)
were not denoted in versions
Tested on (real) X68030.
 1.30 25-Jul-2015  isaki sysinst is 15*2 sect/cyl (fdXc), not 8*2 sect/cyl (it's fdXa,
DOS compatible). It makes the loading of sysinst a bit faster.
Pointed out by Yosuke Sugahara.
 1.29 12-Oct-2012  tsutsui branches: 1.29.14;
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.

Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.

Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
 1.28 25-Dec-2011  tsutsui branches: 1.28.2; 1.28.6;
Apply the following patch submitted by Evgeniy Ivanov:
http://mail-index.NetBSD.org/tech-kern/2011/12/15/msg012226.html
http://mail-index.NetBSD.org/tech-kern/2011/12/17/msg012229.html

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

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

XXX1: "ls" op in fs_ops looks a bit inconsistent, but we will be able to
replace it with real fs ops like readdir if it's really worth
XXX2: someone might have to check sys/arch/ia64/stand/efi/libefi/efifs_ls.c
 1.27 11-Oct-2011  tsutsui branches: 1.27.2; 1.27.6;
Fix "Error occurs, please reset" boot problem on
X68030 + 060turbo in 060 mode, found on NetBSD booth
at OSC 2011 Hiroshima:

- use -D__daddr_t=int32_t for all bootloader files
to avoid 64 bit ops in FFS
- explicitly specify -m68020-60 to avoid 64 bit mulsl/mulul
instructions which need to be handled by 060SP emulation
but not available in 060turbo IPL ROM
(LFS still has uint64_t members even with 32bit daddr_t)

The problem was investigated (at least 1.6.2 bootloaders worked)
by Yasushi Oshima at OSC booth, and fixes have been confirmed
by Y.Sugahara on his 060turbo. Thanks everyone!

Should also be pulled up to netbsd-5.
 1.26 12-Apr-2011  tsutsui Make x68k bootloader to use MI libsa, libkern, and libz Makefiles in
src/sys/lib dirs for maintainability. Tested on X68030, ok from isaki@.
 1.25 19-Mar-2009  tsutsui branches: 1.25.4; 1.25.6;
Remove bcmp() from MD libsa.

XXX: These ports should be rewritten to use MI libsa for maintainability.
 1.24 12-Jan-2009  tsutsui branches: 1.24.2;
- WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- several tweaks to allow build without installed DESTDIR
 1.23 28-Nov-2008  he We now also need globals.c from the common libsa.
 1.22 11-Nov-2007  isaki branches: 1.22.14; 1.22.18; 1.22.24; 1.22.26; 1.22.28;
x68k's floppy is 8*2 sect/cyl, not 18*2 sect/cyl.
 1.21 17-Oct-2007  garbled branches: 1.21.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.20 23-Jun-2007  isaki branches: 1.20.8; 1.20.10; 1.20.14;
Remove _ZLIB_PRIVATE that should have been removed 10 years ago.
 1.19 16-Jan-2006  he branches: 1.19.28; 1.19.30; 1.19.36;
Adapt to use of $S/../common/dist/zlib.
 1.18 27-Dec-2005  he branches: 1.18.2;
Make this build again by using ${S}/../common/lib/libc/Makefile.inc,
after the libc/libkern consolidation.
 1.17 11-Dec-2005  christos merge ktrace-lwp.
 1.16 23-Aug-2003  he branches: 1.16.16;
Add memmove.c, needed by new ufs.c.
 1.15 30-Mar-2003  isaki branches: 1.15.2;
Make it compilable.
see http://mail-index.netbsd.org/source-changes/2003/03/26/0009.html
 1.14 23-Feb-2003  simonb Update for LFSv2 support. Ports that have "bootxx_lfs"-style
bootblocks currently only support LFSv2, but the second level
"boot" program supports both LFS versions.
 1.13 02-Feb-2003  isaki - sys/lib/libsa/ufs_ls.c rev 1.3 needs strrchr.
- sort.
 1.12 25-Jan-2003  isaki Make it compilable with 64bit daddr_t.
 1.11 05-May-2002  isaki libsa/Makefile: Fix rules to create symlinks on read-only source tree.
{boot,libsa,mboot}/Makefile, Makefile.booters:
move that common rule to Makefile.booters
 1.10 12-Dec-2001  tv branches: 1.10.2;
MKfoo=no -> NOfoo
 1.9 02-Dec-2001  minoura Do not install libsa.a
 1.8 14-Nov-2001  tv Work around <bsd.lib.mk> used for kernel libs in other places. Clean up
include paths.
 1.7 31-Oct-2001  thorpej branches: 1.7.2;
Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
 1.6 30-Sep-2001  minoura branches: 1.6.2;
Print daemon image on startup.
(any other missing features?)
 1.5 29-Sep-2001  minoura Implement ls command.
Correct bootdev detection.
Other minor changes.
 1.4 29-Sep-2001  minoura Exclude N/W code.
 1.3 28-Sep-2001  minoura Add changedisk_hook().
 1.2 27-Sep-2001  minoura Add some missing definitions.
 1.1 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.6.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.7.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.7.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.7.2.1 31-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:28:48 +0000
 1.10.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.1 12-Dec-2001  thorpej file Makefile was added on branch kqueue on 2002-01-10 19:50:34 +0000
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.3 15-Nov-2007  yamt sync with head.
 1.16.16.2 03-Sep-2007  yamt sync with head.
 1.16.16.1 21-Jun-2006  yamt sync with head.
 1.18.2.1 01-Feb-2006  yamt sync with head.
 1.19.36.1 26-Jun-2007  garbled Sync with HEAD.
 1.19.30.1 11-Jul-2007  mjf Sync with head.
 1.19.28.2 03-Dec-2007  ad Sync with HEAD.
 1.19.28.1 15-Jul-2007  ad Sync with head.
 1.20.14.1 13-Nov-2007  bouyer Sync with HEAD
 1.20.10.2 09-Jan-2008  matt sync with HEAD
 1.20.10.1 06-Nov-2007  matt sync with HEAD
 1.20.8.1 11-Nov-2007  joerg Sync with HEAD.
 1.21.2.1 19-Nov-2007  mjf Sync with HEAD.
 1.22.28.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1731):
sys/arch/x68k/stand/boot_ufs/Makefile: revision 1.26 via patch
sys/arch/x68k/stand/boot/version: revision 1.4 via patch
sys/arch/x68k/stand/libsa/Makefile: revision 1.27 via patch
sys/arch/x68k/stand/Makefile.booters: revision 1.7 via patch
sys/arch/x68k/stand/boot_ustar/Makefile: revision 1.19 via patch
Fix "Error occurs, please reset" boot problem on
X68030 + 060turbo in 060 mode, found on NetBSD booth
at OSC 2011 Hiroshima:
- use -D__daddr_t=int32_t for all bootloader files
to avoid 64 bit ops in FFS
- explicitly specify -m68020-60 to avoid 64 bit mulsl/mulul
instructions which need to be handled by 060SP emulation
but not available in 060turbo IPL ROM
(LFS still has uint64_t members even with 32bit daddr_t)
The problem was investigated (at least 1.6.2 bootloaders worked)
by Yasushi Oshima at OSC booth, and fixes have been confirmed
by Y.Sugahara on his 060turbo. Thanks everyone!
Should also be pulled up to netbsd-5.
Bump version to denote 060turbo boot fix.
 1.22.26.2 28-Apr-2009  skrll Sync with HEAD.
 1.22.26.1 19-Jan-2009  skrll Sync with HEAD.
 1.22.24.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.22.18.1 04-May-2009  yamt sync with head.
 1.22.14.1 17-Jan-2009  mjf Sync with HEAD.
 1.24.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.4.1 21-Apr-2011  rmind sync with head
 1.27.6.1 18-Feb-2012  mrg merge to -current.
 1.27.2.2 30-Oct-2012  yamt sync with head
 1.27.2.1 17-Apr-2012  yamt sync with head
 1.28.6.2 03-Dec-2017  jdolecek update from HEAD
 1.28.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.28.2.1 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.29.14.2 19-Mar-2016  skrll Sync with HEAD
 1.29.14.1 22-Sep-2015  skrll Sync with HEAD
 1.2 12-Oct-2012  tsutsui First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.

Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.

Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
 1.1 12-Apr-2011  tsutsui branches: 1.1.2; 1.1.6; 1.1.8; 1.1.14; 1.1.18;
Make x68k bootloader to use MI libsa, libkern, and libz Makefiles in
src/sys/lib dirs for maintainability. Tested on X68030, ok from isaki@.
 1.1.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.14.1 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.1.8.1 30-Oct-2012  yamt sync with head
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 12-Apr-2011  jruoho file Makefile.inc was added on branch jruoho-x86intr on 2011-06-06 09:07:03 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 12-Apr-2011  rmind file Makefile.inc was added on branch rmind-uvmplock on 2011-04-21 01:41:31 +0000
 1.4 11-Apr-2011  tsutsui Some KNF. No binary change.
 1.3 07-Apr-2011  isaki Poll the next medium on both drive of #0 and #1.
 1.2 12-Jan-2009  tsutsui branches: 1.2.6; 1.2.8;
- WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- several tweaks to allow build without installed DESTDIR
 1.1 28-Sep-2001  minoura branches: 1.1.4; 1.1.6; 1.1.124; 1.1.128; 1.1.136;
Add changedisk_hook().
 1.1.136.1 19-Jan-2009  skrll Sync with HEAD.
 1.1.128.1 04-May-2009  yamt sync with head.
 1.1.124.1 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 28-Sep-2001  thorpej file chdsk.c was added on branch kqueue on 2002-01-10 19:50:34 +0000
 1.1.4.2 28-Sep-2001  minoura Add changedisk_hook().
 1.1.4.1 28-Sep-2001  minoura file chdsk.c was added on branch nathanw_sa on 2001-09-28 15:19:34 +0000
 1.2.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.6.1 21-Apr-2011  rmind sync with head
 1.6 07-Jan-2024  isaki TAB/space/indent cleanup.
 1.5 21-Nov-2014  christos put back missing paren.
 1.4 20-Nov-2014  christos This now needs clock.h
 1.3 17-Nov-2014  christos PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
 1.2 01-Nov-2012  isaki branches: 1.2.2; 1.2.4;
Remove my local RCS IDs.
 1.1 12-Oct-2012  tsutsui branches: 1.1.2;
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.

Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.

Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
 1.1.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.2 30-Oct-2012  yamt sync with head
 1.1.2.1 12-Oct-2012  yamt file clock.c was added on branch yamt-pagecache on 2012-10-30 17:20:31 +0000
 1.2.4.3 03-Dec-2017  jdolecek update from HEAD
 1.2.4.2 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.1 01-Nov-2012  tls file clock.c was added on branch tls-maxphys on 2012-11-20 03:01:50 +0000
 1.2.2.3 24-Nov-2012  jdc Pull up revisions:
src/sys/arch/x68k/stand/boot_ufs/boot.S revision 1.10
src/sys/arch/x68k/stand/boot/dp8390.c revision 1.2
src/sys/arch/x68k/stand/boot/dp8390.h revision 1.2
src/sys/arch/x68k/stand/boot/if_ne.c revision 1.2
src/sys/arch/x68k/stand/boot/ne.c revision 1.2
src/sys/arch/x68k/stand/libsa/clock.c revision 1.2
src/sys/arch/x68k/stand/netboot/Makefile revision 1.2
src/sys/arch/x68k/stand/netboot/boot.c revision 1.2
src/sys/arch/x68k/stand/netboot/conf.c revision 1.2
src/sys/arch/x68k/stand/bootlogo/MANIFEST delete
src/sys/arch/x68k/stand/bootlogo/netbsd.xpm delete
src/sys/arch/x68k/stand/bootlogo/setbootimg.c delete
src/sys/arch/x68k/stand/bootlogo/xpm2bootimg.c delete
src/sys/arch/x68k/stand/xxboot/boot.S revisions 1.2,1.3
src/sys/arch/x68k/stand/xxboot/bootmain.c revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xx.c revision 1.2
src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/version revision 1.2
src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile revision 1.2
src/sys/arch/x68k/stand/libsa/sdcd.c revision 1.14
(requested by tsutsui in ticket #707).

Fix typo in comment. s/d1/d0/

Remove my local RCS IDs.

Remove x68k/stand/bootlogo/ directory.
It was a tool before the bootloader becomes multi-stage (>10 years ago),
and it does not work anymore today.

Pull fixes in comments from x68k/stand/boot_ufs/boot.S rev 1.9 and 1.10.

Use a correct function name in .globl decl.

- fix comments
- use proper uintNN_t types
- use ANSI function decls
- remove unnecessary function decl
- remove __P()
- misc KNF and cosmetics

- use declarations in <lib/libsa/stand.h>
- remove __P() and some KNF
- remove extern variable decl
- use uintNN_t type

Set *file for FS_OPS() pathname properly in devopen().
Now bootxx_ffsv1 (and other bootxx ufs variants) work properly.

XXX: cd9660_open() in sys/lib/libsa/cd9660.c seems to open a file in
the first entry of root directory if specified path is empty.
Not sure if it's intentional behavoir.

Appease warning "nbmake: ${TOUCHPROG} expands to empty string".

Fix previous; no need to echo dummy command.

Make xxboot for ufs variants actually functional:
- set bootdev properly even on SCSI HD and floppy boot
per SDBOOT/FDBOOT/CDBOOT defines in each Makefile
- always print xxboot name and version
- use IOCS PRINT calls instead of printf to avoid size overflow in DEBUG case
- wrap debug stuff with #ifdef XXBOOT_DEBUG
- bump version to denote changes
Mostly taken from old boot_ufs.

XXX: xxboot_lfs[12] are untested.

Make sure to initialize partition offset in cdopen(),
i.e. fix an uninitialized auto variable which happened
to be zero on XM6i emulator.

Now cdboot also works on real X68030.
 1.2.2.2 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.2.2.1 01-Nov-2012  riz file clock.c was added on branch netbsd-6 on 2012-11-18 19:05:20 +0000
 1.12 07-Jan-2024  isaki TAB/space/indent cleanup.
 1.11 17-Oct-2014  snj There's an r in "determine"
 1.10 12-Oct-2012  tsutsui Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.

The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
 1.9 17-Jul-2011  joerg branches: 1.9.2; 1.9.8; 1.9.12;
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.8 12-Apr-2011  tsutsui Make x68k bootloader to use MI libsa, libkern, and libz Makefiles in
src/sys/lib dirs for maintainability. Tested on X68030, ok from isaki@.
 1.7 11-Apr-2011  tsutsui Some KNF. No binary change.
 1.6 11-Apr-2011  tsutsui Add missing breaks. No need to output to SERIAL on ITE console.
 1.5 11-Nov-2007  isaki branches: 1.5.40; 1.5.46;
Style fix.
 1.4 02-Dec-2001  minoura branches: 1.4.2; 1.4.34; 1.4.76; 1.4.94; 1.4.96; 1.4.100; 1.4.102;
Small message fixes.
 1.3 30-Sep-2001  minoura branches: 1.3.4;
Print daemon image on startup.
(any other missing features?)
 1.2 28-Sep-2001  minoura Message cosmetics.
 1.1 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.3.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 30-Sep-2001  nathanw file consio.c was added on branch nathanw_sa on 2002-01-08 00:28:48 +0000
 1.4.102.1 19-Nov-2007  mjf Sync with HEAD.
 1.4.100.1 13-Nov-2007  bouyer Sync with HEAD
 1.4.96.1 09-Jan-2008  matt sync with HEAD
 1.4.94.1 11-Nov-2007  joerg Sync with HEAD.
 1.4.76.1 03-Dec-2007  ad Sync with HEAD.
 1.4.34.1 15-Nov-2007  yamt sync with head.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 02-Dec-2001  thorpej file consio.c was added on branch kqueue on 2002-01-10 19:50:35 +0000
 1.5.46.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.40.1 21-Apr-2011  rmind sync with head
 1.9.12.2 03-Dec-2017  jdolecek update from HEAD
 1.9.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.8.1 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.9.2.1 30-Oct-2012  yamt sync with head
 1.3 11-Apr-2011  tsutsui Some KNF. No binary change.
 1.2 11-Apr-2011  tsutsui Fix pasto. Now serial console output on bootloader works properly
after ~decade. ok from minoura@
 1.1 27-Sep-2001  minoura branches: 1.1.4; 1.1.6; 1.1.150; 1.1.156;
libsa for the new bootloader of x68k port.
 1.1.156.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.150.1 21-Apr-2011  rmind sync with head
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 27-Sep-2001  thorpej file consio.h was added on branch kqueue on 2002-01-10 19:50:35 +0000
 1.1.4.2 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.1.4.1 27-Sep-2001  minoura file consio.h was added on branch nathanw_sa on 2001-09-27 10:03:28 +0000
 1.7 26-Jun-2016  isaki Add SCSI host adaptor selector to "boot" command of /boot.
By this function, /boot which booted from non-SCSI
(in other words, floppy) can load SCSI kernel.
Now, single /boot can load kernel of all supported filesystems
of all supported boot devices.

---
New "boot" command's syntax is: boot [hostadaptor@][dev:][file]

If you booted from SCSI, hostadaptor is already set (from IOCS)
and you can omit hostadaptor in this case. You can type like
"boot sd0a:netbsd" as before.

If you booted from floppy (hostadaptor is not set) and want to
load the SCSI kernel (hostadaptor is needed), you have to select
your hostadaptor in boot command, like "boot spc0@sd0a:netbsd".
 1.6 12-Oct-2012  tsutsui branches: 1.6.14;
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.

Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.

Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
 1.5 11-Apr-2011  tsutsui branches: 1.5.4; 1.5.10; 1.5.14;
Some KNF. No binary change.
 1.4 11-Nov-2007  isaki branches: 1.4.40; 1.4.46;
Style fix.
 1.3 10-May-2006  skrll branches: 1.3.18; 1.3.36; 1.3.38; 1.3.42; 1.3.44;
Fix a bunch of cast lvalues.
 1.2 29-Sep-2001  minoura branches: 1.2.4; 1.2.6; 1.2.38; 1.2.52; 1.2.54; 1.2.56; 1.2.58; 1.2.60;
Implement ls command.
Correct bootdev detection.
Other minor changes.
 1.1 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.2.60.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.58.1 11-May-2006  elad sync with head
 1.2.56.1 24-May-2006  yamt sync with head.
 1.2.54.1 01-Jun-2006  kardel Sync with head.
 1.2.52.1 09-Sep-2006  rpaulo sync with head
 1.2.38.2 15-Nov-2007  yamt sync with head.
 1.2.38.1 21-Jun-2006  yamt sync with head.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 29-Sep-2001  thorpej file devopen.c was added on branch kqueue on 2002-01-10 19:50:35 +0000
 1.2.4.2 29-Sep-2001  minoura Implement ls command.
Correct bootdev detection.
Other minor changes.
 1.2.4.1 29-Sep-2001  minoura file devopen.c was added on branch nathanw_sa on 2001-09-29 03:50:14 +0000
 1.3.44.1 19-Nov-2007  mjf Sync with HEAD.
 1.3.42.1 13-Nov-2007  bouyer Sync with HEAD
 1.3.38.1 09-Jan-2008  matt sync with HEAD
 1.3.36.1 11-Nov-2007  joerg Sync with HEAD.
 1.3.18.1 03-Dec-2007  ad Sync with HEAD.
 1.4.46.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.40.1 21-Apr-2011  rmind sync with head
 1.5.14.2 03-Dec-2017  jdolecek update from HEAD
 1.5.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.10.1 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.5.4.1 30-Oct-2012  yamt sync with head
 1.6.14.1 09-Jul-2016  skrll Sync with HEAD
 1.9 07-Jan-2024  isaki TAB/space/indent cleanup.
 1.8 08-Mar-2014  isaki Unused variable, for GCC4.8.
 1.7 17-Jul-2011  joerg branches: 1.7.2; 1.7.12; 1.7.16;
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.6 11-Apr-2011  tsutsui Some KNF. No binary change.
 1.5 18-Nov-2007  isaki branches: 1.5.40; 1.5.46;
Use the same prototypes as libx68k.h.
 1.4 11-Nov-2007  isaki Style fix.
 1.3 25-Jan-2006  christos branches: 1.3.28; 1.3.46; 1.3.48; 1.3.52; 1.3.54;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 15-Oct-2001  minoura branches: 1.2.4; 1.2.6; 1.2.38; 1.2.50;
Prepare to set WARNS=2.
 1.1 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.2.50.1 01-Feb-2006  yamt sync with head.
 1.2.38.3 07-Dec-2007  yamt sync with head
 1.2.38.2 15-Nov-2007  yamt sync with head.
 1.2.38.1 21-Jun-2006  yamt sync with head.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 15-Oct-2001  thorpej file fd.c was added on branch kqueue on 2002-01-10 19:50:36 +0000
 1.2.4.2 15-Oct-2001  minoura Prepare to set WARNS=2.
 1.2.4.1 15-Oct-2001  minoura file fd.c was added on branch nathanw_sa on 2001-10-15 16:13:41 +0000
 1.3.54.1 19-Nov-2007  mjf Sync with HEAD.
 1.3.52.2 18-Nov-2007  bouyer Sync with HEAD
 1.3.52.1 13-Nov-2007  bouyer Sync with HEAD
 1.3.48.1 09-Jan-2008  matt sync with HEAD
 1.3.46.2 21-Nov-2007  joerg Sync with HEAD.
 1.3.46.1 11-Nov-2007  joerg Sync with HEAD.
 1.3.28.1 03-Dec-2007  ad Sync with HEAD.
 1.5.46.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.40.1 21-Apr-2011  rmind sync with head
 1.7.16.1 18-May-2014  rmind sync with head
 1.7.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.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 07-Jan-2024  isaki TAB/space/indent cleanup.
 1.1 27-Sep-2001  minoura branches: 1.1.4; 1.1.6;
libsa for the new bootloader of x68k port.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 27-Sep-2001  thorpej file fdsub.S was added on branch kqueue on 2002-01-10 19:50:36 +0000
 1.1.4.2 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.1.4.1 27-Sep-2001  minoura file fdsub.S was added on branch nathanw_sa on 2001-09-27 10:03:29 +0000
 1.2 11-Nov-2007  isaki Style fix.
 1.1 27-Sep-2001  minoura branches: 1.1.4; 1.1.6; 1.1.38; 1.1.80; 1.1.98; 1.1.100; 1.1.104; 1.1.106;
libsa for the new bootloader of x68k port.
 1.1.106.1 19-Nov-2007  mjf Sync with HEAD.
 1.1.104.1 13-Nov-2007  bouyer Sync with HEAD
 1.1.100.1 09-Jan-2008  matt sync with HEAD
 1.1.98.1 11-Nov-2007  joerg Sync with HEAD.
 1.1.80.1 03-Dec-2007  ad Sync with HEAD.
 1.1.38.1 15-Nov-2007  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 27-Sep-2001  thorpej file fdvar.h was added on branch kqueue on 2002-01-10 19:50:37 +0000
 1.1.4.2 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.1.4.1 27-Sep-2001  minoura file fdvar.h was added on branch nathanw_sa on 2001-09-27 10:03:29 +0000
 1.8 23-Jun-2022  isaki x68k/stand: Merge {sd,cd}strategy and {sd,cd}close respectively.
For sd and cd devs, only open differs and the rest is the same.
No functional changes intended.
Suggested by tsutsui@ at port-x68k.
 1.7 26-Jun-2016  isaki Add SCSI host adaptor selector to "boot" command of /boot.
By this function, /boot which booted from non-SCSI
(in other words, floppy) can load SCSI kernel.
Now, single /boot can load kernel of all supported filesystems
of all supported boot devices.

---
New "boot" command's syntax is: boot [hostadaptor@][dev:][file]

If you booted from SCSI, hostadaptor is already set (from IOCS)
and you can omit hostadaptor in this case. You can type like
"boot sd0a:netbsd" as before.

If you booted from floppy (hostadaptor is not set) and want to
load the SCSI kernel (hostadaptor is needed), you have to select
your hostadaptor in boot command, like "boot spc0@sd0a:netbsd".
 1.6 12-Oct-2012  tsutsui branches: 1.6.14;
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.

Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.

Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
 1.5 18-Nov-2007  isaki branches: 1.5.52; 1.5.58; 1.5.62;
Correct filename in a comment.
 1.4 11-Nov-2007  isaki Style fix.
 1.3 15-Oct-2001  minoura branches: 1.3.4; 1.3.6; 1.3.38; 1.3.80; 1.3.98; 1.3.100; 1.3.104; 1.3.106;
Prepare to set WARNS=2.
 1.2 29-Sep-2001  minoura Implement ls command.
Correct bootdev detection.
Other minor changes.
 1.1 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.3.106.1 19-Nov-2007  mjf Sync with HEAD.
 1.3.104.2 18-Nov-2007  bouyer Sync with HEAD
 1.3.104.1 13-Nov-2007  bouyer Sync with HEAD
 1.3.100.1 09-Jan-2008  matt sync with HEAD
 1.3.98.2 21-Nov-2007  joerg Sync with HEAD.
 1.3.98.1 11-Nov-2007  joerg Sync with HEAD.
 1.3.80.1 03-Dec-2007  ad Sync with HEAD.
 1.3.38.2 07-Dec-2007  yamt sync with head
 1.3.38.1 15-Nov-2007  yamt sync with head.
 1.3.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.6.1 15-Oct-2001  thorpej file libx68k.h was added on branch kqueue on 2002-01-10 19:50:37 +0000
 1.3.4.2 15-Oct-2001  minoura Prepare to set WARNS=2.
 1.3.4.1 15-Oct-2001  minoura file libx68k.h was added on branch nathanw_sa on 2001-10-15 16:13:41 +0000
 1.5.62.2 03-Dec-2017  jdolecek update from HEAD
 1.5.62.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.58.1 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.5.52.1 30-Oct-2012  yamt sync with head
 1.6.14.1 09-Jul-2016  skrll Sync with HEAD
 1.4 07-Jan-2024  isaki TAB/space/indent cleanup.
 1.3 31-May-2016  dholland PR 51194 David Binderman: simplify redundant conditional
 1.2 11-Nov-2007  isaki branches: 1.2.62; 1.2.82;
Style fix.
 1.1 27-Sep-2001  minoura branches: 1.1.4; 1.1.6; 1.1.38; 1.1.80; 1.1.98; 1.1.100; 1.1.104; 1.1.106;
libsa for the new bootloader of x68k port.
 1.1.106.1 19-Nov-2007  mjf Sync with HEAD.
 1.1.104.1 13-Nov-2007  bouyer Sync with HEAD
 1.1.100.1 09-Jan-2008  matt sync with HEAD
 1.1.98.1 11-Nov-2007  joerg Sync with HEAD.
 1.1.80.1 03-Dec-2007  ad Sync with HEAD.
 1.1.38.1 15-Nov-2007  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 27-Sep-2001  thorpej file parseutils.c was added on branch kqueue on 2002-01-10 19:50:37 +0000
 1.1.4.2 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.1.4.1 27-Sep-2001  minoura file parseutils.c was added on branch nathanw_sa on 2001-09-27 10:03:29 +0000
 1.2.82.1 09-Jul-2016  skrll Sync with HEAD
 1.2.62.1 03-Dec-2017  jdolecek update from HEAD
 1.5 25-Nov-2012  isaki Make the end of image address absolute-long.
It allows to locate the end of image higher than 0x10000.
 1.4 21-Feb-2011  itohy branches: 1.4.4; 1.4.14;
Cleanup my copyright notice.
 1.3 11-Dec-2005  christos branches: 1.3.100; 1.3.106; 1.3.108;
merge ktrace-lwp.
 1.2 04-Dec-2003  keihan netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.
 1.1 30-Sep-2001  minoura branches: 1.1.4; 1.1.6; 1.1.22;
Print daemon image on startup.
(any other missing features?)
 1.1.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.22.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 30-Sep-2001  thorpej file putimage.S was added on branch kqueue on 2002-01-10 19:50:37 +0000
 1.1.4.2 30-Sep-2001  minoura Print daemon image on startup.
(any other missing features?)
 1.1.4.1 30-Sep-2001  minoura file putimage.S was added on branch nathanw_sa on 2001-09-30 15:54:39 +0000
 1.3.108.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.100.1 05-Mar-2011  rmind sync with head
 1.4.14.1 25-Feb-2013  tls resync with head
 1.4.4.1 16-Jan-2013  yamt sync with (a bit old) head
 1.19 07-Jan-2024  isaki TAB/space/indent cleanup.
 1.18 23-Jun-2022  isaki x68k/stand: Merge {sd,cd}strategy and {sd,cd}close respectively.
For sd and cd devs, only open differs and the rest is the same.
No functional changes intended.
Suggested by tsutsui@ at port-x68k.
 1.17 21-Jun-2022  isaki x68k/stand: Correct blocksize in case of CD.
- Fix calculation of the blocksize passes to SCSI IOCS.
- Use three kind of sector size (blocksize) properly; media's sector size,
DEV_BSIZE from xxstrategy, and Human68k's sector size.
By this change,
- For 512 bytes/sector HDD, no changes are intended.
- For CD, corrects the blocksize (%d5) passes to SCSI IOCS.
It has worked previously though the blocksize was incorrect. Now it
works with correct blocksize.
- As a secondary effect, 256 or 1024 bytes/sector media may work but not
well tested.
Reviewed by tsutsui@ at port-x68k.
 1.16 21-Jun-2022  isaki x68k/stand: Correct a condition expression.
- start is LBA but dblk is relative from this partition.
- The first term was wrong. It should be '(x & 0x1fffff) == x', but
it's more simple to use numerical comparison.
There would have been no impact.
 1.15 11-Feb-2014  tsutsui Specify default SCSI inquiry size (36 bytes) on IOCS_S_INQUIRY() command.

X680x0 SCSI IOCS stalls if SCSI device doesn't return inquiry data
of specified allocation length size on the INQUIRY command,
and it causes hangup on the XM6 based emulators that return only
upto 36 byte inquiry data on SCSI disk emulation.

Many real SCSI-2 hard drives seem to support >100 byte inquiry data,
but at least there is a harddisk that returns only supported inquiry
data size and quits transfer.

The bootloader checks only the device type and there is no reason
to read 100 bytes that includes vender specific data.

Analyzed and reported by GIMONS, a developer of XM6 TypeG emulator,
which also can run NetBSD/x68k.
 1.14 22-Nov-2012  tsutsui branches: 1.14.2;
Make sure to initialize partition offset in cdopen(),
i.e. fix an uninitialized auto variable which happened
to be zero on XM6i emulator.

Now cdboot also works on real X68030.
 1.13 19-Jun-2012  minoura branches: 1.13.2;
Fix CD support (again!).
 1.12 20-Mar-2012  minoura Fix CD support.
 1.11 17-Jul-2011  joerg branches: 1.11.2; 1.11.6; 1.11.8;
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.10 09-Jul-2011  mrg don't assign sc->sc_partinfo.size to itself.
 1.9 11-Apr-2011  tsutsui Some KNF. No binary change.
 1.8 18-Nov-2007  isaki branches: 1.8.40; 1.8.46;
Use the same prototypes as libx68k.h.
 1.7 11-Nov-2007  isaki Style fix.
 1.6 25-Jan-2006  christos branches: 1.6.28; 1.6.46; 1.6.48; 1.6.52; 1.6.54;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.5 07-Jan-2002  minoura branches: 1.5.2; 1.5.34; 1.5.46;
alloca() is now defined in libkern.h.
 1.4 15-Oct-2001  minoura branches: 1.4.4;
Prepare to set WARNS=2.
 1.3 15-Oct-2001  minoura set current_id properly.
 1.2 29-Sep-2001  minoura Implement ls command.
Correct bootdev detection.
Other minor changes.
 1.1 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.4.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.2 11-Jan-2002  nathanw More catchup.
 1.4.4.1 15-Oct-2001  nathanw file sdcd.c was added on branch nathanw_sa on 2002-01-11 23:38:47 +0000
 1.5.46.1 01-Feb-2006  yamt sync with head.
 1.5.34.3 07-Dec-2007  yamt sync with head
 1.5.34.2 15-Nov-2007  yamt sync with head.
 1.5.34.1 21-Jun-2006  yamt sync with head.
 1.5.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1 07-Jan-2002  thorpej file sdcd.c was added on branch kqueue on 2002-01-10 19:50:38 +0000
 1.6.54.1 19-Nov-2007  mjf Sync with HEAD.
 1.6.52.2 18-Nov-2007  bouyer Sync with HEAD
 1.6.52.1 13-Nov-2007  bouyer Sync with HEAD
 1.6.48.1 09-Jan-2008  matt sync with HEAD
 1.6.46.2 21-Nov-2007  joerg Sync with HEAD.
 1.6.46.1 11-Nov-2007  joerg Sync with HEAD.
 1.6.28.1 03-Dec-2007  ad Sync with HEAD.
 1.8.46.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.40.1 21-Apr-2011  rmind sync with head
 1.11.8.2 24-Nov-2012  jdc Pull up revisions:
src/sys/arch/x68k/stand/boot_ufs/boot.S revision 1.10
src/sys/arch/x68k/stand/boot/dp8390.c revision 1.2
src/sys/arch/x68k/stand/boot/dp8390.h revision 1.2
src/sys/arch/x68k/stand/boot/if_ne.c revision 1.2
src/sys/arch/x68k/stand/boot/ne.c revision 1.2
src/sys/arch/x68k/stand/libsa/clock.c revision 1.2
src/sys/arch/x68k/stand/netboot/Makefile revision 1.2
src/sys/arch/x68k/stand/netboot/boot.c revision 1.2
src/sys/arch/x68k/stand/netboot/conf.c revision 1.2
src/sys/arch/x68k/stand/bootlogo/MANIFEST delete
src/sys/arch/x68k/stand/bootlogo/netbsd.xpm delete
src/sys/arch/x68k/stand/bootlogo/setbootimg.c delete
src/sys/arch/x68k/stand/bootlogo/xpm2bootimg.c delete
src/sys/arch/x68k/stand/xxboot/boot.S revisions 1.2,1.3
src/sys/arch/x68k/stand/xxboot/bootmain.c revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xx.c revision 1.2
src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/version revision 1.2
src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile revision 1.2
src/sys/arch/x68k/stand/libsa/sdcd.c revision 1.14
(requested by tsutsui in ticket #707).

Fix typo in comment. s/d1/d0/

Remove my local RCS IDs.

Remove x68k/stand/bootlogo/ directory.
It was a tool before the bootloader becomes multi-stage (>10 years ago),
and it does not work anymore today.

Pull fixes in comments from x68k/stand/boot_ufs/boot.S rev 1.9 and 1.10.

Use a correct function name in .globl decl.

- fix comments
- use proper uintNN_t types
- use ANSI function decls
- remove unnecessary function decl
- remove __P()
- misc KNF and cosmetics

- use declarations in <lib/libsa/stand.h>
- remove __P() and some KNF
- remove extern variable decl
- use uintNN_t type

Set *file for FS_OPS() pathname properly in devopen().
Now bootxx_ffsv1 (and other bootxx ufs variants) work properly.

XXX: cd9660_open() in sys/lib/libsa/cd9660.c seems to open a file in
the first entry of root directory if specified path is empty.
Not sure if it's intentional behavoir.

Appease warning "nbmake: ${TOUCHPROG} expands to empty string".

Fix previous; no need to echo dummy command.

Make xxboot for ufs variants actually functional:
- set bootdev properly even on SCSI HD and floppy boot
per SDBOOT/FDBOOT/CDBOOT defines in each Makefile
- always print xxboot name and version
- use IOCS PRINT calls instead of printf to avoid size overflow in DEBUG case
- wrap debug stuff with #ifdef XXBOOT_DEBUG
- bump version to denote changes
Mostly taken from old boot_ufs.

XXX: xxboot_lfs[12] are untested.

Make sure to initialize partition offset in cdopen(),
i.e. fix an uninitialized auto variable which happened
to be zero on XM6i emulator.

Now cdboot also works on real X68030.
 1.11.8.1 18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.11.6.1 05-Apr-2012  mrg sync to latest -current.
 1.11.2.4 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.11.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.11.2.2 30-Oct-2012  yamt sync with head
 1.11.2.1 17-Apr-2012  yamt sync with head
 1.13.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1 25-Feb-2013  tls resync with head
 1.14.2.1 18-May-2014  rmind sync with head
 1.2 11-Apr-2011  tsutsui Some KNF. No binary change.
 1.1 27-Sep-2001  minoura branches: 1.1.4; 1.1.6; 1.1.150; 1.1.156;
libsa for the new bootloader of x68k port.
 1.1.156.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.150.1 21-Apr-2011  rmind sync with head
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 27-Sep-2001  thorpej file sdcdvar.h was added on branch kqueue on 2002-01-10 19:50:38 +0000
 1.1.4.2 27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.1.4.1 27-Sep-2001  minoura file sdcdvar.h was added on branch nathanw_sa on 2001-09-27 10:03:29 +0000

RSS XML Feed