Skip to content

Commit

Permalink
Clean pre-Bash build artifacts before building the Linux kernel
Browse files Browse the repository at this point in the history
All of these are archived, in a compressed form, in base.tar.bz2.
  • Loading branch information
Googulator committed Feb 16, 2024
1 parent fc5a711 commit fcb6876
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rootfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def create_configuration_file(args):
"""
config_path = os.path.join('steps', 'bootstrap.cfg')
with open(config_path, "w", encoding="utf_8") as config:
config.write(f"ARCH={args.arch}\n")
config.write(f"ARCH_DIR={stage0_arch_map.get(args.arch, args.arch)}\n")
config.write(f"FORCE_TIMESTAMPS={args.force_timestamps}\n")
config.write(f"CHROOT={args.chroot or args.bwrap}\n")
config.write(f"UPDATE_CHECKSUMS={args.update_checksums}\n")
Expand Down
13 changes: 13 additions & 0 deletions steps/improve/clean_artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2024 Gábor Stefanik <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Delete build artifacts to free up space for Linux kernel build

for pkg in $(ls "${SRCDIR}"); do
if [ -d "${SRCDIR}/${pkg}/build" ]; then
rm -rf "${SRCDIR}/${pkg}/build"
fi
done

rm -rf "/${ARCH_DIR}/artifact"
1 change: 1 addition & 0 deletions steps/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ define: BUILD_LINUX = ( CHROOT == False || BUILD_KERNELS == True )
build: kexec-linux-1.0.0 ( BUILD_LINUX == True )
build: kexec-tools-2.0.22 ( BUILD_LINUX == True )
improve: clean_sources
improve: clean_artifacts
build: linux-4.9.10 ( BUILD_LINUX == True )
jump: break ( INTERNAL_CI == pass1 )
improve: populate_device_nodes
Expand Down

0 comments on commit fcb6876

Please sign in to comment.