From: Philip Balister <philip@balister.org>
To: tom.zanussi@intel.com
Cc: yocto@yoctoproject.org, dvhart@linux.intel.com
Subject: Re: [PATCH 1/5] scripts/lib/bsp/engine.py: add yocto_layer_create()
Date: Tue, 18 Dec 2012 09:13:54 -0500 [thread overview]
Message-ID: <50D07A22.8000906@balister.org> (raw)
In-Reply-To: <f339ca3f94ec7bb6a749c5973acb1f85bc1ace6c.1355766001.git.tom.zanussi@intel.com>
On 12/17/2012 12:51 PM, tom.zanussi@intel.com wrote:
> From: Tom Zanussi <tom.zanussi@intel.com>
>
> Add a new yocto_layer_create() function that will be used to generate
> a generic yocto layer (for the new 'yocto-layer' command).
How is a "yocto layer" different from an OpenEmbedded layer? If you
insist on "yocto layter", wouldn't "Yocto Project layer" be more accurate.
One of our goals for next year should be to clean up our terminology to
reduce confusion in the user community.
Philip
>
> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> ---
> scripts/lib/bsp/engine.py | 56 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
>
> diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py
> index 8985544..d406e79 100644
> --- a/scripts/lib/bsp/engine.py
> +++ b/scripts/lib/bsp/engine.py
> @@ -1352,6 +1352,62 @@ def expand_targets(context, bsp_output_dir):
> return target_files
>
>
> +def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, properties_file):
> + """
> + Create yocto layer
> +
> + layer_name - user-defined layer name
> + scripts_path - absolute path to yocto /scripts dir
> + bsp_output_dir - dirname to create for BSP
> + codedump - dump generated code to bspgen.out
> + properties_file - use values from here if nonempty i.e no prompting
> +
> + arch - the arch for a generic layer is 'generic-layer', defined in
> + scripts/lib/bsp/substrate/target/generic-layer
> + """
> + if os.path.exists(bsp_output_dir):
> + print "\nBSP output dir already exists, exiting. (%s)" % bsp_output_dir
> + sys.exit(1)
> +
> + properties = None
> +
> + if properties_file:
> + try:
> + infile = open(properties_file, "r")
> + except IOError:
> + print "Couldn't open properties file %s for reading, exiting" % properties_file
> + sys.exit(1)
> +
> + properties = json.load(infile)
> +
> + os.mkdir(bsp_output_dir)
> +
> + context = create_context(machine, arch, scripts_path)
> + target_files = expand_targets(context, bsp_output_dir)
> +
> + input_lines = gather_inputlines(target_files)
> +
> + program_lines = []
> +
> + gen_program_header_lines(program_lines)
> +
> + gen_initial_property_vals(input_lines, program_lines)
> +
> + if properties:
> + gen_supplied_property_vals(properties, program_lines)
> +
> + gen_program_machine_lines(machine, program_lines)
> +
> + if not properties:
> + gen_program_input_lines(input_lines, program_lines, context)
> +
> + gen_program_lines(target_files, program_lines)
> +
> + run_program_lines(program_lines, codedump)
> +
> + print "New %s BSP created in %s" % (arch, bsp_output_dir)
> +
> +
> def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file):
> """
> Create bsp
>
next prev parent reply other threads:[~2012-12-18 14:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 17:51 [PATCH 0/5] RFC: new 'yocto-layer' tool for creating generic Yocto layers tom.zanussi
2012-12-17 17:51 ` [PATCH 1/5] scripts/lib/bsp/engine.py: add yocto_layer_create() tom.zanussi
2012-12-18 14:13 ` Philip Balister [this message]
2012-12-18 14:33 ` Tom Zanussi
2012-12-18 16:37 ` Philip Balister
2012-12-18 16:56 ` Tom Zanussi
2012-12-18 17:32 ` Philip Balister
2012-12-17 17:51 ` [PATCH 2/5] yocto-layer: new script tom.zanussi
2012-12-20 0:36 ` Darren Hart
2012-12-17 17:51 ` [PATCH 3/5] yocto-layer: add help/usage tom.zanussi
2012-12-17 17:51 ` [PATCH 4/5] yocto-layer: add 'layer' template data tom.zanussi
2012-12-20 0:40 ` Darren Hart
2012-12-20 16:23 ` Tom Zanussi
2012-12-20 16:29 ` Gary Thomas
2012-12-20 16:58 ` Tom Zanussi
2013-01-02 17:19 ` Darren Hart
2012-12-17 17:51 ` [PATCH 5/5] scripts/lib/bsp/engine.py: refactor bsp-creation code tom.zanussi
2012-12-20 0:41 ` Darren Hart
2012-12-20 0:34 ` [PATCH 0/5] RFC: new 'yocto-layer' tool for creating generic Yocto layers Darren Hart
2012-12-20 15:47 ` Tom Zanussi
2013-01-02 17:18 ` Darren Hart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D07A22.8000906@balister.org \
--to=philip@balister.org \
--cc=dvhart@linux.intel.com \
--cc=tom.zanussi@intel.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.