2021-08-06 21:35:53 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
|
|
|
SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS)
|
|
|
|
|
|
|
|
define Build/sdcard-img
|
|
|
|
rm -fR $@.boot
|
|
|
|
mkdir -p $@.boot
|
2022-04-26 15:18:20 +00:00
|
|
|
$(CP) $(KDIR)/$(DEVICE_NAME)$(KERNEL_SUFFIX) $@.boot
|
2021-08-06 21:35:53 +00:00
|
|
|
$(if $(DEVICE_DTS),\
|
|
|
|
$(foreach dtb,$(DEVICE_DTS),$(CP) $(KDIR)/image-$(dtb).dtb $@.boot), \
|
|
|
|
$(CP) $(KDIR)/image-/*.dtb $@.boot)
|
|
|
|
|
2023-12-01 21:48:56 +00:00
|
|
|
PADDING=1 $(SCRIPT_DIR)/gen_image_generic.sh \
|
2021-08-06 21:35:53 +00:00
|
|
|
$@ \
|
|
|
|
$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
|
|
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
|
|
|
|
2048
|
|
|
|
|
|
|
|
$(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Device/Default
|
|
|
|
PROFILES := Default
|
|
|
|
DEVICE_DTS := $(subst _,-,$(1))
|
|
|
|
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
|
|
|
KERNEL_ENTRY := 0x00000000
|
|
|
|
KERNEL_LOADADDR := 0x00000000
|
|
|
|
KERNEL := kernel-bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
include $(SUBTARGET).mk
|
|
|
|
|
|
|
|
$(eval $(call BuildImage))
|