cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lancec
Observer
Observer
361 Views
Registered: ‎10-28-2013

Petalinux Busybox config being overwritten

Jump to solution

Setup: Petalinux 2020.2 on Ubuntu 18.04

Main Problem & Question: I'm running "petalinux-config -c busybox" to enable CONFIG_FEATURE_FTPD_WRITE  and CONFIG_TCPSVD. However, when running "petalinux-build" my changes are being overwritten and I don't know why. How do I configure busybox so my changes aren't overwritten? When I check the running busybox version it is from Nov 15, 2020, so it looks as if Petalinux is installing a prebuilt busybox. Why?

Secondary Question: I noticed that busybox is disabled in the rootfs config but it still appears in the built rootfs. How is that? Who's installing it? (Note: I did try enabling it to see if my configuration above would stick around, but it didn't help)

0 Kudos
1 Solution

Accepted Solutions
hokim
Scholar
Scholar
303 Views
Registered: ‎10-21-2015

Hi 

In 2020.2, "petalinux-config -c busybox"  uses  internally "devtool modify busybox" 

But it seems not to work correctly 

Alternatively. do the following

$ petalinux-devtool modify -O busybox
$ petalinux-devtool menuconfig busybox
$ cd components/yocto/workspace/sources/busybox/oe-local-files/
$ mv devtool-fragment.cfg user.cfg
$ cd -
$ petalinux-devtool finish -f busybox $(pwd)/project-spec/meta-user
$ rm -fr components/yocto/workspace/sources/busybox/
$ tree project-spec/meta-user/recipes-core/busybox
project-spec/meta-user/recipes-core/busybox
├── busybox
│   └── user.cfg
└── busybox_%.bbappend
$ cat project-spec/meta-user/recipes-core/busybox/busybox_%.bbappend 
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://user.cfg"
$ cat project-spec/meta-user/recipes-core/busybox/busybox/user.cfg 
# Thu Apr  8 05:17:44 2021
CONFIG_FEATURE_FTPD_WRITE=y
CONFIG_TCPSVD=y

 

View solution in original post

0 Kudos
5 Replies
maps-mpls
Mentor
Mentor
326 Views
Registered: ‎06-20-2017

[whatever I posted here before did not help the OP]

*** Destination: Rapid design and development cycles *** Unappreciated answers get deleted, unappreciative OPs get put on ignored list ***
0 Kudos
hokim
Scholar
Scholar
304 Views
Registered: ‎10-21-2015

Hi 

In 2020.2, "petalinux-config -c busybox"  uses  internally "devtool modify busybox" 

But it seems not to work correctly 

Alternatively. do the following

$ petalinux-devtool modify -O busybox
$ petalinux-devtool menuconfig busybox
$ cd components/yocto/workspace/sources/busybox/oe-local-files/
$ mv devtool-fragment.cfg user.cfg
$ cd -
$ petalinux-devtool finish -f busybox $(pwd)/project-spec/meta-user
$ rm -fr components/yocto/workspace/sources/busybox/
$ tree project-spec/meta-user/recipes-core/busybox
project-spec/meta-user/recipes-core/busybox
├── busybox
│   └── user.cfg
└── busybox_%.bbappend
$ cat project-spec/meta-user/recipes-core/busybox/busybox_%.bbappend 
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://user.cfg"
$ cat project-spec/meta-user/recipes-core/busybox/busybox/user.cfg 
# Thu Apr  8 05:17:44 2021
CONFIG_FEATURE_FTPD_WRITE=y
CONFIG_TCPSVD=y

 

View solution in original post

0 Kudos
lancec
Observer
Observer
264 Views
Registered: ‎10-28-2013

@hokim 

Thanks, that works. I see the result being the same as what was done in the reference @maps-mpls  mentioned. Just to confirm, the above is just the long form of what I was trying to do which is the following, right?

$ petalinux-config -c busybox
$ petalinux-devtool finish -f busybox $(pwd)/project-spec/meta-user

 

Follow on question I have now is: I have the file $(pwd)/project-spec/configs/busybox/inetd.conf (generated when I loaded my xsa). It has telnetd and ftpd enabled, but what ends up in my rootfs has them disabled. What is the relationship, if any, between the project/spec/configs/busybox/inetd.conf  and what ends up in my rootfs? Is it a bug in Petalinux or is there something else I'm missing? (note: I still pretty new to Petalinux, so if there are docs that go over this please point me to them)

0 Kudos
hokim
Scholar
Scholar
232 Views
Registered: ‎10-21-2015

Hi 

"petalinux-config -c busybox" is identical to "petalinux-devtool modify busybox && petalinux-devtool menuconfig -a busybox"

But I found that "petalinux-devtool modify busybox" doesn't give correct result eventually. The problem seems to originate from yocto devtool python library 

To avoid  the problem, I use "petalinux-devtool modify -O busybox && petalinux-devtool menuconfig busybox"

There are the same problems in "petalinux-config -c kernel" and "petalinux-config -c u-boot" 

devtool-fragment.cfg  need to rename other name.

Oherwise, subsequent configuration overwrites the file 

inetd.conf is found at three locations

 

$ find . -name inetd.conf
./components/yocto/layers/core/meta/recipes-core/busybox/files/inetd.conf
./components/yocto/layers/meta-petalinux/recipes-core/busybox/files/inetd.conf
./project-spec/configs/busybox/inetd.conf

 

The parsing order of  FILESEXTRAPATHS_pepend := "<path>" is the following

 

./build/conf/plnxtool.conf
./components/yocto/layers/core/meta-poky/recipes-core/busybox/busybox_%.bbappend
./components/yocto/layers/meta-petalinux/recipes-core/busybox/busybox_1.%.bbappend

 

Therefore inted.conf under meta-petalinux is used  finally

To fix it, you need to modify  project-spec/meta-user/recipes-core/busybox/busybox_%.bbappend like this(SYSCONFIG_PATH is  <peta-proj>/project-spec/configs)

 

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${SYSCONFIG_PATH}/busybox:"

 

It forces to  use ./project-spec/configs/busybox/inetd.conf 

Refer to https://www.openembedded.org/pipermail/openembedded-devel/2015-October/103710.html

lancec
Observer
Observer
179 Views
Registered: ‎10-28-2013

@hokim Thank you!

0 Kudos