g12: Build dtb/second image and set working boot image offsets
authorJan Altensen <info@stricted.net>
Thu, 24 Jun 2021 17:50:02 +0000 (19:50 +0200)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 27 Jul 2021 21:18:15 +0000 (17:18 -0400)
Change-Id: Iecff2693c55e0b5986353289c9c24fc29f4a88ee

BoardConfigCommon.mk

index bace87eff6dddeb707761d993f37202b0eacb8fb..8e74eb7a481ebc4ba046cae06efca41bd9ef357f 100644 (file)
@@ -42,17 +42,24 @@ DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
 
 ## Kernel
 BOARD_BOOTIMG_HEADER_VERSION := 2
-BOARD_KERNEL_BASE := 0x00000000
+BOARD_DTB_OFFSET := 0x00e88000
+BOARD_KERNEL_BASE := 0x01078000
 BOARD_KERNEL_CMDLINE := androidboot.dynamic_partitions=true androidboot.dtbo_idx=0 androidboot.boot_devices=ffe07000.emmc otg_device=1
 BOARD_KERNEL_IMAGE_NAME := Image.gz
+BOARD_KERNEL_OFFSET := 0x00008000
 BOARD_KERNEL_PAGESIZE := 2048
-BOARD_KERNEL_SEPARATED_DTBO := true
+BOARD_RAMDISK_OFFSET := 0xfef10000
+BOARD_SECOND_OFFSET := 0xfee10000
+BOARD_TAGS_OFFSET := 0xfdf10100
+TARGET_BOOTLOADER_IS_2ND := true
 TARGET_KERNEL_ADDITIONAL_FLAGS := HOSTCFLAGS="-fuse-ld=lld -Wno-unused-command-line-argument"
 TARGET_KERNEL_CLANG_COMPILE := true
 TARGET_KERNEL_CONFIG := g12a_defconfig
 TARGET_KERNEL_SOURCE := kernel/amlogic/linux-4.9
 TARGET_USES_64_BIT_BINDER := true
 
+BOARD_MKBOOTIMG_ARGS = --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) --kernel_offset $(BOARD_KERNEL_OFFSET) --second_offset $(BOARD_SECOND_OFFSET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_TAGS_OFFSET) --dtb_offset $(BOARD_DTB_OFFSET) --header_version $(BOARD_BOOTIMG_HEADER_VERSION) --dtb $(PRODUCT_OUT)/dtb.img
+
 ## LMKD
 TARGET_LMKD_STATS_LOG := true