Hi there,

> On Sep 5, 2020, at 03:06, [email protected] wrote:
> 
> I'm trying to change some default sysctl configuration values (petalinux 
> yocto 2018.1).
> For that I've created a procps bbappend file and trying to add/set some extra 
> config values in the sysctl.config.
> But the values are not getting set. Debugging further found that NO 
> /etc/sysctl.conf or /etc/sysctl.d file is getting deployed in the rootfs.
> There are some default values present in /proc/sys which are the only sysctl 
> values getting set.
> 
> This happens even if I don't have the bbappend file. 
> Tried to manually bitbake the script, but still couldn't see it deployed in 
> rootfs.
> 
> Am I missing something.

I think this is not a meta-xilinx but a regular open-embedded/bitbake question, 
but I'll help you out a bit anyway ;)

Probably the "procps" package, which contains the sysctl.conf file you changed, 
is not being installed because it is not mentioned to be installed explicitly, 
and is not a dependency of anything installed on that rootfs. Now why "procps" 
is "responsible" for carrying the sysctl file is a legacy issue.

There are many ways to achieve what you want. You could create a recipe 
strictly for installing this file to ${D}/${sysconfdir}/sysctl.d. You recipe 
would only need to add it's own "do_install()" override...

You could also bbappend to the "systemd" recipe (use the name 
"recipes-core/systemd/systemd_%.bbappend") with a "do_install_append()" which 
adds your sysctl fragment to ${D}/${sysconfdir}/sysctl.d. Systemd gathers all 
these files in sysctl.d so if your build is systemd, you'll be set.

Or use the procps bbappend as you planned on doing. Start by reviewing 
IMAGE_INSTALL and PACKAGE_INSTALL
https://yoctoproject.org/docs/current/mega-manual/mega-manual.html#image-generation-dev-environment

Depending if you are trying to create a repeatable, control revisioned image, 
either make your own image recipe which will append "procps" to IMAGE_INSTALL, 
or for a simple test build, you could append to IMAGE_INSTALL from your 
local.conf. (The latter will mean that any image recipe you build will have 
procps now, since local.conf's scope is global).

Quickly test your changes:

$ bitbake -e my-image | grep '^PACKAGE_INSTALL=' | grep procps

If good, proceed with build:
$ bitbake my-image # you can also add "-crootfs" to bitbake 

Then:
$ find tmp/work/*/my-image/*/rootfs` -name "*sysctl*"

Good luck!
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4747): 
https://lists.yoctoproject.org/g/meta-xilinx/message/4747
Mute This Topic: https://lists.yoctoproject.org/mt/76646124/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to