From 2d9f068f2f4cb2efd3751096e73991d57fe251d8 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Tue, 22 Jun 2021 19:39:20 +0200 Subject: [PATCH] g12: Support multiple dtbo's Change-Id: I60092adb4e25d699115c0b6f5b3c1434300957e3 --- BoardConfigCommon.mk | 1 + build/tasks/2ndbootloader.mk | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 8e74eb7..4038ea6 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -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 diff --git a/build/tasks/2ndbootloader.mk b/build/tasks/2ndbootloader.mk index e36f76b..e67ea68 100644 --- a/build/tasks/2ndbootloader.mk +++ b/build/tasks/2ndbootloader.mk @@ -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 -- 2.20.1