shithub: riscv

Download patch

ref: 7e4b6693938b65846df17f41d3b5efd8d5449670
parent: c197fede614a623b4363dcc313130aff738e25b8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jan 5 03:41:46 EST 2018

/sys/lib/dist: split 9boot into 9bootproto, make *.386.iso and *.amd64.iso targets

--- a/sys/lib/dist/cfg/plan9.ini
+++ b/sys/lib/dist/cfg/plan9.ini
@@ -3,4 +3,3 @@
 mouseport=ask
 monitor=ask
 vgasize=ask
-bootfile=/386/9pc
--- a/sys/lib/dist/mkfile
+++ b/sys/lib/dist/mkfile
@@ -1,20 +1,46 @@
-proto=/n/src9/sys/lib/sysconfig/proto/cdproto
-iso=/tmp/9front.iso
+proto=/n/src9/sys/lib/sysconfig/proto/distproto
 
-cd:V:	$iso
+cd:V:	/tmp/9front.386.iso.gz
 
-binds:V:
-	test -d /n/src9/.hg && bind /n/src9 /n/src9/dist/plan9front
-	bind cfg /n/src9/cfg
-	bind mail/lib /n/src9/mail/lib
-	bind ndb /n/src9/lib/ndb
-	bind -a adm/timezone /n/src9/adm/timezone
-	bind usr /n/src9/usr
+%.gz:D:	%
+	gzip -9 < $prereq > $target
 
-%.iso:  $proto
+%.386.iso:
+	@{
+	objtype=386
+	kernel=/n/src9/$objtype/9pc
+	mk $target.$pid.pc.iso
+	mv $target.$pid.pc.iso $target
+	}
+
+%.amd64.iso:
+	@{
+	objtype=amd64
+	kernel=/n/src9/$objtype/9pc64
+	mk $target.$pid.pc.iso
+	mv $target.$pid.pc.iso $target
+	}
+
+%.zynq.img:
+	@{
+	objtype=arm
+	kernel=/n/src9/$objtype/9zynq
+	echo 'bootfile='^`{basename $kernel} > /env/plan9.ini
+	fatfiles=(/env/plan9.ini $kernel)
+	mb=1919	# storage vendors idea of 2GB
+	mk $target.$pid.disk
+	mv $target.$pid.disk $target
+	}
+
+%.pc.iso:D:	$proto /n/src9/sys/lib/sysconfig/proto/9bootproto /n/src9/cfg/plan9.ini $kernel
 	@{rfork n
 	mk binds
-	disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat -p $proto -s /n/src9 -v 'Plan 9 Front' $target
+	{grep -v '^bootfile=' /n/src9/cfg/plan9.ini
+	echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}} > /env/plan9.ini
+	bind /env/plan9.ini /n/src9/cfg/plan9.ini
+	disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat \
+		-p <{cat $proto /n/src9/sys/lib/sysconfig/proto/9bootproto} \
+		-s /n/src9 -v 'Plan 9 Front ('^$objtype^')' $target
 	if(test -r /n/src9/386/9boothyb){
 		dd -if /dev/zero -bs 2048 -count 1024 >> $target
 		disk/partfs -m /n/partfs $target
@@ -37,17 +63,6 @@
 		rm -f /srv/$s
 	}}
 
-%.zynq.img:
-	@{
-	objtype=arm
-	kernel=/n/src9/$objtype/9zynq
-	echo 'bootfile='^`{basename $kernel} > /env/plan9.ini
-	fatfiles=(/env/plan9.ini $kernel)
-	mb=1919	# storage vendors idea of 2GB
-	mk $target.$pid.disk
-	mv $target.$pid.disk $target
-	}
-
 %.disk:D:	$proto $fatfiles
 	@{rfork n
 	mk binds
@@ -80,3 +95,11 @@
 	while(test -e /srv/$s.cmd) sleep 1
 	exit ''
 	}
+
+binds:V:
+	test -d /n/src9/.hg && bind /n/src9 /n/src9/dist/plan9front
+	bind cfg /n/src9/cfg
+	bind mail/lib /n/src9/mail/lib
+	bind ndb /n/src9/lib/ndb
+	bind -a adm/timezone /n/src9/adm/timezone
+	bind usr /n/src9/usr
--- /dev/null
+++ b/sys/lib/sysconfig/proto/9bootproto
@@ -1,0 +1,15 @@
+uid=sys
+gid=sys
+386	d775
+	9bootfat	664
+	9boothyb	664
+	9bootiso	664
+	9bootpxe	664
+	efiboot.fat	664
+	bootia32.efi	664
+	bootx64.efi	664
+	mbr		664
+	pbs		664
+
+cfg	d775
+	plan9.ini	664
--- a/sys/lib/sysconfig/proto/cdproto
+++ /dev/null
@@ -1,415 +1,0 @@
-mode=ug+rw
-mode=o-w
-uid=sys
-gid=sys
-adm	d775 adm adm
-	uid=adm
-	gid=adm
-	timezone	d775
-		*
-cfg	d775
-	plan9.ini
-	pxe	d775
-cron	d775
-lib	d775
-	*
-	audio	d775
-		icon	d775
-			*
-	cmap	d775
-		*
-	dict	d775
-		*
-	face	d775
-		+
-	firmware	d775
-	font	d775
-		bit	d775
-			+
-	legal	d775
-		*
-	map	d775
-		README
-	ndb	d775
-		*
-	rfc	d775
-		grabrfc
-	sky	d775
-		*
-	tftpd	d775
-rc	d775
-	skip=\.local$
-	+
-mail	d775 upas upas
-	uid=upas
-	gid=upas
-	box	d775
-		glenda	d775 glenda glenda
-			mbox	d777 glenda glenda
-	faxoutqueue	d775
-	faxqueue	d775
-	fs	d555
-	grey	d775
-	lib	d775
-		*
-	queue	d775
-	tmp	d777
-
-386	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-68000	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-68020	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-amd64	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-arm	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-power	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-power64	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-sparc	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-sparc64	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-mips	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-spim	d775
-	mkfile
-	include	d775
-		+
-	lib	d775
-		ape	d775
-	bin	d775
-		ape	d775
-		audio	d775
-		auth	d775
-		aux	d775
-		bitsy	d775
-		dial	d775
-		disk	d775
-		fs	d775
-		games	d775
-		ip	d775
-			httpd	d775
-		ndb	d775
-		nusb	d775
-		replica	d775
-		upas	d775
-		venti	d775
-
-$objtype	d775
-	*
-	bin	d775
-		skip=^_
-		+
-	lib	d775
-		+
-
-acme	d775
-	*
-	acid	d775
-		+
-	news	d775
-		+
-	wiki	d775
-		+
-	bin	d775
-		skip=\.(out|orig|([ao]?[0125678vqki]?))$
-		*
-		386	d775
-		68000	d775
-		68020	d775
-		amd64	d775
-		arm	d775
-		power	d775
-		power64	d775
-		sparc	d775
-		sparc64	d775
-		mips	d775
-		spim	d775
-		source	d775
-			+
-		dial	d775
-			+
-		$objtype	d775
-			+
-
-sys	d775
-	games	d775
-		lib	d775
-			+
-	include	d775
-		+
-	lib	d775
-		skip=\.(pyo|pyc|orig)$
-		+
-	log	d775
-		auth	a662 sys sys /sys/lib/dist/empty
-		boot	a662 sys sys /sys/lib/dist/empty
-		cpu	a662 sys sys /sys/lib/dist/empty
-		cron	a662 sys sys /sys/lib/dist/empty
-		cs	a662 sys sys /sys/lib/dist/empty
-		dns	a662 sys sys /sys/lib/dist/empty
-
-		cifsd	a662 sys sys /sys/lib/dist/empty
-		ftp	a662 sys sys /sys/lib/dist/empty
-		httpd	d775
-			log	a662 sys sys /sys/lib/dist/empty
-		imap4d	a662 sys sys /sys/lib/dist/empty
-		ipboot	a662 sys sys /sys/lib/dist/empty
-		listen	a662 sys sys /sys/lib/dist/empty
-
-		mail		a662 sys sys /sys/lib/dist/empty
-		pop3		a662 sys sys /sys/lib/dist/empty
-		runq		a662 sys sys /sys/lib/dist/empty
-		smtp		a662 sys sys /sys/lib/dist/empty
-		smtp.fail	a662 sys sys /sys/lib/dist/empty
-		smtpd		a662 sys sys /sys/lib/dist/empty
-		smtpd.mx	a662 sys sys /sys/lib/dist/empty
-
-		secstore	a662 sys sys /sys/lib/dist/empty
-		timesync	a662 sys sys /sys/lib/dist/empty
-		www	a662 sys sys /sys/lib/dist/empty
-		
-	man	d775
-		skip=\.(pdf|ps|orig)$
-		+
-	doc	d775
-		+
-	src	d775
-		skip=\.(out|orig|([ao]?[0125678vqki]?))$
-		+
-
-tmp	d555
-
-usr	d775
-	glenda	d775 glenda glenda
-		uid=glenda
-		gid=glenda
-		bin	d775
-			$objtype	d775
-				+
-			rc	d775
-				+
-		lib	d775
-			*
-		tmp	d775
-
-dist	d775
-	plan9front	d775
-		uid=glenda
-		.hgignore	664
-		.hg		d775
-			+
--- /dev/null
+++ b/sys/lib/sysconfig/proto/distproto
@@ -1,0 +1,414 @@
+mode=ug+rw
+mode=o-w
+uid=sys
+gid=sys
+adm	d775 adm adm
+	uid=adm
+	gid=adm
+	timezone	d775
+		*
+cfg	d775
+	pxe	d775
+cron	d775
+lib	d775
+	*
+	audio	d775
+		icon	d775
+			*
+	cmap	d775
+		*
+	dict	d775
+		*
+	face	d775
+		+
+	firmware	d775
+	font	d775
+		bit	d775
+			+
+	legal	d775
+		*
+	map	d775
+		README
+	ndb	d775
+		*
+	rfc	d775
+		grabrfc
+	sky	d775
+		*
+	tftpd	d775
+rc	d775
+	skip=\.local$
+	+
+mail	d775 upas upas
+	uid=upas
+	gid=upas
+	box	d775
+		glenda	d775 glenda glenda
+			mbox	d777 glenda glenda
+	faxoutqueue	d775
+	faxqueue	d775
+	fs	d555
+	grey	d775
+	lib	d775
+		*
+	queue	d775
+	tmp	d777
+
+386	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+68000	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+68020	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+amd64	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+arm	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+power	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+power64	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+sparc	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+sparc64	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+mips	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+spim	d775
+	mkfile
+	include	d775
+		+
+	lib	d775
+		ape	d775
+	bin	d775
+		ape	d775
+		audio	d775
+		auth	d775
+		aux	d775
+		bitsy	d775
+		dial	d775
+		disk	d775
+		fs	d775
+		games	d775
+		ip	d775
+			httpd	d775
+		ndb	d775
+		nusb	d775
+		replica	d775
+		upas	d775
+		venti	d775
+
+$objtype	d775
+	*
+	bin	d775
+		skip=^_
+		+
+	lib	d775
+		+
+
+acme	d775
+	*
+	acid	d775
+		+
+	news	d775
+		+
+	wiki	d775
+		+
+	bin	d775
+		skip=\.(out|orig|([ao]?[0125678vqki]?))$
+		*
+		386	d775
+		68000	d775
+		68020	d775
+		amd64	d775
+		arm	d775
+		power	d775
+		power64	d775
+		sparc	d775
+		sparc64	d775
+		mips	d775
+		spim	d775
+		source	d775
+			+
+		dial	d775
+			+
+		$objtype	d775
+			+
+
+sys	d775
+	games	d775
+		lib	d775
+			+
+	include	d775
+		+
+	lib	d775
+		skip=\.(pyo|pyc|orig)$
+		+
+	log	d775
+		auth	a662 sys sys /sys/lib/dist/empty
+		boot	a662 sys sys /sys/lib/dist/empty
+		cpu	a662 sys sys /sys/lib/dist/empty
+		cron	a662 sys sys /sys/lib/dist/empty
+		cs	a662 sys sys /sys/lib/dist/empty
+		dns	a662 sys sys /sys/lib/dist/empty
+
+		cifsd	a662 sys sys /sys/lib/dist/empty
+		ftp	a662 sys sys /sys/lib/dist/empty
+		httpd	d775
+			log	a662 sys sys /sys/lib/dist/empty
+		imap4d	a662 sys sys /sys/lib/dist/empty
+		ipboot	a662 sys sys /sys/lib/dist/empty
+		listen	a662 sys sys /sys/lib/dist/empty
+
+		mail		a662 sys sys /sys/lib/dist/empty
+		pop3		a662 sys sys /sys/lib/dist/empty
+		runq		a662 sys sys /sys/lib/dist/empty
+		smtp		a662 sys sys /sys/lib/dist/empty
+		smtp.fail	a662 sys sys /sys/lib/dist/empty
+		smtpd		a662 sys sys /sys/lib/dist/empty
+		smtpd.mx	a662 sys sys /sys/lib/dist/empty
+
+		secstore	a662 sys sys /sys/lib/dist/empty
+		timesync	a662 sys sys /sys/lib/dist/empty
+		www	a662 sys sys /sys/lib/dist/empty
+		
+	man	d775
+		skip=\.(pdf|ps|orig)$
+		+
+	doc	d775
+		+
+	src	d775
+		skip=\.(out|orig|([ao]?[0125678vqki]?))$
+		+
+
+tmp	d555
+
+usr	d775
+	glenda	d775 glenda glenda
+		uid=glenda
+		gid=glenda
+		bin	d775
+			$objtype	d775
+				+
+			rc	d775
+				+
+		lib	d775
+			*
+		tmp	d775
+
+dist	d775
+	plan9front	d775
+		uid=glenda
+		.hgignore	664
+		.hg		d775
+			+