head	1.7;
access;
symbols
	netbsd-11-0-RC4:1.7
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.58
	netbsd-11-base:1.7
	netbsd-10-1-RELEASE:1.7
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.56
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.7
	netbsd-10-0-RELEASE:1.7
	netbsd-10-0-RC6:1.7
	netbsd-10-0-RC5:1.7
	netbsd-10-0-RC4:1.7
	netbsd-10-0-RC3:1.7
	netbsd-10-0-RC2:1.7
	thorpej-ifq:1.7.0.54
	thorpej-ifq-base:1.7
	thorpej-altq-separation:1.7.0.52
	thorpej-altq-separation-base:1.7
	netbsd-10-0-RC1:1.7
	netbsd-10:1.7.0.50
	netbsd-10-base:1.7
	bouyer-sunxi-drm:1.7.0.48
	bouyer-sunxi-drm-base:1.7
	netbsd-9-3-RELEASE:1.7
	thorpej-i2c-spi-conf2:1.7.0.46
	thorpej-i2c-spi-conf2-base:1.7
	thorpej-futex2:1.7.0.44
	thorpej-futex2-base:1.7
	thorpej-cfargs2:1.7.0.42
	thorpej-cfargs2-base:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.40
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.7
	cjep_staticlib_x:1.7.0.38
	cjep_staticlib_x-base:1.7
	thorpej-i2c-spi-conf:1.7.0.36
	thorpej-i2c-spi-conf-base:1.7
	thorpej-cfargs:1.7.0.34
	thorpej-cfargs-base:1.7
	thorpej-futex:1.7.0.32
	thorpej-futex-base:1.7
	netbsd-9-1-RELEASE:1.7
	bouyer-xenpvh-base2:1.7
	phil-wifi-20200421:1.7
	bouyer-xenpvh-base1:1.7
	phil-wifi-20200411:1.7
	bouyer-xenpvh:1.7.0.30
	bouyer-xenpvh-base:1.7
	is-mlppp:1.7.0.28
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.7
	ad-namecache-base3:1.7
	netbsd-9-0-RELEASE:1.7
	netbsd-9-0-RC2:1.7
	ad-namecache-base2:1.7
	ad-namecache-base1:1.7
	ad-namecache:1.7.0.26
	ad-namecache-base:1.7
	netbsd-9-0-RC1:1.7
	phil-wifi-20191119:1.7
	netbsd-9:1.7.0.24
	netbsd-9-base:1.7
	phil-wifi-20190609:1.7
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	isaki-audio2:1.7.0.22
	isaki-audio2-base:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.6
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.20
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.6
	pgoyette-compat:1.7.0.18
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.6
	tls-maxphys:1.7.0.16
	tls-maxphys-base-20171202:1.7
	matt-nb8-mediatek:1.7.0.14
	matt-nb8-mediatek-base:1.7
	nick-nhusb-base-20170825:1.7
	perseant-stdc-iso10646:1.7.0.12
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.10
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.8
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	jdolecek-ncq:1.7.0.6
	jdolecek-ncq-base:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.6.0.10
	netbsd-7-1-RELEASE:1.6
	netbsd-7-1-RC2:1.6
	nick-nhusb-base-20170204:1.7
	netbsd-7-nhusb-base-20170116:1.6
	bouyer-socketcan:1.7.0.4
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.6
	nick-nhusb-base-20161204:1.7
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.6
	nick-nhusb-base-20161004:1.7
	localcount-20160914:1.7
	netbsd-7-nhusb:1.6.0.8
	netbsd-7-nhusb-base:1.6
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.2
	pgoyette-localcount-base:1.7
	nick-nhusb-base-20160907:1.7
	nick-nhusb-base-20160529:1.6
	netbsd-7-0-1-RELEASE:1.6
	nick-nhusb-base-20160422:1.6
	nick-nhusb-base-20160319:1.6
	nick-nhusb-base-20151226:1.6
	netbsd-7-0:1.6.0.6
	netbsd-7-0-RELEASE:1.6
	nick-nhusb-base-20150921:1.6
	netbsd-7-0-RC3:1.6
	netbsd-7-0-RC2:1.6
	netbsd-7-0-RC1:1.6
	nick-nhusb-base-20150606:1.6
	nick-nhusb-base-20150406:1.6
	nick-nhusb:1.6.0.4
	nick-nhusb-base:1.6
	netbsd-6-1-5-RELEASE:1.2.2.3
	netbsd-7:1.6.0.2
	netbsd-7-base:1.6
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.1.2.3
	netbsd-6-1-4-RELEASE:1.2.2.3
	tls-earlyentropy:1.2.0.12
	tls-earlyentropy-base:1.6
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-6-1-3-RELEASE:1.2.2.3
	netbsd-6-1-2-RELEASE:1.2.2.3
	rmind-smpnet-nbase:1.2
	netbsd-6-1-1-RELEASE:1.2.2.3
	riastradh-drm2-base2:1.2
	riastradh-drm2-base1:1.2
	riastradh-drm2:1.2.0.10
	riastradh-drm2-base:1.2
	rmind-smpnet:1.2.0.4
	rmind-smpnet-base:1.2
	netbsd-6-1:1.2.2.3.0.2
	netbsd-6-1-RELEASE:1.2.2.3
	khorben-n900:1.2.0.8
	netbsd-6-1-RC4:1.2.2.3
	netbsd-6-1-RC3:1.2.2.3
	agc-symver:1.2.0.6
	agc-symver-base:1.2
	netbsd-6-1-RC2:1.2.2.3
	netbsd-6-1-RC1:1.2.2.3
	yamt-pagecache-base8:1.2
	yamt-pagecache-base7:1.2
	tls-maxphys-base:1.6
	netbsd-6:1.2.0.2
	yamt-pagecache:1.1.0.2
	yamt-pagecache-base6:1.1;
locks; strict;
comment	@# @;


1.7
date	2016.06.25.14.35.58;	author isaki;	state Exp;
branches
	1.7.16.1;
next	1.6;
commitid	s6FUnVAXMuiK8Rbz;

1.6
date	2014.08.08.15.19.51;	author isaki;	state Exp;
branches
	1.6.4.1;
next	1.5;
commitid	wOh0V97Vncs8tzLx;

1.5
date	2014.08.06.14.10.42;	author isaki;	state Exp;
branches;
next	1.4;
commitid	bJfOdFUAasTr9jLx;

1.4
date	2014.08.05.13.49.04;	author isaki;	state Exp;
branches;
next	1.3;
commitid	JBcu94wfTQPy3bLx;

1.3
date	2014.07.06.06.28.49;	author tsutsui;	state Exp;
branches;
next	1.2;
commitid	gqXGmURiQ7StAhHx;

1.2
date	2012.11.01.14.46.26;	author isaki;	state Exp;
branches
	1.2.2.1
	1.2.12.1;
next	1.1;

1.1
date	2012.10.12.20.15.53;	author tsutsui;	state Exp;
branches
	1.1.2.1;
next	;

1.7.16.1
date	2016.06.25.14.35.58;	author jdolecek;	state dead;
branches;
next	1.7.16.2;
commitid	XcIYRZTAh1LmerhA;

1.7.16.2
date	2017.12.03.11.36.49;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.6.4.1
date	2016.07.09.20.24.59;	author skrll;	state Exp;
branches;
next	;
commitid	6Uo6zNa4c5W4AGdz;

1.2.2.1
date	2012.11.01.14.46.26;	author riz;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2012.11.18.19.05.22;	author riz;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2012.11.24.20.20.26;	author jdc;	state Exp;
branches;
next	;

1.2.12.1
date	2014.08.10.06.54.10;	author tls;	state Exp;
branches;
next	;
commitid	7fY3uHKSIbCABMLx;

1.1.2.1
date	2012.10.12.20.15.53;	author yamt;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2012.10.30.17.20.31;	author yamt;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2013.01.16.05.33.08;	author yamt;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Unify netboot and boot (into boot).
Now boot becomes to be able to load the NFS kernel and
netboot also becomes to be able to load the local kernel.
The only difference is the default kernel which loads.
I.e., netboot's default is nfs.

Bump boot_ustar's BOOT_MAXSIZE.
@
text
@#	$NetBSD: Makefile,v 1.6 2014/08/08 15:19:51 isaki Exp $

# stand/netboot is identical with stand/boot
# except that the default kernel which loads is nfs.

PROG=		netboot
CPPFLAGS+=	-DNETBOOT

.include "../boot/Makefile"
@


1.7.16.1
log
@file Makefile was added on branch tls-maxphys on 2017-12-03 11:36:49 +0000
@
text
@d1 9
@


1.7.16.2
log
@update from HEAD
@
text
@a0 9
#	$NetBSD$

# stand/netboot is identical with stand/boot
# except that the default kernel which loads is nfs.

PROG=		netboot
CPPFLAGS+=	-DNETBOOT

.include "../boot/Makefile"
@


1.6
log
@Remove STRIP?=strip.
Falling back to the hosttool is not a good way now.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2014/08/06 14:10:42 isaki Exp $
d3 2
a4 15
NOMAN=		# defined

.include <bsd.own.mk>

BOOT=		Netboot
VERSIONFILE=	${.CURDIR}/version
VERSION!=	${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \
			END { print it }' ${VERSIONFILE}
NEWVERSWHAT=	"${BOOT}"

# text address
TEXT=		006000

# RTC offset
RTC_OFFSET=	-540
a6 28
BINDIR=		/usr/mdec
BINMODE=	444
STRIPFLAG=

BFDNAME=	a.out-m68k-netbsd

# XXX shared sources should be in COMMONDIR
BOOTDIR=	${.CURDIR}/../boot
.PATH:		${BOOTDIR}

SRCS=		srt0.S boot.c conf.c switch.c exec_image.S if_ne.c ne.c dp8390.c
S=		${.CURDIR}/../../../..
M=		${.CURDIR}/../..
COMMONDIR=	$M/stand/common
.PATH:		${COMMONDIR}

SRCS+=		vers.c
CLEANFILES+=	vers.c
vers.c:	${VERSIONFILE}
	${_MKTARGET_CREATE}
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT}

CPPFLAGS+=	-nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa
CPPFLAGS+=	-I$M/stand/libiocs -I${COMMONDIR}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
CPPFLAGS+=	-DTEXTADDR="0x${TEXT}" 
CPPFLAGS+=	-DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\"
a7 21
CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
CPPFLAGS+=	-DRTC_OFFSET=${RTC_OFFSET}
CPPFLAGS+=	-DSUPPORT_BOOTP -DSUPPORT_DHCP
#CPPFLAGS+=	-DDEBUG
CFLAGS=		-Wno-main -Os -m68020-60
LINKFLAGS=	-N -static -T ${BOOTDIR}/boot.ldscript
LIBIOCS!=	cd $M/stand/libiocs && ${PRINTOBJDIR}
LIBSA!=		cd $M/stand/libsa && ${PRINTOBJDIR}
L=		${LIBSA}/lib
LDLIBS= 	${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
LDLIBS+=	${LIBIOCS}/libiocs.a

.include "../Makefile.booters"

realall: ${PROG}
${PROG}:	${OBJS} ${LDLIBS}
	${_MKTARGET_LINK}
	${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS}
	${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym

CLEANFILES+=	${PROG}.sym
d9 1
a9 1
.include <bsd.prog.mk>
@


1.6.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2016/06/25 14:35:58 isaki Exp $
d3 15
a17 2
# stand/netboot is identical with stand/boot
# except that the default kernel which loads is nfs.
d20 28
d49 21
d71 1
a71 1
.include "../boot/Makefile"
@


1.5
log
@Remove unused variable.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2014/08/05 13:49:04 isaki Exp $
a24 1
STRIP?=		/usr/bin/strip
@


1.4
log
@Support a 'switch' command.
It displays/modifies some SRAM parameters on X680x0, like as
memswitch(1) or Human68k's SWITCH.X .
It makes easy to change the boot devices or correct the inconsistency
of SRAM/real memory size.

sample usage:
 > switch show         .. show all supported parameters
 > switch boot=std     .. set boot order to 'STD'
 > switch memory=12    .. set memory size to 12MB
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2014/07/06 06:28:49 tsutsui Exp $
a25 1
OBJCOPY?=	/usr/bin/objcopy
@


1.3
log
@Merge and share boot.c between normal boot and netboot by dumb #ifdefs.

Tested on XM6i.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2012/11/01 14:46:26 isaki Exp $
d32 1
a32 1
SRCS=		srt0.S boot.c conf.c exec_image.S if_ne.c ne.c dp8390.c
@


1.2
log
@Remove my local RCS IDs.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2012/10/12 20:15:53 tsutsui Exp $
d50 1
d54 1
@


1.2.12.1
log
@Rebase.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2014/08/08 15:19:51 isaki Exp $
d25 2
d32 1
a32 1
SRCS=		srt0.S boot.c conf.c switch.c exec_image.S if_ne.c ne.c dp8390.c
a49 1
CPPFLAGS+=	-DNETBOOT
a52 1
#CPPFLAGS+=	-DDEBUG
@


1.2.2.1
log
@file Makefile was added on branch netbsd-6 on 2012-11-18 19:05:21 +0000
@
text
@d1 71
@


1.2.2.2
log
@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.
@
text
@a0 72
#	$NetBSD: Makefile,v 1.1 2012/10/12 20:15:53 tsutsui Exp $
#	Id: Makefile,v 1.14 2011/10/04 12:59:33 isaki Exp 

NOMAN=		# defined

.include <bsd.own.mk>

BOOT=		Netboot
VERSIONFILE=	${.CURDIR}/version
VERSION!=	${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \
			END { print it }' ${VERSIONFILE}
NEWVERSWHAT=	"${BOOT}"

# text address
TEXT=		006000

# RTC offset
RTC_OFFSET=	-540

PROG=		netboot
BINDIR=		/usr/mdec
BINMODE=	444
STRIPFLAG=

BFDNAME=	a.out-m68k-netbsd
STRIP?=		/usr/bin/strip
OBJCOPY?=	/usr/bin/objcopy

# XXX shared sources should be in COMMONDIR
BOOTDIR=	${.CURDIR}/../boot
.PATH:		${BOOTDIR}

SRCS=		srt0.S boot.c conf.c exec_image.S if_ne.c ne.c dp8390.c
S=		${.CURDIR}/../../../..
M=		${.CURDIR}/../..
COMMONDIR=	$M/stand/common
.PATH:		${COMMONDIR}

SRCS+=		vers.c
CLEANFILES+=	vers.c
vers.c:	${VERSIONFILE}
	${_MKTARGET_CREATE}
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT}

CPPFLAGS+=	-nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa
CPPFLAGS+=	-I$M/stand/libiocs -I${COMMONDIR}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
CPPFLAGS+=	-DTEXTADDR="0x${TEXT}" 
CPPFLAGS+=	-DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\"
CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
CPPFLAGS+=	-DRTC_OFFSET=${RTC_OFFSET}
CPPFLAGS+=	-DSUPPORT_BOOTP -DSUPPORT_DHCP
CFLAGS=		-Wno-main -Os -m68020-60
LINKFLAGS=	-N -static -T ${BOOTDIR}/boot.ldscript
LIBIOCS!=	cd $M/stand/libiocs && ${PRINTOBJDIR}
LIBSA!=		cd $M/stand/libsa && ${PRINTOBJDIR}
L=		${LIBSA}/lib
LDLIBS= 	${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
LDLIBS+=	${LIBIOCS}/libiocs.a

.include "../Makefile.booters"

realall: ${PROG}
${PROG}:	${OBJS} ${LDLIBS}
	${_MKTARGET_LINK}
	${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS}
	${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym

CLEANFILES+=	${PROG}.sym

.include <bsd.prog.mk>
@


1.2.2.3
log
@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.
@
text
@d1 2
a2 1
#	$NetBSD: Makefile,v 1.2.2.2 2012/11/18 19:05:22 riz Exp $
@


1.1
log
@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.
@
text
@d1 1
a1 2
#	$NetBSD$
#	Id: Makefile,v 1.14 2011/10/04 12:59:33 isaki Exp 
@


1.1.2.1
log
@file Makefile was added on branch yamt-pagecache on 2012-10-30 17:20:31 +0000
@
text
@d1 72
@


1.1.2.2
log
@sync with head
@
text
@a0 72
#	$NetBSD$
#	Id: Makefile,v 1.14 2011/10/04 12:59:33 isaki Exp 

NOMAN=		# defined

.include <bsd.own.mk>

BOOT=		Netboot
VERSIONFILE=	${.CURDIR}/version
VERSION!=	${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \
			END { print it }' ${VERSIONFILE}
NEWVERSWHAT=	"${BOOT}"

# text address
TEXT=		006000

# RTC offset
RTC_OFFSET=	-540

PROG=		netboot
BINDIR=		/usr/mdec
BINMODE=	444
STRIPFLAG=

BFDNAME=	a.out-m68k-netbsd
STRIP?=		/usr/bin/strip
OBJCOPY?=	/usr/bin/objcopy

# XXX shared sources should be in COMMONDIR
BOOTDIR=	${.CURDIR}/../boot
.PATH:		${BOOTDIR}

SRCS=		srt0.S boot.c conf.c exec_image.S if_ne.c ne.c dp8390.c
S=		${.CURDIR}/../../../..
M=		${.CURDIR}/../..
COMMONDIR=	$M/stand/common
.PATH:		${COMMONDIR}

SRCS+=		vers.c
CLEANFILES+=	vers.c
vers.c:	${VERSIONFILE}
	${_MKTARGET_CREATE}
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT}

CPPFLAGS+=	-nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa
CPPFLAGS+=	-I$M/stand/libiocs -I${COMMONDIR}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
CPPFLAGS+=	-DTEXTADDR="0x${TEXT}" 
CPPFLAGS+=	-DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\"
CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
CPPFLAGS+=	-DRTC_OFFSET=${RTC_OFFSET}
CPPFLAGS+=	-DSUPPORT_BOOTP -DSUPPORT_DHCP
CFLAGS=		-Wno-main -Os -m68020-60
LINKFLAGS=	-N -static -T ${BOOTDIR}/boot.ldscript
LIBIOCS!=	cd $M/stand/libiocs && ${PRINTOBJDIR}
LIBSA!=		cd $M/stand/libsa && ${PRINTOBJDIR}
L=		${LIBSA}/lib
LDLIBS= 	${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
LDLIBS+=	${LIBIOCS}/libiocs.a

.include "../Makefile.booters"

realall: ${PROG}
${PROG}:	${OBJS} ${LDLIBS}
	${_MKTARGET_LINK}
	${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS}
	${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym

CLEANFILES+=	${PROG}.sym

.include <bsd.prog.mk>
@


1.1.2.3
log
@sync with (a bit old) head
@
text
@d2 1
@


