BuildSystem: Optimize disk image creation

disk image is now created with rsync so there is no need for copying the
whole sysroot twice.
This commit is contained in:
2025-08-01 22:52:56 +03:00
parent d8a695a88d
commit 11a2d15003
3 changed files with 36 additions and 17 deletions

View File

@@ -4,13 +4,11 @@ set -e
export BANAN_SCRIPT_DIR=$(dirname $(realpath $0))
source $BANAN_SCRIPT_DIR/config.sh
FAKEROOT_FILE="$BANAN_BUILD_DIR/fakeroot-context"
run_fakeroot() {
if [ ! -f $FAKEROOT_FILE ]; then
touch $FAKEROOT_FILE
if [ ! -f $BANAN_FAKEROOT ]; then
touch $BANAN_FAKEROOT
fi
fakeroot -i $FAKEROOT_FILE -s $FAKEROOT_FILE -- /bin/bash -c '$@' bash $@
fakeroot -i $BANAN_FAKEROOT -s $BANAN_FAKEROOT -- /bin/bash -c '$@' bash $@
}
make_build_dir () {
@@ -47,11 +45,6 @@ build_toolchain () {
create_image () {
build_target all
build_target install
pushd $BANAN_SYSROOT >/dev/null
run_fakeroot tar cf ${BANAN_SYSROOT_TAR} *
popd >/dev/null
$BANAN_SCRIPT_DIR/image.sh "$1"
}