Date   

Re: #kirkstone boot script section not added in the fitimage #kirkstone

Quentin Schulz
 

Hi Sébastien,

On 11/14/22 14:50, sebastien.fabre31@... wrote:
Hello,
I am working on kirkstone. If UBOOT_ENV is specified and kernel-fitimage is in KERNEL_CLASSES, boot script section is not added in the fitimage.
In fitimage_assemble (kernel-fitimage.bbclass), the 3 rd step is not performed because boot directory is not in STAGING_DIR_HOST. Indeed, u-boot.inc installs UBOOT_ENV_BINARY in boot directory but boot is not in SYSROOT_DIRS so it is not present in kernel STAGING_DIR_HOST.
Should we add the following line in u-boot.inc ?
SYSROOT_DIRS:append = "${@' /boot' if d.getVar('UBOOT_ENV') else ''}"
The logic seems reasonable to me, yes. We could have used the deploy directory instead and depend on the do_deploy task instead of the do_populate_sysroot but I think it is actually safer to use the sysroot (because it is cleaned if a dependency changes, as opposed to the deploy directory that might be providing an old version, e.g. think one build with UBOOT_ENV set followed by one it isn't, the deployed artifact will still be present).

Though, please use += instead of :append.

I'm wondering also if we cannot just always have /boot in SYSROOT_DIRS for U-Boot recipe? I guess it's fine like this :)

Please send a patch,
Cheers,
Quentin


Alexander Kanavin
 

In this case I have no idea unfortunately. Does a regular kernel work?

Alex

On Mon 21. Nov 2022 at 16.38, Nikita Gupta <nikitagupta2509@...> wrote:
Hello Alex, 
Sorry for late reply. Actually i madert- image by setting the preferred virtual/kernel type. 
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi-rt"
 
and bake the recipe for following target.
bitbake core-image-base 

I got my image successfully and it is booting up, but it is not taking user input from my keyboard. Why is it happening?

Thanks in Advance



Re: Reproducible builds not working with musl?

Alexander Kanavin
 

You have to find them yourself with gut bisect I would say. Too many things have changed.

Alex

On Mon 21. Nov 2022 at 17.07, Kenth Eriksson <kenth.eriksson@...> wrote:
I see. Any particular fixes you can point me to that may be relevant also for musl?



Re: Reproducible builds not working with musl?

Kenth Eriksson
 

I see. Any particular fixes you can point me to that may be relevant also for musl?


Nikita Gupta
 

Hello Alex, 
Sorry for late reply. Actually i madert- image by setting the preferred virtual/kernel type. 
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi-rt"
 
and bake the recipe for following target.
bitbake core-image-base 

I got my image successfully and it is booting up, but it is not taking user input from my keyboard. Why is it happening?

Thanks in Advance


Re: Reproducible builds not working with musl?

Joshua Watt
 

On 11/21/22 08:38, Alexander Kanavin wrote:
On Mon, 21 Nov 2022 at 15:31, Kenth Eriksson
<kenth.eriksson@...> wrote:
Having trouble with reproducible builds in yocto on dunfell release with musl as libc. E.g. I can see that the build path for musl crti assembler file is leaking through and becomes visible when I do strings on libraries and binaries.

$ strings /opt/infn-xr/1.0/sysroots/aarch64-xr-linux-musl/usr/lib64/.debug/libcrypto.so.1.1 | grep crt[a-z]\.o
/data/jenkins/workspace/XR_yocto-xr_master/build/build/infn-xr/gmcu/tmp/work/aarch64-xr-linux-musl/openssl/1.1.1l-r0/recipe-sysroot/usr/lib64/crti.o
/data/jenkins/workspace/XR_yocto-xr_master/build/build/infn-xr/gmcu/tmp/work/aarch64-xr-linux-musl/openssl/1.1.1l-r0/recipe-sysroot/usr/lib64/crtn.o
$

Is this a known issue? Yocto passes -fmacro-prefix-map and -fdebug-prefix-map as part of DEBUG_PREFIX_MAP to eliminate paths to WORKDIR. But it looks as that fails for the musl assembler file?
Testing reproducibility properly is a heavy exercise (you need to
build everything from scratch, then compare), and so we do it only for
glibc.

There have been recent fixes and tests to check that host paths do not
leak into target files, but dunfell probably has neither the fix nor
the test.
This is correct; it's hard for upstream to test every possible combination for reproducibility. We do try to get some decent coverage, but ultimately if you really care about reproducible builds, you should setup a reproducible build test for your exact combination. We've tried to make this pretty easy, see https://youtu.be/zXEdqGS62Wc?t=1021


Alex


Re: Reproducible builds not working with musl?

Alexander Kanavin
 

On Mon, 21 Nov 2022 at 15:31, Kenth Eriksson
<kenth.eriksson@...> wrote:

Having trouble with reproducible builds in yocto on dunfell release with musl as libc. E.g. I can see that the build path for musl crti assembler file is leaking through and becomes visible when I do strings on libraries and binaries.

$ strings /opt/infn-xr/1.0/sysroots/aarch64-xr-linux-musl/usr/lib64/.debug/libcrypto.so.1.1 | grep crt[a-z]\.o
/data/jenkins/workspace/XR_yocto-xr_master/build/build/infn-xr/gmcu/tmp/work/aarch64-xr-linux-musl/openssl/1.1.1l-r0/recipe-sysroot/usr/lib64/crti.o
/data/jenkins/workspace/XR_yocto-xr_master/build/build/infn-xr/gmcu/tmp/work/aarch64-xr-linux-musl/openssl/1.1.1l-r0/recipe-sysroot/usr/lib64/crtn.o
$

Is this a known issue? Yocto passes -fmacro-prefix-map and -fdebug-prefix-map as part of DEBUG_PREFIX_MAP to eliminate paths to WORKDIR. But it looks as that fails for the musl assembler file?
Testing reproducibility properly is a heavy exercise (you need to
build everything from scratch, then compare), and so we do it only for
glibc.

There have been recent fixes and tests to check that host paths do not
leak into target files, but dunfell probably has neither the fix nor
the test.

Alex


Reproducible builds not working with musl?

Kenth Eriksson
 

Having trouble with reproducible builds in yocto on dunfell release with musl as libc. E.g. I can see that the build path for musl crti assembler file is leaking through and becomes visible when I do strings on libraries and binaries.

$ strings /opt/infn-xr/1.0/sysroots/aarch64-xr-linux-musl/usr/lib64/.debug/libcrypto.so.1.1 | grep crt[a-z]\.o
/data/jenkins/workspace/XR_yocto-xr_master/build/build/infn-xr/gmcu/tmp/work/aarch64-xr-linux-musl/openssl/1.1.1l-r0/recipe-sysroot/usr/lib64/crti.o
/data/jenkins/workspace/XR_yocto-xr_master/build/build/infn-xr/gmcu/tmp/work/aarch64-xr-linux-musl/openssl/1.1.1l-r0/recipe-sysroot/usr/lib64/crtn.o
$

Is this a known issue? Yocto passes -fmacro-prefix-map and -fdebug-prefix-map as part of DEBUG_PREFIX_MAP to eliminate paths to WORKDIR. But it looks as that fails for the musl assembler file?

 


Re: rust issue for armv6 in mainline poky

Alexander Kanavin
 

Can you try the tip of master please?

Alex

On Mon, 21 Nov 2022 at 13:32, Marek Belisko <marek.belisko@...> wrote:

Hi,

on kirkstone branch when trying to build rust for raspberrypi machine
I'm getting:

ERROR: rust-cross-arm1176jzfshf-vfp-glibc-1.59.0-r0
do_rust_gen_targets: Error executing a python function in
exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_rust_gen_targets(d)
0003:
File: '/data/projects/test-build/.build-rpi/../sources/poky/meta/recipes-devtools/rust/rust-cross.inc',
lineno: 19, function: do_rust_gen_targets
0015: if arch == "arm" and target_is_armv7(d):
0016: arch = 'armv7'
0017: features = d.getVar('TARGET_LLVM_FEATURES') or ""
0018: cpu = d.getVar('TARGET_LLVM_CPU')
*** 0019: rust_gen_target(d, thing, wd, features, cpu, arch, abi)
0020:}
0021:
0022:# Otherwise we'll depend on what we provide
0023:INHIBIT_DEFAULT_RUST_DEPS = "1"
File: '/data/projects/test-build/.build-rpi/../sources/poky/meta/recipes-devtools/rust/rust-common.inc',
lineno: 314, function: rust_gen_target
0310: # build tspec
0311: tspec = {}
0312: tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi)
0313: tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
*** 0314: tspec['max-atomic-width'] =
int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
0315: tspec['target-pointer-width'] =
d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
0316: tspec['target-c-int-width'] =
d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
0317: tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
0318: tspec['arch'] = arch_to_rust_target_arch(rust_arch)
Exception: TypeError: int() argument must be a string, a bytes-like
object or a number, not 'NoneType'

by adding below it seems to fix an issue (copied from meta-rust):
diff --git a/meta/recipes-devtools/rust/rust-common.inc
b/meta/recipes-devtools/rust/rust-common.inc
index ef70c48d0f..389c75d2f7 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -118,6 +118,15 @@ def llvm_features(d):
llvm_features_from_target_fpu(d))


+
+DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
+LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}"
+TARGET_ENDIAN[arm-eabi] = "little"
+TARGET_POINTER_WIDTH[arm-eabi] = "32"
+TARGET_C_INT_WIDTH[arm-eabi] = "32"
+MAX_ATOMIC_WIDTH[arm-eabi] = "64"
+FEATURES[arm-eabi] = "+v6,+vfp2"
+
## arm-unknown-linux-gnueabihf

Thanks and BR,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com



rust issue for armv6 in mainline poky

Marek Belisko
 

Hi,

on kirkstone branch when trying to build rust for raspberrypi machine
I'm getting:

ERROR: rust-cross-arm1176jzfshf-vfp-glibc-1.59.0-r0
do_rust_gen_targets: Error executing a python function in
exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_rust_gen_targets(d)
0003:
File: '/data/projects/test-build/.build-rpi/../sources/poky/meta/recipes-devtools/rust/rust-cross.inc',
lineno: 19, function: do_rust_gen_targets
0015: if arch == "arm" and target_is_armv7(d):
0016: arch = 'armv7'
0017: features = d.getVar('TARGET_LLVM_FEATURES') or ""
0018: cpu = d.getVar('TARGET_LLVM_CPU')
*** 0019: rust_gen_target(d, thing, wd, features, cpu, arch, abi)
0020:}
0021:
0022:# Otherwise we'll depend on what we provide
0023:INHIBIT_DEFAULT_RUST_DEPS = "1"
File: '/data/projects/test-build/.build-rpi/../sources/poky/meta/recipes-devtools/rust/rust-common.inc',
lineno: 314, function: rust_gen_target
0310: # build tspec
0311: tspec = {}
0312: tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi)
0313: tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
*** 0314: tspec['max-atomic-width'] =
int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
0315: tspec['target-pointer-width'] =
d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
0316: tspec['target-c-int-width'] =
d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
0317: tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
0318: tspec['arch'] = arch_to_rust_target_arch(rust_arch)
Exception: TypeError: int() argument must be a string, a bytes-like
object or a number, not 'NoneType'

by adding below it seems to fix an issue (copied from meta-rust):
diff --git a/meta/recipes-devtools/rust/rust-common.inc
b/meta/recipes-devtools/rust/rust-common.inc
index ef70c48d0f..389c75d2f7 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -118,6 +118,15 @@ def llvm_features(d):
llvm_features_from_target_fpu(d))


+
+DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
+LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}"
+TARGET_ENDIAN[arm-eabi] = "little"
+TARGET_POINTER_WIDTH[arm-eabi] = "32"
+TARGET_C_INT_WIDTH[arm-eabi] = "32"
+MAX_ATOMIC_WIDTH[arm-eabi] = "64"
+FEATURES[arm-eabi] = "+v6,+vfp2"
+
## arm-unknown-linux-gnueabihf

Thanks and BR,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


Re: [meta-rockchip][PATCH] rockchip-defaults: remove xf86-input-keyboard

Quentin Schulz
 

Hi Trevor,

On 11/19/22 14:45, Trevor Woerner wrote:
xf86-input-keyboard was removed from openembedded-core at its commit:
f1d7c33b64 (xf86-input-keyboard: remove the recipe, 2022-07-20). Therefore > remove it from the XSERVER definition.
Signed-off-by: Trevor Woerner <twoerner@...>
Reviewed-by: Quentin Schulz <foss+yocto@...>

Thanks,
Quentin


Re: QA notification for completed autobuilder build (yocto-4.1.1.rc1)

Jing Hui Tham
 

Hi All,

QA for yocto-4.11.rc1 is completed. This is the full report for this release:
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-testresults-contrib/tree/?h=intel-yocto-testresults

======= Summary ========
No high milestone defects.

No new issue found.

Thanks,
Jing Hui

-----Original Message-----
From: yocto@... <yocto@...> On
Behalf Of Pokybuild User
Sent: Tuesday, 15 November, 2022 7:00 AM
To: yocto@...
Cc: qa-build-notification@...
Subject: [yocto] QA notification for completed autobuilder build (yocto-
4.1.1.rc1)


A build flagged for QA (yocto-4.1.1.rc1) was completed on the autobuilder
and is available at:


https://autobuilder.yocto.io/pub/releases/yocto-4.1.1.rc1


Build hash information:

bitbake: 138dd7883ee2c521900b29985b6d24a23d96563c
meta-agl: e5dd276442a8c9268a8818a638b07ee96383b657
meta-arm: ff9b6f29bf4a6e3fcead5c1025a413cffee7bc53
meta-aws: 8537180c8645455ee2b57c696389df21fc17f63a
meta-intel: f70cf173dc40131e5ed3955a4a459fff3aa010ed
meta-mingw: b0067202db8573df3d23d199f82987cebe1bee2c
meta-openembedded: c5668905a6d8a78fb72c2cbf8b20e91e686ceb86
meta-virtualization: 8857b36ebfec3d548755755b009adc491ef320ab
oecore: 9237ffc4feee2dd6ff5bdd672072509ef9e82f6d
poky: d3cda9a3e0837eb2ac5482f5f2bd8e55e874feff



This is an automated message from the Yocto Project Autobuilder
Git: git://git.yoctoproject.org/yocto-autobuilder2
Email: richard.purdie@...



Re: systemd: how to enable auto-loading kernel modules

Mike Looijmans
 

Guess you'll have to provide more than just "It doesn't work" if you want any serious assistance.

The source code would help. Also telling us whether the drivers actually probe if you load them manually using modprobe.



Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@...
W: www.topic.nl

Please consider the environment before printing this e-mail

On 08-11-2022 07:58, Merlin via lists.yoctoproject.org wrote:
Thanks Mike for your advice!
I've replaced underscore to hyphen and rerun a build from fetch, but unfortunately that didn't invoke auto-load.
In fact, my modules are device drivers developed in out-of-tree repositories. Some user-space applications depend on them, so I wanted them to be auto-loaded on boot. Autoload didn't occur even though I've added corresponding devicetree properties.
Best
Merlin


[meta-rockchip][PATCH] rockchip-defaults: remove xf86-input-keyboard

Trevor Woerner
 

xf86-input-keyboard was removed from openembedded-core at its commit:
f1d7c33b64 (xf86-input-keyboard: remove the recipe, 2022-07-20). Therefore
remove it from the XSERVER definition.

Signed-off-by: Trevor Woerner <twoerner@...>
---
conf/machine/include/rockchip-defaults.inc | 1 -
1 file changed, 1 deletion(-)

diff --git a/conf/machine/include/rockchip-defaults.inc b/conf/machine/include/rockchip-defaults.inc
index ca94249..3ce2e24 100644
--- a/conf/machine/include/rockchip-defaults.inc
+++ b/conf/machine/include/rockchip-defaults.inc
@@ -15,7 +15,6 @@ XSERVER = " \
xf86-video-modesetting \
xf86-input-evdev \
xf86-input-mouse \
- xf86-input-keyboard \
"

# misc
--
2.36.0.rc2.17.g4027e30c53


Re: [yocto-autobuilder-helper][langdale] config.json: don't run the meta-agl-core test

Steve Sakoman
 

On Fri, Nov 18, 2022 at 5:08 AM Alexander Kanavin
<alex.kanavin@...> wrote:

Does this mean that master should be excluded too?
No, master is supported.

Steve

On Fri, 18 Nov 2022 at 15:28, Steve Sakoman <steve@...> wrote:

langdale isn't currently supported on any branch of meta-agl

Signed-off-by: Steve Sakoman <steve@...>
---
config.json | 17 -----------------
1 file changed, 17 deletions(-)

diff --git a/config.json b/config.json
index da87a2d..27283c9 100644
--- a/config.json
+++ b/config.json
@@ -403,23 +403,6 @@
"SANITYTARGETS" : "core-image-sato:do_testsdk"
}
},
- "meta-agl-core" : {
- "NEEDREPOS" : ["poky", "meta-agl"],
- "ADDLAYER" : [
- "${BUILDDIR}/../meta-agl/meta-agl-core"
- ],
- "DISTRO" : "poky-agl",
- "BUILDINFO" : true,
- "BUILDHISTORY" : true,
- "PACKAGE_CLASSES" : "package_rpm",
- "extravars" : [
- "AGL_FEATURES = 'aglcore'"
- ],
- "step1" : {
- "MACHINE": "qemux86-64",
- "BBTARGETS": "agl-image-core-autobuilder"
- }
- },
"meta-aws" : {
"NEEDREPOS" : ["poky", "meta-openembedded", "meta-aws"],
"ADDLAYER" : [
--
2.25.1




Re: [yocto-autobuilder-helper][langdale] config.json: don't run the meta-agl-core test

Alexander Kanavin
 

Does this mean that master should be excluded too?

Alex

On Fri, 18 Nov 2022 at 15:28, Steve Sakoman <steve@...> wrote:

langdale isn't currently supported on any branch of meta-agl

Signed-off-by: Steve Sakoman <steve@...>
---
config.json | 17 -----------------
1 file changed, 17 deletions(-)

diff --git a/config.json b/config.json
index da87a2d..27283c9 100644
--- a/config.json
+++ b/config.json
@@ -403,23 +403,6 @@
"SANITYTARGETS" : "core-image-sato:do_testsdk"
}
},
- "meta-agl-core" : {
- "NEEDREPOS" : ["poky", "meta-agl"],
- "ADDLAYER" : [
- "${BUILDDIR}/../meta-agl/meta-agl-core"
- ],
- "DISTRO" : "poky-agl",
- "BUILDINFO" : true,
- "BUILDHISTORY" : true,
- "PACKAGE_CLASSES" : "package_rpm",
- "extravars" : [
- "AGL_FEATURES = 'aglcore'"
- ],
- "step1" : {
- "MACHINE": "qemux86-64",
- "BBTARGETS": "agl-image-core-autobuilder"
- }
- },
"meta-aws" : {
"NEEDREPOS" : ["poky", "meta-openembedded", "meta-aws"],
"ADDLAYER" : [
--
2.25.1




[yocto-autobuilder-helper][langdale] config.json: don't run the meta-agl-core test

Steve Sakoman
 

langdale isn't currently supported on any branch of meta-agl

Signed-off-by: Steve Sakoman <steve@...>
---
config.json | 17 -----------------
1 file changed, 17 deletions(-)

diff --git a/config.json b/config.json
index da87a2d..27283c9 100644
--- a/config.json
+++ b/config.json
@@ -403,23 +403,6 @@
"SANITYTARGETS" : "core-image-sato:do_testsdk"
}
},
- "meta-agl-core" : {
- "NEEDREPOS" : ["poky", "meta-agl"],
- "ADDLAYER" : [
- "${BUILDDIR}/../meta-agl/meta-agl-core"
- ],
- "DISTRO" : "poky-agl",
- "BUILDINFO" : true,
- "BUILDHISTORY" : true,
- "PACKAGE_CLASSES" : "package_rpm",
- "extravars" : [
- "AGL_FEATURES = 'aglcore'"
- ],
- "step1" : {
- "MACHINE": "qemux86-64",
- "BBTARGETS": "agl-image-core-autobuilder"
- }
- },
"meta-aws" : {
"NEEDREPOS" : ["poky", "meta-openembedded", "meta-aws"],
"ADDLAYER" : [
--
2.25.1


Re: source-less python

Josef Holzmayr
 

It can always be added if is is found useful and robust. We tend to be careful about taking things into core layers as long as those two concerns, plus the maintenance commitment are not clear. Technical debt is a real problem.


On Thu, Nov 17, 2022 at 2:05 PM Yishai Jaffe <yishai1999@...> wrote:
Seems like a shame not to add this feature for everyone to use... 

Yishai Jaffe

On Thu, Nov 17, 2022, 2:34 PM Alexander Kanavin <alex.kanavin@...> wrote:
 Making your own! You can have it added to the layer index for better publicity.

Alex

On Thu, 17 Nov 2022 at 13:27, Yishai Jaffe <yishai1999@...> wrote:
>
> What layer would you suggest?
>
> Yishai Jaffe
>
> On Thu, Nov 17, 2022, 2:21 PM Alexander Kanavin <alex.kanavin@...> wrote:
>>
>> You can start by placing it in a separate layer?
>>
>> Alex
>>
>> On Thu, 17 Nov 2022 at 13:04, Yishai Jaffe <yishai1999@...> wrote:
>> >
>> > I assume by core you mean openembedded-core/poky, yes?
>> >
>> > So where would you add it to?
>> >
>> > Seems to me like a very useful feature that many people would use if they knew the option exists.
>> >
>> > Also, I noticed that in the recipe for python there is a variable named INCLUDE_PYC which does exactly what you think it would. This looks to me like someone did think about the whole python size subject but didn't exactly go through with it all the way. You can decide if to include pyc files but not the opposite. Also, this feature which does exist only applies to the python recipe but not to all other non-base python module recipes. Maybe this can be added to setuptools3 bbclass?
>> >
>> > Yishai Jaffe
>> >
>> > On Thu, Nov 17, 2022, 1:24 PM Alexander Kanavin <alex.kanavin@...> wrote:
>> >>
>> >> I just wonder if this should really be in core. The standards for core
>> >> are high: it needs to be both testable and tested, and there's only so
>> >> many possible options and tweaks where things can regress that we can
>> >> take. On the other hand, there has not been much demand for it.
>> >>
>> >> Alex
>> >>
>> >> On Thu, 17 Nov 2022 at 12:13, Yishai Jaffe <yishai1999@...> wrote:
>> >> >
>> >> > Hi Alexander,
>> >> >
>> >> > After some research, these are the numbers I came up with for compiling core-image-minimal with python3-core:
>> >> >
>> >> > Normal compilation:
>> >> > tar.bz2 - 6.6MB
>> >> > squashfs-xz - 6.1MB
>> >> >
>> >> > With my pyc-only patch:
>> >> > tar.bz2 - 5.8MB
>> >> > squashfs-xz - 5.2MB
>> >> >
>> >> > So that's about a 15% decrease in size.
>> >> > Again, this is for an image only with python3-core. Logically that would mean that if you had an image with more python packages it would be even a bigger percentage.
>> >> >
>> >> >
>> >> > Yishai Jaffe
>> >> >
>> >> >
>> >> > On Sun, Nov 13, 2022 at 5:12 PM Alexander Kanavin <alex.kanavin@...> wrote:
>> >> >>
>> >> >> Generally we slim down python installations by not installing all of
>> >> >> the standard library, and rather having precise dependencies for
>> >> >> specific modules. Can you illustrate the kind of space savings that
>> >> >> can be gained in actual numbers?
>> >> >>
>> >> >> Another issue is that this should be supported upstream and in the
>> >> >> wider python community. Is it?
>> >> >>
>> >> >> Alex
>> >> >>
>> >> >> On Sun, 13 Nov 2022 at 14:25, Federico Pellegrin <fede@...> wrote:
>> >> >> >
>> >> >> >
>> >> >> > Hello,
>> >> >> > Just as a small reference since I raised some doubts and questions in Buildroot community on this: there has been also some troubles to understand the correctness or not there (as I found some packages with problems due to this source-less management) and this then sparked, besides discussions in the Buildroot mailing list (roughly end of July / beginning of August if someone interested searching there), also an issue to the Python community, which albeit some discussion I think never arrived to a concrete conclusion. This is the issue: https://github.com/python/cpython/issues/95827 (see also the linked one maybe)
>> >> >> >
>> >> >> > These are just my 2 cents to this discussion, then of course the Python experts will probably chime in and describe the official/discussed position of Yocto regarding to this, but just felt like mentioning that although Buildroot is somehow offering this right now (and likely mostly works as well!), it's not really a so clean and/or agreed solution.
>> >> >> >
>> >> >> > Cheers,
>> >> >> > Federico
>> >> >> >
>> >> >> > Il giorno dom 13 nov 2022 alle ore 13:55 Yishai Jaffe <yishai1999@...> ha scritto:
>> >> >> >>
>> >> >> >> Hi,
>> >> >> >> I was wondering if there has been talk about support for source-less python on an image. Installing py and pyc files doubles the size of python on the rootfs. I can imagine this being implemented as an image feature.
>> >> >> >> I know that in buildroot it is supported.
>> >> >> >> Was this discussed and decided against? Is this an open issue?
>> >> >> >> I have a working patch that implements this. I can submit it for review.
>> >> >> >>
>> >> >> >> Thanks,
>> >> >> >> Yishai Jaffe
>> >> >> >> Yishai Jaffe
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >




Re: Image dependent variables/files in included recipes

Josef Holzmayr
 

For the record - Yocto chant #1:

Recipe data is local - configuration data is global.

On Thu, Nov 17, 2022 at 4:30 PM Quentin Schulz via lists.yoctoproject.org <quentin.schulz=theobroma-systems.com@...> wrote:

Hi Maik,

On 11/17/22 16:22, Maik Vermeulen wrote:
> Hi,
>
> Depending on the image that's being built, e.g. development vs. production,
> we would like to be able to include different user passwords and firewall
> settings.
>
> We know this can be achieved by just having two different recipes that do
> the same thing, but with different variables or included files. However, we
> were wondering if there is a neater way?
>
> We saw this post:
> https://urldefense.com/v3/__https://www.yoctoproject.org/pipermail/yocto/2018-June/041378.html__;!!OOPJP91ZZw!k-UkKru_mKI6U4p8UgDfH_VEh1-qar1kiQuqcmnyrETRAnubF79KykqR7VGaRu47i1Ws7n8CAagOJBqEFBB3goTxmBkgn8-qL3X383IHnKva$
> which seems to do what we want, because one recipe can install
> recipe-development, and the other can install recipe-production, while the
> recipe itself can then implement what needs to happen for either.
> However, other recipes included in the images can also depend on recipe,
> and they shouldn't depend on one specifically. They should accept that
> either recipe-development or recipe-production is included. Currently we
> see that both the generic recipe and the specific recipe used by the image
> are built and overwrite each other.
>
> What would be a neat way to achieve two variants of a recipe, and having
> different contents and settings in them?
> Or, can we solve that other included recipes depend on one of the variants,
> instead of on the generic one.
>

Development vs production is solved by using different distros.

You can then have the same recipe but with different files (see
(DISTRO)OVERRIDES mechanism for SRC_URI file:// files, c.f.
https://summit.yoctoproject.org/media/yocto-project-summit-2022-05/submissions/SCYYWD/resources/Demystifying_the_OVERRIDES_mec_2lZOP3n.pdf)
and/or different variables via FOO:dev-distro or FOO:append:dev-distro
for example.

You could also have different recipes both PROVIDES'ing the same virtual
recipe and then have PREFERRED_PROVIDER_my-recipe = "my-recipe-dev" in
your dev-distro.conf file.

Two distros is usually overkill when you have very small and
non-invasive differences between your dev and prod images (e.g. an
additional package, or a lone package that needs to be slightly
different). In that scenario, a "drity" solution is to have two recipes
and have the final image pick the appropriate package. But this quickly
does not scale well once you have recipes/packages depending on those or
if you have more than two flavors to support.

The best practice is to use two distros.

Cheers,
Quentin




Re: Image dependent variables/files in included recipes

Quentin Schulz
 

Hi Maik,

On 11/17/22 16:22, Maik Vermeulen wrote:
Hi,
Depending on the image that's being built, e.g. development vs. production,
we would like to be able to include different user passwords and firewall
settings.
We know this can be achieved by just having two different recipes that do
the same thing, but with different variables or included files. However, we
were wondering if there is a neater way?
We saw this post:
https://urldefense.com/v3/__https://www.yoctoproject.org/pipermail/yocto/2018-June/041378.html__;!!OOPJP91ZZw!k-UkKru_mKI6U4p8UgDfH_VEh1-qar1kiQuqcmnyrETRAnubF79KykqR7VGaRu47i1Ws7n8CAagOJBqEFBB3goTxmBkgn8-qL3X383IHnKva$
which seems to do what we want, because one recipe can install
recipe-development, and the other can install recipe-production, while the
recipe itself can then implement what needs to happen for either.
However, other recipes included in the images can also depend on recipe,
and they shouldn't depend on one specifically. They should accept that
either recipe-development or recipe-production is included. Currently we
see that both the generic recipe and the specific recipe used by the image
are built and overwrite each other.
What would be a neat way to achieve two variants of a recipe, and having
different contents and settings in them?
Or, can we solve that other included recipes depend on one of the variants,
instead of on the generic one.
Development vs production is solved by using different distros.

You can then have the same recipe but with different files (see (DISTRO)OVERRIDES mechanism for SRC_URI file:// files, c.f. https://summit.yoctoproject.org/media/yocto-project-summit-2022-05/submissions/SCYYWD/resources/Demystifying_the_OVERRIDES_mec_2lZOP3n.pdf) and/or different variables via FOO:dev-distro or FOO:append:dev-distro for example.

You could also have different recipes both PROVIDES'ing the same virtual recipe and then have PREFERRED_PROVIDER_my-recipe = "my-recipe-dev" in your dev-distro.conf file.

Two distros is usually overkill when you have very small and non-invasive differences between your dev and prod images (e.g. an additional package, or a lone package that needs to be slightly different). In that scenario, a "drity" solution is to have two recipes and have the final image pick the appropriate package. But this quickly does not scale well once you have recipes/packages depending on those or if you have more than two flavors to support.

The best practice is to use two distros.

Cheers,
Quentin