Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] A tool for boottime image configuration
@ 2014-08-28 18:47 nitin.a.kamble
  2014-08-28 18:47 ` [PATCH 1/1] imageconfigurator: a new recipe " nitin.a.kamble
  2014-09-05  1:20 ` [PATCH 0/1] A tool " Kamble, Nitin A
  0 siblings, 2 replies; 12+ messages in thread
From: nitin.a.kamble @ 2014-08-28 18:47 UTC (permalink / raw)
  To: darren.hart, richard.purdie, saul.wold, Openembedded-core

From: Nitin A Kamble <nitin.a.kamble@intel.com>

This pull request provides the base recipe for the Image Configurator tool,
which provides ability to configure the BSP images for a particular hardware
at boot time.

  The recipe needs machine configuration files, which are to be provided in
the individual BSP layers. The meta-intel layer will be using this recipe to
support multiple machines with common BSPs. There is nothing architecture
specific here, and it can also be used by any other layer to consolidate
multiple BSPs.

Thanks,
Nitin

The following changes since commit 669c07d6022174d01fe5a95b7b0faa9ef86da1e2:

  bitbake: build/data: Write out more complete python run files (2014-08-28 15:12:45 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib nitin/misc
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
  imageconfigurator: a new recipe for boottime image configuration

 .../imageconfigurator/imageconfigurator_git.bb     | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb

-- 
1.8.1.4



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

* [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 18:47 [PATCH 0/1] A tool for boottime image configuration nitin.a.kamble
@ 2014-08-28 18:47 ` nitin.a.kamble
  2014-08-28 18:53   ` Mark Hatle
  2014-08-28 20:09   ` Burton, Ross
  2014-09-05  1:20 ` [PATCH 0/1] A tool " Kamble, Nitin A
  1 sibling, 2 replies; 12+ messages in thread
From: nitin.a.kamble @ 2014-08-28 18:47 UTC (permalink / raw)
  To: darren.hart, richard.purdie, saul.wold, Openembedded-core

From: Nitin A Kamble <nitin.a.kamble@intel.com>

This recipe adds ability to configure a BSP image for a specific
machine or platform at the boot time. The machine configurations
are not provided here, and are to be provided in the BSP layers.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 .../imageconfigurator/imageconfigurator_git.bb     | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb

diff --git a/meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb b/meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb
new file mode 100644
index 0000000..7208ad0
--- /dev/null
+++ b/meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Daemon to configure an image for a specific machine at boot time."
+SECTION = "base"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+RDEPENDS_${PN} = "sysvinit sed"
+
+PE = "1"
+PV = "0.1+git${SRCPV}"
+
+SRCREV = "90603bed54f7c033a7b2f92214c21d011459844b"
+
+SRC_URI = "git://git.yoctoproject.org/imageconfigurator.git"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit autotools pkgconfig update-rc.d
+
+INITSCRIPT_NAME = "imageconfigurator"
+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"
-- 
1.8.1.4



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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 18:47 ` [PATCH 1/1] imageconfigurator: a new recipe " nitin.a.kamble
@ 2014-08-28 18:53   ` Mark Hatle
  2014-08-28 20:09   ` Burton, Ross
  1 sibling, 0 replies; 12+ messages in thread
From: Mark Hatle @ 2014-08-28 18:53 UTC (permalink / raw)
  To: openembedded-core

On 8/28/14, 1:47 PM, nitin.a.kamble@intel.com wrote:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
> This recipe adds ability to configure a BSP image for a specific
> machine or platform at the boot time. The machine configurations
> are not provided here, and are to be provided in the BSP layers.
>
> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> ---
>   .../imageconfigurator/imageconfigurator_git.bb     | 50 ++++++++++++++++++++++
>   1 file changed, 50 insertions(+)
>   create mode 100644 meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb
>
> diff --git a/meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb b/meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb
> new file mode 100644
> index 0000000..7208ad0
> --- /dev/null
> +++ b/meta/recipes-bsp/imageconfigurator/imageconfigurator_git.bb
> @@ -0,0 +1,50 @@
> +SUMMARY = "Daemon to configure an image for a specific machine at boot time."
> +SECTION = "base"
> +LICENSE = "GPLv3"

Any specific reason for GPLv3 vs GPLv2+?  I have a number of customers who are 
still locked on GPLv2 images for the time being, and they are interested in this 
kind of tool.

--Mark

> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> +RDEPENDS_${PN} = "sysvinit sed"
> +
> +PE = "1"
> +PV = "0.1+git${SRCPV}"
> +
> +SRCREV = "90603bed54f7c033a7b2f92214c21d011459844b"
> +
> +SRC_URI = "git://git.yoctoproject.org/imageconfigurator.git"
> +
> +S = "${WORKDIR}/git"
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +inherit autotools pkgconfig update-rc.d
> +
> +INITSCRIPT_NAME = "imageconfigurator"
> +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"
>



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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 18:47 ` [PATCH 1/1] imageconfigurator: a new recipe " nitin.a.kamble
  2014-08-28 18:53   ` Mark Hatle
@ 2014-08-28 20:09   ` Burton, Ross
  2014-08-28 20:14     ` Kamble, Nitin A
  1 sibling, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2014-08-28 20:09 UTC (permalink / raw)
  To: Nitin A Kamble; +Cc: OE-core, Darren Hart, Saul Wold

On 28 August 2014 19:47,  <nitin.a.kamble@intel.com> wrote:
> +PE = "1"

No need for an epoch.

> +PACKAGE_ARCH = "${MACHINE_ARCH}"

Wouldn't it be simpler to have this as normal architecture, and depend
on a machine-specific data package?

Ross


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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 20:09   ` Burton, Ross
@ 2014-08-28 20:14     ` Kamble, Nitin A
  2014-08-28 20:33       ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Kamble, Nitin A @ 2014-08-28 20:14 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core, Hart, Darren, Wold, Saul

Thanks for the feedback Ross, My comments below.


> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Thursday, August 28, 2014 1:10 PM
> To: Kamble, Nitin A
> Cc: Hart, Darren; Purdie, Richard; Wold, Saul; OE-core
> Subject: Re: [OE-core] [PATCH 1/1] imageconfigurator: a new recipe for
> boottime image configuration
> 
> On 28 August 2014 19:47,  <nitin.a.kamble@intel.com> wrote:
> > +PE = "1"
> 
> No need for an epoch.
Commit changed on the contrib branch for this.

> 
> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
> 
> Wouldn't it be simpler to have this as normal architecture, and depend on a
> machine-specific data package?

This really need to be machine specific. For every BSP different files will be packaged.

Nitin

> 
> Ross

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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 20:14     ` Kamble, Nitin A
@ 2014-08-28 20:33       ` Burton, Ross
  2014-08-28 21:05         ` Kamble, Nitin A
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2014-08-28 20:33 UTC (permalink / raw)
  To: Kamble, Nitin A; +Cc: OE-core, Hart, Darren, Wold, Saul

On 28 August 2014 21:14, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
>> Wouldn't it be simpler to have this as normal architecture, and depend on a
>> machine-specific data package?
>
> This really need to be machine specific. For every BSP different files will be packaged.

Sure, I was proposing an imageconfigurator that is not
machine-specific, and then imageconfigurator-data packages that are
per-BSP.

Ross


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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 20:33       ` Burton, Ross
@ 2014-08-28 21:05         ` Kamble, Nitin A
  2014-08-28 21:49           ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Kamble, Nitin A @ 2014-08-28 21:05 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core, Hart, Darren, Wold, Saul



> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Thursday, August 28, 2014 1:34 PM
> To: Kamble, Nitin A
> Cc: Hart, Darren; Purdie, Richard; Wold, Saul; OE-core
> Subject: Re: [OE-core] [PATCH 1/1] imageconfigurator: a new recipe for
> boottime image configuration
> 
> On 28 August 2014 21:14, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
> >> Wouldn't it be simpler to have this as normal architecture, and
> >> depend on a machine-specific data package?
> >
> > This really need to be machine specific. For every BSP different files will be
> packaged.
> 
> Sure, I was proposing an imageconfigurator that is not machine-specific, and
> then imageconfigurator-data packages that are per-BSP.
> 
> Ross

Ohh, That is a good idea. Do you have any example recipe for me to look at which is doing something similar?

Thanks,
Nitin




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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 21:05         ` Kamble, Nitin A
@ 2014-08-28 21:49           ` Burton, Ross
  2014-08-28 22:13             ` Kamble, Nitin A
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2014-08-28 21:49 UTC (permalink / raw)
  To: Kamble, Nitin A; +Cc: OE-core, Hart, Darren, Wold, Saul

On 28 August 2014 22:05, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
> Ohh, That is a good idea. Do you have any example recipe for me to look at which is doing something similar?

It will just be a matter of imageconfigurator RRECOMMENDing
imageconfigurator-data, and then imageconfigurator-data being
machinearch and doing the per-machine magic however it wants.

Ross


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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 21:49           ` Burton, Ross
@ 2014-08-28 22:13             ` Kamble, Nitin A
  2014-08-28 23:03               ` Otavio Salvador
  0 siblings, 1 reply; 12+ messages in thread
From: Kamble, Nitin A @ 2014-08-28 22:13 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core, Hart, Darren, Wold, Saul

> 
> It will just be a matter of imageconfigurator RRECOMMENDing
> imageconfigurator-data, and then imageconfigurator-data being
> machinearch and doing the per-machine magic however it wants.
> 
> Ross
I see. That means the recipe will be split into two recipes. It would be cool, if it can be done with a single recipe. But that would need ability to mark different PACKAGE_ARCHS to different packages of the same recipe.

Splitting the recipe into two has other consequences.
1. The non-data recipe is of no use if the data recipe is not present.
2. The data recipe in the oecore layer will be empty, so it can be dropped from the oecore layer.
3. With that the 2 recipes go in two separate layers which need each other, which is an awkward organization of recipes.

Is there any better way to achieve the same without splitting the recipe into 2?

Thanks,
Nitin




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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 22:13             ` Kamble, Nitin A
@ 2014-08-28 23:03               ` Otavio Salvador
  2014-08-29  1:06                 ` Kamble, Nitin A
  0 siblings, 1 reply; 12+ messages in thread
From: Otavio Salvador @ 2014-08-28 23:03 UTC (permalink / raw)
  To: Kamble, Nitin A; +Cc: Hart, Darren, Wold, Saul, OE-core

On Thu, Aug 28, 2014 at 7:13 PM, Kamble, Nitin A
<nitin.a.kamble@intel.com> wrote:
>>
>> It will just be a matter of imageconfigurator RRECOMMENDing
>> imageconfigurator-data, and then imageconfigurator-data being
>> machinearch and doing the per-machine magic however it wants.
>>
>> Ross
> I see. That means the recipe will be split into two recipes. It would be cool, if it can be done with a single recipe. But that would need ability to mark different PACKAGE_ARCHS to different packages of the same recipe.
>
> Splitting the recipe into two has other consequences.
> 1. The non-data recipe is of no use if the data recipe is not present.
> 2. The data recipe in the oecore layer will be empty, so it can be dropped from the oecore layer.
> 3. With that the 2 recipes go in two separate layers which need each other, which is an awkward organization of recipes.
>
> Is there any better way to achieve the same without splitting the recipe into 2?

I think this recipe is small enough so I don't think adding another
one will buy anything...

While on that, can you describe some use-cases you see which this can
be used to cover?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 1/1] imageconfigurator: a new recipe for boottime image configuration
  2014-08-28 23:03               ` Otavio Salvador
@ 2014-08-29  1:06                 ` Kamble, Nitin A
  0 siblings, 0 replies; 12+ messages in thread
From: Kamble, Nitin A @ 2014-08-29  1:06 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Hart, Darren, Wold, Saul, OE-core

> 
> I think this recipe is small enough so I don't think adding another one will buy
> anything...
Otavio, I agree with you here.

> 
> While on that, can you describe some use-cases you see which this can be
> used to cover?
We have common BSPs in meta-intel such as intel-corei7-64 and intel-core2-32. These are targeted for multiple platforms, but each platform need it's own configuration settings to make it fully useful. With this Image Configurator tool, one can select the target platform at boot time to get the Image completely configured for that platform. This ability signigicantly cuts down the number BSPs we need to maintain for various platforms. And same can be done with other architecture BSPs.

Thanks,
Nitin

  

> 
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* Re: [PATCH 0/1] A tool for boottime image configuration
  2014-08-28 18:47 [PATCH 0/1] A tool for boottime image configuration nitin.a.kamble
  2014-08-28 18:47 ` [PATCH 1/1] imageconfigurator: a new recipe " nitin.a.kamble
@ 2014-09-05  1:20 ` Kamble, Nitin A
  1 sibling, 0 replies; 12+ messages in thread
From: Kamble, Nitin A @ 2014-09-05  1:20 UTC (permalink / raw)
  To: Hart, Darren, richard.purdie@linuxfoundation.org, Wold, Saul,
	Openembedded-core@lists.openembedded.org

I have changed name of the "Image Configurator" tool to "Machine Setup Tool". Also we have decided to host the recipe in the meta-intel layer instead of the oecore layer for the upcoming Yocto Project 1.7 release. And after further stabilization the recipe will be migrated to oecore layer before the YP 1.8 release.

Nitin
 


> -----Original Message-----
> From: Kamble, Nitin A
> Sent: Thursday, August 28, 2014 11:47 AM
> To: Hart, Darren; richard.purdie@linuxfoundation.org; Wold, Saul;
> Openembedded-core@lists.openembedded.org
> Cc: Kamble, Nitin A
> Subject: [PATCH 0/1] A tool for boottime image configuration
> 
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> 
> This pull request provides the base recipe for the Image Configurator tool,
> which provides ability to configure the BSP images for a particular hardware
> at boot time.
> 
>   The recipe needs machine configuration files, which are to be provided in
> the individual BSP layers. The meta-intel layer will be using this recipe to
> support multiple machines with common BSPs. There is nothing architecture
> specific here, and it can also be used by any other layer to consolidate
> multiple BSPs.
> 
> Thanks,
> Nitin
> 
> The following changes since commit
> 669c07d6022174d01fe5a95b7b0faa9ef86da1e2:
> 
>   bitbake: build/data: Write out more complete python run files (2014-08-28
> 15:12:45 +0100)
> 
> are available in the git repository at:
> 
>   git://git.yoctoproject.org/poky-contrib nitin/misc
>   http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc
> 
> Nitin A Kamble (1):
>   imageconfigurator: a new recipe for boottime image configuration
> 
>  .../imageconfigurator/imageconfigurator_git.bb     | 50
> ++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 meta/recipes-
> bsp/imageconfigurator/imageconfigurator_git.bb
> 
> --
> 1.8.1.4



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

end of thread, other threads:[~2014-09-05  1:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 18:47 [PATCH 0/1] A tool for boottime image configuration nitin.a.kamble
2014-08-28 18:47 ` [PATCH 1/1] imageconfigurator: a new recipe " nitin.a.kamble
2014-08-28 18:53   ` Mark Hatle
2014-08-28 20:09   ` Burton, Ross
2014-08-28 20:14     ` Kamble, Nitin A
2014-08-28 20:33       ` Burton, Ross
2014-08-28 21:05         ` Kamble, Nitin A
2014-08-28 21:49           ` Burton, Ross
2014-08-28 22:13             ` Kamble, Nitin A
2014-08-28 23:03               ` Otavio Salvador
2014-08-29  1:06                 ` Kamble, Nitin A
2014-09-05  1:20 ` [PATCH 0/1] A tool " Kamble, Nitin A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox