mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-16 08:15:24 +01:00
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:
parent
732af79cdd
commit
f12897265c
4 changed files with 28 additions and 13 deletions
|
|
@ -177,7 +177,7 @@ CONFIG_SCHED_AUTOGROUP=y
|
|||
# CONFIG_SYSFS_DEPRECATED is not set
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="/sysb"
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INITRAMFS_ROOT_UID=0
|
||||
CONFIG_INITRAMFS_ROOT_GID=0
|
||||
CONFIG_RD_GZIP=y
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
17
sysa/linux-4.9.10/patches/initramfs_list.patch
Normal file
17
sysa/linux-4.9.10/patches/initramfs_list.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Use gen_initramfs_list.sh from outside kernel source tree.
|
||||
|
||||
--- scripts/gen_initramfs_list.sh 2021-10-10 20:37:12.220231015 +1100
|
||||
+++ scripts/gen_initramfs_list.sh 2021-10-10 20:37:22.694296140 +1100
|
||||
@@ -310,7 +310,7 @@
|
||||
fi
|
||||
fi
|
||||
cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)"
|
||||
- usr/gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile}
|
||||
+ gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile}
|
||||
else
|
||||
cpio_tfile=${cpio_file}
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue