How to create sysupgrade binary file from kernel, dtb and rootfs? (imx6 emmc)

I built my own OpenWrt images (kernel, rootfs, etc...) from sources for i.MX6UL arch.
My rootfs based on ext4 file system, eMMC memory.

I can't find any sysupgrade binary file inside my bin directory.
How to create custom sysupgrade compatible binary file?

Thanx!

usually missing sysupgrade.bin means that it failed the image size check

Is sysupgrade supported for your device? Is there a recipe for it in the image Makefile? If that is a new device, have you already authored that recipe?

Looking at the imx6 image Makefile gives you hints.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/imx6/image/Makefile;h=948694381edbb843cf4f3bdc6dc681e4306c420f;hb=HEAD

In which script/Makefile is this check performed and how can I find it to fix it?

Yes, this is a new device and apparently the problem is the lack of the required recipe...

Judging by imx6 image Makefile, recipe for creating sysupgrade.bin is available only for device "toradex_apalis" - do I understand correctly?

Yes.

Based on you messages, I wonder if you already have OpenWrt running in the device and you are now just looking for the sysupgrade capability, or if you are still at the stage of getting the first firmware created (even without sysupgrade capability.)

Sysupgrade typically exists for the traditional routers with internal flash and a suitable bootloader like u-boot.

Sysupgrade rarely exists for the "computer-like" devices with memory cards or hard disks. E.g. x86 is without sysupgrade images. But it can exist, assuming that you can debug how the bootloader reads image and what kind of image components it expects (and packaegd how).

Yes, I already have OpenWrt running on my device (I built u-boot, dtb file, kernel image and rootfs ext4) and I want to get sysupgrade.bin based on these files. My device has built-in eMMc memory and a suitable u-boot bootloader:)
For this I need to create a recipe like "toradex_apalis" (in imx6 image Makefile)?

Something like that, yes.