Hello. We are currently adapting our IOT platform for WP77/WP76 and have a few questions:
I am currently looking for a good place to store the unit serial number.
I was contemplating the Legato ‘config’ tool/api, but it seems to fragile as the data are stored on the “userapp” partition (/mnt/flash) which is shared with /home and /legato
Is there a partition in this list that will not be overwitten by a firmware update, where I can create a ubi volume for private use?
If i flash the “WP77xx_Release14.1_GENERIC_GCF_PTCRB.spk” file above as described here,
which mtd partitions (as in /proc/mtd like you said) will be overwritten?
Which mtd partition is that part flashed to? mtd1? mtd7? or something else?
I would have loved to be able to find this information with Google, or in the source code on GitHub, or in the documentation, but I can not.
It is just the TYPE, not partition name.
I believe the yocto.cwe will be flashed to “system” partition, and legato.cwe will be flashed to “lefwkro” partition.
The relationship is from trying to figure out which partitions are touched by a firmware update.
I knew already that a legato.cwe would overwrite the “lefwkro” parition.
And a linux-SWI*.cwe would overwrite the “system” partition etc. etc.
What I still do not know are which partitions are overwritten by a combined firmware SPK file like the one downloaded from here which combines many .cwe files into one.
If I store the serial number somewhere on the “userapp” partition (ie. somewhere in the /mnt/flash tree) I also still don’t know when that will disappear!
What happens if the userapp partition is completely botched? How can one recover it to a usable state?
Suppose something (accidentally) does a ‘rm -rf /mnt/flash/*’
How can the module recover from that? and regain a usable /legato for instance?
And anything stored in /home or anywhre on the userapp partition will surely be gone!
In case others google their way to here:
I finally managed to crack this challenge …
The solution was to create extra ufs partitions in the “system” (mtd13) mtd partition with my data.
This way, all can be restored, even if (when) /mnt/flash (“userapp” mtd16) is trashed or cleared.
Incidentally, /home/root lives on the “userapp” partition and will be lost if it is cleared.
Here is my solution from “mdm9x28-image-minimal.bbappend” that adds two extra partitions:
# Spiffy: We can append to the create_ubinize_config() method
create_ubinize_config_append() {
if [[ -s ${dm_root_hash_path} && -f /tmp/amplex-image.tar.bz2 ]]; then
echo >> $cfg_path
echo \[amplex_tbz\] >> $cfg_path
echo mode=ubi >> $cfg_path
echo image="/tmp/amplex-image.tar.bz2" >> $cfg_path
echo vol_id=3 >> $cfg_path
echo vol_type=static >> $cfg_path
echo vol_name=amplex_tbz >> $cfg_path
echo vol_alignment=1 >> $cfg_path
fi
if [[ -s ${dm_root_hash_path} && -f /tmp/amplex-param.conf ]]; then
echo >> $cfg_path
echo \[amplex_param\] >> $cfg_path
echo mode=ubi >> $cfg_path
echo image="/tmp/amplex-param.conf" >> $cfg_path
echo vol_id=4 >> $cfg_path
echo vol_type=static >> $cfg_path
echo vol_name=amplex_param >> $cfg_path
echo vol_alignment=1 >> $cfg_path
fi