How to generate sysupgrade compatible firmware binary file (Espressobin)

I followed below procedure :

and built my own OpenWrt from sources and it's woking fine on my hardware Espressobin

I built a system not using squashfs but ext4 file system based

Anyway i do not find any compatible file for using with sysupgrade inside bin directory.
I would like to use sysupgrade through LuCi to upgrade my openwrt.

Do i missed something ?

Probably you are missing a recipe for ext4 image.
Or you are trying to pack too many packages into the image, so that it is too large and does not get generated during the build.

Sorry it's unclear what do you mean by recipe for ext4 image ?

I answered first with generic comments, but when looking at your specific board, it seems to be a rather rare SDcard based one, and it does support ext4. So my comment for that was wrong.
But I am not sure if it supports sysupgrade at all.

Only the SDcard image seems to be defined:

Device definition:;a=blob;f=target/linux/mvebu/image/;h=ff8f2c0930f7932aeddc57a42bc2e50f6a6a2e30;hb=HEAD#l9

calls here (Device/Default-arm64):;a=blob;f=target/linux/mvebu/image/Makefile;h=3a478780693d31023fae0a62b2152c3dc4e79ce7;hb=HEAD#l115

 118   IMAGES := sdcard.img.gz
 119   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata

No trace of sysupgrade image .bin.
Possibly (likely) it is not supported for your device.

Or alternatively, that sdcard.img.gz might be accepted by the sysupgrade routine. It has the append-metadata step, which suggest that OpenWrt sysupgrade metadata is added and sysupgrade might accept it.

1 Like

Right i activated using menuconfig generation of image file through sdcard and the associated file sdcard.img.gz was able to load on sysupgrade tool. But after i loose my sdcard contents because only updated files were upgraded ? , i guess it's because the architecture was not same. Anyway i will try a fresh install using sdcard file then retry sysupgrade after some modifications. Will let you know ...

i tryied using openwrt-mvebu-cortexa53-globalscale-espressobin-ext4-sdcard.img.gz sysupgrade and no errors during upgrade

Very strange after sysupgrade i've this structure on my sdcard :grinning:
so kernel file and other directory of root file system are missing ?

marvell>> ext4ls mmc 0:1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 lost+found
         7835656 Image
            7885 armada-3720-espressobin.dtb
             328 boot.scr

SD card based machines usually have two partition on the card, boot and rootfs. That looks like a boot partition.

The usual way to upgrade a SD card machine is to remove the card and block flash the whole image using a PC. You could look at the sysupgrade scripts to see what an in-place sysupgrade expects to do.

Oh yes i forgot that you are right !

I can confirm that using the generated image sdcard (openwrt-mvebu-cortexa53-globalscale-espressobin-ext4-sdcard.img.gz) on Luci and sysupgrade feature I can upgrade the system it works but it delete everything, so it’s not useful that way ? I would like to upgrade but without loosing what I installed before ... how to ?

Note that with even the usual sysupgrade, the user will need to reinstall the add-on packages that he had installed. (Usually settings can be kept, but packages are lost.)

It means packages installed using opkg found in remote (after running opkg update) are lost after ? Only configuration is kept ?

That's correct.

OK @tmomas

I can confirm that using the generated image sdcard (openwrt-mvebu-cortexa53-globalscale-espressobin-ext4-sdcard.img.gz) on Luci and sysupgrade feature I can upgrade the system. In fact it restore with keep of configuration but package installed in remote are lost.
Your support was great and in particular @hnyman Thank you !

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.