shithub: powernv

ref: a691c9111a69257e206ce895d35396d0f6225929
dir: /mkfile/

View raw version
CONF=nv
CONFLIST=nv

loadaddr=0xffffffff80100000

objtype=power64
</$objtype/mkfile
p=9

DEVS=`{rc ../port/mkdevlist $CONF}

PORT=\
	alarm.$O\
	alloc.$O\
	allocb.$O\
	auth.$O\
	cache.$O\
	chan.$O\
	dev.$O\
	edf.$O\
	fault.$O\
	mul64fract.$O\
	page.$O\
	parse.$O\
	pgrp.$O\
	portclock.$O\
	print.$O\
	proc.$O\
	qio.$O\
	qlock.$O\
	rdb.$O\
	rebootcmd.$O\
	segment.$O\
	syscallfmt.$O\
	sysfile.$O\
	sysproc.$O\
	taslock.$O\
	tod.$O\
	xalloc.$O\
	userinit.$O\

OBJ=\
	l.$O\
	main.$O\
	clock.$O\
	fpu.$O\
	mmu.$O\
	trap.$O\
	random.$O\
	$CONF.root.$O\
	$CONF.rootc.$O\
	$DEVS\
	$PORT\

# HFILES=

LIB=\
	/$objtype/lib/libmemlayer.a\
	/$objtype/lib/libmemdraw.a\
	/$objtype/lib/libdraw.a\
	/$objtype/lib/libip.a\
	/$objtype/lib/libsec.a\
	/$objtype/lib/libmp.a\
	/$objtype/lib/libc.a\
#	/$objtype/lib/libdtracy.a\

9:V:	$p$CONF $p$CONF.elf

$p$CONF:D:	$OBJ $CONF.$O $LIB
	$LD  -o $target -T$loadaddr -R0x100000 -l $prereq
	size $target

$p$CONF.elf:D:	$OBJ $CONF.$O $LIB
	$LD  -o $target -H 6 -T$loadaddr -R0x100000 -l $prereq

$OBJ: $HFILES

install:V: /$objtype/$p$CONF

/$objtype/$p$CONF:D: $p$CONF
	cp -x $p$CONF /$objtype/

<../boot/bootmkfile
<../port/portmkfile
<|../port/mkbootrules $CONF

initcode.out:		init9.$O initcode.$O /$objtype/lib/libc.a
	$LD -l -R1 -s -o $target $prereq

$CONF.clean:
	rm -rf $p$CONF errstr.h $CONF.c boot$CONF.c

test.iso: 9nv.elf
	rm -fr tmp $target
	mkdir -p tmp/
	mkdir tmp/live
	@{
		echo 'name 9front'
		echo 'image /9nv.elf'
	} > tmp/petitboot.conf
	cp 9nv.elf tmp/
	disk/mk9660  -p <{echo +} -s tmp $target
	rm -fr tmp