All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] yocto-bsp fixes
@ 2012-04-13  3:28 tom.zanussi
  2012-04-13  3:28 ` [PATCH 1/4] yocto-bsp: enable property value display of nested properties tom.zanussi
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tom.zanussi @ 2012-04-13  3:28 UTC (permalink / raw)
  To: yocto

From: Tom Zanussi <tom.zanussi@intel.com>

This patchset fixes [YOCTO #2222], updating the property value listing
code to match the current representation.  The following combinations
were tested (BSPs generated by yocto-bsp and sato images built and
boot-tested):

- qemu i386 generated from JSON using the 3.2 kernel
- qemu arm generated from the text UI using the 3.2 kernel
- qemu x86-64 generated from JSON using the 3.0 kernel
- x86-64 generated from JSON using the 3.2 kernel
- i386 generated from text UI using the 3.0 kernel

Jessica Zhang has also verified that the propery value listing and
BSP generation from JSON works for her in the Eclipse plugin.

There are also a few minor patches to the template files here that fix
problems encountered when testing.

Please pull into poky/master.

Thanks,

Tom

The following changes since commit 6703173449ad21e1623ac75a66535cb2ed52aeeb:
  Richard Purdie (1):
        package_rpm.bbclass: Set tmppath for rpm to somewhere which won't conflict with the rootfs

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib.git tzanussi/2222-fix
  http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/2222-fix

Tom Zanussi (4):
  yocto-bsp: enable property value display of nested properties
  yocto-bsp: fix qemuarch test for xserver-xf86-config.bbappend
  yocto-bsp: fix multi-provider error in qemu arch template
  yocto-bsp: fix x86_64 tuning for qemu arch

 scripts/lib/bsp/engine.py                          |   56 +++++++++++++++++++-
 scripts/lib/bsp/kernel.py                          |    2 +-
 .../arch/qemu/conf/machine/{{=machine}}.conf       |    3 +-
 ..."x86_64\": }} xserver-xf86-config_0.1.bbappend" |    0
 4 files changed, 57 insertions(+), 4 deletions(-)
 rename "scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"x86\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend" => "scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"i386\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend" (100%)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] yocto-bsp: enable property value display of nested properties
  2012-04-13  3:28 [PATCH 0/4] yocto-bsp fixes tom.zanussi
@ 2012-04-13  3:28 ` tom.zanussi
  2012-04-13  3:28 ` [PATCH 2/4] yocto-bsp: fix qemuarch test for xserver-xf86-config.bbappend tom.zanussi
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-04-13  3:28 UTC (permalink / raw)
  To: yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Previous versions of yocto-bsp mapped every input element to a unique
variable name, which is what the current property value display code
expects.  When that was changed to a nested form, the display code
wasn't updated to match - this updated does that.

Fixes [YOCTO #2222]

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 scripts/lib/bsp/engine.py |   56 +++++++++++++++++++++++++++++++++++++++++++-
 scripts/lib/bsp/kernel.py |    2 +-
 2 files changed, 55 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py
index d2f0735..8e53f00 100644
--- a/scripts/lib/bsp/engine.py
+++ b/scripts/lib/bsp/engine.py
@@ -1222,8 +1222,7 @@ def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, prop
     context = create_context(machine, arch, scripts_path)
     target_files = expand_targets(context, bsp_output_dir)
 
-    if not properties:
-        input_lines = gather_inputlines(target_files)
+    input_lines = gather_inputlines(target_files)
 
     program_lines = []
 
@@ -1316,6 +1315,44 @@ def yocto_bsp_list_properties(arch, scripts_path, properties_file):
     print_dict(properties)
 
 
+def split_nested_property(property):
+    """
+    A property name of the form x.y describes a nested property
+    i.e. the property y is contained within x and can be addressed
+    using standard JSON syntax for nested properties.  Note that if a
+    property name itself contains '.', it should be contained in
+    double quotes.
+    """
+    splittable_property = ""
+    in_quotes = False
+    for c in property:
+        if c == '.' and not in_quotes:
+            splittable_property += '\n'
+            continue
+        if c == '"':
+            in_quotes = not in_quotes
+        splittable_property += c
+
+    split_properties = splittable_property.split('\n')
+
+    if len(split_properties) > 1:
+        return split_properties
+
+    return None
+
+
+def find_input_line_group(substring, input_lines):
+    """
+    Find and return the InputLineGroup containing the specified substring.
+    """
+    for line in input_lines:
+        if isinstance(line, InputLineGroup):
+            if substring in line.group[0].line:
+                return line
+
+    return None
+
+
 def find_input_line(name, input_lines):
     """
     Find the input line with the specified name.
@@ -1330,6 +1367,8 @@ def find_input_line(name, input_lines):
             try:
                 if line.props["name"] == name:
                     return line
+                if line.props["name"] + "_" + line.props["nameappend"] == name:
+                    return line
             except KeyError:
                 pass
 
@@ -1363,6 +1402,17 @@ def yocto_bsp_list_property_values(arch, property, scripts_path, properties_file
 
     properties = get_properties(input_lines)
 
+    nested_properties = split_nested_property(property)
+    if nested_properties:
+        # currently the outer property of a nested property always
+        # corresponds to an input line group
+        input_line_group = find_input_line_group(nested_properties[0], input_lines)
+        if input_line_group:
+            input_lines[:] = input_line_group.group[1:]
+            # The inner property of a nested property name is the
+            # actual property name we want, so reset to that
+            property = nested_properties[1]
+
     input_line = find_input_line(property, input_lines)
     if not input_line:
         print "Couldn't find values for property %s" % property
@@ -1376,6 +1426,8 @@ def yocto_bsp_list_property_values(arch, property, scripts_path, properties_file
     elif type == "choicelist" or type == "checklist":
         try:
             gen_fn = input_line.props["gen"]
+            if nested_properties:
+                context["filename"] = nested_properties[0]
             values_list = input_line.gen_choices_list(context, False)
         except KeyError:
             for choice in input_line.choices:
diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
index b4e7fbf..360851b 100644
--- a/scripts/lib/bsp/kernel.py
+++ b/scripts/lib/bsp/kernel.py
@@ -657,7 +657,7 @@ def find_giturl(context):
     bbs = glob.glob(bbglob)
     for kernel in bbs:
         filename = os.path.splitext(os.path.basename(kernel))[0]
-        if filename == filebase:
+        if filename in filebase:
             giturl = extract_giturl(kernel)
             return giturl
     
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] yocto-bsp: fix qemuarch test for xserver-xf86-config.bbappend
  2012-04-13  3:28 [PATCH 0/4] yocto-bsp fixes tom.zanussi
  2012-04-13  3:28 ` [PATCH 1/4] yocto-bsp: enable property value display of nested properties tom.zanussi
@ 2012-04-13  3:28 ` tom.zanussi
  2012-04-13  3:28 ` [PATCH 3/4] yocto-bsp: fix multi-provider error in qemu arch template tom.zanussi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-04-13  3:28 UTC (permalink / raw)
  To: yocto

From: Tom Zanussi <tom.zanussi@intel.com>

While testing the fix for [YOCTO #2222] I noticed that the qemuarch
test was wrong - there is no 'x86' qemuarch, just 'i386'.  Change the
test to match.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 ..."x86_64\": }} xserver-xf86-config_0.1.bbappend" |    0
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename "scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"x86\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend" => "scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"i386\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend" (100%)

diff --git "a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"x86\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend" "b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"i386\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend"
similarity index 100%
rename from "scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"x86\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend"
rename to "scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/{{ if qemuarch == \"i386\" or qemuarch == \"x86_64\": }} xserver-xf86-config_0.1.bbappend"
-- 
1.7.0.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/4] yocto-bsp: fix multi-provider error in qemu arch template
  2012-04-13  3:28 [PATCH 0/4] yocto-bsp fixes tom.zanussi
  2012-04-13  3:28 ` [PATCH 1/4] yocto-bsp: enable property value display of nested properties tom.zanussi
  2012-04-13  3:28 ` [PATCH 2/4] yocto-bsp: fix qemuarch test for xserver-xf86-config.bbappend tom.zanussi
@ 2012-04-13  3:28 ` tom.zanussi
  2012-04-13  3:28 ` [PATCH 4/4] yocto-bsp: fix x86_64 tuning for qemu arch tom.zanussi
  2012-04-14 21:59 ` [PATCH 0/4] yocto-bsp fixes Richard Purdie
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-04-13  3:28 UTC (permalink / raw)
  To: yocto

From: Tom Zanussi <tom.zanussi@intel.com>

While testing the fix for [YOCTO #2222] I noticed a new build error
that wasn't there in previous testing:

ERROR: Multiple .bb files are due to be built which each provide virtual/libgl

The build still completed and produced a good image, but an error
message was displayed, which this patch removes.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 .../arch/qemu/conf/machine/{{=machine}}.conf       |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
index 003ead1..61ba842 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
@@ -9,6 +9,7 @@ PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
 PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
 
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
 
 {{ input type:"choicelist" name:"qemuarch" prio:"5" msg:"Which qemu architecture would you like to use?" default:"i386" }}
 {{ input type:"choice" val:"i386" msg:"i386    (32-bit)" }}
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] yocto-bsp: fix x86_64 tuning for qemu arch
  2012-04-13  3:28 [PATCH 0/4] yocto-bsp fixes tom.zanussi
                   ` (2 preceding siblings ...)
  2012-04-13  3:28 ` [PATCH 3/4] yocto-bsp: fix multi-provider error in qemu arch template tom.zanussi
@ 2012-04-13  3:28 ` tom.zanussi
  2012-04-14 21:59 ` [PATCH 0/4] yocto-bsp fixes Richard Purdie
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-04-13  3:28 UTC (permalink / raw)
  To: yocto

From: Tom Zanussi <tom.zanussi@intel.com>

While testing the fix for [YOCTO #2222] I noticed that the tuning for
the qemu x86_64 target was using the wrong tuning file - it should be
x86_64 instead of i586.  Change the template to match.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 .../arch/qemu/conf/machine/{{=machine}}.conf       |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
index 61ba842..0e4ecad 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
@@ -20,7 +20,7 @@ PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
 {{ if qemuarch == "i386": }}
 require conf/machine/include/tune-i586.inc
 {{ if qemuarch == "x86_64": }}
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-x86_64.inc
 {{ if qemuarch == "arm": }}
 require conf/machine/include/tune-arm926ejs.inc
 {{ if qemuarch == "powerpc": }}
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] yocto-bsp fixes
  2012-04-13  3:28 [PATCH 0/4] yocto-bsp fixes tom.zanussi
                   ` (3 preceding siblings ...)
  2012-04-13  3:28 ` [PATCH 4/4] yocto-bsp: fix x86_64 tuning for qemu arch tom.zanussi
@ 2012-04-14 21:59 ` Richard Purdie
  4 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2012-04-14 21:59 UTC (permalink / raw)
  To: tom.zanussi; +Cc: yocto

On Thu, 2012-04-12 at 22:28 -0500, tom.zanussi@intel.com wrote:
> From: Tom Zanussi <tom.zanussi@intel.com>
> 
> This patchset fixes [YOCTO #2222], updating the property value listing
> code to match the current representation.  The following combinations
> were tested (BSPs generated by yocto-bsp and sato images built and
> boot-tested):
> 
> - qemu i386 generated from JSON using the 3.2 kernel
> - qemu arm generated from the text UI using the 3.2 kernel
> - qemu x86-64 generated from JSON using the 3.0 kernel
> - x86-64 generated from JSON using the 3.2 kernel
> - i386 generated from text UI using the 3.0 kernel
> 
> Jessica Zhang has also verified that the propery value listing and
> BSP generation from JSON works for her in the Eclipse plugin.
> 
> There are also a few minor patches to the template files here that fix
> problems encountered when testing.
> 
> Please pull into poky/master.
> 
> Thanks,
> 
> Tom
> 
> The following changes since commit 6703173449ad21e1623ac75a66535cb2ed52aeeb:
>   Richard Purdie (1):
>         package_rpm.bbclass: Set tmppath for rpm to somewhere which won't conflict with the rootfs
> 
> are available in the git repository at:
> 
>   git://git.yoctoproject.org/poky-contrib.git tzanussi/2222-fix
>   http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/2222-fix
> 
> Tom Zanussi (4):
>   yocto-bsp: enable property value display of nested properties
>   yocto-bsp: fix qemuarch test for xserver-xf86-config.bbappend
>   yocto-bsp: fix multi-provider error in qemu arch template
>   yocto-bsp: fix x86_64 tuning for qemu arch

Merged to master, thanks.

Richard



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-14 21:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  3:28 [PATCH 0/4] yocto-bsp fixes tom.zanussi
2012-04-13  3:28 ` [PATCH 1/4] yocto-bsp: enable property value display of nested properties tom.zanussi
2012-04-13  3:28 ` [PATCH 2/4] yocto-bsp: fix qemuarch test for xserver-xf86-config.bbappend tom.zanussi
2012-04-13  3:28 ` [PATCH 3/4] yocto-bsp: fix multi-provider error in qemu arch template tom.zanussi
2012-04-13  3:28 ` [PATCH 4/4] yocto-bsp: fix x86_64 tuning for qemu arch tom.zanussi
2012-04-14 21:59 ` [PATCH 0/4] yocto-bsp fixes Richard Purdie

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.