From 80b6361575eea0fcd94ce179a7dc35f1adc8e7f7 Mon Sep 17 00:00:00 2001 From: German Monroy Date: Thu, 29 Sep 2011 17:39:30 -0700 Subject: [PATCH] merge of reated changes kernel build: add Android makefile So that this kernel can be compiled together with the rest of Android (i.e. build automatically creates boot.bin) Change-Id: I7f59d0d17ed267e101f0cee2f75a5893de5cfbcb kbuild: add a make defoldconfig make option The oldconfig option is asking user to choose when new config options are defined in KConfig files, and not in .config This prevents automatic builds. This make target will use default values for all options not specified in .config xxChange - Id: I713a5cc248130056441060dccfcb492ad0d8acb5 Signed-off-by: Pierre Tardy Change-Id: I5f12ca9bc66ba7ac54bc205319c23d2875c0ea6f --- AndroidKernel.mk | 22 ++++++++++++++++++++++ scripts/kconfig/Makefile | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 AndroidKernel.mk diff --git a/AndroidKernel.mk b/AndroidKernel.mk new file mode 100644 index 0000000..71b5b83 --- /dev/null +++ b/AndroidKernel.mk @@ -0,0 +1,22 @@ +# This makefile is included from vendor/intel/*/AndroidBoard.mk. +# If the kernel source is present, AndroidBoard.mk will perform a kernel build +# otherise, AndroidBoard.mk will find the kernel binaries in a tarball. + +# This can be overridden on the make command line. +TARGET_KERNEL_SOURCE_IS_PRESENT ?= true + +.PHONY: get_kernel_from_source menuconfig +menuconfig get_kernel_from_source: + TARGET_TOOLS_PREFIX="$(ANDROID_BUILD_TOP)/$(TARGET_TOOLS_PREFIX)" DIFFCONFIGS="$(DIFFCONFIGS)" vendor/intel/support/kernel-build.sh -c $(CUSTOM_BOARD) -o $@ + +# This rule is useful for creating a kernel that will be +# shared with a tree that does not have kernel source. +make_kernel_tarball: get_kernel_from_source bootimage + @echo Building kernel tarball: $(TARGET_KERNEL_TARBALL) + @rm -rf $(PRODUCT_OUT)/kerneltarball + @mkdir -p $(PRODUCT_OUT)/kerneltarball/root/lib/modules + @cp $(PRODUCT_OUT)/root/lib/modules/* $(PRODUCT_OUT)/kerneltarball/lib/modules + @cp $(PRODUCT_OUT)/bzImage $(PRODUCT_OUT)/kerneltarball/ + tar cvzf $(TARGET_KERNEL_TARBALL) -C $(PRODUCT_OUT)/kerneltarball bzImage root/lib/modules + +$(PRODUCT_OUT)/bzImage: get_kernel_from_source diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index faa9a47..bb3ba10 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -29,6 +29,9 @@ nconfig: $(obj)/nconf oldconfig: $(obj)/conf $< --$@ $(Kconfig) +defoldconfig: $(obj)/conf + $< --defconfig=.config $(Kconfig) + silentoldconfig: $(obj)/conf $(Q)mkdir -p include/generated $< --$@ $(Kconfig) -- 2.7.4