[Dev] crosstool-ng-libre
Josh Branning
lovell.joshyyy at gmail.com
Tue Mar 22 05:06:32 GMT 2016
Hello,
I have received a laptop, on which I intend to cross-compile the
parabola base packages, using crosstool-ng-libre, on debian. The idea,
is that it will be possible to create something like 'parabola from
scratch', and could help with reproducible builds.
When I wrote the patch for crosstool-ng-libre, I only tested to see if
it would download the linux-libre kernel instead of the vanilla kernel.
Unfortunately, upon further, recent, testing, I found that the compiling
process for the toolchain breaks when attempting to patch the kernel.
So here is the updated patch. Which has been successfully tested to see
if it can build a complete toolchain.
BRgs.
Josh
--- crosstool-ng-1.20.0.old/scripts/build/kernel/linux.sh 2014-09-08
22:58:37.000000000 +0100
+++ crosstool-ng-1.20.0/scripts/build/kernel/linux.sh 2016-03-22
01:01:24.800141359 +0000
@@ -45,12 +45,8 @@
k_ver="${CT_KERNEL_VERSION}"
;;
esac
- case "${CT_KERNEL_VERSION}" in
- 2.6.*) rel_dir=v2.6;;
- 3.*) rel_dir=v3.x;;
- esac
- korg_base="http://ftp.kernel.org/pub/linux/kernel/${rel_dir}"
- CT_GetFile "linux-${CT_KERNEL_VERSION}" \
+
korg_base="http://linux-libre.fsfla.org/pub/linux-libre/releases/${CT_KERNEL_VERSION}-gnu"
+ CT_GetFile "linux-libre-${CT_KERNEL_VERSION}-gnu" \
"${korg_base}" \
"${korg_base}/longterm/v${k_ver}" \
"${korg_base}/longterm"
@@ -66,13 +62,18 @@
# If using a custom directory location, nothing to do
if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" \
- -a -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then
+ -a -d "${CT_SRC_DIR}/linux-libre-${CT_KERNEL_VERSION}-gnu" ]; then
return 0
fi
# Otherwise, we're using either a mainstream tarball, or a custom
# tarball; in either case, we need to extract
- CT_Extract "linux-${CT_KERNEL_VERSION}"
+ CT_Extract "linux-libre-${CT_KERNEL_VERSION}-gnu"
+
+ #The following IF statement is a hack, it renames the source
directory so that CT_Patch will work on the libre kernel.
+ if [ -d "${CT_SRC_DIR}/linux-libre-${CT_KERNEL_VERSION}-gnu" ]; then
+ mv "${CT_SRC_DIR}/linux-libre-${CT_KERNEL_VERSION}-gnu"
"${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}"
+ fi
# If using a custom tarball, no need to patch
if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
More information about the Dev
mailing list