openwrt/target/linux/qoriq/image/Makefile
Russell Senior 643a4adf9a qoriq: pad rootfs with zeros
Presently, sysupgrade -n does *not* reset the overlayfs, retaining
unwanted filesystem contents. Adding PADDING=1 in front of
gen_image_generic.sh in image/Makefile ensures that the overlayfs is
recreated on firstboot.

Fixes: 080a769b4d ("qoriq: new target")
Signed-off-by: Russell Senior <russell@personaltelco.net>
[add Fixes tag, rewrite commit subject and message to respect line
length]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-12-02 14:06:56 +02:00

37 lines
1.0 KiB
Makefile

# 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
$(CP) $(KDIR)/$(DEVICE_NAME)$(KERNEL_SUFFIX) $@.boot
$(if $(DEVICE_DTS),\
$(foreach dtb,$(DEVICE_DTS),$(CP) $(KDIR)/image-$(dtb).dtb $@.boot), \
$(CP) $(KDIR)/image-/*.dtb $@.boot)
PADDING=1 $(SCRIPT_DIR)/gen_image_generic.sh \
$@ \
$(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))