I want to implement a easy upgrade OS mechanism on our custom developed board, we are using imx8mp processors with yocto kirkstone. I just need to be upgradable locally, with an usb stick.
I have to say there is an overloading of information out there and loads of options, but none with a proper tutorial as far as I could see.
After much exploring, I decide to give it a try to ostree.
. I could successfully include in my build. Now I have to figure out how does it work.
The way I included it is using the meta-updater repository https://github.com/advancedtelematic/meta-updater.
This repository is part of AGL, automotive grade linux. It’s to have OTA (off the air) upgrades. It’s maintained from OTA HERE and need a paid subscription.
Means, it’s not free. But as we won’t do upgrades OTA, I disabled everything related to Aktualizr and I could build successfully.
So, in my local.conf, I added:
< IMAGE_FSTYPES += ” wic.bz2 ext4.gz”
< require conf/distro/sota.conf.inc
< SOTA_SERVER = “”
< OSTREE_REPO = “/ostree/ostree_repo”
And to bblayers.conf:
< BBLAYERS += “${BSPDIR}/sources/meta-updater”
After the build, I have the images:
142M jul 5 12:59 core-image-base-imx8mp-xxx-1.00.016-c1.rootfs.ostree.tar.bz2
286M jul 5 13:00 core-image-base-imx8mp-xxx-1.00.016-c1.rootfs.ext4.gz
588M jul 5 13:01 core-image-base-imx8mp-xxx-1.00.016-c1.rootfs.ota-ext4
141M jul 5 13:01 core-image-base-imx8mp-xxx-1.00.016-c1.rootfs.wic.bz2
Then, I flash the core-image-base-imx8mp-xxx-1.00.016-c1.rootfs.wic.bz2 with the uuu tool from NXP.
This resulted in a kernel panic:
[ 4.614758] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 4.624642] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 4.631727] devtmpfs: error mounting -2
[ 4.636083] Freeing unused kernel memory: 2624K
[ 4.640682] Run /sbin/init as init process
[ 4.644910] Run /etc/init as init process
[ 4.648971] Run /bin/init as init process
[ 4.653051] Run /bin/sh as init process
[ 4.656948] Kernel panic – not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
So, I guess the kernel part is not included in the wic image.
How should then flash the eMMMC then? or, how to include this uImage into the .wic package?
Howto apply then upgrades on top of the first installation, if I am using an off the hook method and I want to do updates with an usb stick?
How ostree will behave for directories that are custom, i.e., I include a /frechete directory into the board, would it change between updates?