On 28.03.23 11:35, Anton Schillén wrote:
> Hello,
> I'm building a project where we use Yocto to build our firmware image,
> to enable OTA we choose SWUpdate and we've successfully packaged
> SWUpdate in our image and created .wic, .ext4.gz.u-boot and .rpi-sdimg
> files of the image.
> I have included meta-swupdate and meta-swupdate-boards (and added a
> raspberrypi2 v by copying all raspberrypi3 files
>
https://github.com/Susapp/meta-swupdate-boards
> <
https://github.com/Susapp/meta-swupdate-boards>)
> Running /bitbake swupdate-image/ //produces no error but doesn't create
> any .swu file.
I guess I will change the name - this question comes a lot of times on
the ML. Please search in archives.
swupdate-image generates a rescue : a minimal image with SWUpdate
running. It does not create a SWU.
You should inherit swupdate classes in your image to create the SWU.
Bt again, this is explained in the documentation:
http://sbabic.github.io/swupdate/building-with-yocto.html
And:
"In meta-SWUpdate there is a recipe to generate an initrd with a rescue
system with SWUpdate. Use: bitbake swupdate-image"
Pleas eread the documentation.
Best regards,
Stefano Babic
>
> I'm appending
swupdate-image.bb <
http://swupdate-image.bb> with
> *swupdate-image.bbappend*
> DESCRIPTION = "My firmware update package"
> LICENSE = "CLOSED"
> export DISTRO_VERSION="0.1.0"
>
> FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
> SRC_URI += "file://sw-description"
>
> SB_IMAGE = "core-image-minimal-raspberrypi2"
>
> # images to build before building swupdate image
> IMAGE_DEPENDS = "${SB_IMAGE}"
>
> # images and files that will be included in the .swu image
> SWUPDATE_IMAGES = "${SB_IMAGE}"
>
> # a deployable image can have multiple format, choose one
> SWUPDATE_IMAGES_FSTYPES[core-image-minimal-raspberrypi2] = ".wic"
>
> IMAGE_CMD_swu = "swupdate -c swupdate.cfg -i $ROOTFS_DIR -o $IMAGE_NAME.swu"
> FILES_${PN} += "/sw-description"
> IMAGE_FSTYPES_core-image-minimal-raspberrypi2 = "swu"
>
> # Include the swupdate package in the update package
> RDEPENDS_${PN} += " swupdate"
>
> And define *sw-description* in ./files as
> And Relevant parts of*local.conf* is:
>
> # Swupdate for OTA updates
> IMAGE_CMD_swu = "swupdate -c swupdate.cfg -i $ROOTFS_DIR -o $IMAGE_NAME.swu"
> IMAGE_INSTALL:append = " swupdate"
> # Swupdates for Raspberry Pi
> RPI_USE_U_BOOT = "1"
> IMAGE_FSTYPES:append = " rpi-sdimg"
> PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
> DISTRO_FEATURES:append = " sysvinit"
> ENABLE_UART = "1"
> IMAGE_FSTYPES += " ext4 ext4.gz ext4.zst wic"
> WKS_FILES_raspberrypi2 = "ts-raspberrypi.wks"
>
> Running /MACHINE=raspberrypi2 bitbake core-image-minimal/**produces the
> .wic .ext4.zst .rpi-sdimg rootfs images and then running swupdate-image
> reruns no tasks and doesn't produce anything.
> Sometimes it gives the warning below, but it feels like it only
> complains about the checksum, not the actual sw-description file?
> WARNING meta-swupdate/recipes-extended/images/
swupdate-image.bb
> <
http://swupdate-image.bb>: Unable to get checksum for swupdate-image
> SRC_URI entry sw-description: file could not be found
> What am I missing here, why wont it create a .swu file?
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swupdate+u...@googlegroups.com
> <mailto:
swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/swupdate/CAMviwBB7CFkWMxD0pzyNOpfacUbRG%3D6FSMaG0zG%2Bjq4O6NUYVw%40mail.gmail.com <
https://groups.google.com/d/msgid/swupdate/CAMviwBB7CFkWMxD0pzyNOpfacUbRG%3D6FSMaG0zG%2Bjq4O6NUYVw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone:
+49-8142-66989-53 Fax:
+49-8142-66989-80 Email:
sba...@denx.de
=====================================================================