I am rather new to eclipse hawkbit and SWupdate I have been trying to do a test implementation on a RPi before I go with the production implementation.
I have Hawkbit up and running but I am having several problems with SWupdate, I have built a core-image-full-cmdline.wic
and the .swu
update Image along with it:
This is the local.conf
:
MACHINE = "raspberrypi3"
IMAGE_FSTYPES += "wic"
RPI_USE_U_BOOT = "1"
KERNEL_IMAGETYPE = "uImage"
IMAGE_INSTALL_append = " kernel-image kernel-modules"
#WKS_FILES_raspberrypi3 = "ts-raspberrypi.wks"
PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
ENABLE_UART = "1"
I also got this error when I changed the IMAGE_FSTYPE from ext4 rpimg to wic:
ERROR: update-image-1.0-r0 do_swuimage: swupdate cannot find image file: /home/aswin/yocto/build/tmp/deploy/images/raspberrypi3/core-image-full-cmdline.ext4.gz
ERROR: Logfile of failure stored in: /home/aswin/yocto/build/tmp/work/raspberrypi3-poky-linux-gnueabi/update-image/1.0-r0/temp/log.do_swuimage.87006
ERROR: Task (/home/aswin/yocto/layers/meta-swupdate-boards/recipes-extended/images/update-image.bb:do_swuimage) failed with exit code '1'
So I had to change the update-image.bb
FSTYPE = ".wic"
And when I comment this out #WKS_FILES_raspberrypi3 = "ts-raspberrypi.wks"
Then flash the image to a sd card and boot it nothing really shows up except for a blinking line. If I leave it, then the .swu
file is way too big to upload it to hawkbit.
Tested using
kirkstone
version, so it is still relevant in 2023, and sumarizes what I found while testing swupdate to rpi3B +.There are two issues to be addressed:
1. Expected image
Software update meta-swupdate layer makes the assumption that the image created by
meta-raspberrypi
comes in a .ext4.gz, however the default filesystem and image comes in .ext3.gz so when running 'bitbake update-image' it will fail to find the image with the right extension, which should be:This is easily addressable by adding these lines in your conf/local.conf file:
2. Expected packages
In the configuration file you provided, you already enable systemd as your init manager, which is need by swupdate to be able to load on start.
In addition to this, if you found out that the swudate binaries and files are not present in your rootfs. It means that swupdate was not automatically added to the core-image-full-cmdline.
To do so we need to "append" packages to the core-image-full-cmdline. Inside the
meta-swupdate-boards
layer, add or create the file3. Summary
Your configuration file in conf/local.conf should include this lines:
and the swupdate should be appended to the core-image-full-cmdline layer as explained on 2.
4. Testing
Once you have modified your local.conf file, run in your build environment run:
Then,
Output images
For the SD Card
We need two files wic.bz2 and wic.bmap to properly write to the SD card using the bmap tool, we can check them in
The the files not including date are simply symbolic links.
For the software update images
The files with extension .swu will be used to upload in hawkbit.
I tested this using
kirkstone
branches in all related meta-layers:Cheers,