This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2 of 6] kernel/linux: Extract custom location function and use generic GetCustom


# HG changeset patch
# User David Holsgrove <david.holsgrove@xilinx.com>
# Date 1349847853 -36000
# Node ID b6b1b07f7ab14184f457e907db6269057cdd6126
# Parent  54e6f8f3b141d3502e51e35cdda8aded03b597f4
kernel/linux: Extract custom location function and use generic GetCustom

Config options remain the same as before, just generalised to be used by other
components also

diff -r 54e6f8f3b141 -r b6b1b07f7ab1 scripts/build/kernel/linux.sh
--- a/scripts/build/kernel/linux.sh	Thu Oct 04 13:26:14 2012 +1000
+++ b/scripts/build/kernel/linux.sh	Wed Oct 10 15:44:13 2012 +1000
@@ -29,23 +29,12 @@
     fi
 
     if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
-        if [ ! -d "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then
-            # Wee need to know the custom tarball extension,
-            # so we can create a properly-named symlink, which
-            # we use later on in 'extract'
-            case "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" in
-                *.tar.bz2)      custom_name="linux-custom.tar.bz2";;
-                *.tar.gz|*.tgz) custom_name="linux-custom.tar.gz";;
-                *.tar)          custom_name="linux-custom.tar";;
-                *)  CT_Abort "Unknown extension for custom linux tarball '${CT_KERNEL_LINUX_CUSTOM_LOCATION}'";;
-            esac
-            CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"  \
-                                      "${CT_TARBALLS_DIR}/${custom_name}"
-        else
-            custom_name="linux-custom"
-            CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"  \
-                                      "${CT_SRC_DIR}/${custom_name}"
+        CT_TestAndAbort "Custom linux: CT_CUSTOM_LOCATION_ROOT_DIR or CT_KERNEL_LINUX_CUSTOM_LOCATION must be set." \
+        -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"
+        if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then
+            CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/linux"
         fi
+        CT_GetCustom "linux-${CT_KERNEL_VERSION}" "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"
     else # Not a custom tarball
         case "${CT_KERNEL_VERSION}" in
             2.6.*.*|3.*.*)

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]