Oops, forgot to add port/bootfs.proto and port/mkbootfs.

This commit is contained in:
iru 2011-04-16 17:50:51 -03:00
parent 418d88fe3d
commit 23b2128da1
2 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,45 @@
$cputype
bin
9660srv
awk
bind
bzfs
cat
dd
disk
fdisk
kfs
prep
dossrv
echo
fossil
fossil
grep
gunzip
hoc
ip
ipconfig
ls
mount
ramfs
rc
read
rm
sed
seq
srv
test
unmount
xd
rc
lib
rcmain
conf.rc 555 sys sys ../boot/conf.rc
local.rc 555 sys sys ../boot/local.rc
menu.rc 555 sys sys ../boot/menu.rc
tcp.rc 555 sys sys ../boot/tcp.rc
bin
diskparts
bootrc 555 sys sys ../boot/bootrc
tmp

39
sys/src/9/port/mkbootfs Executable file
View file

@ -0,0 +1,39 @@
#!/bin/rc
fn bootraw {
proto=../port/bootfs.proto
mkdir bootfs
aux/stub /sys/log/timesync
bind /dev/null /sys/log/timesync
# 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 {
aux/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
}
bootraw
bootbz2
rootbz2
rm -rf bootfs