summaryrefslogtreecommitdiff
path: root/scripts/build/kernel
diff options
context:
space:
mode:
authorDavid Holsgrove <david.holsgrove@xilinx.com>2012-10-11 04:39:40 (GMT)
committerDavid Holsgrove <david.holsgrove@xilinx.com>2012-10-11 04:39:40 (GMT)
commitbdc4ed3df17b428e388bdadc0cae8ea3faa3c3b8 (patch)
tree1f3f7a34daa83a4238104036fe77b4c9455c62a4 /scripts/build/kernel
parentf242016a0921f3aeac885b3332acd14fdaf14af1 (diff)
kernel/linux: use generic custom infrastructure
Config options remain the same as before, just generalised to be used by other components also. Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com> [yann.morin.1998@free.fr: fix indentation, fix comment] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <50674fe47431174aab80.1349931193@localhost.localdomain> PatchWork-Id: 190786
Diffstat (limited to 'scripts/build/kernel')
-rw-r--r--scripts/build/kernel/linux.sh25
1 files changed, 5 insertions, 20 deletions
diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh
index 9d27d92..dad85c4 100644
--- a/scripts/build/kernel/linux.sh
+++ b/scripts/build/kernel/linux.sh
@@ -29,23 +29,8 @@ do_kernel_get() {
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}"
- 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.*.*)
@@ -74,12 +59,12 @@ do_kernel_get() {
# Extract kernel
do_kernel_extract() {
- if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" \
- -o -d "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then
+ # If using custom headers, or custom directory location, nothing to do
+ if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" \
+ -o -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then
return 0
fi
- # This also handles the custom tarball
CT_Extract "linux-${CT_KERNEL_VERSION}"
CT_Patch "linux" "${CT_KERNEL_VERSION}"
}