Plan 9 from Bell Labs’s /usr/web/sources/contrib/ericvh/ppctools/mkfile

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


CONF=bgl
CONFLIST=mambo bgl bglio bglcpu

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

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

PORT=\
	alarm.$O\
	alloc.$O\
	allocb.$O\
	chan.$O\
	dev.$O\
	edf.$O\
	fault.$O\
	fpi.$O\
	fpimem.$O\
	fpipower.$O\
	fpu.$O\
	image.$O\
	latin1.$O\
	page.$O\
	parse.$O\
	pgrp.$O\
	portclock.$O\
	print.$O\
	proc.$O\
	qio.$O\
	qlock.$O\
	rebootcmd.$O\
	segment.$O\
	swap.$O\
	sysauth.$O\
	sysfile.$O\
	sysproc.$O\
	sysseg.$O\
	taslock.$O\
	tod.$O\
	xalloc.$O\

OBJ=\
	l.$O\
	hummer.$O\
	tlb.$O\
	clock.$O\
	dcr.$O\
	main.$O\
	mmu.$O\
	random.$O\
	trap.$O\
	ppcmul64fract.$O\
	uicbic.$O\
	bglcapdcr.$O\
	$CONF.root.$O\
	$CONF.rootc.$O\
	$DEVS\
	$PORT\

LIB=\
	/$objtype/lib/libc.a\
	/$objtype/lib/libsec.a\

ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}

$p$CONF:	$CONF.c $OBJ $LIB
	$CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
	$LD -R4 -o $target -T0x80800000 -l $OBJ $CONF.$O $LIB
	$LD -R4 -H5 -S -o $target^.elf -T0x80800000  -D0 -l $OBJ $CONF.$O $LIB
	ls -l $target

bgd: 9bgl
	nm 9bgl | grep bgllog
	9fs bgdfen1
	cp 9bgl.elf /n/bgdfen1
	ls -l /n/bgdfen1/9bgl.elf

bginst: 9bglio 9bglcpu
	nm 9bglio | grep bgllog
	9fs bgdfen1
	cp 9bglio.elf /n/bgdfen1
	cp 9bglcpu.elf /n/bgdfen1
	ls -l /n/bgdfen1/9bglio.elf
	ls -l /n/bgdfen1/9bglcpu.elf

$p$CONF.gz:	$p$CONF
	strip -o /fd/1 $p$CONF | gzip -9 > $p$CONF.gz

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

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

PCFILES=`{../port/mkfilelist ../ppc440}
^($PCFILES)\.$O:R:	'../ppc440/\1.c'
	$CC $CFLAGS -.I. -I../ppc440 ../ppc440/$stem1.c

clock.$O devether.$O main.$O trap.$O:	/$objtype/include/ureg.h

$ETHER: 			../ppc440/etherif.h ../port/netif.h
main.$O:			init.h
trap.$O:			/sys/include/tos.h

init.h:		init9.s ../port/initcode.c
	$AS init9.s
	$CC ../port/initcode.c
	$LD -l -s -R4 -o init.out init9.$O initcode.$O -lc
	{echo 'uchar initcode[]={'
	 strip -o /fd/1 init.out | xd -1x |
		sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
	 echo '};'} > init.h

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].