scripts/build/kernel/linux.sh
changeset 3079 37831a33e07e
parent 3076 63d108a39453
child 3080 f4a0fc3d0aad
     1.1 --- a/scripts/build/kernel/linux.sh	Thu Oct 11 14:39:40 2012 +1000
     1.2 +++ b/scripts/build/kernel/linux.sh	Tue Oct 16 20:57:44 2012 +0200
     1.3 @@ -59,13 +59,25 @@
     1.4  
     1.5  # Extract kernel
     1.6  do_kernel_extract() {
     1.7 -    # If using custom headers, or custom directory location, nothing to do
     1.8 -    if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y"    \
     1.9 -         -o -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then
    1.10 +    # If using a custom headers tree, nothing to do
    1.11 +    if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]
    1.12          return 0
    1.13      fi
    1.14 -   
    1.15 +
    1.16 +    # If using a custom directory location, nothing to do
    1.17 +    if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y"    \
    1.18 +         -a -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then
    1.19 +        return 0
    1.20 +    fi
    1.21 +
    1.22 +    # Otherwise, we're using either a mainstream tarball, or a custom
    1.23 +    # tarball; in either case, we need to extract
    1.24      CT_Extract "linux-${CT_KERNEL_VERSION}"
    1.25 +
    1.26 +    # If using a custom tarball, no need to patch
    1.27 +    if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
    1.28 +        return 0
    1.29 +    fi
    1.30      CT_Patch "linux" "${CT_KERNEL_VERSION}"
    1.31  }
    1.32