[meta-intel] [PATCH 21/31] machinesetuptool: a new recipe for setup of a machine

Kamble, Nitin A nitin.a.kamble at intel.com
Fri Sep 19 10:14:09 PDT 2014



On 9/19/14, 9:41 AM, "Zanussi, Tom" <tom.zanussi at intel.com> wrote:

>On Fri, 2014-09-19 at 11:31 -0500, Kamble, Nitin A wrote:
>> 
>> On 9/19/14, 6:52 AM, "Zanussi, Tom" <tom.zanussi at intel.com> wrote:
>> 
>> >On Thu, 2014-09-18 at 17:35 -0700, nitin.a.kamble at intel.com wrote:
>> >> From: Nitin A Kamble <nitin.a.kamble at intel.com>
>> >> 
>> >> This recipe adds ability to setup a BSP image for a specific machine
>>or
>> >> platform at the boot time. The base recipe does not provide any
>>machine
>> >> configuration files, and the required machine configuration files are
>> >> to be provided in the BSP layers.
>> >> 
>> >> This recipe is currently split in 2 files for ease of future
>>migration
>> >>of
>> >> the base recipe to the oecore layer.
>> >> 
>> >
>> >This seems like fairly significant new functionality to go in
>>completely
>> >undocumented.  I'd expect to see at least something that explains the
>> >basics of what it is, how it works, why it's needed, what functionality
>> >it's meant to replace, and especially how users are supposed to use it
>> >and what the interface is.
>> 
>> Yes, Documentation is pending, but before I go there, I would like to
>>get
>> the code in so that the interfaces are officially finalized.
>
>Well, documentation will be needed in any case, and it really helps to
>give reviewers an idea of what they're looking at, rather than having
>them waste time trying to puzzle out the interfaces and intentions.
>
>I'm guessing that any documentation you'd create now wouldn't have to be
>completely rewritten, so it shouldn't be too onerous a task to update
>those along with any code changes.

Ok, And where should this documentation go? Some of it I have included in
the sources of the machinesetuptool itself. Some sample configuration is
also included in the code repository. I can create a new file names
README.machinesetuptool in the top directory of meta-intel layer. Will
that work?

Nitin


>
>Tom
>
>> >
>> >Also, if we pull this in, and then as implied by your last sentence,
>> >it's migrated to oe-core and runs into resistance or needs to be
>>changed
>> >significantly, are we stuck supporting a conflicting interface in
>> >meta-intel forever?  If so, and it's ultimately intended to live in
>> >oe-core, I'd suggest it just wait to undergo a proper review in that
>> >context in the 1.8 timeframe.
>> 
>> Good points here Tom. Darren what do you recommend?
>> 
>> Thanks,
>> Nitin
>> 
>> >
>> >Tom
>> >
>> >> Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
>> >> ---
>> >>  .../machinesetuptool/machinesetuptool_git.bb       | 49
>> >>++++++++++++++++++++++
>> >>  1 file changed, 49 insertions(+)
>> >>  create mode 100644
>> >>common/recipes-bsp/machinesetuptool/machinesetuptool_git.bb
>> >> 
>> >> diff --git 
>> >>a/common/recipes-bsp/machinesetuptool/machinesetuptool_git.bb
>> >>b/common/recipes-bsp/machinesetuptool/machinesetuptool_git.bb
>> >> new file mode 100644
>> >> index 0000000..0dfe242
>> >> --- /dev/null
>> >> +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool_git.bb
>> >> @@ -0,0 +1,49 @@
>> >> +SUMMARY = "Daemon to setup an image for a specific machine at boot
>> >>time."
>> >> +SECTION = "base"
>> >> +LICENSE = "GPLv3"
>> >> +LIC_FILES_CHKSUM =
>> >>"file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
>> >> +RDEPENDS_${PN} = "sysvinit sed"
>> >> +
>> >> +PV = "1.0+git${SRCPV}"
>> >> +
>> >> +SRCREV = "4cb28ca5de3385f6e16a1e3f69b1a8a79b75ace4"
>> >> +
>> >> +SRC_URI = "git://git.yoctoproject.org/machinesetuptool.git"
>> >> +
>> >> +S = "${WORKDIR}/git"
>> >> +
>> >> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>> >> +
>> >> +inherit autotools pkgconfig update-rc.d
>> >> +
>> >> +INITSCRIPT_NAME = "machinesetuptool"
>> >> +INITSCRIPT_PARAMS = "start 00 S . stop 20 0 1 6 ."
>> >> +
>> >> +RRECOMMENDS_${PN} += "kernel-module-uinput"
>> >> +
>> >> +python __anonymous () {
>> >> +    src_uri = d.getVar('SRC_URI', True)
>> >> +    machine_config_files = (d.getVar('MACHINE_CONFIG_FILES', True)
>>or
>> >>"")
>> >> +    for file in machine_config_files.split():
>> >> +         src_uri += " file://" + file
>> >> +    d.setVar('SRC_URI', src_uri)
>> >> +}
>> >> +
>> >> +do_install_append() {
>> >> +	{
>> >> +	echo SUPPORTED_MACHINES=\"${SUPPORTED_MACHINES}\"
>> >> +	echo DEFAULT_MACHINE_SELECTION=${DEFAULT_MACHINE_SELECTION}
>> >> +	} > ${D}/${sysconfdir}/${BPN}/defaults
>> >> +
>> >> +	for file in ${MACHINE_CONFIG_FILES}
>> >> +	do
>> >> +		install -m 0644 ${S}/../${file} ${D}/${sysconfdir}/${BPN}/config/
>> >> +	done
>> >> +}
>> >> +
>> >> +# following variables are initialized to empty values now.
>> >> +# These need to be populated with the desired machine configurations
>> >> +# for each BSP in it's own layer.
>> >> +MACHINE_CONFIG_FILES = ""
>> >> +SUPPORTED_MACHINES = ""
>> >> +DEFAULT_MACHINE_SELECTION = "none"
>> >
>> >
>> 
>
>



More information about the meta-intel mailing list