kernel/linux: prepare for arch whose kenel name is not the standard name
authorZhenqiang Chen <zhenqiang.chen@linaro.org>
Mon Dec 30 23:15:02 2013 +0100 (2013-12-30)
changeset 32613b61be3d7aa6
parent 3260 f43e37c7c047
child 3262 87ad9e82546d
kernel/linux: prepare for arch whose kenel name is not the standard name

For some architectures, the kernel architecture name is not the common
name of the architecture for other tools.

For example: ARM 64-bit is commonly referenced as aarch64, but the kernel
calls it arm64.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@free.fr: split out of the aarch64 patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts/build/kernel/linux.sh
     1.1 --- a/scripts/build/kernel/linux.sh	Tue Dec 31 13:02:57 2013 +0100
     1.2 +++ b/scripts/build/kernel/linux.sh	Mon Dec 30 23:15:02 2013 +0100
     1.3 @@ -97,6 +97,7 @@
     1.4  # Install kernel headers using headers_install from kernel sources.
     1.5  do_kernel_install() {
     1.6      local kernel_path
     1.7 +    local arch
     1.8  
     1.9      CT_DoLog DEBUG "Using kernel's headers_install"
    1.10  
    1.11 @@ -108,11 +109,13 @@
    1.12      fi
    1.13      V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
    1.14  
    1.15 +    kernel_arch="${CT_ARCH}"
    1.16 +
    1.17      CT_DoLog EXTRA "Installing kernel headers"
    1.18      CT_DoExecLog ALL                                    \
    1.19      make -C "${kernel_path}"                            \
    1.20           O="${CT_BUILD_DIR}/build-kernel-headers"       \
    1.21 -         ARCH=${CT_ARCH}                                \
    1.22 +         ARCH=${arch}                                   \
    1.23           INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr"       \
    1.24           ${V_OPT}                                       \
    1.25           headers_install
    1.26 @@ -122,7 +125,7 @@
    1.27          CT_DoExecLog ALL                                    \
    1.28          make -C "${kernel_path}"                            \
    1.29               O="${CT_BUILD_DIR}/build-kernel-headers"       \
    1.30 -             ARCH=${CT_ARCH}                                \
    1.31 +             ARCH=${arch}                                   \
    1.32               INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr"       \
    1.33               ${V_OPT}                                       \
    1.34               headers_check