You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by "paul@wrada.com" <pa...@wrada.com> on 2016/08/08 17:40:16 UTC

split image configuration comments please.

I've tested a simple split image build with newt and I can load both images and have the bootloader boot the loader and then the loader boot and verify the split image.

The loader application has a special call to loader_go that checks to see if its meant to run a split app or not.
The main application has only one special piece (its #ifdef'd deep inside the startup code automatically) where it re-copies and zeros the loader bss and data sections before running.  Of course the main app uses a different linker script which as a few differences.

I have not yet implemented the extra hash check to ensure they match,but first I wanted to get some configuration in so that the loader could decide whether to boot the split image or not.

So now, I will implement configuration:

As part of newtmgr, Right now we have


    list         Show target images
    upload       Upload image to target
    boot         Which image to boot
    fileupload   Upload file to target
    filedownload Download file from target

Currently the way we have it with split images, they are not bootable. So the boot command will fail to boot an split image in the second partition and will never copy a split image to the primary partition.

So we need an extra command to tell the loader whether to run the app or not.  We can't just erase the second partition anymore because the app is running from it.


    split_app    Sets a flag to enable the split application

This flag would be ignored by normal dual images.  If course if the flag was set but the image was invalid, it will still not boot the app and will just run the loader.

So an upgrade would look like this

  1.  you are happily running a split app
  2.  You set "split_app" to zero and reboot
  3.  The loader comes up and you upload a new loader
  4.  You set the boot to boot the new loader
  5.  You upload a new split app
  6.  You set the split_app to 1 and reboot
  7.  Everything is happy

Please provide comments on this.  Unlike the design which largely hides details to users, this UI will show up for everyone and they will have to understand.

Paul