Files
device_xiaomi_rosemary/dtbo/dtbo.mk
Kshitij Gupta eb5043a68f rosemary: Add custom dtbo mk rules and append certs
- rosemary's LK appears to be checking for certs added to dtbo during
  signing. We unfortunately do not have the private keys needed to
  generate an image that the bootloader would accept.
- dd out the 2 der certs and append them appropriately with some padding
  to make the bootloader happy. (Extracted from MIUI 12 dtbo.img)

Change-Id: I26402236bcea3516fb98f5d48857106ae30b54c1
Signed-off-by: Kshitij Gupta <kshitijgm@gmail.com>
2023-04-25 17:59:38 +02:00

13 lines
682 B
Makefile

APPEND_CERTS := $(DEVICE_PATH)/dtbo/append_certs.py
BOARD_DTBO_CFG := $(DTBO_OUT)/dtboimg.cfg
MKDTIMG := $(HOST_OUT_EXECUTABLES)/mkdtimg$(HOST_EXECUTABLE_SUFFIX)
MKDTBOIMG := $(HOST_OUT_EXECUTABLES)/mkdtboimg.py$(HOST_EXECUTABLE_SUFFIX)
$(BOARD_PREBUILT_DTBOIMAGE): $(DTC) $(MKDTIMG) $(MKDTBOIMG)
$(BOARD_PREBUILT_DTBOIMAGE):
@echo "Building dtbo.img"
$(call make-dtbo-target,$(KERNEL_DEFCONFIG))
$(call make-dtbo-target,dtbs)
$(MKDTBOIMG) cfg_create $@ $(BOARD_DTBO_CFG) -d $(DTBO_OUT)/arch/$(KERNEL_ARCH)/boot/dts
$(APPEND_CERTS) --alignment 16 --cert1 $(DEVICE_PATH)/dtbo/security/cert1.der --cert2 $(DEVICE_PATH)/dtbo/security/cert2.der --dtbo $(BOARD_PREBUILT_DTBOIMAGE)