camus has quit [Remote host closed the connection]
camus has joined #yocto
<angman>
Hi! I use bitbake to build images at work. Let me ask a question about how to get the value of a variable in each package.🙏
<angman>
(Since this is a long post, I will break it up into several posts)
kayterina[m] has joined #yocto
<angman>
# Question.
<angman>
When `bitbake-getvar` or `bitbake -e` extract the value of a variable, it seems to resolve some overrides (e.g. poky) and not some (e.g. ${PN}).
<angman>
I think to get the value of the actual variable that bitbake uses to build, I need to get the value with all the overrides resolved. Are there any ways to do so?
<angman>
If it does not exist, which document can I refer to for the specifications of the overrides that bitbake-getvar and bitbake -e resolve and the ones that do not?
davidinux has quit [Ping timeout: 255 seconds]
<angman>
# Detail
<angman>
For example, I made the following change to the SUMMARY variable in the vim package.
<angman>
-SUMMARY = "Vi IMproved - enhanced vi editor"
<angman>
+SUMMARY = "base"
<angman>
+SUMMARY:${PN} = "PN override"
<angman>
+SUMMARY:poky = "poky override"
<angman>
+
<angman>
DESCRIPTION = "Vim is a greatly improved version of the good old UNIX editor Vi. Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, script language, etc. There is also a Graphical User Interface (GUI) available. There is also a
<angman>
Graphical User Interface (GUI) available.
<angman>
SECTION = "console/utils"
<angman>
```
<angman>
Using bitbake-getvar with this, I got the following values.
<angman>
```
camus1 has joined #yocto
camus has quit [Ping timeout: 255 seconds]
camus1 is now known as camus
invalidopcode1 has quit [Remote host closed the connection]
invalidopcode1 has joined #yocto
jclsn has quit [Ping timeout: 264 seconds]
jclsn has joined #yocto
Thorn has quit [Ping timeout: 255 seconds]
invalidopcode1 has quit [Remote host closed the connection]
invalidopcode1 has joined #yocto
angman has quit [Quit: Client closed]
angman has joined #yocto
<angman>
Sorry, my previous post seems to have been interrupted.
<angman>
Using bitbake-getvar with above recipe, I got the following values.
<angman>
```
<angman>
$ bitbake-getvar -r vim --value SUMMARY:vim
<angman>
PN override
<angman>
$ bitbake-getvar -r vim --value SUMMARY
<angman>
poky override
<angman>
```
<angman>
As you can see, it appears that the poky override is resolved and the ${PN} override is not.
<JaMa>
angman: I didn't read what you're trying to do, but real pn override looks like SUMMARY:pn-vim
<JaMa>
:${PN} is sometimes used, but typically as suffix in <package-name> specific variables (like FILES/RDEPENDS/LICENSE) and it's not an override
<JaMa>
and don't use --value if you're trying to understand what's going on
aleblanc[m] has quit [Quit: You have been kicked for being idle]
invalidopcode1 has quit [Remote host closed the connection]
invalidopcode1 has joined #yocto
xmn has quit [Ping timeout: 248 seconds]
schtobia has quit [Quit: Bye!]
schtobia has joined #yocto
schtobia has quit [Client Quit]
schtobia has joined #yocto
Net147 has quit [Quit: Quit]
<angman>
To sum up my question in a nutshell.
<angman>
* Sorry. I'm not really interested in individual overrides (${PN}/pn-${PN}).
<angman>
* Overrides can be set for variables used in recipes (poky, ${PN}, pn-${PN}, class-target, etc.)
<angman>
* I would like to get the value of a variable taking into account which of these overrides are enabled and which are disabled when bitbake builds. Is there any way to do this?
Net147 has joined #yocto
Net147 has joined #yocto
Net147 has quit [Changing host]
davidinux has joined #yocto
schtobia has quit [Quit: Bye!]
schtobia has joined #yocto
schtobia has quit [Client Quit]
schtobia has joined #yocto
florian_kc has joined #yocto
florian_kc has quit [Ping timeout: 255 seconds]
davidinux has quit [Ping timeout: 256 seconds]
JaMa has quit [Quit: reboot]
Thorn has quit [Ping timeout: 252 seconds]
goliath has joined #yocto
Net147 has quit [Read error: Connection reset by peer]
cambrian_invader has quit [Ping timeout: 252 seconds]
florian_kc has quit [Ping timeout: 255 seconds]
camus has quit [Ping timeout: 248 seconds]
cambrian_invader has joined #yocto
angman has joined #yocto
<Entei[m]>
How can I check where some variable is being assigned? My `gcc` gets built with the target prefix `riscv64-poky-linux` and the kernel has the name `5.19.7-yocto-standard`. I'd like to change that.
<Entei[m]>
Looking for the gcc recipe there's so many recipe files, and hierarchal inclusions/inheritance of files. It gets difficult to track too quick.
<Saur[m]>
Entei: Use `bitbake -e <recipe>` to make bitbake show all variables, including how they got their values. Or you can use `bitbake-getvar -r <recipe> <variable>` if you just want to get the value and definition of one variable.
vladest has quit [Read error: Connection reset by peer]
aak-rookie has joined #yocto
<aak-rookie>
i want to ask a question about using sdk in cmake. however, this chat about yocto. do you mind if i ask? i thought the question i'm going to ask might not belong to this chat.
Haxxa has quit [Quit: Haxxa flies away.]
Haxxa has joined #yocto
florian_kc has joined #yocto
sakoman has quit [Quit: Leaving.]
sakoman has joined #yocto
aak-rookie has quit [Quit: Client closed]
xcm has quit [*.net *.split]
qschulz has quit [*.net *.split]
Shaun has quit [*.net *.split]
dmoseley has quit [*.net *.split]
lexano has quit [*.net *.split]
astlep5504 has quit [*.net *.split]
dlan has quit [*.net *.split]
yolo has quit [*.net *.split]
smooge has quit [*.net *.split]
Fanfwe has quit [*.net *.split]
npcomp has quit [*.net *.split]
jsandman has quit [*.net *.split]
jjmcdn has quit [*.net *.split]
marex has quit [*.net *.split]
alinucs has quit [*.net *.split]
perfinion has quit [*.net *.split]
iokill has quit [*.net *.split]
warthog9 is now known as 020AAPQ8E
xcm has joined #yocto
qschulz has joined #yocto
yolo has joined #yocto
Fanfwe has joined #yocto
dlan has joined #yocto
Shaun has joined #yocto
smooge has joined #yocto
lexano has joined #yocto
iokill has joined #yocto
marex has joined #yocto
npcomp has joined #yocto
jsandman has joined #yocto
perfinion has joined #yocto
jjmcdn has joined #yocto
alinucs has joined #yocto
dmoseley has joined #yocto
astlep5504 has joined #yocto
020AAPQ8E is now known as warthog9
vladest has joined #yocto
nemik has quit [Ping timeout: 264 seconds]
nemik has joined #yocto
Thorn has quit [Ping timeout: 248 seconds]
invalidopcode1 has quit [Remote host closed the connection]
invalidopcode1 has joined #yocto
Thorn has joined #yocto
florian_kc has quit [Ping timeout: 255 seconds]
nemik has quit [Ping timeout: 248 seconds]
nemik has joined #yocto
nemik has quit [Ping timeout: 248 seconds]
nemik has joined #yocto
sakoman has quit [Quit: Leaving.]
vladest has quit [Ping timeout: 260 seconds]
goliath has quit [Quit: SIGSEGV]
DvorkinDmitry has joined #yocto
<DvorkinDmitry>
I need to install some external module into the image IF I'm building the image with some specific kernel version. How to do that?