Shuffle around the creation of sysb

For further RAM savings, we want to create sysb -without- having linux
tarball extracted at the same time. To accomplish this, we move the
gen_init_cpio + related script out of the tree and create it afterward.

Also use hard links to free up some more space.
This commit is contained in:
fosslinux 2021-10-11 07:54:23 +11:00 committed by Andrius Štikonas
parent 732af79cdd
commit f12897265c
4 changed files with 28 additions and 13 deletions

View file

@ -41,14 +41,6 @@ src_prepare() {
}
src_compile() {
# Generate the initramfs so we can remove /sysb
make ARCH=i386 prepare
make ARCH=i386 usr/
mkdir -p "${PREFIX}/boot"
mv usr/initramfs_data.cpio.gz "${PREFIX}/boot/initramfs-sysb"
make clean
rm -rf /sysb
sed -i 's:/sysb::' .config
cp .config include/config/auto.conf
rm include/generated/autoconf.h
generate_autoconf_h
@ -58,5 +50,8 @@ src_compile() {
}
src_install() {
mkdir -p "${PREFIX}/boot"
cp arch/i386/boot/bzImage "${PREFIX}/boot/linux-4.9.10"
cp usr/gen_init_cpio "${PREFIX}/bin"
cp scripts/gen_initramfs_list.sh "${PREFIX}/bin"
}