A couple yocto-bsp fixes
cover A couple yocto-bsp fixes
From: Tom Zanussi <[email protected]>
Fixes for a couple yocto-bsp bugs.
The following changes since commit 1a03b7dfba464fde770ba69b618427d13e0a3b8b:
Scott Rifenbark (1):
documentation/bsp-guide/bsp.xml: spelling corrected.
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/yocto-bsp-fixes-2219-2330
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/yocto-bsp-fixes-2219-2330
Tom Zanussi (2):
yocto-kernel: use BUILDDIR to find bblayers.conf
yocto-bsp: clarify help with reference to meta-intel
scripts/lib/bsp/help.py | 40 ++++++++++++++++++++++++++++++++++++++++ scripts/lib/bsp/kernel.py | 7 ++++++- 2 files changed, 46 insertions(+), 1 deletions(-)
PATCH 1/2 yocto-kernel: use BUILDDIR to find bblayers.conf
From: Tom Zanussi <[email protected]>
The current code assumes that builddir == srcdir/build, which it obviously isn't sometimes. Use BUILDDIR to get the actual builddir being used.
Fixes [YOCTO #2219].
--- scripts/lib/bsp/kernel.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
scripts/lib/bsp/kernel.py +6 -1
@@ -37,7 +37,12 @@ def find_bblayers(scripts_path): """ Find and return a sanitized list of the layers found in BBLAYERS. """ - bblayers_conf = os.path.join(scripts_path, "../build/conf/bblayers.conf") + try: + builddir = os.environ["BUILDDIR"] + except KeyError: + print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" + sys.exit(1) + bblayers_conf = os.path.join(builddir, "conf/bblayers.conf") layers = []
Signature · 1 line
1.7.0.4
PATCH 2/2 yocto-bsp: clarify help with reference to meta-intel
From: Tom Zanussi <[email protected]>
The current yocto-bsp help assumes knowledge that the meta-intel layer needs to be cloned before it's put into the BBLAYERS. Avoid the guesswork and state the details explicitly in the help.
Also, the shorter 'usage' string doesn't mention it at all; it would help to at minimum mention it and refer the user to the detailed help.
Fixes [YOCTO #2330].
--- scripts/lib/bsp/help.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)
scripts/lib/bsp/help.py +40 -0
@@ -115,6 +115,18 @@ yocto_bsp_create_usage = """ 'properties' that will be used to fill out the BSP-specific portions of the BSP. The possible values for the 'karch' paramter can be listed via 'yocto-bsp list karch'. + + NOTE: Once created, you should add your new layer to your + bblayers.conf file in order for it to be subsquently seen and + modified by the yocto-kernel tool. + + See 'yocto bsp help create' for more detailed instructions. + + NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the + presence of the of the meta-intel layer, so you should also have a + meta-intel layer present and added to your bblayers.conf as well. + + See 'yocto bsp help create' for more detailed instructions. """ yocto_bsp_create_help = """
@@ -159,9 +171,37 @@ DESCRIPTION bblayers.conf file in order for it to be subsquently seen and modified by the yocto-kernel tool. + For example, assuming your poky repo is at /path/to/poky, your + your new BSP layer is at /path/to/poky/meta-mybsp, and your build + directory is /path/to/build: + + $ gedit /path/to/build/conf/bblayers.conf + + BBLAYERS ?= " \\ + /path/to/poky/meta \\ + /path/to/poky/meta-yocto \\ + /path/to/poky/meta-mybsp \\ + " + NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the presence of the of the meta-intel layer, so you should also have a meta-intel layer present and added to your bblayers.conf as well. + + For example, assuming your poky repo is at /path/to/poky, your + your new BSP layer is at /path/to/poky/meta-mybsp, and your build + directory is /path/to/build: + + $ cd /path/to/poky + $ git clone git://git.yoctoproject.org/meta-intel.git + + $ gedit /path/to/build/conf/bblayers.conf + + BBLAYERS ?= " \\ + /path/to/poky/meta \\ + /path/to/poky/meta-yocto \\ + /path/to/poky/meta-intel \\ + /path/to/poky/meta-mybsp \\ + " """ yocto_bsp_list_usage = """
Signature · 1 line
1.7.0.4
Re: [PATCH 2/2] yocto-bsp: clarify help with reference to meta-intel
Quoted 6 lines · On 04/27/2012 12:00 PM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
The current yocto-bsp help assumes knowledge that the meta-intel layer needs to be cloned before it's put into the BBLAYERS. Avoid the guesswork and state the details explicitly in the help.
Quoted 6 lines
Also, the shorter 'usage' string doesn't mention it at all; it would help to at minimum mention it and refer the user to the detailed help.
Fixes [YOCTO #2330].
Signed-off-by Tom Zanussi <[email protected]>
Some minor nits below:
Quoted 12 lines
--- scripts/lib/bsp/help.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)scripts/lib/bsp/help.py +0
-0@@ -115,6 +115,18 @@ yocto_bsp_create_usage = """ 'properties' that will be used to fill out the BSP-specific portions of the BSP. The possible values for the 'karch' paramter can be listed via 'yocto-bsp list karch'.
scripts/lib/bsp/help.py yocto_bsp_create_usage = """ · line 127
Quoted 10 lines
scripts/lib/bsp/help.py +10
-0+ + NOTE: Once created, you should add your new layer to your + bblayers.conf file in order for it to be subsquently seen and + modified by the yocto-kernel tool. + + See 'yocto bsp help create' for more detailed instructions. + + NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the + presence of the of the meta-intel layer, so you should also have a + meta-intel layer present and added to your bblayers.conf as well.
Consider:
+ NOTE: For x86- and x86_64-based BSPs, the generated BSP assumes the
+ presence of the of the meta-intel layer. Ensure the meta-intel layer
+ is present and added to bblayers.conf.
scripts/lib/bsp/help.py DESCRIPTION · line 175
Quoted 11 lines
scripts/lib/bsp/help.py +4
-0+ + See 'yocto bsp help create' for more detailed instructions. """ yocto_bsp_create_help = """@@ -159,9 +171,37 @@ DESCRIPTION bblayers.conf file in order for it to be subsquently seen and modified by the yocto-kernel tool. + For example, assuming your poky repo is at /path/to/poky, your + your new BSP layer is at /path/to/poky/meta-mybsp, and your build
The word "your" appears twice in a row.
scripts/lib/bsp/help.py DESCRIPTION · line 188
Quoted 13 lines
scripts/lib/bsp/help.py +10
-0+ directory is /path/to/build: + + $ gedit /path/to/build/conf/bblayers.conf + + BBLAYERS ?= " \\ + /path/to/poky/meta \\ + /path/to/poky/meta-yocto \\ + /path/to/poky/meta-mybsp \\ + " + NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the presence of the of the meta-intel layer, so you should also have a meta-intel layer present and added to your bblayers.conf as well.
OK, this is just context, but same comment as above.
scripts/lib/bsp/help.py DESCRIPTION · line 191
Quoted 3 lines
scripts/lib/bsp/help.py +3
-0+ + For example, assuming your poky repo is at /path/to/poky, your + your new BSP layer is at /path/to/poky/meta-mybsp, and your build
Same double "your" here as well.
Quoted 16 lines
scripts/lib/bsp/help.py +13
-0+ directory is /path/to/build: + + $ cd /path/to/poky + $ git clone git://git.yoctoproject.org/meta-intel.git + + $ gedit /path/to/build/conf/bblayers.conf + + BBLAYERS ?= " \\ + /path/to/poky/meta \\ + /path/to/poky/meta-yocto \\ + /path/to/poky/meta-intel \\ + /path/to/poky/meta-mybsp \\ + " """ yocto_bsp_list_usage = """
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Re: [PATCH 2/2] yocto-bsp: clarify help with reference to meta-intel
Quoted 8 lines · Darren Hart
Quoted 6 lines · On 04/27/2012 12:00 PM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
The current yocto-bsp help assumes knowledge that the meta-intel layer needs to be cloned before it's put into the BBLAYERS. Avoid the guesswork and state the details explicitly in the help.
Quoted 8 lines
Quoted 6 lines
Also, the shorter 'usage' string doesn't mention it at all; it would help to at minimum mention it and refer the user to the detailed help.
Fixes [YOCTO #2330].
Signed-off-by Tom Zanussi <[email protected]>Some minor nits below:
Thanks for catching those, patches resubmitted...
Tom
Quoted 86 lines
Quoted 13 lines
--- scripts/lib/bsp/help.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)scripts/lib/bsp/help.py +0
-0@@ -115,6 +115,18 @@ yocto_bsp_create_usage = """ 'properties' that will be used to fill out the BSP-specific portions of the BSP. The possible values for the 'karch' paramter can be listed via 'yocto-bsp list karch'.scripts/lib/bsp/help.py yocto_bsp_create_usage = """ · line 127
Quoted 10 lines
scripts/lib/bsp/help.py +10
-0+ + NOTE: Once created, you should add your new layer to your + bblayers.conf file in order for it to be subsquently seen and + modified by the yocto-kernel tool. + + See 'yocto bsp help create' for more detailed instructions. + + NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the + presence of the of the meta-intel layer, so you should also have a + meta-intel layer present and added to your bblayers.conf as well.Consider:
+ NOTE: For x86- and x86_64-based BSPs, the generated BSP assumes the
+ presence of the of the meta-intel layer. Ensure the meta-intel layer
+ is present and added to bblayers.conf.scripts/lib/bsp/help.py DESCRIPTION · line 175
Quoted 11 lines
scripts/lib/bsp/help.py +4
-0+ + See 'yocto bsp help create' for more detailed instructions. """ yocto_bsp_create_help = """@@ -159,9 +171,37 @@ DESCRIPTION bblayers.conf file in order for it to be subsquently seen and modified by the yocto-kernel tool. + For example, assuming your poky repo is at /path/to/poky, your + your new BSP layer is at /path/to/poky/meta-mybsp, and your buildThe word "your" appears twice in a row.
scripts/lib/bsp/help.py DESCRIPTION · line 188
Quoted 13 lines
scripts/lib/bsp/help.py +10
-0+ directory is /path/to/build: + + $ gedit /path/to/build/conf/bblayers.conf + + BBLAYERS ?= " \\ + /path/to/poky/meta \\ + /path/to/poky/meta-yocto \\ + /path/to/poky/meta-mybsp \\ + " + NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the presence of the of the meta-intel layer, so you should also have a meta-intel layer present and added to your bblayers.conf as well.OK, this is just context, but same comment as above.
scripts/lib/bsp/help.py DESCRIPTION · line 191
Quoted 3 lines
scripts/lib/bsp/help.py +3
-0+ + For example, assuming your poky repo is at /path/to/poky, your + your new BSP layer is at /path/to/poky/meta-mybsp, and your buildSame double "your" here as well.
Quoted 16 lines
scripts/lib/bsp/help.py +13
-0+ directory is /path/to/build: + + $ cd /path/to/poky + $ git clone git://git.yoctoproject.org/meta-intel.git + + $ gedit /path/to/build/conf/bblayers.conf + + BBLAYERS ?= " \\ + /path/to/poky/meta \\ + /path/to/poky/meta-yocto \\ + /path/to/poky/meta-intel \\ + /path/to/poky/meta-mybsp \\ + " """ yocto_bsp_list_usage = """
Re: [PATCH 2/2] yocto-bsp: clarify help with reference to meta-intel
In reply to Darren Hartnit of nit
Quoted 12 lines · Darren Hart
Quoted 5 lines · On 04/27/2012 12:00 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
+ NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the
+ presence of the of the meta-intel layer, so you should also have a
+ meta-intel layer present and added to your bblayers.conf as well.Consider:
+ NOTE: For x86- and x86_64-based BSPs, the generated BSP assumes the
+ presence of the of the meta-intel layer. Ensure the meta-intel layer
+ is present and added to bblayers.conf.
Unless I am really mis-reading this I think "presence of the of the" should just be "presence of the"
Re: [PATCH 2/2] yocto-bsp: clarify help with reference to meta-intel
Quoted 11 lines · William Mills
nit of nit
Quoted 8 lines · Darren Hart
Quoted 5 lines · On 04/27/2012 12:00 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
+ NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the
+ presence of the of the meta-intel layer, so you should also have a
+ meta-intel layer present and added to your bblayers.conf as well.Consider:
Quoted 7 lines
Quoted 4 lines
+ NOTE: For x86- and x86_64-based BSPs, the generated BSP assumes the
+ presence of the of the meta-intel layer. Ensure the meta-intel layer
+ is present and added to bblayers.conf.Unless I am really mis-reading this I think "presence of the of the" should just be "presence of the"
Oh wow. :-)
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Re: [PATCH 2/2] yocto-bsp: clarify help with reference to meta-intel
Quoted 10 lines
Quoted 7 lines
Quoted 4 lines
+ NOTE: For x86- and x86_64-based BSPs, the generated BSP assumes the
+ presence of the of the meta-intel layer. Ensure the meta-intel layer
+ is present and added to bblayers.conf.Unless I am really mis-reading this I think "presence of the of the" should just be "presence of the"
Oh wow. :-)
There is an illusion like this (attached jpeg)
Re: [PATCH 2/2] yocto-bsp: clarify help with reference to meta-intel
In reply to William MillsQuoted 11 lines · William Mills
nit of nit
Quoted 8 lines · Darren Hart
Quoted 5 lines · On 04/27/2012 12:00 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
+ NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the
+ presence of the of the meta-intel layer, so you should also have a
+ meta-intel layer present and added to your bblayers.conf as well.Consider:
Quoted 7 lines
Quoted 4 lines
+ NOTE: For x86- and x86_64-based BSPs, the generated BSP assumes the
+ presence of the of the meta-intel layer. Ensure the meta-intel layer
+ is present and added to bblayers.conf.Unless I am really mis-reading this I think "presence of the of the" should just be "presence of the"
Doh, you're correct, good catch. Third version of the most perused help text in history submitted...
Thanks,
Tom
Re: [PATCH 1/2] yocto-kernel: use BUILDDIR to find bblayers.conf
In reply to [email protected]Quoted 18 lines · On 04/27/2012 12:00 PM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
The current code assumes that builddir == srcdir/build, which it obviously isn't sometimes. Use BUILDDIR to get the actual builddir being used.
Fixes [YOCTO #2219].
Signed-off-by Tom Zanussi <[email protected]>--- scripts/lib/bsp/kernel.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)scripts/lib/bsp/kernel.py +0
-0
scripts/lib/bsp/kernel.py def find_bblayers(scripts_path): · line 43
Quoted 8 lines
scripts/lib/bsp/kernel.py +4
-1@@ -37,7 +37,12 @@ def find_bblayers(scripts_path): """ Find and return a sanitized list of the layers found in BBLAYERS. """ - bblayers_conf = os.path.join(scripts_path, "../build/conf/bblayers.conf") + try: + builddir = os.environ["BUILDDIR"] + except KeyError: + print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)"
We should probably update the bsp tools to use the logging module, I'll open a feature request for that.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2375
This should make it easier to instrument the code with verbosity levels as well as make these go to the right file descriptor. I believe this is consistent with the rest of the source though, so this looks fine as is.
scripts/lib/bsp/kernel.py def find_bblayers(scripts_path): · line 48
Quoted 5 lines
scripts/lib/bsp/kernel.py +2
-0+ sys.exit(1) + bblayers_conf = os.path.join(builddir, "conf/bblayers.conf") layers = []
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel