...
Besides adding the parameter (the path of the public key) to /usr/lib/swupdate/conf.d/10-mongoose-args for activating the web server, make sure the platform system clock is within the validity period of the public key (mycert.cert.pem) and reference the procedure of updating images by other Ubuntu platforms in Ubuntu MATE 24.04 - eMMC boot.
Yocto 4.2.4 - eMMC boot
When you run “make config” to configure your build environment and after selecting the board, you will be prompted to choose a boot device. Refer to the picture below and Enter “1” to select eMMC.
...
After selecting eMMC size, you will be prompted to choose a root file system. Refer to the picture below and Enter “12” to select Yocto 4.2.4.
...
Generate self-signed certificates
After updating the images to the platform and boot the system of it, it would fail to start SWUpdate daemon as shown below. It lacks a public key to start SWUpdate daemon.
...
The procedure to generate self-signed certificates is the same as that in Ubuntu MATE 24.04 - eMMC boot. After generating the public key (mycert.cert.pem) by itself or coping it from other platforms which generate it, pack update.swu and will update the images for this Yocto platform, add the parameters of “-k /home/root/my_key/mycert.cert.pem“ for SWUPDATE_ARGS in /usr/lib/swupdate/swupdate.sh of the platform shown below. Then it will start SWUpdate daemon successfully after rebooting the system.
Code Block |
---|
#!/bin/sh
# Override these variables in sourced script(s) located
# in /usr/lib/swupdate/conf.d or /etc/swupdate/conf.d
SWUPDATE_ARGS="-k /home/root/work/my_key/mycert.cert.pem -v ${SWUPDATE_EXTRA_ARGS}"
SWUPDATE_WEBSERVER_ARGS=""
SWUPDATE_SURICATTA_ARGS=""
# source all files from /etc/swupdate/conf.d and /usr/lib/swupdate/conf.d/
# A file found in /etc replaces the same file in /usr
for f in `(test -d /usr/lib/swupdate/conf.d/ && ls -1 /usr/lib/swupdate/conf.d/; test -d /etc/swupda
if [ -f /etc/swupdate/conf.d/$f ]; then
. /etc/swupdate/conf.d/$f
else
. /usr/lib/swupdate/conf.d/$f
fi
done
# handle variable escaping in a simmple way. Use exec to forward open filedescriptors from systemd
if [ "$SWUPDATE_WEBSERVER_ARGS" != "" -a "$SWUPDATE_SURICATTA_ARGS" != "" ]; then
exec /usr/bin/swupdate $SWUPDATE_ARGS -w "$SWUPDATE_WEBSERVER_ARGS" -u "$SWUPDATE_SURICATTA_ARGS"
elif [ "$SWUPDATE_WEBSERVER_ARGS" != "" ]; then
exec /usr/bin/swupdate $SWUPDATE_ARGS -w "$SWUPDATE_WEBSERVER_ARGS"
elif [ "$SWUPDATE_SURICATTA_ARGS" != "" ]; then
exec /usr/bin/swupdate $SWUPDATE_ARGS -u "$SWUPDATE_SURICATTA_ARGS"
else
exec /usr/bin/swupdate $SWUPDATE_ARGS |
sw-description configuration file
Reference it in Ubuntu MATE 24.04 - eMMC boot.
Building a signed SWU image with CMS signature
Reference it in Ubuntu MATE 24.04 - eMMC boot.
HW_FILE
Reference it in Ubuntu MATE 24.04 - eMMC boot.
Update images
The Yocto platform can update images (update.swu) via the command by itself or web server only by other Ubuntu platforms.
Run SWUpdate
Reference it in Ubuntu MATE 24.04 - eMMC boot.
Web server
The Yocto system can only update images (update.swu) by other Ubuntu systems. Reference it in Ubuntu MATE 24.04 - eMMC boot.