From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8482CE00294 for ; Tue, 18 Dec 2012 08:56:02 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Dec 2012 08:55:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,309,1355126400"; d="scan'208";a="259184778" Received: from unknown (HELO [10.255.13.202]) ([10.255.13.202]) by orsmga002.jf.intel.com with ESMTP; 18 Dec 2012 08:56:01 -0800 Message-ID: <1355849760.20791.47.camel@empanada> From: Tom Zanussi To: Philip Balister Date: Tue, 18 Dec 2012 10:56:00 -0600 In-Reply-To: <50D09BBB.1030604@balister.org> References: <50D07A22.8000906@balister.org> <1355841229.20791.32.camel@empanada> <50D09BBB.1030604@balister.org> X-Mailer: Evolution 3.4.1 (3.4.1-2.fc17) Mime-Version: 1.0 Cc: yocto@yoctoproject.org, dvhart@linux.intel.com Subject: Re: [PATCH 1/5] scripts/lib/bsp/engine.py: add yocto_layer_create() X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 16:56:02 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Tue, 2012-12-18 at 11:37 -0500, Philip Balister wrote: > On 12/18/2012 09:33 AM, Tom Zanussi wrote: > > On Tue, 2012-12-18 at 09:13 -0500, Philip Balister wrote: > >> On 12/17/2012 12:51 PM, tom.zanussi@intel.com wrote: > >>> From: Tom Zanussi > >>> > >>> 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. > >> > > > > Technically it isn't any different, but it's based on the template > > engine code and templates that make up the 'Yocto BSP Tools', which for > > various reasons (they create Yocto-compliant BSP layers, something not > > of interest to OpenEmbedded proper, and it probably doesn't make sense > > to clutter oe-core with a bunch of 'template data', etc) live in poky > > and not oe-core. > > Actually, BSP's should work standalone with oe-core, so it is of interest. > > > > > As such, the new tool is named 'yocto-layer' to match the other existing > > Yocto BSP tools, 'yocto-bsp' and 'yocto-kernel'. > > I will now get pedantic. > > The meta-yocto layer functions as a distro layer. So referring to things > as yocto this and yocto that, suggests they only work with the > meta-yocto layer. > > So it doesn't make sense to me to put general purpose tools in a distro > layer. > > > Right, none of the yocto- tools has anything to do with the meta-yocto layer, so if that's how it's taken, then, yeah, it's misleading. It wouldn't bother me to do a global search and replace of 'yocto' with 'oe' for the tools - I guess that would imply it would all be moving into oe-core, though. Is that what you're suggesting? Tom > > > > Tom > > > > > >> 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 > >>> --- > >>> 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 > >>> > > > > > > > >