c8bb85f758
- 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.
24 lines
442 B
Makefile
24 lines
442 B
Makefile
# $FreeBSD$
|
|
|
|
MAINTAINER=jhb@FreeBSD.org
|
|
|
|
ORG=0x00
|
|
|
|
all: cdldr
|
|
|
|
cdldr: cdldr.o
|
|
.if ${OBJFORMAT} == aout
|
|
${LD} -nostdlib -N -s -T ${ORG} -o cdldr.out cdldr.o
|
|
dd if=cdldr.out of=${.TARGET} ibs=32 skip=1
|
|
.else
|
|
${LD} -N -e start -Ttext ${ORG} -o cdldr.out cdldr.o
|
|
objcopy -S -O binary cdldr.out ${.TARGET}
|
|
.endif
|
|
|
|
cdldr.o: cdldr.s
|
|
${AS} ${AFLAGS} -o ${.TARGET} ${.CURDIR}/cdldr.s
|
|
|
|
CLEANFILES+= cdldr cdldr.out cdldr.o
|
|
|
|
.include <bsd.prog.mk>
|