shithub: riscv

ref: 5d37407e3c98b41f64c20a3d03125d3ea6299a2d
dir: /sys/src/9/boot/bootmkfile/

View raw version
boot.$O:	../boot/boot.c
	$CC -I../boot $CFLAGS ../boot/boot.c

boot:	boot.$O
	$LD -o $target $prereq

# look for proto file in order:
#	1) $CONF.bootfs.proto		(config specific)
#	2) bootfs.proto			(kernel specific)
#	3) ../boot/bootfs.proto		(default generic)
#
BOOTFSPROTO=`{for(i in $CONF.bootfs.proto bootfs.proto ../boot/bootfs.proto) test -r $i && echo $i && exit}

bootfs.paq:	$BOOTFSPROTO `{disk/mkfs -aos / $BOOTFSPROTO >[2]/dev/null}
	mkdir -p bootfs
	disk/mkfs -s / -d bootfs $BOOTFSPROTO
	@{
		cd bootfs/$objtype/bin
		#strip * */* */*/* >[2]/dev/null || status=''
	}
	mkpaqfs -9 -b 65536 -o $target bootfs
	rm -rf bootfs