The initramfs.trx image can be flashed from the web interface of factory
firmware.
Unfortunately, the default boot command of the bootloader does not load
the ramdisk in the FIT image. This means that the image can only be
built when the option TARGET_ROOTFS_INITRAMFS_SEPARATE is disabled.
Tested with firmware 3.0.0.4.388_33965 (U-Boot 2022.10 / 2.0.0.5).
Signed-off-by: Jan Hoffmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20841
Signed-off-by: Hauke Mehrtens <[email protected]>
KERNEL_INITRAMFS := kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+ifeq ($(IB),)
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),)
+ # The default boot command of the bootloader does not load the ramdisk from the FIT image
+ ARTIFACTS := initramfs.trx
+ ARTIFACT/initramfs.trx := append-image-stage initramfs-kernel.bin | \
+ uImage none | asus-trx -v 3 -n $$(DEVICE_MODEL)
+endif
+endif
+endif
endef
TARGET_DEVICES += asus_tuf-ax4200