Sw-Update installation problem on rasberry pi 3

1,415 views
Skip to first unread message

m.se...@gmail.com

unread,
Aug 11, 2020, 10:20:47 AM8/11/20
to swupdate
Hi everyone,

I've been trying to run the update on raspberry pi 3 for a few days.
For this, I followed the 2 links below.


After a long period of error-free yocto image creation, I got the following error on the device. Does anyone have a idea what could be the reason?

rasberrypi3_lcd.jpg






















I am grateful for any help.

Thanks in advance and grettings,
Selim

Matteo Iervasi

unread,
Aug 29, 2020, 3:56:56 AM8/29/20
to swupdate
I'm having the same problem right now, I tried with both Dunfell and Zeus without luck.
It seems something is wrong about the kernel image, but I don't know how to solve it unfortunately.

Matteo Iervasi

Matteo Iervasi

unread,
Aug 29, 2020, 6:26:34 AM8/29/20
to swupdate
I've tried to build a core-image-full-cmdline without swupdate and it boots without problems, so now I'm sure that something goes wrong during the creation of the image using meta-swupdate-boards.
I'll report here the steps I used to reproduce the problem (tried on fresh Ubuntu 20.04 VM installation):

sudo apt update
sudo apt install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev
git clone git://git.yoctoproject.org/poky -b dunfell
cd poky
git clone git://github.com/openembedded/meta-openembedded.git -b dunfell
git clone https://github.com/agherzan/meta-raspberrypi.git -b dunfell
git clone https://github.com/sbabic/meta-swupdate -b dunfell
git clone https://github.com/sbabic/meta-swupdate-boards.git
source oe-init-build-env
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake-layers add-layer ../meta-openembedded/meta-networking
bitbake-layers add-layer ../meta-openembedded/meta-multimedia
bitbake-layers add-layer ../meta-raspberrypi
bitbake-layers add-layer ../meta-swupdate
bitbake-layers add-layer ../meta-swupdate-boards


Then I edited the local.conf as always:

MACHINE = "raspberrypi3"
RPI_USE_U_BOOT = "1"
IMAGE_FSTYPES = "rpi-sdimg ext4.gz"
PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"


And finally the bitbake command:

bitbake update-image

Then I've proceeded flashing the rpi-sdimg to the SD card, and you'll see the poor Raspberry complaining about
wrong image format for bootm command

Unfortunately this is also my first experience with Yocto for a university assignment, so I don't know exactly how to proceed for finding and fixing the error. In fact I also tried to make a custom layer (using the template reported in swupdate documentation) in the standard qemux86_64 core-image-full-cmdline, but while the .swu image is generated the actual swupdate program isn't included in the image and I don't know why.
I'm sorry for the long post, I hope I didn't bother anyone.

In hope to figure this out
Best regards
Matteo Iervasi

Stefano Babic

unread,
Aug 29, 2020, 9:57:59 AM8/29/20
to Matteo Iervasi, swupdate
Hi Matteo,

On 29.08.20 12:26, Matteo Iervasi wrote:
> I've tried to build a core-image-full-cmdline without swupdate and it
> boots without problems, so now I'm sure that something goes wrong during
> the creation of the image using meta-swupdate-boards.
> I'll report here the steps I used to reproduce the problem (tried on
> fresh Ubuntu 20.04 VM installation):
>

meta-swupdate-boards is shown as example how to integrate SWUpdate in
own projects. If you built a sdimg, this does not prepare two partitions
for a dual copy concept. I use a Raspi as terminal server, and you can
build it using the branch "terminal-server" of meta-swupdate-boards. You
have to use the WIC image instead of the sdimg, else it cannot work.

You find another example using a RPI3 with Homeassistant here :

https://github.com/meta-homeassistant/meta-homeassistant

> sudo apt update
> sudo apt install gawk wget git-core diffstat unzip texinfo gcc-multilib
> build-essential chrpath socat cpio python python3 python3-pip
> python3-pexpect xz-utils debianutils iputils-ping python3-git
> python3-jinja2 libegl1-mesa libsdl1.2-dev
> git clone git://git.yoctoproject.org/poky -b dunfell
> cd poky
> git clone git://github.com/openembedded/meta-openembedded.git -b dunfell
> git clone https://github.com/agherzan/meta-raspberrypi.git -b dunfell
> git clone https://github.com/sbabic/meta-swupdate -b dunfell
> git clone https://github.com/sbabic/meta-swupdate-boards.git
> source oe-init-build-env
> bitbake-layers add-layer ../meta-openembedded/meta-oe
> bitbake-layers add-layer ../meta-openembedded/meta-python
> bitbake-layers add-layer ../meta-openembedded/meta-networking
> bitbake-layers add-layer ../meta-openembedded/meta-multimedia
> bitbake-layers add-layer ../meta-raspberrypi
> bitbake-layers add-layer ../meta-swupdate
> bitbake-layers add-layer ../meta-swupdate-boards
>
> Then I edited the local.conf as always:
>
> MACHINE = "raspberrypi3"
> RPI_USE_U_BOOT = "1"
> IMAGE_FSTYPES = "rpi-sdimg ext4.gz"
> PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
>

Check:

https://github.com/meta-homeassistant/meta-homeassistant/blob/master/kas-raspberrypi3.yml

> And finally the bitbake command:
>
> bitbake update-image
>
> Then I've proceeded flashing the rpi-sdimg to the SD card,

It does not work - use WIC images instead.

> and you'll
> see the poor Raspberry complaining about
> wrong image format for bootm command

No, it is t that U-Boot environment is not correctly set and it has
nothing to do with kernel and its image format.

>
> Unfortunately this is also my first experience with Yocto for a
> university assignment, so I don't know exactly how to proceed for
> finding and fixing the error.

Some hints to get something running:

- if you use kas, you can take the file above to produce an image with
Homeassistant

- you can use "terminal-server" branch, and build with this setup in
your local.conf:

RPI_USE_U_BOOT = "1"
ENABLE_UART = "1"
KERNEL_IMAGETYPE = "uImage"
IMAGE_INSTALL_append = " kernel-image kernel-modules"
WKS_FILES_raspberrypi3 = "ts-raspberrypi.wks"
IMAGE_FSTYPES += " wic"

and then store terminal-server-image-raspberrypi3.wic (not sdimg) to
your SD card.


> In fact I also tried to make a custom
> layer (using the template reported in swupdate documentation) in the
> standard qemux86_64 core-image-full-cmdline, but while the .swu image is
> generated the actual swupdate program isn't included in the image and I
> don't know why.
> I'm sorry for the long post, I hope I didn't bother anyone.


Best regards,
Stefano Babic


--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

Matteo Iervasi

unread,
Aug 30, 2020, 5:25:36 AM8/30/20
to swupdate
Wow, it kinda works (though I had to manually run swupdate from the command line, the web ui doesn't seem to work).
I feel like I'm starting to understand a bit about this project.

Thank you a lot for the help, very appreciated!

Best regards
Matteo Iervasi

Stefano Babic

unread,
Aug 30, 2020, 7:21:21 AM8/30/20
to Matteo Iervasi, swupdate
Hi Matteo,

On 30.08.20 11:25, Matteo Iervasi wrote:
> Wow, it kinda works (though I had to manually run swupdate from the
> command line, the web ui doesn't seem to work).

Check your configuration, there should be something wrong, I guess the
service is not started due to a wrong configuration. Run "systemctl
status swupdate" to find why.

> I feel like I'm starting to understand a bit about this project.
>
> Thank you a lot for the help, very appreciated!
>

Best regards,
Stefano Babic
> <http://git.yoctoproject.org/poky> -b dunfell
> > cd poky
> > git clone git://github.com/openembedded/meta-openembedded.git
> <http://github.com/openembedded/meta-openembedded.git> -b dunfell
> Phone: +49-8142-66989-53 <tel:+49%208142%206698953> Fax:
> +49-8142-66989-80 <tel:+49%208142%206698980> Email: sba...@denx.de
> =====================================================================
>
> --
> 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/e2e1ab7c-4c6d-466c-be41-964ab33c74f0n%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/e2e1ab7c-4c6d-466c-be41-964ab33c74f0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Matteo Iervasi

unread,
Aug 30, 2020, 9:16:38 AM8/30/20
to swupdate
It was my fault indeed, I added systemd only to DISTRO_FEATURES before, now I've put this into local.conf:
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
and it works (by the way the systemctl log shows that swupdate tried to ping "paperina" which I think is a host you use for testing).

Thank for all the support
Best regards
Matteo Iervasi

Stefano Babic

unread,
Aug 30, 2020, 9:25:42 AM8/30/20
to Matteo Iervasi, swupdate
Hi Matteo,

On 30.08.20 15:16, Matteo Iervasi wrote:
> It was my fault indeed, I added systemd only to DISTRO_FEATURES before,
> now I've put this into local.conf:
> DISTRO_FEATURES_append ="systemd"
> DISTRO_FEATURES_BACKFILL_CONSIDERED +="sysvinit"
> VIRTUAL-RUNTIME_init_manager ="systemd"
> VIRTUAL-RUNTIME_initscripts ="systemd-compat-units"

Correct - this is the setup to replace SystemV with systemd.

> and it works (by the way the systemctl log shows that swupdate tried to
> ping "paperina" which I think is a host you use for testing).

Well, this is the name of my server, you have to set your Hawkbit's url
if you have any (or disable the suricatta daemon if you just use the
Webserver).

>
> Thank for all the support

You're welcome.
> https://groups.google.com/d/msgid/swupdate/3c51e340-3654-4d09-aeac-e39fb4928fcdn%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/3c51e340-3654-4d09-aeac-e39fb4928fcdn%40googlegroups.com?utm_medium=email&utm_source=footer>.

mohamed tarek

unread,
Apr 10, 2021, 8:00:00 PM4/10/21
to swupdate
does meta-swupdate-boards support raspberrypi4 or i need to create my own bsp?
could i use core-image-base instead of core image-full-cmdline in update-image.bb in swupdate-boards?
Reply all
Reply to author
Forward
0 new messages