Jesus Galan Lopez (yiyus)mkbootfs and bootfs.protoc56f02616 years agoHistory
50 lines · 824 B · Text
RawDownload
#!/bin/rc fn cmds {	if(! test -e /sys/lib/dist/bin/386/bzfs) {		@{			cd /sys/lib/dist/cmd			mk install			mk clean		}	}} fn bootraw {	proto=bootfs.proto	rm -rf bootfs	mkdir bootfs		# make files writable for now.	cat $proto | sed 's!d000!d775!;s!000!664!;s!555!775!;s!444!664!' > proto.cp	disk/mkfs -a proto.cp | disk/mkext -d bootfs	@{		cd bootfs/386/bin		strip * */* >[2]/dev/null || status=''	}	disk/mkfs -a -s bootfs proto.cp >boot.raw	rm proto.cp} fn bootbz2 {	/sys/lib/dist/bin/386/bflz -n 32 < boot.raw >boot.bflz	bzip2 -9 < boot.bflz >boot.bz2	rm boot.raw boot.bflz} fn rootbz2 {	{		echo bzfilesystem		cat boot.bz2		dd -if /dev/zero -bs 1024 -count 1 >[2]/dev/null	} >rootfs.bz2	ls -l rootfs.bz2	rm boot.bz2} cmdsbind -a /sys/lib/dist/bin/386 /386/binbootrawbootbz2rootbz2