1 # SPDX-License-Identifier: GPL-2.0-only
3 include $(TOPDIR
)/rules.mk
4 include $(INCLUDE_DIR
)/image.mk
6 SQUASHFSCOMP
:= xz
$(LZMA_XZ_OPTIONS
)
8 define Build
/sdcard-img
11 $(CP
) $(KDIR
)/$(DEVICE_NAME
)$(KERNEL_SUFFIX
) $@.boot
13 $(foreach dtb
,$(DEVICE_DTS
),$(CP
) $(KDIR
)/image-
$(dtb
).dtb
$@.boot
), \
14 $(CP
) $(KDIR
)/image-
/*.dtb
$@.boot
)
16 PADDING
=1 $(SCRIPT_DIR
)/gen_image_generic.sh \
18 $(CONFIG_TARGET_KERNEL_PARTSIZE
) $@.boot \
19 $(CONFIG_TARGET_ROOTFS_PARTSIZE
) $(IMAGE_ROOTFS
) \
22 $(if
$(UBOOT
),dd if
=$(STAGING_DIR_IMAGE
)/$(UBOOT
).img of
=$@ bs
=512 skip
=1 seek
=1 conv
=notrunc
)
27 DEVICE_DTS
:= $(subst _
,-,$(1))
28 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
29 KERNEL_ENTRY
:= 0x00000000
30 KERNEL_LOADADDR
:= 0x00000000
34 include $(SUBTARGET
).mk
36 $(eval
$(call BuildImage
))