summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/Makefile.in19
-rw-r--r--target/linux/Makefile.in.advanced53
2 files changed, 24 insertions, 48 deletions
diff --git a/target/linux/Makefile.in b/target/linux/Makefile.in
index 3e8bc7b30..742fe1942 100644
--- a/target/linux/Makefile.in
+++ b/target/linux/Makefile.in
@@ -26,28 +26,23 @@ LINUX26_BZCAT:=$(BZCAT)
LINUX26_SITE=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
ifeq ($(BOARD_PATH),)
-BOARD_PATH:=$(strip $(subst ",,$(BR2_BOARD_PATH)))
-#"))
+BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
endif
# Linux kernel configuration file
# Has to be set by the target/device
# If it is not set by the target/device, then pick the one from .config
ifndef LINUX26_KCONFIG
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG))),)
-LINUX26_KCONFIG=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG)),)
+LINUX26_KCONFIG=$(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG))
else
# LINUX26_KCONFIG=$(BOARD_PATH)/linux26.config
endif
endif
ifndef LINUX26_FORMAT
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT))),)
-LINUX26_FORMAT=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT)),)
+LINUX26_FORMAT=$(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT))
else
LINUX26_FORMAT=zImage
endif
@@ -67,8 +62,7 @@ endif
endif
endif
-ROOTFS_STRIPPED_SUFFIX=$(strip $(subst ",,$(ROOTFS_SUFFIX)))
-#"))
+ROOTFS_STRIPPED_SUFFIX=$(call qstrip,$(ROOTFS_SUFFIX))
# File name for the Linux kernel binary
ifndef LINUX26_KERNEL
LINUX26_KERNEL_NAME=$(BINARIES_DIR)/$(LINUX26_FORMAT)$(ROOTFS_STRIPPED_SUFFIX)
@@ -86,7 +80,6 @@ LINUX_KERNEL=$(LINUX26_KERNEL_NAME)
ifeq ($(strip $(LINUX26_PATCH_DIR)),)
ifneq ($(BOARD_PATH),)
LINUX26_PATCH_DIR:=$(BOARD_PATH)/kernel-patches/
-#"))
endif
endif
LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \
diff --git a/target/linux/Makefile.in.advanced b/target/linux/Makefile.in.advanced
index 47a1f4ebb..9de47350a 100644
--- a/target/linux/Makefile.in.advanced
+++ b/target/linux/Makefile.in.advanced
@@ -20,8 +20,7 @@ endif
# 4. Use default (2.6.22.1)
ifeq ($(DOWNLOAD_LINUX26_VERSION),)
ifneq ($(BR2_DOWNLOAD_LINUX26_VERSION),)
-DOWNLOAD_LINUX26_VERSION:=$(strip $(subst ",,$(BR2_DOWNLOAD_LINUX26_VERSION)))
-#"))
+DOWNLOAD_LINUX26_VERSION:=$(call qstrip,$(BR2_DOWNLOAD_LINUX26_VERSION))
else
DOWNLOAD_LINUX26_VERSION:=$(LINUX_HEADERS_VERSION)
endif
@@ -35,8 +34,7 @@ endif
# 4. Use default (2.6.22.1)
ifeq ($(LINUX26_VERSION),)
ifneq ($(BR2_LINUX26_VERSION),)
-LINUX26_VERSION:=$(strip $(subst ",,$(BR2_LINUX26_VERSION)))
-#"))
+LINUX26_VERSION:=$(call qstrip,$(BR2_LINUX26_VERSION))
else
LINUX26_VERSION:=$(LINUX_HEADERS_VERSION)
endif
@@ -46,8 +44,7 @@ endif
LINUX26_VERSION_PROBED = `$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) -s kernelrelease`
ifeq ($(BOARD_PATH),)
-BOARD_PATH:=$(strip $(subst ",,$(BR2_BOARD_PATH)))
-#"))
+BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
endif
# Version of Linux AFTER patches
@@ -60,16 +57,12 @@ LINUX_DIR:=$(LINUX26_DIR)
# -----------------------------------------------------------------------------
# Define source name and sites
LINUX26_SOURCE:=linux-$(DOWNLOAD_LINUX26_VERSION).tar.bz2
-LINUX26_SITE:=$(strip $(subst ",,$(BR2_KERNEL_SITE)))
-#"))
+LINUX26_SITE:=$(call qstrip,$(BR2_KERNEL_SITE))
-LINUX26_PATCH_SOURCE:=$(strip $(subst ",,$(BR2_KERNEL_PATCH)))
-#"))
-LINUX26_PATCH_SITE:=$(strip $(subst ",,$(BR2_KERNEL_PATCH_SITE)))
-#"))
+LINUX26_PATCH_SOURCE:=$(call qstrip,$(BR2_KERNEL_PATCH))
+LINUX26_PATCH_SITE:=$(call qstrip,$(BR2_KERNEL_PATCH_SITE))
-LINUX26_BSP_PATCH:=$(strip $(subst ",,$(BR2_LINUX_BSP_PATCH)))
-#"))
+LINUX26_BSP_PATCH:=$(call qstrip,$(BR2_LINUX_BSP_PATCH))
ifneq ($(LINUX26_BSP_PATCH),)
LINUX_HEADERS_DEPENDS:= $(DL_DIR)/$(LINUX26_BSP_PATCH)
@@ -86,8 +79,7 @@ LINUX26_PATCH_DIR:=$(BOARD_PATH)/kernel-patches/
endif
# kernel architecture patches provided by buildroot
-KERNEL_ARCH_PATCH_DIR:=$(strip $(subst ",,$(BR2_KERNEL_ARCH_PATCH_DIR)))
-#"))
+KERNEL_ARCH_PATCH_DIR:=$(call qstrip,$(BR2_KERNEL_ARCH_PATCH_DIR))
@@ -98,10 +90,8 @@ KERNEL_ARCH_PATCH_DIR:=$(strip $(subst ",,$(BR2_KERNEL_ARCH_PATCH_DIR)))
# Has to be set by the target/device
# If it is not set by the target/device, then pick the one from .config
ifndef LINUX26_KCONFIG
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG))),)
-LINUX26_KCONFIG:=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG)),)
+LINUX26_KCONFIG:=$(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG))
else
ifeq ($(BR2_i386),y)
LINUX26_KCONFIG:=$(BOARD_PATH)/linux26.config
@@ -111,18 +101,15 @@ endif
endif
endif
-KERNEL_CONFIG_METHOD:=$(strip $(subst ",,$(BR2_KERNEL_CONFIG_METHOD)))
-#"))
+KERNEL_CONFIG_METHOD:=$(call qstrip,$(BR2_KERNEL_CONFIG_METHOD))
ifeq ($(KERNEL_CONFIG_METHOD),)
KERNEL_CONFIG_METHOD:=menuconfig
endif
# -----------------------------------------------------------------------------
ifndef LINUX26_FORMAT
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT))),)
-#"))
-LINUX26_FORMAT:=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT)))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT)),)
+LINUX26_FORMAT:=$(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT))
else
LINUX26_FORMAT:=zImage
endif
@@ -168,8 +155,7 @@ LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/bzImage
endif
endif
-ROOTFS_STRIPPED_SUFFIX=$(strip $(subst ",,$(ROOTFS_SUFFIX)))
-#"))
+ROOTFS_STRIPPED_SUFFIX=$(call qstrip,$(ROOTFS_SUFFIX))
# -----------------------------------------------------------------------------
# File name for the Linux kernel binary
LINUX26_KERNEL_NAME:=$(LINUX26_FORMAT)$(ROOTFS_STRIPPED_SUFFIX)
@@ -234,10 +220,8 @@ ifeq ($(BR2_LINUX_COPYTO_TFTPBOOT),y)
LINUX26_TARGETS+=/tftpboot/$(LINUX26_KERNEL_NAME)
endif
-ifneq ($(strip $(subst ",,$(BR2_LINUX_COPYTO))),)
-LINUX_COPYTO:=$(strip $(subst ",,$(BR2_LINUX_COPYTO)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_LINUX_COPYTO)),)
+LINUX_COPYTO:=$(call qstrip,$(BR2_LINUX_COPYTO))
LINUX26_TARGETS+=$(LINUX_COPYTO)/$(LINUX26_KERNEL_NAME)
endif
@@ -294,8 +278,7 @@ endif
# =============================================================================
linux_patch: $(LINUX26_DIR)/.patched.board
-KERNEL_EXTRA_VERSION:=$(strip $(subst ",,$(BR2_EXTRA_VERSION)))
-#"))
+KERNEL_EXTRA_VERSION:=$(call qstrip,$(BR2_EXTRA_VERSION))
lxcf: $(LINUX26_DIR)/.config
@@ -337,7 +320,7 @@ ifeq ($(BR2_PACKAGE_LINUX_USE_KCONFIG),y)
$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) $(KERNEL_CONFIG_METHOD) ; \
fi
endif
-ifneq ($(strip $(subst ",,$(BR2_EXTRA_VERSION))),)
+ifneq ($(call qstrip,$(BR2_EXTRA_VERSION)),)
$(SED) 's,^EXTRAVERSION.*,EXTRAVERSION = $(KERNEL_EXTRA_VERSION),g' $(LINUX26_DIR)/Makefile
endif
# $(strip $(subst ",, - ))