1.1 --- a/scripts/build/kernel/linux.sh Thu Oct 04 13:26:14 2012 +1000
1.2 +++ b/scripts/build/kernel/linux.sh Thu Oct 11 14:39:40 2012 +1000
1.3 @@ -29,23 +29,8 @@
1.4 fi
1.5
1.6 if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
1.7 - if [ ! -d "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then
1.8 - # Wee need to know the custom tarball extension,
1.9 - # so we can create a properly-named symlink, which
1.10 - # we use later on in 'extract'
1.11 - case "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" in
1.12 - *.tar.bz2) custom_name="linux-custom.tar.bz2";;
1.13 - *.tar.gz|*.tgz) custom_name="linux-custom.tar.gz";;
1.14 - *.tar) custom_name="linux-custom.tar";;
1.15 - *) CT_Abort "Unknown extension for custom linux tarball '${CT_KERNEL_LINUX_CUSTOM_LOCATION}'";;
1.16 - esac
1.17 - CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" \
1.18 - "${CT_TARBALLS_DIR}/${custom_name}"
1.19 - else
1.20 - custom_name="linux-custom"
1.21 - CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" \
1.22 - "${CT_SRC_DIR}/${custom_name}"
1.23 - fi
1.24 + CT_GetCustom "linux" "${CT_KERNEL_VERSION}" \
1.25 + "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"
1.26 else # Not a custom tarball
1.27 case "${CT_KERNEL_VERSION}" in
1.28 2.6.*.*|3.*.*)
1.29 @@ -74,12 +59,12 @@
1.30
1.31 # Extract kernel
1.32 do_kernel_extract() {
1.33 - if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" \
1.34 - -o -d "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then
1.35 + # If using custom headers, or custom directory location, nothing to do
1.36 + if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" \
1.37 + -o -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then
1.38 return 0
1.39 fi
1.40
1.41 - # This also handles the custom tarball
1.42 CT_Extract "linux-${CT_KERNEL_VERSION}"
1.43 CT_Patch "linux" "${CT_KERNEL_VERSION}"
1.44 }