Hello
We have a slightly annoying issue:
Our rootfs installer is gettting too big to fit completely in memory
on all our devices, so we recently had to change the sw-description
to use "installed-directly = true;" for the rootfs (see below)
But the order seems to be:
- Extract everything to /tmp
-- if something is
"installed-directly": true that's done now...
- run preinstall scripts
- install images from /tmp
- run postinstall scripts
This kind of kills the point of having preinstall scripts at all.
Is there a way to install the rootfs after the
preinstall scripts
without extracting it to /tmp?
I could probably set $TMPDIR to a mounted partitition that's big enough and change back to
"installed-directly = false;", but that seems like a bad solution...
Best Regards
Einar Jon
Relevant sw-description snippet
images = (
{
filename = "@@IMG_FILE@@";
sha256 = "$swupdate_get_sha256(@@IMG_FILE@@)";
compressed = "zstd";
device = "/dev/disk/by-partlabel/root";
installed-directly = true;
},
{
filename = "SPL";
sha256 = "$swupdate_get_sha256(SPL)";
offset = "1K";
device = "/dev/mmcblk0boot0";
type = "raw";
installed-directly = false;
},
# more
"installed-directly": false
stuff skipped...
);
scripts = (
{
filename = "backup-and-restore-rootfs-files.sh";
sha256 = "$swupdate_get_sha256(backup-and-restore-rootfs-files.sh)";
type = "shellscript";
}
);