Adding rootfs.tar.gz to sysupgrade.tar.gz?

I am generating the following image files:

-rw-r--r-- 1 grommish grommish     1967 Jul  8 22:28 config.buildinfo
-rw-r--r-- 1 grommish grommish      341 Jul  8 22:28 feeds.buildinfo
-rw-r--r-- 1 grommish grommish  7034876 Jul  8 22:30 openwrt-octeon-itus-itusbridge-ext4-sysupgrade.tar.gz
-rwxr-xr-x 1 grommish grommish 17233208 Jul  8 22:30 openwrt-octeon-itus-itusbridge-initramfs-kernel.bin
-rwxr-xr-x 1 grommish grommish  8385848 Jul  8 22:30 openwrt-octeon-itus-itusbridge-kernel.bin
-rw-r--r-- 1 grommish grommish 11069440 Jul  8 22:30 openwrt-octeon-itus-itusbridge-squashfs-sysupgrade.tar
-rw-r--r-- 1 grommish grommish  7034881 Jul  8 22:30 openwrt-octeon-itus-itusrouter-ext4-sysupgrade.tar.gz
-rwxr-xr-x 1 grommish grommish 17233208 Jul  8 22:30 openwrt-octeon-itus-itusrouter-initramfs-kernel.bin
-rwxr-xr-x 1 grommish grommish  8385848 Jul  8 22:30 openwrt-octeon-itus-itusrouter-kernel.bin
-rw-r--r-- 1 grommish grommish 11069440 Jul  8 22:30 openwrt-octeon-itus-itusrouter-squashfs-sysupgrade.tar
-rw-r--r-- 1 grommish grommish     3497 Jul  8 22:30 openwrt-octeon-itus.manifest
-rw-r--r-- 1 grommish grommish  3277518 Jul  8 22:30 openwrt-octeon-itus-rootfs.tar.gz
drwxr-xr-x 2 grommish grommish     4096 Jul  8 22:28 packages
-rw-r--r-- 1 grommish grommish     1169 Jul  8 22:30 profiles.json
-rw-r--r-- 1 grommish grommish     1458 Jul  8 22:30 sha256sums
-rw-r--r-- 1 grommish grommish       18 Jul  8 22:28 version.buildinfo

And in the -ext4-sysupgrade.tar.gz files:

-rw-r--r--    1 root     root            11 Jul  7 08:12 CONTROL
-rwxr-xr-x    1 root     root       8385848 Jul  7 08:12 kernel
-rw-r--r--    1 root     root     109051904 Jul  7 08:12 root

I am looking to generate a openwrt-octeon-itus-itusxxxxx-ext4-sysupgrade.tar.gz file that contains the CONTROL, kernel, and openwrt-octeon-itus-rootfs.tar.gz instead of the root image..

Is that possible?

This required a custom Build/ entry in my subtarget .mk file and I finally figured out how to do it.

In case someone else gets help from this :smiley:

The Build/create-itus-sysupgrade define outlines what I needed it to do, then I added it at the tail of the IMAGE/sysupgrade.tar line (as an aside, I finally found out what those flags were and where they were defined - include/image-commands.mk for anyone else who would like to look at them.

This is my finalized .mk file for it.

#
# Itus Networks Shield profiles
#
define Build/create-itus-sysupgrade
	tar -cvzf $(BIN_DIR)/sysupgrade-itus-$(BOARD_NAME).tar.gz -C $(BIN_DIR) \
	    openwrt-octeon-itus-$(BOARD_NAME)-kernel.bin openwrt-octeon-itus-rootfs.tar.gz
endef

ITUSROUTER_CMDLINE:=console=ttyS0,115200, root=/dev/mmcblk1p2 rootfstype=f2fs rootwait
define Device/itusrouter
  DEVICE_VENDOR := Itus Networks
  DEVICE_MODEL := Shield Router
  BOARD_NAME := itusrouter
  CMDLINE := $(ITUSROUTER_CMDLINE)
  KERNEL_NAME := vmlinux.elf
  KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
  KERNEL := kernel-bin | patch-cmdline
  KERNEL_INSTALL := 1
  IMAGES := sysupgrade.tar
  IMAGE/sysupgrade.tar := kernel-bin | sysupgrade-tar | append-metadata | gzip | create-itus-sysupgrade
endef
TARGET_DEVICES += itusrouter

ITUSBRIDGE_CMDLINE:=console=ttyS0,115200, root=/dev/mmcblk1p4 rootfstype=f2fs rootwait
define Device/itusbridge
  DEVICE_VENDOR := Itus Networks
  DEVICE_MODEL := Shield Bridge
  BOARD_NAME := itusbridge
  CMDLINE := $(ITUSBRIDGE_CMDLINE)
  KERNEL_NAME := vmlinux.elf
  KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
  KERNEL := kernel-bin | patch-cmdline
  KERNEL_INSTALL := 1
  IMAGES := sysupgrade.tar
  IMAGE/sysupgrade.tar := kernel-bin | sysupgrade-tar | append-metadata | gzip | create-itus-sysupgrade
endef
TARGET_DEVICES += itusbridge