0bc9ad781f
bootmkfile will now looks for the following proto files in order and pick the first one it finds to build the bootfs.paq file: 1) $CONF.boofs.proto (config specific) 2) bootfs.proto (kernel specific) 3) $BOOTDIR/bootfs.proto (default generic)
32 lines
718 B
Plaintext
32 lines
718 B
Plaintext
BOOTDIR=../boot
|
|
|
|
BOOTFILES=\
|
|
aux.$O\
|
|
boot.$O\
|
|
printstub.$O\
|
|
|
|
$BOOTFILES: $BOOTDIR/boot.h
|
|
|
|
%.$O: $BOOTDIR/%.c
|
|
$CC -I$BOOTDIR $CFLAGS $BOOTDIR/$stem.c
|
|
|
|
boot: $BOOTFILES
|
|
$LD -o $target $BOOTFILES
|
|
|
|
# look for proto file in order:
|
|
# 1) $CONF.bootfs.proto (config specific)
|
|
# 2) bootfs.proto (kernel specific)
|
|
# 3) $BOOTDIR/bootfs.proto (default generic)
|
|
#
|
|
BOOTFSPROTO=`{for(i in $CONF.bootfs.proto bootfs.proto $BOOTDIR/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 -o $target bootfs
|
|
rm -rf bootfs
|