commit b2f2e5edcab647be9709433eb193df1dc456848e
parent 39dcd079e2a3b722645475205832b5189de7df13
Author: Jan Pobrislo <ccx@te2000.cz>
Date: Sat, 29 Nov 2025 14:01:53 +0000
Make more paths configurable
Diffstat:
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/templates/linux b/templates/linux
@@ -48,17 +48,17 @@ diff -u ../linux.config .config || true
{% endblock build %}
{%- block install %}
-mkdir -p "${dest}/{{docdir}}/linux" "${dest}/boot"
+mkdir -p "${dest}/{{docdir}}/linux" "${dest}/{{kernel_image_path}}"
cp -v .config "${dest}/{{configdir}}"
mv Documentation/* "${dest}/{{docdir}}/linux"
{{ linux_arch_personality|default('') }} make modules_install install \
- INSTALL_MOD_PATH="${dest}/kernel" \
+ INSTALL_MOD_PATH="${dest}/{{kernel_mod_path}}" \
INSTALL_MOD_STRIP=1 \
- INSTALL_PATH="${dest}/boot" \
- INSTALL_DTBS_PATH="${dest}/boot/dtbs"
+ INSTALL_PATH="${dest}/{{kernel_image_path}}" \
+ INSTALL_DTBS_PATH="${dest}/{{kernel_dtbs_path}}"
# remove dangling symlinks
-module_dir="${dest}/kernel/lib/modules/{{ assertion(patch_version|default(tarball_version + ".0", True)) }}"
+module_dir="${dest}/{{kernel_mod_path}}/lib/modules/{{ assertion(patch_version|default(tarball_version + ".0", True)) }}"
rm -f "$module_dir/build" "$module_dir/source"
ls -lhA "$module_dir"
@@ -67,18 +67,18 @@ ls -lhA "$module_dir"
$2 == "boot" { link($0); next }
$2 == "lib" && $3 == "modules" { exit 3 } # make sure kernel modules do not mix with userspace libraries
function mod_path(s) {
- sub("^[.]/kernel/lib/", "./kernel/", s)
+ sub("^[.]/{{kernel_mod_path}}/lib/", "./{{kernel_mod_path}}/", s)
return s
}
$2 == "kernel" && $3 == "lib" && $4 == "modules" { link(mod_path($0)); next }
{% endblock genlinks_rules -%}
{% block genlinks_begin %}
kernel_name="{{ assertion(patch_version|default(tarball_version + ".0", True)) }}"
- x["./boot/vmlinuz"]=1
- x["./boot/System.map"]=1
- x["./kernel/lib/modules/" kernel_name "/modules.alias"]=1
- x["./kernel/lib/modules/" kernel_name "/modules.builtin"]=1
- x["./kernel/lib/modules/" kernel_name "/modules.dep"]=1
- x["./kernel/lib/modules/" kernel_name "/modules.order"]=1
- x["./kernel/lib/modules/" kernel_name "/modules.symbols"]=1
+ x["./{{kernel_image_path}}/vmlinuz"]=1
+ x["./{{kernel_image_path}}/System.map"]=1
+ x["./{{kernel_mod_path}}/lib/modules/" kernel_name "/modules.alias"]=1
+ x["./{{kernel_mod_path}}/lib/modules/" kernel_name "/modules.builtin"]=1
+ x["./{{kernel_mod_path}}/lib/modules/" kernel_name "/modules.dep"]=1
+ x["./{{kernel_mod_path}}/lib/modules/" kernel_name "/modules.order"]=1
+ x["./{{kernel_mod_path}}/lib/modules/" kernel_name "/modules.symbols"]=1
{% endblock genlinks_begin %}
diff --git a/templates/musl-cross-make b/templates/musl-cross-make
@@ -15,6 +15,7 @@ touch musl-cross-make/sources/*
# Patch linker path for dynamic executables
make -C musl-cross-make gcc-{{gcc_ver|shesc}}
+{#- TODO: replace /lib with /{{dynlibdir}} #}
sed -i -e 's|/lib/ld-musl-|{{versions}}/'"$pthbs_package"'/{{triplet}}/lib/ld-musl-|' musl-cross-make/gcc-{{gcc_ver|shesc}}/gcc/config/*/linux*.h
{{make}} -C musl-cross-make || exit $?
make -C musl-cross-make install || exit $?
diff --git a/templates/scriptsetup b/templates/scriptsetup
@@ -16,8 +16,8 @@ for d in bin sbin command; do
done
if test -d vim; then
- mkdir -p "${dest}/vimfiles/pack/plugins/start"
- mv -v vim "${dest}/vimfiles/pack/plugins/start/$pthbs_package"
+ mkdir -p "${dest}/{{vimdir}}/pack/plugins/start"
+ mv -v vim "${dest}/{{vimdir}}/pack/plugins/start/$pthbs_package"
fi
if test -d zsh-functions; then