• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Use this file to generate dtb.img and dtbo.img instead of using
2# BOARD_PREBUILT_DTBIMAGE_DIR. We need to keep dtb and dtbo files at the fixed
3# positions in images, so that bootloader can rely on their indexes in the
4# image. As dtbo.img must be signed with AVB tool, we generate intermediate
5# dtbo.img, and the resulting $(PRODUCT_OUT)/dtbo.img will be created with
6# Android build system, by exploiting BOARD_PREBUILT_DTBOIMAGE variable.
7
8ifneq ($(filter beagle_x15%, $(TARGET_DEVICE)),)
9
10MKDTIMG := $(realpath prebuilts/misc/$(HOST_PREBUILT_TAG)/libufdt/mkdtimg)
11DTBIMAGE := $(PRODUCT_OUT)/dtb.img
12DTBOIMAGE := $(PRODUCT_OUT)/$(DTBO_UNSIGNED)
13
14# Please keep this list fixed: add new files in the end of the list
15DTB_FILES := \
16	$(DTB_DIR)/am57xx-beagle-x15-revc.dtb \
17
18# Please keep this list fixed: add new files in the end of the list
19DTBO_FILES := \
20	$(DTBO_DIR)/am57xx-evm-common.dtbo \
21	$(DTBO_DIR)/am57xx-evm-reva3.dtbo
22
23$(DTBIMAGE): $(DTB_FILES)
24	cat $^ > $@
25
26$(DTBOIMAGE): $(DTBO_FILES)
27	$(MKDTIMG) create $@ $^
28
29include $(CLEAR_VARS)
30LOCAL_MODULE := dtbimage
31LOCAL_LICENSE_KINDS := legacy_notice
32LOCAL_LICENSE_CONDITIONS := notice
33LOCAL_ADDITIONAL_DEPENDENCIES := $(DTBIMAGE)
34include $(BUILD_PHONY_PACKAGE)
35
36include $(CLEAR_VARS)
37LOCAL_MODULE := dtboimage
38LOCAL_LICENSE_KINDS := legacy_notice
39LOCAL_LICENSE_CONDITIONS := notice
40LOCAL_ADDITIONAL_DEPENDENCIES := $(DTBOIMAGE)
41include $(BUILD_PHONY_PACKAGE)
42
43droidcore: dtbimage dtboimage
44
45endif
46