Skip to contentSkip to conversation

Remove kernel image from IMAGE_BOOT_FILES for WIC boot partition

DISCUSSION Konstantin Kletschke 2 participants 6 messages Jun 7, 2023

lore
Share & tools
lore
#0 lore raw

Hi There,

I want to create a WIC image for sdcards which generally works. I use beaglebone-yocto with barebox instead of u-boot.

This works with overwriting IMAGE_BOOT_FILES in my meta-insidem2m/recipes-core/images/sdcard.bb:

IMAGE_BOOT_FILES="barebox/barebox.bin;barebox.bin barebox-pbl/MLO;MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"

I use bootloader spec booting with barebox, so I need only MLO and barbox.bin in the boot partition, so I went:

IMAGE_BOOT_FILES="barebox/barebox.bin;barebox.bin barebox-pbl/MLO;MLO"

bitbake -e reflects the change:

bitbake -e sdcard|grep ^IMAGE_BOOT IMAGE_BOOT_FILES="barebox/barebox.bin;barebox.bin barebox-pbl/MLO;MLO"

Then "bitbake sdcard" complains:

| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['cross-localedef-native', 'ldconfig-native', 'cdrtools-native', 'qemuwrapper-cross', 'depmodwrapper-cross', 'update-rc.d-native', 'apt-native', 'btrfs-tools-native', 'dosfstools-native', 'dpkg-native', 'e2fsprogs-native', 'gptfdisk-native', 'makedevs-native', 'mtools-native', 'opkg-utils-native', 'pseudo-native', 'squashfs-tools-native', 'syslinux-native', 'parted-native', 'pigz-native', 'bmap-tools-native', 'openssl-native', 'debianutils-native', 'kmod-native', 'systemd-systemctl-native', 'shadow-native', 'qemu-native', 'python3-six-native', 'python3-setuptools-native', 'python3-installer-native', 'python3-native', 'python3-wheel-native', 'coreutils-native', 'zlib-native', 'perl-native', 'gnutls-native', 'lz4-native', 'xz-native', 'xxhash-native', 'db-native', 'cmake-native', 'libgcrypt-native', 'attr-native', 'lzo-native', 'zstd-native', 'libtool-native', 'texinfo-dummy-native', 'readline-native', 'util-linux-native', 'ncurses-native', 'gettext-minimal-native', 'popt-native', 'shared-mime-info-native', 'nasm-native', 'bzip2-native', 'gettext-native', 'glib-2.0-native', 'python3-flit-core-native', 'unzip-native', 'gdbm-native', 'libtirpc-native', 'util-linux-libuuid-native', 'libffi-native', 'libnsl2-native', 'sqlite3-native', 'make-native', 'nettle-native', 'libunistring-native', 'libidn2-native', 'gmp-native', 'curl-native', 'libgpg-error-native', 'libcap-native', 'libcap-ng-native', 'libpcre2-native', 'libxml2-native', 'itstool-native', 'groff-native', 'libpcre-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function set_image_size
| DEBUG: 345274.800000 = 265596 * 1.300000
| DEBUG: 345274.800000 = max(345274.800000, 65536)[345274.800000] + 0
| DEBUG: 345275.000000 = int(345274.800000)
| DEBUG: 345275 = aligned(345275)
| DEBUG: returning 345275
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_wic
| INFO: Creating image(s)...
|
| ERROR: No kernel file found
|
| WARNING: exit code 1 from a shell command.

How do I remove the requirement for a kernel image? I suppose if I manage to do that, the dtb files are missng too, then.

Kind Regards
Konstantin

Signature · 14 lines
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

[email protected]
http://www.inside-m2m.de 

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover
#1 lore raw

I don't have a ready solution, but you could grep for the error message, see where it happens and what can be done to 'not make it happen'.

Alex

Quoted 72 lines · Konstantin Kletschke

Hi There,

I want to create a WIC image for sdcards which generally works. I use beaglebone-yocto with barebox instead of u-boot.

This works with overwriting IMAGE_BOOT_FILES in my meta-insidem2m/recipes-core/images/sdcard.bb:

IMAGE_BOOT_FILES="barebox/barebox.bin;barebox.bin barebox-pbl/MLO;MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"

I use bootloader spec booting with barebox, so I need only MLO and barbox.bin in the boot partition, so I went:

IMAGE_BOOT_FILES="barebox/barebox.bin;barebox.bin barebox-pbl/MLO;MLO"

bitbake -e reflects the change:

bitbake -e sdcard|grep ^IMAGE_BOOT IMAGE_BOOT_FILES="barebox/barebox.bin;barebox.bin barebox-pbl/MLO;MLO"

Then "bitbake sdcard" complains:

| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['cross-localedef-native', 'ldconfig-native', 'cdrtools-native', 'qemuwrapper-cross', 'depmodwrapper-cross', 'update-rc.d-native', 'apt-native', 'btrfs-tools-native', 'dosfstools-native', 'dpkg-native', 'e2fsprogs-native', 'gptfdisk-native', 'makedevs-native', 'mtools-native', 'opkg-utils-native', 'pseudo-native', 'squashfs-tools-native', 'syslinux-native', 'parted-native', 'pigz-native', 'bmap-tools-native', 'openssl-native', 'debianutils-native', 'kmod-native', 'systemd-systemctl-native', 'shadow-native', 'qemu-native', 'python3-six-native', 'python3-setuptools-native', 'python3-installer-native', 'python3-native', 'python3-wheel-native', 'coreutils-native', 'zlib-native', 'perl-native', 'gnutls-native', 'lz4-native', 'xz-native', 'xxhash-native', 'db-native', 'cmake-native', 'libgcrypt-native', 'attr-native', 'lzo-native', 'zstd-native', 'libtool-native', 'texinfo-dummy-native', 'readline-native', 'util-linux-native', 'ncurses-native', 'gettext-minimal-native', 'popt-native', 'shared-mime-info-native', 'nasm-native', 'bzip2-native', 'gettext-native', 'glib-2.0-native', 'python3-flit-core-native', 'unzip-native', 'gdbm-native', 'libtirpc-native', 'util-linux-libuuid-native', 'libffi-native', 'libnsl2-native', 'sqlite3-native', 'make-native', 'nettle-native', 'libunistring-native', 'libidn2-native', 'gmp-native', 'curl-native', 'libgpg-error-native', 'libcap-native', 'libcap-ng-native', 'libpcre2-native', 'libxml2-native', 'itstool-native', 'groff-native', 'libpcre-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function set_image_size
| DEBUG: 345274.800000 = 265596 * 1.300000
| DEBUG: 345274.800000 = max(345274.800000, 65536)[345274.800000] + 0
| DEBUG: 345275.000000 = int(345274.800000)
| DEBUG: 345275 = aligned(345275)
| DEBUG: returning 345275
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_wic
| INFO: Creating image(s)...
|
| ERROR: No kernel file found
|
| WARNING: exit code 1 from a shell command.

How do I remove the requirement for a kernel image? I suppose if I manage to do that, the dtb files are missng too, then.

Kind Regards
Konstantin

--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

[email protected]
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60202): https://lists.yoctoproject.org/g/yocto/message/60202
Mute This Topic: https://lists.yoctoproject.org/mt/99383061/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 2 lines · Alexander Kanavin

I don't have a ready solution, but you could grep for the error message, see where it happens and what can be done to 'not make it

I am still searching for this like you suggested :-D

#3 lore raw

[ak@fedora poky]$ grep -ir "No kernel file found" scripts/ scripts/lib/wic/plugins/source/bootimg-partition.py:
raise WicError('No kernel file found')

You're welcome.

Alex

Quoted 7 lines · Konstantin Kletschke
Quoted 2 lines · Alexander Kanavin

I don't have a ready solution, but you could grep for the error message, see where it happens and what can be done to 'not make it

I am still searching for this like you suggested :-D

#4 lore raw
Quoted 3 lines · Alexander Kanavin

[ak@fedora poky]$ grep -ir "No kernel file found" scripts/ scripts/lib/wic/plugins/source/bootimg-partition.py:
raise WicError('No kernel file found')

Yeah... I end up in scripts/lib/wic/engine.py get_custom_config() which I must prepare to avoid falling into the "No Kernel..." pitfall, what is that, an u-boot extlinux config? I am trying to find out...

#5 lore raw
Quoted 3 lines · Konstantin Kletschke

Yeah... I end up in scripts/lib/wic/engine.py get_custom_config() which I must prepare to avoid falling into the "No Kernel..." pitfall, what is that, an u-boot extlinux config? I am trying to find out...

I found out:

In the wks file I have to specifiy an existing configfile like this at the bottom (--configfile part):

bootloader --append="console=ttyS0,115200" --configfile="directdisk-bootloader-config.cfg"

Then I can use my stripped down set of IMAGE_BOOT_FILES without kernel and dtb files.

I end up with an unnecessary extlinux/extlinux.conf but this are ~550Bytes and are not avoidable so I can live with that at the moment.