sim: Set version numbers in images
To make the images easier to identify during analysis, set the version
number.  The major number tries to be set to the slot number, and the
build number is the byte offset.
@@ -264,10 +264,10 @@ fn install_image(flash: &mut Flash, offset: usize, len: usize) -> Vec<u8> {
img_size: len as u32,
flags: 0,
ver: ImageVersion {
- major: 1,
+ major: (offset / (128 * 1024)) as u8,
minor: 0,
revision: 1,
- build_num: 1,
+ build_num: offset as u32,
},
_pad3: 0,
};
