summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-29 15:25:29 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-29 15:25:29 +0000
commit2e6632339a218330e92e0219d90500c536fbbfb8 (patch)
tree998aaff3674104ff9327658a8d0f4b369f2caf94
parentd838faa938c5e58ee5e8d916e520186893ccc054 (diff)
downloadlh-bootstrap-2e6632339a218330e92e0219d90500c536fbbfb8.tar.xz
Small incremental build fixes (28)
-rw-r--r--Makefile6
-rw-r--r--lh-config.dist10
-rwxr-xr-xmake6
3 files changed, 14 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index b2e254e..43f140b 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,9 @@ $(OUTPUT)/tmp/.lh_userfs_installed: $(OUTPUT)/tmp/.lh_layout_installed
# The qemu disk images (requires qemu and libguestfs-tools)
$(OUTPUT)/tmp/.lh_diskimages_done: $(OUTPUT)/tmp/.lh_rootfs_installed $(OUTPUT)/tmp/.lh_rwfs_installed $(OUTPUT)/tmp/.lh_userfs_installed
- exec virt-make-fs --format=qcow2 --size=1G --type=ext4 $(OUTPUT)/rootfs $(OUTPUT)/rootfs.qcow2
- exec virt-make-fs --format=qcow2 --size=512M --type=ext4 $(OUTPUT)/rwfs $(OUTPUT)/rwfs.qcow2
- exec virt-make-fs --format=qcow2 --size=512M --type=ext4 $(OUTPUT)/userfs $(OUTPUT)/userfs.qcow2
+ setuidgid $(NORMALUSER) virt-make-fs --format=qcow2 --type=ext4 --size=$(ROOTFS_SIZE) $(OUTPUT)/rootfs $(OUTPUT)/rootfs.qcow2 & \
+ setuidgid $(NORMALUSER) virt-make-fs --format=qcow2 --type=ext4 --size=$(RWFS_SIZE) $(OUTPUT)/rwfs $(OUTPUT)/rwfs.qcow2 & \
+ setuidgid $(NORMALUSER) virt-make-fs --format=qcow2 --type=ext4 --size=$(USERFS_SIZE) $(OUTPUT)/userfs $(OUTPUT)/userfs.qcow2
exec setuidgid $(NORMALUSER) touch $@
qemu-boot: $(OUTPUT)/build-host/kernel/.lh_installed $(OUTPUT)/tmp/.lh_diskimages_done run-qemu
diff --git a/lh-config.dist b/lh-config.dist
index 13b4a49..0905191 100644
--- a/lh-config.dist
+++ b/lh-config.dist
@@ -16,12 +16,14 @@ NORMALUSER=nobody
# CROSS_BASE=/home/ska/toolchains/cross/$TRIPLE
-# Set this to true if you want your created rootfs to be statically linked
+# Set this to true if you want your created rootfs to be statically linked.
+# By default, it will be true for musl toolchains, false for glibc toolchains.
# BUILD_HOST_STATIC=false
-# Filesystems size, in megabytes.
-
-ROOTFS_SIZE=32768
+# Filesystems size, as understood by libguestfs's virt-make-fs
+ROOTFS_SIZE=1024M
+RWFS_SIZE=512M
+USERFS_SIZE=512M
# The device on which to spawn an early getty.
# Leave empty for no early getty.
diff --git a/make b/make
index eaf93e6..965caa3 100755
--- a/make
+++ b/make
@@ -19,6 +19,10 @@ WD=$(pwd)
BUILD_BUILD_CC=${BUILD_BUILD_CC:-gcc}
OUTPUT=${OUTPUT:-$WD/output}
BUILD_HOST_CC="$TRIPLE-${CROSS_CC:-gcc}"
+ROOTFS_SIZE=${ROOTFS_SIZE:-1024M}
+RWFS_SIZE=${RWFS_SIZE:-512M}
+USERFS_SIZE=${USERFS_SIZE:-512M}
+
if test -z "$BUILD_HOST_STATIC" ; then
case "$TRIPLE" in
@@ -53,7 +57,7 @@ PATH="$WD/bin:$OUTPUT/build-build/command:$OUTPUT/build-build/bin:$OUTPUT/build-
umask 022
exec env -i $crossenv LH_MAKE_MARKER=1 "WD=$WD" "NORMALUSER=$NORMALUSER" "TRIPLE=$TRIPLE" "OUTPUT=$OUTPUT" "PATH=$PATH" \
- "ROOTFS_SIZE=$ROOTFS_SIZE" \
+ "ROOTFS_SIZE=$ROOTFS_SIZE" "RWFS_SIZE=$RWFS_SIZE" "USERFS_SIZE=$USERFS_SIZE" BUILD_HOST_STATIC="$BUILD_HOST_STATIC" \
"BUILD_HOST_CC=$BUILD_HOST_CC" "BUILD_HOST_CC_FULL=$BUILD_HOST_CC_FULL" "BUILD_HOST_SYSROOT=$BUILD_HOST_SYSROOT" "BUILD_HOST_PREFIX=$BUILD_HOST_PREFIX" \
"KERNEL_ARCH=$KERNEL_ARCH" "KERNEL_GENERIC_ARCH=$KERNEL_GENERIC_ARCH" "QEMU_ARCH=$QEMU_ARCH" "KERNEL_CONFIG=$KERNEL_CONFIG" \
"BUILD_BUILD_CC=$BUILD_BUILD_CC" SHELL=/bin/sh "CONSOLE=$CONSOLE" \