summaryrefslogtreecommitdiff
path: root/scripts/build/kernel
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-30 05:32:38 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:57:56 (GMT)
commit567277099a487508fd228a4c56f3583db3fa96c9 (patch)
tree19b7f40c0f6e4e6284e799dbac1098bd8805dc2d /scripts/build/kernel
parent57426168ad2c7e8367786ed466c86f6aeb49b3c3 (diff)
Fix the references to old config variables
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/kernel')
-rw-r--r--scripts/build/kernel/linux.sh55
1 files changed, 5 insertions, 50 deletions
diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh
index cd4a456..0f04d64 100644
--- a/scripts/build/kernel/linux.sh
+++ b/scripts/build/kernel/linux.sh
@@ -19,58 +19,12 @@ CT_DoKernelTupleValues() {
# Download the kernel
do_kernel_get() {
- local k_ver
- local custom_name
- local rel_dir
- local korg_base mirror_base
-
- if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
- CT_GetCustom "linux" "${CT_KERNEL_LINUX_CUSTOM_VERSION}" \
- "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"
- else # Not a custom tarball
- case "${CT_KERNEL_VERSION}" in
- 2.6.*.*|3.*.*|4.*.*)
- # 4-part versions (for 2.6 stables and long-terms), and
- # 3-part versions (for 3.x.y and 4.x.y stables and long-terms)
- # we need to trash the last digit
- k_ver="${CT_KERNEL_VERSION%.*}"
- ;;
- 2.6.*|3.*|4.*)
- # 3-part version (for 2.6.x initial releases), and 2-part
- # versions (for 3.x and 4.x initial releases), use all of it
- k_ver="${CT_KERNEL_VERSION}"
- ;;
- esac
- case "${CT_KERNEL_VERSION}" in
- 2.6.*) rel_dir=v2.6;;
- 3.*) rel_dir=v3.x;;
- 4.*) rel_dir=v4.x;;
- esac
- korg_base="http://www.kernel.org/pub/linux/kernel/${rel_dir}"
- CT_GetFile "linux-${CT_KERNEL_VERSION}" \
- "${korg_base}" \
- "${korg_base}/longterm/v${k_ver}" \
- "${korg_base}/longterm"
- fi
+ CT_Fetch LINUX
}
# Extract kernel
do_kernel_extract() {
- # 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
- 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}"
-
- # If using a custom tarball, no need to patch
- if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
- return 0
- fi
- CT_Patch "linux" "${CT_KERNEL_VERSION}"
+ CT_ExtractPatch LINUX
# Disable building relocs application - it needs <linux/types.h>
# on the host, which may not be present on Cygwin or MacOS; it
@@ -79,7 +33,8 @@ do_kernel_extract() {
# This is not done as a patch, since it varies from Linux version
# to version - patching each particular Linux version would be
# too cumbersome.
- CT_Pushd "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}"
+ # TBD should happen before marking the sources as "patched"?
+ CT_Pushd "${CT_SRC_DIR}/linux"
sed -i -r 's/(\$\(MAKE\) .* relocs)$/:/' arch/*/Makefile
CT_Popd
}
@@ -93,7 +48,7 @@ do_kernel_headers() {
mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
- kernel_path="${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}"
+ kernel_path="${CT_SRC_DIR}/linux"
V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
kernel_arch="${CT_ARCH}"