head	1.4;
access;
symbols
	RELENG_4_11_0_RELEASE:1.1.2.3
	RELENG_4_11:1.1.2.3.0.14
	RELENG_4_11_BP:1.1.2.3
	RELENG_4_10_0_RELEASE:1.1.2.3
	RELENG_4_10:1.1.2.3.0.12
	RELENG_4_10_BP:1.1.2.3
	RELENG_4_9_0_RELEASE:1.1.2.3
	RELENG_4_9:1.1.2.3.0.10
	RELENG_4_9_BP:1.1.2.3
	RELENG_4_8_0_RELEASE:1.1.2.3
	RELENG_4_8:1.1.2.3.0.8
	RELENG_4_8_BP:1.1.2.3
	RELENG_4_7_0_RELEASE:1.1.2.3
	RELENG_4_7:1.1.2.3.0.6
	RELENG_4_7_BP:1.1.2.3
	RELENG_4_6_2_RELEASE:1.1.2.3
	RELENG_4_6_1_RELEASE:1.1.2.3
	RELENG_4_6_0_RELEASE:1.1.2.3
	RELENG_4_6:1.1.2.3.0.4
	RELENG_4_6_BP:1.1.2.3
	RELENG_4_5_0_RELEASE:1.1.2.3
	RELENG_4_5:1.1.2.3.0.2
	RELENG_4_5_BP:1.1.2.3
	RELENG_4_4_0_RELEASE:1.1.2.2
	RELENG_4_4:1.1.2.2.0.4
	RELENG_4_4_BP:1.1.2.2
	KSE_MILESTONE_2:1.3
	KSE_PRE_MILESTONE_2:1.3
	RELENG_4_3_0_RELEASE:1.1.2.2
	RELENG_4_3:1.1.2.2.0.2
	RELENG_4_3_BP:1.1.2.2
	RELENG_4_2_0_RELEASE:1.1.2.2
	RELENG_4_1_1_RELEASE:1.1.2.2
	PRE_SMPNG:1.3
	RELENG_4_1_0_RELEASE:1.1.2.2
	RELENG_4_0_0_RELEASE:1.1
	RELENG_4:1.1.0.2
	RELENG_4_BP:1.1;
locks; strict;
comment	@# @;


1.4
date	2001.11.04.03.28.10;	author jhb;	state dead;
branches;
next	1.3;

1.3
date	2000.05.23.12.31.32;	author jhb;	state Exp;
branches;
next	1.2;

1.2
date	2000.03.28.01.19.47;	author jhb;	state Exp;
branches;
next	1.1;

1.1
date	2000.01.27.21.21.00;	author jhb;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2000.04.15.03.09.42;	author ps;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2000.07.07.21.12.33;	author jhb;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2001.12.21.21.02.36;	author jhb;	state dead;
branches;
next	;


desc
@@


1.4
log
@Axe the old cdldr.
@
text
@# $FreeBSD: src/sys/boot/i386/cdldr/Makefile,v 1.3 2000/05/23 12:31:32 jhb Exp $

MAINTAINER=jhb@@FreeBSD.org

ORG=		0x7c00

LDR=		cdldr
BOOT=		cdboot
PROG=		${BOOT}
NOMAN=
STRIP=
BINDIR?=	/boot


.if exists(${.OBJDIR}/../loader)
LOADER=	${.OBJDIR}/../loader/loader
.else
LOADER=	${.CURDIR}/../loader/loader
.endif

${BOOT}: ${LDR} ${LOADER}
	cat ${LDR} ${LOADER} > ${.TARGET}.tmp
	dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
	rm ${.TARGET}.tmp

${LDR}: ${LDR}.o
.if ${OBJFORMAT} == aout
	${LD} -nostdlib -N -s -T ${ORG} -o ${LDR}.out ${LDR}.o
	dd if=${LDR}.out of=${.TARGET} ibs=32 skip=1
.else
	${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
	objcopy -S -O binary ${LDR}.out ${.TARGET}
.endif

CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o ${BOOT}.tmp

.include <bsd.prog.mk>
@


1.3
log
@Grrr, fix a silly 'movl' -> 'movw' typo in both pxeldr and cdldr.  Also,
remove unnecessary cruft from the Makefiles for both.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/boot/i386/cdldr/Makefile,v 1.2 2000/03/28 01:19:47 jhb Exp $
@


1.2
log
@Mega i386 loader commit.
- Don't hard code 0x10000 as the entry point for the loader.  Instead add
  src/sys/boot/i386/Makefile.inc which defines a make variable with the
  entry point for the loader.  Move the loader's entry point up to
  0x20000, which makes PXE happy.
- Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE,
  instead use m4 to achieve this.  Also, add a BTXLDR_VERBOSE knob in the
  btxldr Makefile to turn this option on.
- Redo parts of cdldr's Makefile so that it now builds and installs cdboot
  instead of having i386/loader/Makefile do that.  Also, add in some more
  variables to make the pxeldr Makefile almost identical and thus to ease
  maintainability.
- Teach cdldr about the a.out format.  Cdldr now parsers the a.out header
  of the loader binary and relocates it based on that.  The entry point of
  the loader no longer has to be hardcoded into cdldr.  Also, the boot
  info table from mkisofs is no longer required to get a useful cdboot.
- Update the lsdev function for BIOS disks to parse other file systems
  (such as DOS FAT) that we currently support.  This is still buggy as
  it assumes that a floppy with a DOS boot sector actually has a MBR and
  parses it as such.  I'll be fixing this in the future.
- The biggie:  Add in support for booting off of PXE-enabled network
  adapters.  Currently, we use the TFTP API provided by the PXE BIOS.
  Eventually we will switch to using the low-level NIC driver thus
  allowing both TFTP and NFS to be used, but for now it's just TFTP.

Submitted by:	ps, alfred
Testing by:	Benno Rice <benno@@netizen.com.au>
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/boot/i386/cdldr/Makefile,v 1.1 2000/01/27 21:21:00 jhb Exp $
a33 3

${LDR}.o: ${.CURDIR}/${LDR}.s
	${AS} ${AFLAGS} -o ${.TARGET} ${.CURDIR}/${LDR}.s
@


1.1
log
@Add the new cdldr CD bootstrap loader.  This patch includes the following:

- Fix btxldr to preserve a NULL bootinfo pointer when it copies the kernel
  arguments.
- Add the cdldr bootstrap program.  This program is tacked onto the
  beginning of the standard 3rd stage boot loader (/boot/loader) to form
  the CD boot loader (/boot/cdboot).  When a CD is booted, the cdboot file
  is copied into memory instead and executed.  The cdldr stub emulates the
  environment normally provided by boot2 and then starts the loader.  This
  booting method does not emulate a floppy drive, but boots directly off of
  the CD.  This should fix the problems some BIOS's have with emulating a
  2.88 MB floppy image.
- Add support to the loader to recognize that it has been booted by cdldr
  instead of boot2 and use a simpler method of extracting the BIOS boot
  device.
@
text
@d1 1
a1 1
# $FreeBSD$
d5 1
a5 1
ORG=0x00
d7 6
a12 1
all: cdldr
d14 13
a26 1
cdldr: cdldr.o
d28 2
a29 2
	${LD} -nostdlib -N -s -T ${ORG} -o cdldr.out cdldr.o
	dd if=cdldr.out of=${.TARGET} ibs=32 skip=1
d31 2
a32 2
	${LD} -N -e start -Ttext ${ORG} -o cdldr.out cdldr.o
	objcopy -S -O binary cdldr.out ${.TARGET}
d35 2
a36 2
cdldr.o: cdldr.s
	${AS} ${AFLAGS} -o ${.TARGET} ${.CURDIR}/cdldr.s
d38 1
a38 1
CLEANFILES+= cdldr cdldr.out cdldr.o
@


1.1.2.1
log
@MFC: sync up loader with current, including PXE.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/boot/i386/cdldr/Makefile,v 1.1 2000/01/27 21:21:00 jhb Exp $
d5 1
a5 1
ORG=		0x7c00
d7 1
a7 6
LDR=		cdldr
BOOT=		cdboot
PROG=		${BOOT}
NOMAN=
STRIP=
BINDIR?=	/boot
d9 1
a9 13

.if exists(${.OBJDIR}/../loader)
LOADER=	${.OBJDIR}/../loader/loader
.else
LOADER=	${.CURDIR}/../loader/loader
.endif

${BOOT}: ${LDR} ${LOADER}
	cat ${LDR} ${LOADER} > ${.TARGET}.tmp
	dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
	rm ${.TARGET}.tmp

${LDR}: ${LDR}.o
d11 2
a12 2
	${LD} -nostdlib -N -s -T ${ORG} -o ${LDR}.out ${LDR}.o
	dd if=${LDR}.out of=${.TARGET} ibs=32 skip=1
d14 2
a15 2
	${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
	objcopy -S -O binary ${LDR}.out ${.TARGET}
d18 2
a19 2
${LDR}.o: ${.CURDIR}/${LDR}.s
	${AS} ${AFLAGS} -o ${.TARGET} ${.CURDIR}/${LDR}.s
d21 1
a21 1
CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o ${BOOT}.tmp
@


1.1.2.2
log
@MFC: Lots of bootstrap fixes and features:

- Add $FreeBSD$ to README
- Coment fix for the if_wx module in loader.conf
- Axe all the unneeded m4 files (yay!)
- EDD support in mbr, boot1 and boot2, and the loader
- inline functions in boot2 that are only used once to gain 68 bytes of
  free space
- emulate the WBINVD instruction in BTX
- remove cruft from the cdldr Makefile
- improve hard disk probe checking as well as lsdev enhancements in the
  loader
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/boot/i386/cdldr/Makefile,v 1.1.2.1 2000/04/15 03:09:42 ps Exp $
d34 3
@


1.1.2.3
log
@MFC: Axe the old cdldr.

Approved by:	re
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/boot/i386/cdldr/Makefile,v 1.1.2.2 2000/07/07 21:12:33 jhb Exp $
@


