Re: linux-libc-headers - how to handle for older kernels?
Mike Looijmans
On 01-12-19 22:57, Peter Bergin via Lists.Yoctoproject.Org wrote:
Hi, It is not broken, so please don't fix it. OpenPLi has been using kernels way older than 4.1 with the kernel-headers generated by OE/yocto and did not experience any problems with that. There's about 50+ machines in there that have pre-built binary drivers that only work with a particular kernel config and hence the old stuff. There are some corner-cases with exotic kernels and exotic exports and exotic boot executables that use the kernel compiler, but I doubt that you're in there... If you have a kernel that exports something that's not in the regular headers, it's way better to solve that using a syscall than trying to poke in low level libc stuff. So again, if you don't experience problems, please don't try to fix it...
|
|
|
|
Re: linux-libc-headers - how to handle for older kernels?
Mikko Rapeli
Hi,
On Sun, Dec 01, 2019 at 10:57:15PM +0100, Peter Bergin wrote: Hi,I would fork linux-libc-headers to the kernel you are actually using despite the comment in the file. That's the only way to export headers from the correct kernel to everyone who needs them. There is no other documented way of exporting the actual kernel headers to users in bitbake builds and SDK. One optimization I would do is to fork the uapi headers from the actual kernel recipe so that full system does not need to be recompiled when kernel changes. One needs to manually track for kernel uapi header changes then. Cheers, -Mikko
|
|
|
|
trying to use ext4 rootfs image in a wic image (dependency issues)
Theodore A. Roth
Hello,
I'm trying to create a wic image that contains an ext4 partition image file in the /boot partition . I've set the following: IMAGE_FSTYPES = "tar.xz ext4 wic wic.bmap" IMAGE_BOOT_FILES += "${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.ext4" I'm using "beaglebone-yocto" for MACHINE and the above overrides what is set in the "beaglebone-yocto.conf" machine configuration. When I run "bitbake myimage", the do_image_wic task fails to find the ""${IMAGE_BASENAME}-${MACHINE}.ext4" because the do_image_wic task is run before the do_image_complete task copies the files from DEPLOYDIR into DEPLOY_DIR_IMAGE. Since the do_image_wic task is looking in DEPLOY_DIR_IMAGE and is run before the do_image_complete task due to dependencies, the creation of the wic image fails. I tried to work around this with the following: do_image_wic[recrdeptask] += "do_image_ext4" but I quickly discovered that does not work due do_image_complete copying of files (as discussed above). If I remove "wic*" from IMAGE_FSTYPES, build myimage and then run wic manually, all is good, but I lose the automating of wic image creation when building the image recipe and also lose the ability to have other image recipes inherit (via "include") and extend the base image (thus inheriting the wic creation rules). The end goal is to have an initramfs which loopback mounts the ext4 rootfs partition readonly from the /boot partition. Any suggestions on how to get do_image_ext4 generated files available to do_image_wic? Ted Roth
|
|
|
|
linux-libc-headers - how to handle for older kernels?
Peter Bergin
Hi,
I'm currently working in a project using Yocto 2.6 (thud) release. It has default kernel v4.18 and also linux-libc-headers from kernel v4.18. In my project we will use kernel v4.1. I would like advice how to handle the linux-libc-headers package for my project, should I use the v4.18 headers or should I use the v4.1 header files which matches the running kernel? From https://www.kernel.org/doc/html/latest/kbuild/headers_install.html: "Kernel headers are backwards compatible, but not forwards compatible. This means that a program built against a C library using older kernel headers should run on a newer kernel (although it may not have access to new features), but a program built against newer kernel headers may not work on an older kernel." With the information from the quote above I would directly use v4.1 headers as my linux-libc-headers. But then reading the information in the file meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc makes me think another round. It states: " # You're probably looking here thinking you need to create some new copy # of linux-libc-headers since you have your own custom kernel. To put # this simply, you DO NOT. ... # There can also be a case where your kernel extremely old and you want # an older libc ABI for that old kernel. The headers installed by this # recipe should still be a standard mainline kernel, not your own custom # one. " The first part states that I should not change linux-libc-headers. But when I read the last part I'm not sure about the interpretation and it could be for my case. Just a matter of definition if v4.1 is extremely old compared to v4.18. Then another thing comes in to the equation; the LIBC ABI. When I look into the configuration of the glibc package it uses the configure switch "--enable-kernel=3.2" which means it shall be compatible with all kernel newer than v3.2. Then probably glibc is fine if it is compiled with v4.18 and run on v4.1? If building all applications against v4.18 headers but run on v4.1 kernel. I have a feeling that there potentially can be problems here. Please help me with some information about this and share your opinions? Are there any risks at all to use v4.1 as linux-libc-headers in my Yocto build? The only drawback I see is that it will be a new configuration not well tested by the community. Are there other risks or drawbacks using your own version of linux-libc-headers? Best regards, /Peter
|
|
|
|
Re: Mising init and systemd binary files
JH
Thanks Paul, indeed, what was I missing.
toggle quoted messageShow quoted text
Kind regards, - jh
On 11/30/19, Paul Barker <paul@...> wrote:
On Sat, 30 Nov 2019, at 11:28, JH wrote:Hi,Are you using an existing image recipe or writing your own? If it's your
|
|
|
|
Re: Mising init and systemd binary files
On Sat, 30 Nov 2019, at 11:28, JH wrote:
Hi,Are you using an existing image recipe or writing your own? If it's your own, do you have packagegroup-core-boot included? Thanks, -- Paul Barker
|
|
|
|
Mising init and systemd binary files
JH
Hi,
I built a Yocto image, but could not find /init, usually it should be a symbolic link in /init->/sbin/init->/lib/systemd/systemd, In /lib/systemd directory, it only contains a subdirectory system, all other systemd binaries are missing, many system commands in /sbin are also missing. What could I get wrong here to miss out all systemd files? Thank you. Kind regards, - jh
|
|
|
|
Re: How does metadata include in an image recipe work?
Morne
but when I run bitbake ex-image2, it only built ex-image2 image, it did not built images defined in ex-image1.bb.See this previous answer on the mailing list to a similar question: https://www.yoctoproject.org/pipermail/yocto/2018-August/042220.html - Morné
|
|
|
|
Add package to rootfs
JH
Hi,
I built a Yocto image in a file app-image.rootfs.tar.gz, I also built a kernel initramfs to bundle the rootfs, but that kernel rootfs is different to my app-image.rootfs.tar.gz, how to define IMAGE_ROOTFS to have my kernel rootfs point to the same rootfs packaged to app-image.rootfs.tar.gz? Thank you. Kind regards, - jh
|
|
|
|
How does metadata include in an image recipe work?
JH
Hi,
I have two images recipes, one is included in another image recipe: $ ls recipes-core/images ex-image1.bb ex-image2.bb $ cat recipes-core/images/ex-image2.bb include ex-image1.bb ...... My understanding that the metadata "include" is to include all image files defined in the included recipe as well, but when I run bitbake ex-image2, it only built ex-image2 image, it did not built images defined in ex-image1.bb. What could I be missing here? How could I build an image to include all image files included in another image.bb? Thank you. Kind regards, - jh
|
|
|
|
[matchbox-wm][PATCH] keys: Avoid freeing Wm_config member pointer in keys_load_config().
Simon Haggett
If the Wm_config instance contains a non-NULL pointer in its kbd_conf_file
member, then (in a build that does not use gconf) keys_load_config() will assign that pointer to a local conf_path variable. However, keys_load_config() later calls free() on this conf_path variable (since it may instead have been assigned a malloc'd buffer). This can therefore leave Wm_config::kbd_conf_file as a dangling pointer. Furthermore, if the user has specified the -kbdconfig argument when starting matchbox-window-manager then this pointer comes from argv and so the call to free() can lead to a segmentation fault. This patch fixes the issue by using strdup() to make a copy of the string pointed to by the Wm_config::kbd_conf_file member pointer. This matches the approach used when conf_path is required to take the value of a string literal, and ensures that free() can safely be called on conf_path. Signed-off-by: Simon Haggett <simon.haggett@...> --- src/keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keys.c b/src/keys.c index bc83bd4..ca77f81 100644 --- a/src/keys.c +++ b/src/keys.c @@ -326,7 +326,7 @@ keys_load_config(Wm *w) }; if (w->config->kbd_conf_file != NULL) - conf_path = w->config->kbd_conf_file; + conf_path = strdup(w->config->kbd_conf_file); if (conf_path == NULL && getenv("HOME")) { -- 2.17.1
|
|
|
|
Copy initramfs to rootfs
Sinisa <sgujic@...>
Hello everyone,
I started to build kernel with initramfs, and so far all that works great. I got my new shiny zImage-initramfs--4.1.14..xxx.bin. I can boot it over tftp, its does exactly what i want. Problem im facing is, how do i put this new zImage instead of originally built zImage in final rootfs archive (tar.gz). To clarify, upon a "bitbake create-my-fancy-image" i got in tmp/deploy/images two zImage files, one without initramfs and one with initramfs. When i inspect my rootfs.tar.gz /boot folder, i have zImage inisde (symlink and DTB also). I would like to replace somehow this zImage with initramfs version. How do i do that? Documentations talks only about this IMAGE_BUNDLE that is going to merge kernel with initramfs, but i cant find any obvious way to get this into rootfs, to replace somehow original zImage. The best idea i have so far (that does not work) is to do something like this: initramfs_postprocess() { # NOTE: pseudo code rm ${IMAGE_ROOTFS}/boot/zImage-custom* unlink ${IMAGE_ROOTFS}/boot/zImage # Im not sure how do i reference file from tmp/deploy/images, which is my question number 2 cp zImage-initramfs-* to ${WORKDIR}/boot/zImage } ROOTFS_POSTPROCESS_COMMAND += "initramfs_postprocess; " This above looks very dirty to me, but its best "idea" i have atm. So, in my local.conf i have: INITRAMFS_IMAGE_BUNDLE = "1" # means fuse kernel + initramfs And in my main image recipe i have: INITRAMFS_IMAGE = "initramfs-custom" #name of the recipe that provides some custom /init INITRAMFS_FSTYPES = "cpio.gz" # make a compressed cpio out of initramfs One thing to note, im trying to avoid doing this with wks and creating a special /boot partition. This is not something im really targeting, i know its possible, but i want to have my kernel inside rootfs.tar.gz in /boot from single image recipe due the various reasons. Any suggestion is much appreciated. Regards, Sinisa
|
|
|
|
Re: [meta-mingw][PATCH] gettext: adapt for version 0.20
Alexander Kanavin
On Fri, 29 Nov 2019 at 16:24, Joshua Watt <jpewhacker@...> wrote: On Thu, Nov 28, 2019 at 11:47 AM Alexander Kanavin It probably will, yes (I didn't test, but it drops a patch that's apparently needed in 0.19). Alex >
|
|
|
|
Re: [patchtest][PATCH 1/2] patchtest: Fix printing of exception tracebacks
On Fri, 15 Nov 2019, at 13:23, Paul Barker wrote:
The addError() handler is called outside of an actual exception handlerPing on this and the following patch. -- Paul Barker
|
|
|
|
Re: [patchtest-oe][PATCH] test_patch_upstream_status: Be explicit about case sensitivity
On Fri, 15 Nov 2019, at 13:09, Paul Barker wrote:
The case sensitivity of the checks for the "Upstream-Status" labelPing. -- Paul Barker
|
|
|
|
Re: [meta-mingw][PATCH] gettext: adapt for version 0.20
Joshua Watt
On Thu, Nov 28, 2019 at 11:47 AM Alexander Kanavin
<alex.kanavin@...> wrote: I've applied this to master-next, we can pull up master once the oe-core patch lands. I'm assuming this will break the current master AB builds if it's applied to master without the oe-core patch?
|
|
|
|
Re: Private: Re: [yocto] source.list for apt tool in yocto image for raspberry pi
#yocto
#raspberrypi
#debian
#apt
Josef Holzmayr <holzmayr@...>
On Fri, Nov 29, 2019 at 04:29:59AM -0800, keyurthumar0402@... wrote:
On Fri, Nov 29, 2019 at 04:23 AM, Josef Holzmayr wrote:You have to write recipes, then. Please see: https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#new-recipe-writing-a-new-recipeHey thank you for the reply. (And keep the threads on-list please.) Greetz -- ——————————————— Josef Holzmayr Software Developer Embedded Systems Tel: +49 8444 9204-48 Fax: +49 8444 9204-50 R-S-I Elektrotechnik GmbH & Co. KG Woelkestrasse 11 D-85301 Schweitenkirchen www.rsi-elektrotechnik.de ——————————————— Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393 Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg Ust-IdNr: DE 128592548 _____________________________________________________________ Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363 Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg USt-IdNr.: DE 128592548
|
|
|
|
Re: source.list for apt tool in yocto image for raspberry pi
#yocto
#raspberrypi
#debian
#apt
Josef Holzmayr <holzmayr@...>
On Fri, Nov 29, 2019 at 03:56:41AM -0800, keyurthumar0402@... wrote:
There is a lot of things confused in here, it seems. I Have built yocto image for raspberry pi.Ok. Congratulations! It is debian based and...You mean, you set packege PACKAGE_CLASSES ?= "package_deb"? ...apt is already installed....which in the end is juut a binary. What should i write in source.list ? As I don' t have my personal repository please suggest some standard repository.There is none. The standard practise is to build the image with all the things you need, and not use runtime package management. If you want to use it like a debian, and think it should behave like a debian, then you probably should just run debian. Yocto builds a custom distribution, therefore no "official" packages exist. Greetz. -- ——————————————— Josef Holzmayr Software Developer Embedded Systems Tel: +49 8444 9204-48 Fax: +49 8444 9204-50 R-S-I Elektrotechnik GmbH & Co. KG Woelkestrasse 11 D-85301 Schweitenkirchen www.rsi-elektrotechnik.de ——————————————— Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393 Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg Ust-IdNr: DE 128592548 _____________________________________________________________ Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363 Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg USt-IdNr.: DE 128592548
|
|
|
|
source.list for apt tool in yocto image for raspberry pi
#yocto
#raspberrypi
#debian
#apt
keyurthumar0402@...
|
|
|
|
Re: Private: Re: [yocto] Which layer is best for tpm2 stack
Maciej Pijanowski
On 29.11.2019 11:01, Diego Santa Cruz
via Lists.Yoctoproject.Org wrote:
I'm currently using meta-tpm from meta-security for tpm2-tools. My reasoning was that this one will likely be the one to go in the long run since it's hosted on the poky git (?).
-- Maciej Pijanowski Embedded Systems Engineer GPG: F1401D2E1CCB19EF https://3mdeb.com | @3mdeb_com
|
|
|