Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/root/sys/src/boot/pc-e820/mkfile

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


objtype=386
</$objtype/mkfile
BIN=/386

TARG=\
	9load\
	9pxeload\
	9pxeloaddebug\
	9loadlite\
	9loaddebug\
	9loadlitedebug\
	mbr\
	pbs\
	pbslba\

CORE=\
	alarm.$O\
	cga.$O\
	clock.$O\
	console.$O\
	e820.$O\
	dosboot.$O\
	devfloppy.$O\
	dma.$O\
	fs.$O\
	ilock.$O\
	l64p.$O\
	kbd.$O\
	kfsboot.$O\
	multiboot.$O\
	patchvesa.$O\
	print.$O\
	queue.$O\
	trap.$O\
	warp32.$O\
	warp64.$O\

LOAD=\
	8250.$O\
	apm.$O\
	boot.$O\
	cis.$O\
	conf.$O\
	devi82365.$O\
	devpccard.$O\
	devsd.$O\
	inflate.$O\
	load.$O\
	memory.$O\
	part.$O\
	pci.$O\
	sdaoe.$O\
	sdata.$O\
	sdiahci.$O\
#	sdmylex.$O\
#	sd53c8xx.$O\
	sdscsi.$O\

ETHER=\
	bootp.$O\
	ether.$O\
	ether2114x.$O\
	ether2000.$O\
	ether589.$O\
	ether79c970.$O\
	ether8003.$O\
	ether8139.$O\
	ether8169.$O\
	ether82557.$O\
	ether82563.$O\
	ether82598.$O\
	ether83815.$O\
	ether8390.$O\
	etherdp83820.$O\
#	etherga620.$O\
	etherm10g.$O\
	etherec2t.$O\
	etherelnk3.$O\
	etherigbe.$O\
	ethermii.$O\
	etherrhine.$O\
	etheryuk.$O\

HFILES=\
	lib.h\
	mem.h\
	dat.h\
	fns.h\
	io.h\

CFLAGS=-TFVw -I.

all:V:	$TARG

9load:	l.$O $CORE $LOAD $ETHER
	$LD -o $target -H3 -T0x80010000 -l $prereq -lflate -lfis -lc -lip
	ls -l $target

9pxeload:	lpxe.$O $CORE $LOAD $ETHER
	$LD -o $target -H3 -T0x80007C00 -l $prereq -lflate  -lfis -lc -lip
	ls -l $target

9pxeloaddebug:	lpxe.$O $CORE $LOAD $ETHER
	$LD -o $target -T0x80007C00 -l $prereq -lflate -lfis -lc -lip
	ls -l $target
	# acid $target
	# map({"text", 0x80007C00, 0x80090000, 0x00000020})

9loaddebug:	l.$O $CORE $LOAD $ETHER
	$LD -o $target -T0x80010000 -l $prereq -lflate -lfis -lc -lip
	ls -l $target
	# acid $target
	# map({"text", 0x80010000, 0x80090000, 0x00000020})

9loadlite:	l.$O $CORE $LOAD noether.$O
	$LD -o $target -H3 -T0x80010000 -l $prereq -lflate -lfis -lc -lip
	ls -l $target

9loadlitedebug:	l.$O $CORE $LOAD noether.$O
	$LD -o $target -T0x80010000 -l $prereq -lflate -lfis -lc -lip
	ls -l $target
	# acid $target
	# map({"text", 0x80010000, 0x80090000, 0x00000020})

lpxe.$O: l.s
	$AS -DPXE -o $target l.s

%.$O:	%.s
	$AS $stem.s

%.$O:	%.c
	$CC $CFLAGS $stem.c

%.$O:	$HFILES

l.$O pbs.$O pbslba.$O mbr.$O:	x16.h

clock.$O floppy.$O trap.$O:	ureg.h
bcom.$O conf.$O devfloppy.$O devsd.$O dosboot.$O fs.$O \
	kfsboot.$O load.$O part.$O:	dosfs.h fs.h kfs.h
ether.$O etherelnk3.$O:	etherif.h
devsd.$O part.$O sdata.$O sdscsi.$O: sd.h
bootp.$O:	ip.h
sdiahci.$O:	ahci.h
sdaoe.$O:	aoe.h

SDEV=`{echo load.c bcom.c devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
$SDEV: sd.h

mbr:	mbr.$O
	$LD -o $target -H3 -T0x0600 -l $prereq
	ls -l $target

pbs&:	pbs%.$O
	$LD -o $target -H3 -T0x7C00 -l $prereq
	ls -l $target

pbs&.debug:	pbs%.$O
	$LD -o $target -T0x7C00 -l $prereq
	ls -l $target
	# acid $target
	# map({"text", 0x7C00, 0x7E00, 0x00000020})
	
clean:
	rm -f *.[$OS] [$OS].out y.tab.? y.debug y.output $TARG 9loaddebug 9pxeloaddebug lddebug

install:V:
	for (i in $TARG)
		mk $MKFLAGS $i.install

%.install:V:	$BIN/%
	# import lookout / /n/lookout
	# cp $prereq /n/lookout/$prereq

$BIN/%:	%
	cp $stem $BIN/$stem

UPDATE=\
	mkfile\
	${CORE:%.$O=%.c}\
	${LOAD:%.$O=%.c}\
	${ETHER:%.$O=%.c}\
	$HFILES\
	l.s\
	noether.c\
	pbs.s\
	pbslba.s\
	mbr.s\
	x16.h\
	ureg.h\
	dosfs.h\
	fs.h\
	kfs.h\
	etherif.h\
	sd.h\
	ip.h\
	devfloppy.h\
	${TARG:%=/386/%}\

update:V:
	update $UPDATEFLAGS $UPDATE


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.