boot: allow alternative proto files per kernel and kernel config for bootfs.paq
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)
This commit is contained in:
parent
8ab9c6d388
commit
0bc9ad781f
2 changed files with 12 additions and 3 deletions
|
@ -13,7 +13,12 @@ $BOOTFILES: $BOOTDIR/boot.h
|
|||
boot: $BOOTFILES
|
||||
$LD -o $target $BOOTFILES
|
||||
|
||||
BOOTFSPROTO=$BOOTDIR/bootfs.proto
|
||||
# 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
|
||||
|
|
|
@ -180,8 +180,12 @@ if(~ $#usbwait 1)
|
|||
if(~ $#usbwait 0)
|
||||
sleep 2
|
||||
|
||||
. /rc/lib/net.rc
|
||||
. /rc/lib/local.rc
|
||||
# load boot methods
|
||||
fn showlocaldevs {}
|
||||
fn configlocal {}
|
||||
for(i in /rc/lib/*.rc){
|
||||
. $i
|
||||
}
|
||||
|
||||
# add partitions and binds
|
||||
configlocal
|
||||
|
|
Loading…
Reference in a new issue