summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2020-08-19 19:22:59 -0700
committerLinux Build Service Account <lnxbuild@localhost>2020-08-19 19:22:59 -0700
commitb72ef2c9b9ff682cb371b2ec2fab841dcb623650 (patch)
treede40a9bd1a6b8045bb8cd95279d1421b57c6daab
parent615e00ca6f3bffeb797b675368de149f17552451 (diff)
parent0440fc6971947e9aad13c4f75d5269f750f28d4c (diff)
Merge 0440fc6971947e9aad13c4f75d5269f750f28d4c on remote branch
Change-Id: I786dfd1cbba8d9938c356127f9b055ca8e7723db
-rwxr-xr-xbuildkernel.sh3
-rw-r--r--kernel_definitions.mk35
-rw-r--r--modules_blocklist/modules.blocklist.holi90
3 files changed, 106 insertions, 22 deletions
diff --git a/buildkernel.sh b/buildkernel.sh
index 9ec3256..6880d95 100755
--- a/buildkernel.sh
+++ b/buildkernel.sh
@@ -146,7 +146,8 @@ copy_modules_to_prebuilt()
PREBUILT_OUT=$1
# Clean the DLKM directory to remove stale modules
- rm -rf ${KERNEL_MODULES_OUT}
+ rm -rf ${KERNEL_MODULES_OUT}/*.ko
+ rm -rf ${KERNEL_MODULES_OUT}/*.zip
mkdir -p ${KERNEL_MODULES_OUT}
diff --git a/kernel_definitions.mk b/kernel_definitions.mk
index 5759b95..b0e14ab 100644
--- a/kernel_definitions.mk
+++ b/kernel_definitions.mk
@@ -1,7 +1,11 @@
# Android Kernel compilation/common definitions
ifeq ($(KERNEL_DEFCONFIG),)
+ifneq ($(TARGET_BOARD_AUTO),true)
KERNEL_DEFCONFIG := vendor/$(TARGET_BOARD_PLATFORM)-qgki-debug_defconfig
+else
+ KERNEL_DEFCONFIG := vendor/gen3auto-qgki-debug_defconfig
+endif
endif
TARGET_KERNEL := msm-$(TARGET_KERNEL_VERSION)
@@ -118,7 +122,9 @@ ifeq ($(GKI_KERNEL),1)
GKI_PLATFORM_NAME := $(shell echo $(KERNEL_DEFCONFIG) | sed -r "s/(-gki_defconfig|-qgki_defconfig|-qgki-consolidate_defconfig|-qgki-debug_defconfig)$///")
GKI_PLATFORM_NAME := $(shell echo $(GKI_PLATFORM_NAME) | sed "s/vendor\///g")
TARGET_USES_UNCOMPRESSED_KERNEL := $(shell grep "CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL=y" $(TARGET_KERNEL_SOURCE)/arch/arm64/configs/vendor/$(GKI_PLATFORM_NAME)_GKI.config)
-KERNEL_GENERATE_DEFCONFIG := $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_DEFCONFIG)
+
+# Generate the defconfig file from the fragments
+_x := $(shell ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(real_cc) KERN_OUT=$(KERNEL_OUT) $(TARGET_KERNEL_MAKE_ENV) MAKE_PATH=$(MAKE_PATH) $(TARGET_KERNEL_SOURCE)/scripts/gki/generate_defconfig.sh $(KERNEL_DEFCONFIG))
else
TARGET_USES_UNCOMPRESSED_KERNEL := $(shell grep "CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL=y" $(TARGET_KERNEL_SOURCE)/arch/arm64/configs/$(KERNEL_DEFCONFIG))
endif
@@ -168,6 +174,9 @@ ifeq ($(GKI_KERNEL),1)
BOARD_KERNEL_MODULE_DIRS := $(GKI_TARGET_MODULES_DIR)
BOARD_KERNEL-GKI_BOOTIMAGE_PARTITION_SIZE := 0x06000000
+
+ # Generate the GKI defconfig
+ _x := $(shell ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(real_cc) KERN_OUT=$(KERNEL_OUT) $(TARGET_KERNEL_MAKE_ENV) MAKE_PATH=$(MAKE_PATH) $(TARGET_KERNEL_SOURCE)/scripts/gki/generate_defconfig.sh $(GKI_KERNEL_DEFCONFIG))
endif
endif
@@ -217,19 +226,6 @@ MAKE_PATH := $(SOURCE_ROOT)/prebuilts/build-tools/linux-x86/bin/
# Helper functions
-ifeq ($(GKI_KERNEL),1)
-# Generate the defconfig file from fragments
-# $(1): The defconfig to generate. For example, vendor/lahaina-qgki_defconfig
-define generate-defconfig
- set -x; \
- ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(real_cc) KERN_OUT=$(KERNEL_OUT) $(TARGET_KERNEL_MAKE_ENV) MAKE_PATH=$(MAKE_PATH) $(TARGET_KERNEL_SOURCE)/scripts/gki/generate_defconfig.sh $(1); \
- set +x
-endef
-else
-define generate-defconfig
-endef
-endif
-
# Build the kernel
# $(1): KERNEL_DEFCONFIG to build for
# $(2): KERNEL_OUT directory
@@ -262,27 +258,24 @@ endef
# Android Kernel make rules
$(KERNEL_HEADERS_INSTALL): $(KERNEL_OUT) $(DTC) $(UFDT_APPLY_OVERLAY)
- $(call generate-defconfig,$(KERNEL_DEFCONFIG)); \
$(call build-kernel,$(KERNEL_DEFCONFIG),$(KERNEL_OUT),$(KERNEL_MODULES_OUT),$(KERNEL_HEADERS_INSTALL),1,$(TARGET_PREBUILT_INT_KERNEL))
$(KERNEL_OUT):
mkdir -p $(KERNEL_OUT)
+$(GKI_KERNEL_OUT):
+ mkdir -p $(GKI_KERNEL_OUT)
+
$(KERNEL_USR): $(KERNEL_HEADERS_INSTALL)
rm -rf $(KERNEL_SYMLINK)
ln -s kernel/$(TARGET_KERNEL) $(KERNEL_SYMLINK)
$(TARGET_PREBUILT_KERNEL): $(KERNEL_OUT) $(DTC) $(KERNEL_USR)
echo "Building the requested kernel.."; \
- $(call generate-defconfig,$(KERNEL_DEFCONFIG)); \
$(call build-kernel,$(KERNEL_DEFCONFIG),$(KERNEL_OUT),$(KERNEL_MODULES_OUT),$(KERNEL_HEADERS_INSTALL),0,$(TARGET_PREBUILT_INT_KERNEL))
-# Make GKI_TARGET_PREBUILT_KERNEL dependent on TARGET_PREBUILT_KERNEL just so
-# that the builds are serialzed. This is just to avoid hogging CPU resoruces
-# and to avoid any potential race-conditions.
-$(GKI_TARGET_PREBUILT_KERNEL): $(DTC) $(TARGET_PREBUILT_KERNEL)
+$(GKI_TARGET_PREBUILT_KERNEL): $(DTC) $(UFDT_APPLY_OVERLAY) $(GKI_KERNEL_OUT)
echo "Building GKI kernel.."; \
- $(call generate-defconfig,$(GKI_KERNEL_DEFCONFIG)); \
$(call build-kernel,$(GKI_KERNEL_DEFCONFIG),$(GKI_KERNEL_OUT),$(GKI_KERNEL_MODULES_OUT),$(GKI_KERNEL_HEADERS_INSTALL),0,$(GKI_TARGET_PREBUILT_INT_KERNEL))
$(INSTALLED_KERNEL_TARGET): $(TARGET_PREBUILT_KERNEL) $(GKI_TARGET_PREBUILT_KERNEL)
diff --git a/modules_blocklist/modules.blocklist.holi b/modules_blocklist/modules.blocklist.holi
new file mode 100644
index 0000000..751d4dd
--- /dev/null
+++ b/modules_blocklist/modules.blocklist.holi
@@ -0,0 +1,90 @@
+# Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+blocklist 8250_of
+blocklist dummy_hcd
+blocklist llcc_perfmon
+blocklist tda18250
+blocklist tda9887
+blocklist tuner-simple
+blocklist mt2266
+blocklist tea5767
+blocklist xc5000
+blocklist mt2131
+blocklist qt1010
+blocklist tuner-types
+blocklist tua9001
+blocklist m88rs6000t
+blocklist tda18218
+blocklist mxl5007t
+blocklist fc2580
+blocklist r820t
+blocklist mc44s803
+blocklist fc0012
+blocklist si2157
+blocklist tda827x
+blocklist tuner-xc2028
+blocklist mt2060
+blocklist qm1d1b0004
+blocklist qm1d1c0042
+blocklist tda18212
+blocklist fc0013
+blocklist msi001
+blocklist fc0011
+blocklist tda8290
+blocklist max2165
+blocklist xc4000
+blocklist it913x
+blocklist mt20xx
+blocklist mxl301rf
+blocklist mt2063
+blocklist e4000
+blocklist tea5761
+blocklist tda18271
+blocklist mxl5005s
+blocklist radio-i2c-rtc6226-qca
+blocklist dummy-cpufreq
+blocklist dummy_hcd
+blocklist kheaders
+blocklist atomic64_test
+blocklist test_user_copy
+blocklist lkdtm
+blocklist net_failover
+blocklist adc-tm
+blocklist rtc-test
+blocklist can-bcm
+blocklist can-gw
+blocklist can-raw
+blocklist failover
+blocklist vmw_vsock_virtio_transport
+blocklist vmw_vsock_virtio_transport_common
+blocklist vsock_diag
+blocklist vsock
+blocklist qca_cld3_wlan
+blocklist torture
+blocklist locktorture
+blocklist rcutorture