Skip to content

Commit 32138d1

Browse files
committed
Clean pre-Bash build artifacts before building the Linux kernel
All of these are archived, in a compressed form, in base.tar.bz2.
1 parent 4e0a0f0 commit 32138d1

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

rootfs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def create_configuration_file(args):
2828
"""
2929
config_path = os.path.join('steps', 'bootstrap.cfg')
3030
with open(config_path, "w", encoding="utf_8") as config:
31+
config.write(f"ARCH={args.arch}\n")
32+
config.write(f"ARCH_DIR={stage0_arch_map.get(args.arch, args.arch)}\n")
3133
config.write(f"FORCE_TIMESTAMPS={args.force_timestamps}\n")
3234
config.write(f"CHROOT={args.chroot or args.bwrap}\n")
3335
config.write(f"UPDATE_CHECKSUMS={args.update_checksums}\n")

steps/improve/clean_artifacts.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: 2024 Gábor Stefanik <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
# Delete build artifacts to free up space for Linux kernel build
6+
7+
for pkg in $(ls "${SRCDIR}"); do
8+
if [ -d "${SRCDIR}/${pkg}/build" ]; then
9+
rm -rf "${SRCDIR}/${pkg}/build"
10+
fi
11+
done
12+
13+
rm -rf "/${ARCH_DIR}/artifact"

steps/manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ define: BUILD_LINUX = ( CHROOT == False || BUILD_KERNELS == True )
123123
build: kexec-linux-1.0.0 ( BUILD_LINUX == True )
124124
build: kexec-tools-2.0.22 ( BUILD_LINUX == True )
125125
improve: clean_sources
126+
improve: clean_artifacts
126127
build: linux-4.9.10 ( BUILD_LINUX == True )
127128
jump: break ( INTERNAL_CI == pass1 )
128129
improve: populate_device_nodes

0 commit comments

Comments
 (0)