* Adding debug output in recipe
@ 2018-04-05 7:33 Raymond Yeung
2018-04-06 4:52 ` Anuj Mittal
0 siblings, 1 reply; 9+ messages in thread
From: Raymond Yeung @ 2018-04-05 7:33 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
Is there a way to add simple debug output (ideally don't need to control debug level) to echo out values of variables? I tried the bb.xxx variants, but couldn't get them to work.
Raymond
[-- Attachment #2: Type: text/html, Size: 697 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding debug output in recipe
2018-04-05 7:33 Adding debug output in recipe Raymond Yeung
@ 2018-04-06 4:52 ` Anuj Mittal
2018-04-06 6:05 ` Raymond Yeung
0 siblings, 1 reply; 9+ messages in thread
From: Anuj Mittal @ 2018-04-06 4:52 UTC (permalink / raw)
To: Raymond Yeung, yocto
On 04/05/2018 03:33 PM, Raymond Yeung wrote:
> Is there a way to add simple debug output (ideally don't need to control
> debug level) to echo out values of variables? I tried the bb.xxx
> variants, but couldn't get them to work.
>
To find out what a variable is being set to, you can try:
bitbake -e <recipename>
Please see:
https://wiki.yoctoproject.org/wiki/Technical_FAQ#I_set_a_variable_but_it_doesn.27t_seem_to_be_having_an_effect.2C_how_do_I_fix_this.3F
Is that what you were looking for?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding debug output in recipe
2018-04-06 4:52 ` Anuj Mittal
@ 2018-04-06 6:05 ` Raymond Yeung
2018-04-06 6:39 ` Anuj Mittal
0 siblings, 1 reply; 9+ messages in thread
From: Raymond Yeung @ 2018-04-06 6:05 UTC (permalink / raw)
To: Anuj Mittal, yocto
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]
Hi Anuj,
"bitbake -e" is very useful for debugging out-of-tree build issue. However, looks like I have another issue. From "devtool build" output, I could see variables passed into makefile. Let's focus on "CC" for now:
CC=x86_64-poky-linux-gcc -fuse-ld=bfd
If we compare this to "bitbake -e" dump:
export CC="x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/a/ryeung/dev/yocto-git/yocto_build/build/tmp/sysroots/intel-corei7-64"
You can see somehow the variable is modified. Let's focus on --sysroot portion. Without it, there seems to be no way for me to control LIBRARY_PATH's value. The result is that the linker couldn't find crti.o and a few other files. By manually adding back --sysroot portion, I could now get past this failure, onto the next.
I suppose, as a possible final solution, I could do:
$(CC) --sysroot=$(KERNEL_SRC) ...
I'm really looking for simpler, more intuitive solution. What about the missing "-m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2" in the export?
Raymond
________________________________
From: Anuj Mittal <anuj.mittal@intel.com>
Sent: Thursday, April 5, 2018 9:52 PM
To: Raymond Yeung; yocto@yoctoproject.org
Subject: Re: [yocto] Adding debug output in recipe
On 04/05/2018 03:33 PM, Raymond Yeung wrote:
> Is there a way to add simple debug output (ideally don't need to control
> debug level) to echo out values of variables? I tried the bb.xxx
> variants, but couldn't get them to work.
>
To find out what a variable is being set to, you can try:
bitbake -e <recipename>
Please see:
https://wiki.yoctoproject.org/wiki/Technical_FAQ#I_set_a_variable_but_it_doesn.27t_seem_to_be_having_an_effect.2C_how_do_I_fix_this.3F
Is that what you were looking for?
[-- Attachment #2: Type: text/html, Size: 3996 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding debug output in recipe
2018-04-06 6:05 ` Raymond Yeung
@ 2018-04-06 6:39 ` Anuj Mittal
2018-04-06 22:31 ` Raymond Yeung
2018-04-07 1:43 ` Raymond Yeung
0 siblings, 2 replies; 9+ messages in thread
From: Anuj Mittal @ 2018-04-06 6:39 UTC (permalink / raw)
To: Raymond Yeung, yocto
On 04/06/2018 02:05 PM, Raymond Yeung wrote:
> Hi Anuj,
>
>
> "bitbake -e" is very useful for debugging out-of-tree build issue.
> However, looks like I have another issue. From "devtool build" output,
> I could see variables passed into makefile. Let's focus on "CC" for now:
>
>
> CC=x86_64-poky-linux-gcc -fuse-ld=bfd
I think that is the value of KERNEL_CC if you're inheriting module.bbclass.
>
>
> If we compare this to "bitbake -e" dump:
>
>
> export CC="x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7
> -mfpmath=sse -msse4.2
> --sysroot=/a/ryeung/dev/yocto-git/yocto_build/build/tmp/sysroots/intel-corei7-64"
>
>
> You can see somehow the variable is modified. Let's focus on --sysroot
> portion. Without it, there seems to be no way for me to control
> LIBRARY_PATH's value. The result is that the linker couldn't find
> crti.o and a few other files. By manually adding back --sysroot
> portion, I could now get past this failure, onto the next.
>
>
> I suppose, as a possible final solution, I could do:
>
>
> $(CC) --sysroot=$(KERNEL_SRC) ...
This looks like a problem with your source Makefile. Please check the
variable that points to kernel sources in your Makefile.
Use EXTRA_OEMAKE += "<varname>='${STAGING_KERNEL_DIR}'" if the variable
name used in your Makefile is different from KERNEL_PATH or KERNEL_SRC.
You can also check run.do_compile file to see the exact compile steps.
Please see:
https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules
>
>
> I'm really looking for simpler, more intuitive solution. What about the
> missing "-m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2" in the
> export?
>
>
> Raymond
>
>
>
>
> ------------------------------------------------------------------------
> *From:* Anuj Mittal <anuj.mittal@intel.com>
> *Sent:* Thursday, April 5, 2018 9:52 PM
> *To:* Raymond Yeung; yocto@yoctoproject.org
> *Subject:* Re: [yocto] Adding debug output in recipe
>
> On 04/05/2018 03:33 PM, Raymond Yeung wrote:
>> Is there a way to add simple debug output (ideally don't need to control
>> debug level) to echo out values of variables? I tried the bb.xxx
>> variants, but couldn't get them to work.
>>
>
> To find out what a variable is being set to, you can try:
>
> bitbake -e <recipename>
>
> Please see:
>
> https://wiki.yoctoproject.org/wiki/Technical_FAQ#I_set_a_variable_but_it_doesn.27t_seem_to_be_having_an_effect.2C_how_do_I_fix_this.3F
>
> Is that what you were looking for?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding debug output in recipe
2018-04-06 6:39 ` Anuj Mittal
@ 2018-04-06 22:31 ` Raymond Yeung
2018-04-07 1:43 ` Raymond Yeung
1 sibling, 0 replies; 9+ messages in thread
From: Raymond Yeung @ 2018-04-06 22:31 UTC (permalink / raw)
To: Anuj Mittal, yocto
[-- Attachment #1: Type: text/plain, Size: 3778 bytes --]
You're right on. KERNEL_CC was used. The 3rd party code actually has 3 components -
1. a kernel module
2. a shared library
3. 2 demo binaries
Their top-level makefile builds everything. From Yocto's perspective, it interfaces with this code as though the whole thing is a kernel module. There may be adversed implication to the shared library if I were to use the KERNEL_CC variable. So, I'm thinking of modifying the 3rd party makefile to support separate builds.
What documentation/section I should look into for patching the makefile (minimize changes to original vendor files)?
Thanks,
Raymond
________________________________
From: Anuj Mittal <anuj.mittal@intel.com>
Sent: Thursday, April 5, 2018 11:39 PM
To: Raymond Yeung; yocto@yoctoproject.org
Subject: Re: [yocto] Adding debug output in recipe
On 04/06/2018 02:05 PM, Raymond Yeung wrote:
> Hi Anuj,
>
>
> "bitbake -e" is very useful for debugging out-of-tree build issue.
> However, looks like I have another issue. From "devtool build" output,
> I could see variables passed into makefile. Let's focus on "CC" for now:
>
>
> CC=x86_64-poky-linux-gcc -fuse-ld=bfd
I think that is the value of KERNEL_CC if you're inheriting module.bbclass.
>
>
> If we compare this to "bitbake -e" dump:
>
>
> export CC="x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7
> -mfpmath=sse -msse4.2
> --sysroot=/a/ryeung/dev/yocto-git/yocto_build/build/tmp/sysroots/intel-corei7-64"
>
>
> You can see somehow the variable is modified. Let's focus on --sysroot
> portion. Without it, there seems to be no way for me to control
> LIBRARY_PATH's value. The result is that the linker couldn't find
> crti.o and a few other files. By manually adding back --sysroot
> portion, I could now get past this failure, onto the next.
>
>
> I suppose, as a possible final solution, I could do:
>
>
> $(CC) --sysroot=$(KERNEL_SRC) ...
This looks like a problem with your source Makefile. Please check the
variable that points to kernel sources in your Makefile.
Use EXTRA_OEMAKE += "<varname>='${STAGING_KERNEL_DIR}'" if the variable
name used in your Makefile is different from KERNEL_PATH or KERNEL_SRC.
You can also check run.do_compile file to see the exact compile steps.
Please see:
https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules
Yocto Project Linux Kernel Development Manual<https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules>
www.yoctoproject.org
Kernel modification involves changing the Yocto Project kernel, which could involve changing configuration options as well as adding new kernel recipes.
>
>
> I'm really looking for simpler, more intuitive solution. What about the
> missing "-m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2" in the
> export?
>
>
> Raymond
>
>
>
>
> ------------------------------------------------------------------------
> *From:* Anuj Mittal <anuj.mittal@intel.com>
> *Sent:* Thursday, April 5, 2018 9:52 PM
> *To:* Raymond Yeung; yocto@yoctoproject.org
> *Subject:* Re: [yocto] Adding debug output in recipe
>
> On 04/05/2018 03:33 PM, Raymond Yeung wrote:
>> Is there a way to add simple debug output (ideally don't need to control
>> debug level) to echo out values of variables? I tried the bb.xxx
>> variants, but couldn't get them to work.
>>
>
> To find out what a variable is being set to, you can try:
>
> bitbake -e <recipename>
>
> Please see:
>
> https://wiki.yoctoproject.org/wiki/Technical_FAQ#I_set_a_variable_but_it_doesn.27t_seem_to_be_having_an_effect.2C_how_do_I_fix_this.3F
>
> Is that what you were looking for?
[-- Attachment #2: Type: text/html, Size: 8468 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding debug output in recipe
2018-04-06 6:39 ` Anuj Mittal
2018-04-06 22:31 ` Raymond Yeung
@ 2018-04-07 1:43 ` Raymond Yeung
2018-04-09 20:12 ` MACHINE .conf file Raymond Yeung
1 sibling, 1 reply; 9+ messages in thread
From: Raymond Yeung @ 2018-04-07 1:43 UTC (permalink / raw)
To: Anuj Mittal, yocto
[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]
Want to comment on this part of an earlier reply from Anuj:
"Use EXTRA_OEMAKE += "<varname>='${STAGING_KERNEL_DIR}'" if the variable
name used in your Makefile is different from KERNEL_PATH or KERNEL_SRC."
A "bitbake -e <my recipe>" confirms that EXTRA_OEMAKE is already setup to use KERNEL_SRC. And I'd manually modified the 3rd party Makefile to use it (still need to find out a nicer patching method).
Originally reported problem with "Files/directories were installed but not shipped" apparently was due to use of
EXTRA_OEMAKE_append_task-install = " -C ${STAGING_KERNEL_DIR} M=${S}"
It's a line auto-generated by "devtool add". Commenting out this line (and removing the already created directories from .../oe_workdir/image in my out-of-tree root directory) stops the failure.
However, I still need to figure out how I could specify to the tool where my .ko, .so and 2 binaries should be moved to, in order to make it into the image. Makefile for original 3rd party code also has a "install" target that "installs" the files into various directories on the host (e.g. /usr/bin).
In the "Incorporating Out-of-Tree Modules" section, there's a mentioning of 4 MACHINE_XXX variables. I'll try them to see if they may help.
Raymond
[-- Attachment #2: Type: text/html, Size: 2759 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* MACHINE .conf file
2018-04-07 1:43 ` Raymond Yeung
@ 2018-04-09 20:12 ` Raymond Yeung
2018-04-10 4:04 ` Mohammad, Jamal M
0 siblings, 1 reply; 9+ messages in thread
From: Raymond Yeung @ 2018-04-09 20:12 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
Some questions about MACHINE:
1. I'd customized MACHINE (="intel-corei7-64") variable in conf/local.conf under my build directory, as per document, and had successfully generated an image for my H/W. However, I don't seem to find "intel-corei7-64.conf" file in meta/conf/machine under poky source directory. Is this normal?
2. How many machine files are there per target machine, and should it be in meta/conf/machine under source directory (similar to #1, but just a confirmation for me)?
3. To install an "external" .ko in the root filesystem, my understanding is I need to add its name to MACHINE_XXX_RRECOMMENDS (or one of the other 3) in machine .conf file. If there's only 1 machine file, this is obvious. If not, where should I put it?
Raymond
[-- Attachment #2: Type: text/html, Size: 1591 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MACHINE .conf file
2018-04-09 20:12 ` MACHINE .conf file Raymond Yeung
@ 2018-04-10 4:04 ` Mohammad, Jamal M
2018-04-10 6:59 ` Raymond Yeung
0 siblings, 1 reply; 9+ messages in thread
From: Mohammad, Jamal M @ 2018-04-10 4:04 UTC (permalink / raw)
To: Raymond Yeung, yocto
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
Did you add meta-intel layer in conf/bblayers.conf file.. It will be present in that directory.
From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Raymond Yeung
Sent: Tuesday, April 10, 2018 1:42 AM
To: yocto@yoctoproject.org
Subject: [yocto] MACHINE .conf file
Some questions about MACHINE:
1. I'd customized MACHINE (="intel-corei7-64") variable in conf/local.conf under my build directory, as per document, and had successfully generated an image for my H/W. However, I don't seem to find "intel-corei7-64.conf" file in meta/conf/machine under poky source directory. Is this normal?
2. How many machine files are there per target machine, and should it be in meta/conf/machine under source directory (similar to #1, but just a confirmation for me)?
3. To install an "external" .ko in the root filesystem, my understanding is I need to add its name to MACHINE_XXX_RRECOMMENDS (or one of the other 3) in machine .conf file. If there's only 1 machine file, this is obvious. If not, where should I put it?
Raymond
[-- Attachment #2: Type: text/html, Size: 4753 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MACHINE .conf file
2018-04-10 4:04 ` Mohammad, Jamal M
@ 2018-04-10 6:59 ` Raymond Yeung
0 siblings, 0 replies; 9+ messages in thread
From: Raymond Yeung @ 2018-04-10 6:59 UTC (permalink / raw)
To: Mohammad, Jamal M, yocto
[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]
Meta-intel comes with the BSP we chose for our board. It's already in conf/bblayers.conf.
I tried to use do_install() {...} within the workspaces/recipes/.../.bb file created by devtool to move files. However, I'm currently stuck with not knowing the exact variable/macro I could use for the source and the destination to prepare for the root filesystem. Any tip/help?
________________________________
From: Mohammad, Jamal M <MohammadJamal.Mohiuddin@ncr.com>
Sent: Monday, April 9, 2018 9:04 PM
To: Raymond Yeung; yocto@yoctoproject.org
Subject: RE: MACHINE .conf file
Did you add meta-intel layer in conf/bblayers.conf file.. It will be present in that directory.
From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Raymond Yeung
Sent: Tuesday, April 10, 2018 1:42 AM
To: yocto@yoctoproject.org
Subject: [yocto] MACHINE .conf file
Some questions about MACHINE:
1. I'd customized MACHINE (="intel-corei7-64") variable in conf/local.conf under my build directory, as per document, and had successfully generated an image for my H/W. However, I don't seem to find "intel-corei7-64.conf" file in meta/conf/machine under poky source directory. Is this normal?
2. How many machine files are there per target machine, and should it be in meta/conf/machine under source directory (similar to #1, but just a confirmation for me)?
3. To install an "external" .ko in the root filesystem, my understanding is I need to add its name to MACHINE_XXX_RRECOMMENDS (or one of the other 3) in machine .conf file. If there's only 1 machine file, this is obvious. If not, where should I put it?
Raymond
[-- Attachment #2: Type: text/html, Size: 4222 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-04-11 19:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05 7:33 Adding debug output in recipe Raymond Yeung
2018-04-06 4:52 ` Anuj Mittal
2018-04-06 6:05 ` Raymond Yeung
2018-04-06 6:39 ` Anuj Mittal
2018-04-06 22:31 ` Raymond Yeung
2018-04-07 1:43 ` Raymond Yeung
2018-04-09 20:12 ` MACHINE .conf file Raymond Yeung
2018-04-10 4:04 ` Mohammad, Jamal M
2018-04-10 6:59 ` Raymond Yeung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.