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
=====================================================================