g12: Support multiple dtbo's
authorJan Altensen <info@stricted.net>
Tue, 22 Jun 2021 17:39:20 +0000 (19:39 +0200)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 27 Jul 2021 21:18:15 +0000 (17:18 -0400)
Change-Id: I60092adb4e25d699115c0b6f5b3c1434300957e3

BoardConfigCommon.mk
build/tasks/2ndbootloader.mk

index 8e74eb7a481ebc4ba046cae06efca41bd9ef357f..4038ea666c45af44720a4b938c16524e5913003f 100644 (file)
@@ -48,6 +48,7 @@ BOARD_KERNEL_CMDLINE := androidboot.dynamic_partitions=true androidboot.dtbo_idx
 BOARD_KERNEL_IMAGE_NAME := Image.gz
 BOARD_KERNEL_OFFSET := 0x00008000
 BOARD_KERNEL_PAGESIZE := 2048
+BOARD_PREBUILT_DTBOIMAGE ?= $(TARGET_OUT_INTERMEDIATES)/DTBO_OBJ/arch/$(KERNEL_ARCH)/boot/dtbo.img
 BOARD_RAMDISK_OFFSET := 0xfef10000
 BOARD_SECOND_OFFSET := 0xfee10000
 BOARD_TAGS_OFFSET := 0xfdf10100
index e36f76be9a2f4097eb8f15b02110079ff4706166..e67ea684a90186eb2da07cbeb8386ecb1474deaf 100644 (file)
@@ -50,6 +50,12 @@ else
 endif
 
 $(BOARD_PREBUILT_DTBOIMAGE): $(INSTALLED_KERNEL_TARGET) $(MKDTBOIMG)
+ifeq ($(words $(TARGET_DTB_NAME)),1)
        $(MKDTBOIMG) create $@ $(DTBDIR)/$(TARGET_DTBO_NAME).dtb
+else
+       $(MKDTBOIMG) create $@ $(foreach dtbo, $(TARGET_DTB_NAME), \
+               $(DTBDIR)/$(strip $(dtbo)).dtb \
+       )
+endif
 
 endif