mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
- filter out eventual -fPIC -fpic -DPIC flags from the target cflags
Honor the .config setting for KCONFIG and FORMAT iff not imposed by the target/device. If they are not set in the config, the defaults (zImage etc) still apply.
This commit is contained in:
parent
5dd91e234e
commit
e252fa9385
@ -24,6 +24,25 @@ LINUX26_SITE=http://ftp.kernel.org/pub/linux/kernel/v2.6
|
|||||||
#LINUX26_FORMAT=vmlinux
|
#LINUX26_FORMAT=vmlinux
|
||||||
#LINUX26_BINLOC=$(LINUX26_FORMAT)
|
#LINUX26_BINLOC=$(LINUX26_FORMAT)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# LINUX26_KCONFIG=$(BR2_BOARD_PATH)/linux26.config
|
||||||
|
ifndef LINUX26_KCONFIG
|
||||||
|
ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG))),)
|
||||||
|
LINUX26_KCONFIG=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG)))
|
||||||
|
#"))
|
||||||
|
#"))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifndef LINUX26_FORMAT
|
||||||
|
ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT))),)
|
||||||
|
LINUX26_FORMAT=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT)))
|
||||||
|
#"))
|
||||||
|
#"))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Has to be set by the target/device
|
# Has to be set by the target/device
|
||||||
# LINUX26_FORMAT=bzImage
|
# LINUX26_FORMAT=bzImage
|
||||||
ifndef LINUX26_FORMAT
|
ifndef LINUX26_FORMAT
|
||||||
@ -35,10 +54,6 @@ ifndef LINUX26_BINLOC
|
|||||||
LINUX26_BINLOC=arch/$(KERNEL_ARCH)/boot/$(LINUX26_FORMAT)
|
LINUX26_BINLOC=arch/$(KERNEL_ARCH)/boot/$(LINUX26_FORMAT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Linux kernel configuration file
|
|
||||||
# Has to be set by the target/device
|
|
||||||
# LINUX26_KCONFIG=$(BR2_BOARD_PATH)/linux26.config
|
|
||||||
|
|
||||||
# File name for the Linux kernel binary
|
# File name for the Linux kernel binary
|
||||||
LINUX26_KERNEL=linux-kernel-$(LINUX26_VERSION)-$(KERNEL_ARCH)
|
LINUX26_KERNEL=linux-kernel-$(LINUX26_VERSION)-$(KERNEL_ARCH)
|
||||||
|
|
||||||
@ -52,10 +67,10 @@ LINUX_KERNEL=$(LINUX26_KERNEL)
|
|||||||
|
|
||||||
# kernel patches
|
# kernel patches
|
||||||
LINUX26_PATCH_DIR=$(BR2_BOARD_PATH)/kernel-patches/
|
LINUX26_PATCH_DIR=$(BR2_BOARD_PATH)/kernel-patches/
|
||||||
|
__LINUX26_NO_PIC=-fPIC -fpic -DPIC
|
||||||
LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS=$(HOSTCFLAGS) \
|
LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS=$(HOSTCFLAGS) \
|
||||||
ARCH=$(KERNEL_ARCH) \
|
ARCH=$(KERNEL_ARCH) \
|
||||||
CFLAGS_KERNEL="$(TARGET_CFLAGS)" \
|
CFLAGS_KERNEL="$(filter-out $(__LINUX26_NO_PIC),$(TARGET_CFLAGS))" \
|
||||||
INSTALL_MOD_PATH=$(TARGET_DIR) \
|
INSTALL_MOD_PATH=$(TARGET_DIR) \
|
||||||
CROSS_COMPILE=$(KERNEL_CROSS)
|
CROSS_COMPILE=$(KERNEL_CROSS)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user