From 1044934709afbd9c3a87f64f6add749a0290cfec Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Fri, 21 Nov 2014 21:47:47 +0100 Subject: Linux image build: give ability to add extra command line options Signed-off-by: Abdoulaye Walsimou Gaye --- core/kconfig/linux-kernel-build.kconfig | 7 +++++++ core/kconfig/linux.kconfig | 4 ++-- core/toolchain/linux/linux.mk | 8 +++++--- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/kconfig/linux-kernel-build.kconfig b/core/kconfig/linux-kernel-build.kconfig index 6d30536..596fbdd 100644 --- a/core/kconfig/linux-kernel-build.kconfig +++ b/core/kconfig/linux-kernel-build.kconfig @@ -48,10 +48,17 @@ choice Select this option to use an external linux source tree. endchoice +comment "Linux kernel image/modules build options" + config EMBTK_LINUX_BUILD_EXTSRC string "External linux source tree path" depends on EMBTK_LINUX_BUILD_USE_EXTSRC help Please specify your external linux source tree path. +config EMBTK_LINUX_BUILD_EXTRACMD + string "Additional command line options" + help + Here you can add additional command line options to pass to the linux + build system while generating the kernel image. endmenu diff --git a/core/kconfig/linux.kconfig b/core/kconfig/linux.kconfig index 38436b0..abefb70 100644 --- a/core/kconfig/linux.kconfig +++ b/core/kconfig/linux.kconfig @@ -233,13 +233,13 @@ endif config EMBTK_LINUX_HAVE_MIRROR bool "Use a linux mirror" help - specify an alternate location where to download linux sources. + specify an alternate location where to download linux sources. config EMBTK_LINUX_HAVE_MIRROR_SITE depends on EMBTK_LINUX_HAVE_MIRROR string "Mirror site" default "ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror" help - specify an alternate location where to download linux sources + specify an alternate location where to download linux sources config EMBTK_LINUX_NEED_PATCH bool diff --git a/core/toolchain/linux/linux.mk b/core/toolchain/linux/linux.mk index b66998a..7622cf4 100644 --- a/core/toolchain/linux/linux.mk +++ b/core/toolchain/linux/linux.mk @@ -35,6 +35,7 @@ pembtk_linux_dotconfig_f := $(call embtk_uquote,$(CONFIG_EMBTK_LINUX_DOTCONFIG)) pembtk_linux_extsrc-y := $(CONFIG_EMBTK_LINUX_BUILD_USE_EXTSRC) pembtk_linux_srcdir := $(call embtk_uquote,$(or $(CONFIG_EMBTK_LINUX_BUILD_EXTSRC),$(LINUX_SRC_DIR))) pembtk_linux_modules-y := $(shell grep MODULES=y "$(pembtk_linux_dotconfig_f)" 2>/dev/null) +pembtk_linux_extracmd := $(call embtk_uquote,$(CONFIG_EMBTK_LINUX_BUILD_EXTRACMD)) define pembtk_linux_check_dotconfig if [ "x" = "x$(pembtk_linux_dotconfig_f)" ]; then \ @@ -78,14 +79,15 @@ define embtk_install_linux $(if $(pembtk_linux_extsrc-y),$(pembtk_linux_check_extsrc)) cp $(CONFIG_EMBTK_LINUX_DOTCONFIG) $(pembtk_linux_srcdir)/.config $(MAKE) -C $(pembtk_linux_srcdir) $(LINUX_MAKE_OPTS) silentoldconfig - $(MAKE) -C $(pembtk_linux_srcdir) $(LINUX_MAKE_OPTS) $(J) + $(MAKE) -C $(pembtk_linux_srcdir) \ + $(LINUX_MAKE_OPTS) $(pembtk_linux_extracmd) $(J) [ -e $(pembtk_linux_generated/boot) ] || \ install -d $(pembtk_linux_generated/boot) [ -e $(pembtk_linux_generated/boot/dts) ] || \ install -d $(pembtk_linux_generated/boot/dts) cp $(pembtk_linux_srcdir)/vmlinux $(pembtk_linux_generated) - cd $(pembtk_linux_bootdir); \ - for b in $(pembtk_linux_bootfiles); do \ + cd $(pembtk_linux_bootdir); for b in $(pembtk_linux_bootfiles); \ + do \ if [ -e $$b ]; then cp $$b $(pembtk_linux_generated/boot); fi; \ done for b in $$(ls $(pembtk_linux_bootdir)/dts/*.dtb 2>/dev/null); \ -- cgit v1.2.3