Lightspeed Over the Air Update (OTA)
Lightspeed uses meta-rauc for Over The Air (OTA) updates. Currently this feature is implemented only for the QEMU arm64 device.
Build the image
We can build the Qemu arm64 image with following command
kas build kas-cfgs/lsqemuarm64-minimal-appliance.yaml
Run the Qemu
runqemu lightspeed-image-minimal-appliance wic.qcow2 nographic slirp
Copy the bundle Qemu
Now we need to copy the built rauc bundle into the Qemu using the following command.
scp -P 2222 lightspeed-image-minimal-appliance-bundle-lsqemuarm64-rauc.raucb root@localhost:/tmp
check the rauc information in the the Qemu
rauc info /tmp/lightspeed-image-minimal-appliance-bundle-lsqemuarm64-rauc.raucb
Install the Qemu
rauc install /tmp/lightspeed-image-minimal-appliance-bundle-lsqemuarm64-rauc.raucb
And reboot the machine for installation to take the effect.
Check the status in Qemu
rauc status
Signature Key Generation and Configuration:
We have already created self-signed certificates for development (proof of concept) for Qemu. The real production environment uses real CA.
OpenSSL Certs and Keys are generated as follows. If we want to generate new keys and certificates, we can use the following commands.
mkdir -p keys
openssl genrsa -out keys/development-1.key.pem 2048
openssl req -new -x509 -key keys/development-1.key.pem \
-out keys/development-1.cert.pem -days 3650 -subj "/CN=Development Key/"
# This copy used on the device for verifying bundles
cp keys/development-1.cert.pem keys/ca.cert.pem
This will generate development-1.key.pem, development-1.cert.pem and ca.cert.pem.
development-key.pem and development-1.cert.pem are passed to the meta-rauc in the image bb files as follow to sign the rauc bundle during build process.
RAUC_KEY_FILE = “${THISDIR}/files/development-1.key.pem” RAUC_CERT_FILE = “${THISDIR}/files/development-1.cert.pem”
The ca.cert.pem (which is used to verify the signature), shall be installed into the device through the rauc-conf.bbappend file.