Skip to content

Commit b88e2e8

Browse files
committed
"get completely rid of dead code toolchain stuff", pt2
- this stuff has been laying around, unused, for years
1 parent 8854277 commit b88e2e8

5 files changed

Lines changed: 14 additions & 19 deletions

File tree

lib/functions/compilation/kernel-make.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ function run_kernel_make_internal() {
1818
prepare_distcc_compilation_config
1919

2020
common_make_envs=(
21-
"CCACHE_BASEDIR=\"$(pwd)\"" # Base directory for ccache, for cache reuse # @TODO: experiment with this and the source path to maximize hit rate
22-
"CCACHE_TEMPDIR=\"${CCACHE_TEMPDIR:?}\"" # Temporary directory for ccache, under WORKDIR
23-
"PATH=\"${toolchain}:${PYTHON3_INFO[USERBASE]}/bin:${PATH}\"" # Insert the toolchain and the pip binaries into the PATH
24-
"PYTHONPATH=\"${PYTHON3_INFO[MODULES_PATH]}:${PYTHONPATH}\"" # Insert the pip modules downloaded by Armbian into PYTHONPATH (needed for dtb checks)
25-
"DPKG_COLORS=always" # Use colors for dpkg @TODO no dpkg is done anymore, remove?
26-
"XZ_OPT='--threads=0'" # Use parallel XZ compression
27-
"TERM='${TERM}'" # Pass the terminal type, so that 'make menuconfig' can work.
21+
"CCACHE_BASEDIR='$(pwd)'" # Base directory for ccache, for cache reuse # @TODO: experiment with this and the source path to maximize hit rate
22+
"CCACHE_TEMPDIR='${CCACHE_TEMPDIR:?}'" # Temporary directory for ccache, under WORKDIR
23+
"PATH='${PYTHON3_INFO[USERBASE]}/bin:${PATH}'" # Insert the pip binaries into the PATH
24+
"PYTHONPATH='${PYTHON3_INFO[MODULES_PATH]}:${PYTHONPATH}'" # Insert the pip modules downloaded by Armbian into PYTHONPATH (needed for dtb checks)
25+
"DPKG_COLORS=always" # Use colors for dpkg @TODO no dpkg is done anymore, remove?
26+
"XZ_OPT='--threads=0'" # Use parallel XZ compression
27+
"TERM='${TERM}'" # Pass the terminal type, so that 'make menuconfig' can work.
2828
"COLUMNS='${COLUMNS:-160}'"
2929
"COLORFGBG='${COLORFGBG}'"
3030
)
@@ -96,18 +96,18 @@ function run_kernel_make_long_running() {
9696

9797
function kernel_determine_toolchain() {
9898
# compare with the architecture of the current Debian node
99-
# if it matches we use the system compiler
10099
if dpkg-architecture -e "${ARCH}"; then
101100
display_alert "Native compilation" "target ${ARCH} on host $(dpkg --print-architecture)"
102101
else
103102
display_alert "Cross compilation" "target ${ARCH} on host $(dpkg --print-architecture)"
104103
fi
105104

105+
declare kernel_compiler_full kernel_compiler_version
106106
if [[ "${KERNEL_COMPILER}" == "clang" ]]; then
107-
KERNEL_COMPILER_FULL="${KERNEL_COMPILER}"
107+
kernel_compiler_full="${KERNEL_COMPILER}"
108108
else
109-
KERNEL_COMPILER_FULL="${KERNEL_COMPILER}gcc"
109+
kernel_compiler_full="${KERNEL_COMPILER}gcc"
110110
fi
111-
kernel_compiler_version="$(eval env "${KERNEL_COMPILER_FULL}" -dumpfullversion -dumpversion)"
112-
display_alert "Compiler version" "${KERNEL_COMPILER_FULL} ${kernel_compiler_version}" "info"
111+
kernel_compiler_version="$(eval env "${kernel_compiler_full}" -dumpfullversion -dumpversion)"
112+
display_alert "Compiler version" "${kernel_compiler_full} ${kernel_compiler_version}" "info"
113113
}

lib/functions/compilation/kernel.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ function compile_kernel() {
7373
declare version
7474
version=$(grab_version "$kernel_work_dir")
7575

76-
# determine the toolchain
77-
declare toolchain
76+
# log the kernel toolchain version
7877
LOG_SECTION="kernel_determine_toolchain" do_with_logging do_with_hooks kernel_determine_toolchain
7978

8079
kernel_config # has it's own logging sections inside

lib/functions/general/python-tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function prepare_python_and_pip() {
107107
"PYTHONUSERBASE=${PYTHON3_INFO[USERBASE]}"
108108
"PYTHONUNBUFFERED=yes"
109109
"PYTHONPYCACHEPREFIX=${PYTHON3_INFO[PYCACHEPREFIX]}"
110-
"PATH=\"${toolchain}:${PYTHON3_INFO[USERBASE]}/bin:${PATH}\"" # add toolchain to PATH to make building wheels work
110+
"PATH='${PYTHON3_INFO[USERBASE]}/bin:${PATH}'"
111111
)
112112

113113
# If the hash file exists, we're done.

lib/functions/host/mountpoints.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function prepare_armbian_mountpoints_description_dict() {
1717
"cache"
1818
"cache/git-bare"
1919
"cache/git-bundles"
20-
"cache/toolchain"
2120
"cache/aptcache"
2221
"cache/rootfs"
2322
"cache/initrd"
@@ -38,7 +37,6 @@ function prepare_armbian_mountpoints_description_dict() {
3837
["cache"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # catch-all cache, could be bind-mounted or a volume. On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.
3938
["cache/git-bare"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # Git bare repos (kernel/u-boot). On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.
4039
["cache/git-bundles"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # Downloads of git bundles, can be bind-mounted or a volume. On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.
41-
["cache/toolchain"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # toolchain cache, can be bind-mounted or a volume. On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.
4240
["cache/aptcache"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # .deb apt cache, replaces apt-cacher-ng. Can be bind-mounted or a volume. On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.
4341
["cache/rootfs"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # rootfs .tar.zst cache, can be bind-mounted or a volume. On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.
4442
["cache/initrd"]="docker_kind_linux=bind docker_kind_darwin=namedvolume" # initrd.img cache, can be bind-mounted or a volume. On Darwin it's too slow to bind-mount, so it's a volume by default. On Linux, it's a bind-mount by default.

lib/functions/host/prepare-host.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ function prepare_host_noninteractive() {
9393

9494
# create directory structure # @TODO: this should be close to DEST, otherwise super-confusing
9595
mkdir -p "${SRC}"/{cache,output} "${USERPATCHES_PATH}" "${SRC}"/output/info
96-
97-
# @TODO: original: mkdir -p "${DEST}"/debs-beta/extra "${DEST}"/debs/extra "${DEST}"/{config,debug,patch} "${USERPATCHES_PATH}"/overlay "${SRC}"/cache/{sources,hash,hash-beta,toolchain,utility,rootfs} "${SRC}"/.tmp
9896
mkdir -p "${USERPATCHES_PATH}"/overlay "${SRC}"/cache/{sources,rootfs} "${SRC}"/.tmp
9997

10098
prepare_host_binfmt_qemu # in qemu-static.sh as most binfmt/qemu logic is there now

0 commit comments

Comments
 (0)