kexec sysupgrade image in a mtd partition.

Strontium strntydog at
Mon Jun 21 07:26:29 PDT 2021

I have a small openwrt image which i want to use to chain into another
openwrt image in another mtd partition.  I have carved up the flash
properly with the .dts and makefile's for my targets. 

So i have /dev/mtd3 which is being started by uboot, and i want to chain
into /dev/mtd4 which has another version of openwrt installed on it. 
(Standard sysupgrade image, 64 byte header, kernel, sqfs, trailer for jffs2)

Obviously i need to use kexec.

Is it possible to run kexec on the image in the mtd partition directly,
or do i need to first extract the kernel into ram to run kexec on it? 
What about the sqfs,  does the kernel find that in the mtd or do i need
to pass it in to kexec also?  the dts in the /dev/mtd4 image has the
`compatible = "denx,uimage";` option set on /dev/mtd4 and /dev/mtd3 is
renamed "reserved" and is read only.

I am trying to use the kexec-tools command line tool to do this.

More information about the openwrt-devel mailing list