diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-07-19 13:26:34 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-07-19 13:26:34 +0800 |
commit | 73065c7f277e968a8938752ebf38e916cf55a5dd (patch) | |
tree | 42fc99675d170ca010eca8496b66539b7ddf8a85 /scripts | |
parent | 899e015abf8c70088e8b67e87586ae81f305711c (diff) | |
download | crosstool-ng-73065c7f277e968a8938752ebf38e916cf55a5dd.tar.gz crosstool-ng-73065c7f277e968a8938752ebf38e916cf55a5dd.tar.bz2 crosstool-ng-73065c7f277e968a8938752ebf38e916cf55a5dd.zip |
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/kernel/hurd.sh | 71 | ||||
-rw-r--r-- | scripts/functions | 1 |
2 files changed, 72 insertions, 0 deletions
diff --git a/scripts/build/kernel/hurd.sh b/scripts/build/kernel/hurd.sh new file mode 100644 index 00000000..fcda95bc --- /dev/null +++ b/scripts/build/kernel/hurd.sh @@ -0,0 +1,71 @@ +# This file declares functions to install the kernel headers for linux +# Copyright 2007 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +CT_DoKernelTupleValues() +{ + : +} + +# Download the kernel +do_kernel_get() +{ + CT_Fetch HURD + CT_Fetch GNUMACH + CT_Fetch MIG +} + +# Extract kernel +do_kernel_extract() +{ + # TBD verify linux_disable_build_relocs is run + CT_ExtractPatch HURD + CT_ExtractPatch GNUMACH + CT_ExtractPatch MIG +} + +# Install kernel headers using headers_install from kernel sources. +do_kernel_headers() +{ + CT_DoStep INFO "Installing kernel headers" + + for component in gnumach mig hurd; do + local build_dir="${CT_BUILD_DIR}/${component}" + local src_dir="${CT_SRC_DIR}/${component}" + + CT_mkdir_pushd "${build_dir}" + CT_DoLog EXTRA "crupest PATH $PATH" + + case ${component} in + gnumach) + CT_DoLog EXTRA "Installing GNU Mach headers" + CT_DoExecLog ALL \ + ${src_dir}/configure \ + --host="${CT_TARGET}" \ + --prefix="/usr" + CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install-data + ;; + mig) + CT_DoLog EXTRA "Installing GNU MIG" + CT_DoExecLog ALL \ + ${src_dir}/configure \ + --target="${CT_TARGET}" \ + --prefix="/usr" + CT_DoExecLog ALL \ + make TARGET_CFLAGS="-isysroot ${CT_SYSROOT_DIR}" install + ;; + hurd) + CT_DoLog EXTRA "Installing Hurd headers" + CT_DoExecLog ALL \ + ${src_dir}/configure \ + --host="${CT_TARGET}" \ + --prefix="/usr" + CT_DoExecLog ALL make prefix="${CT_SYSROOT_DIR}/usr" install-data-local-headers + ;; + esac + + CT_Popd + done + + CT_EndStep +} diff --git a/scripts/functions b/scripts/functions index 9ee0391b..cd15f39b 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1780,6 +1780,7 @@ CT_Mirrors() case "${org}" in GNU) + echo "https://mirrors.tuna.tsinghua.edu.cn/gnu/${project}" echo "https://ftpmirror.gnu.org/gnu/${project}" echo "http://ftpmirror.gnu.org/gnu/${project}" echo "https://ftp.gnu.org/gnu/${project}" |