All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] INITRD commit feedback changes
@ 2014-08-05 21:39 nitin.a.kamble
  2014-08-05 21:39 ` [PATCH 1/2] INITRD var: documentation changes nitin.a.kamble
  2014-08-05 21:39 ` [PATCH 2/2] code cleanup for INITRD variable handing nitin.a.kamble
  0 siblings, 2 replies; 5+ messages in thread
From: nitin.a.kamble @ 2014-08-05 21:39 UTC (permalink / raw)
  To: richard.purdie, saul.wold, darren.hart, Openembedded-core

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

Here are couple of commits which enhances the code and documentation referring
the recently changed INITRD variable. It is based on the feedback received from
Darren Hart.

Thanks,
Nitin

The following changes since commit 870bb8d35547b8313b3a487d7e8b914ab9470e64:

  local.conf.sample.extended: fix example for EXTRA_USERS_PARAMS (2014-08-04 17:38:24 +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 (2):
  INITRD var: documentation changes
  code cleanup for INITRD variable handing

 documentation/ref-manual/ref-classes.xml   | 4 ++--
 documentation/ref-manual/ref-variables.xml | 2 +-
 meta/classes/boot-directdisk.bbclass       | 4 +++-
 meta/classes/bootimg.bbclass               | 2 ++
 meta/conf/documentation.conf               | 2 +-
 5 files changed, 9 insertions(+), 5 deletions(-)

-- 
1.8.1.4



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

* [PATCH 1/2] INITRD var: documentation changes
  2014-08-05 21:39 [PATCH 0/2] INITRD commit feedback changes nitin.a.kamble
@ 2014-08-05 21:39 ` nitin.a.kamble
  2014-08-05 22:27   ` Hart, Darren
  2014-08-05 21:39 ` [PATCH 2/2] code cleanup for INITRD variable handing nitin.a.kamble
  1 sibling, 1 reply; 5+ messages in thread
From: nitin.a.kamble @ 2014-08-05 21:39 UTC (permalink / raw)
  To: richard.purdie, saul.wold, darren.hart, Openembedded-core

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

The use of the INITRD variable is changed in a recent commit. Instead of
specifying a single filesystem image, it specifies a list of file system
images. Reflecting this change in the documentation.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 documentation/ref-manual/ref-classes.xml   | 4 ++--
 documentation/ref-manual/ref-variables.xml | 2 +-
 meta/conf/documentation.conf               | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
index e7e9942..91dbfda 100644
--- a/documentation/ref-manual/ref-classes.xml
+++ b/documentation/ref-manual/ref-classes.xml
@@ -881,7 +881,7 @@
         <itemizedlist>
             <listitem><para>
                 <link linkend='var-INITRD'><filename>INITRD</filename></link>:
-                Indicates a filesystem image to use as an initrd (optional).
+                Indicates a list of filesystem images to concatenate and use as an initrd (optional).
                 </para></listitem>
             <listitem><para>
                 <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
@@ -2864,7 +2864,7 @@
         The class supports the following variables:
         <itemizedlist>
             <listitem><para><emphasis><link linkend='var-INITRD'><filename>INITRD</filename></link>:</emphasis>
-                Indicates a filesystem image to use as an initial RAM disk
+                Indicates a list of filesystem images to concatenate and use as an initial RAM disk
                 (initrd).
                 This variable is optional.</para></listitem>
             <listitem><para><emphasis><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:</emphasis>
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index b4d6e71..7808de6 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -4020,7 +4020,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
         <glossentry id='var-INITRD'><glossterm>INITRD</glossterm>
             <glossdef>
                 <para>
-                    Indicates a filesystem image to use as an initial RAM
+                    Indicates a list of filesystem images to concatenate and use as an initial RAM
                     disk (<filename>initrd</filename>).
                 </para>
 
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 31fbd6c..eb36de0 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -225,7 +225,7 @@ INHIBIT_PACKAGE_STRIP[doc] = "If set to "1", causes the build to not strip binar
 INHERIT[doc] = "Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files."
 INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
 INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM disk (initramfs), which is used during boot."
-INITRD[doc] = "Indicates list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
+INITRD[doc] = "Indicates a list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
 INITSCRIPT_NAME[doc] = "The filename of the initialization script as installed to ${sysconfdir}/init.d."
 INITSCRIPT_PACKAGES[doc] = "A list of the packages that contain initscripts. This variable is used in recipes when using update-rc.d.bbclass. The variable is optional and defaults to the PN variable."
 INITSCRIPT_PARAMS[doc] = "Specifies the options to pass to update-rc.d. The variable is mandatory and is used in recipes when using update-rc.d.bbclass."
-- 
1.8.1.4



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

* [PATCH 2/2] code cleanup for INITRD variable handing
  2014-08-05 21:39 [PATCH 0/2] INITRD commit feedback changes nitin.a.kamble
  2014-08-05 21:39 ` [PATCH 1/2] INITRD var: documentation changes nitin.a.kamble
@ 2014-08-05 21:39 ` nitin.a.kamble
  2014-08-05 22:35   ` Hart, Darren
  1 sibling, 1 reply; 5+ messages in thread
From: nitin.a.kamble @ 2014-08-05 21:39 UTC (permalink / raw)
  To: richard.purdie, saul.wold, darren.hart, Openembedded-core

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

* Remove an unnecessary check
* Instead of ignoring, report the errors

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/classes/boot-directdisk.bbclass | 4 +++-
 meta/classes/bootimg.bbclass         | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 995d3e7..5107d7f 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -76,8 +76,10 @@ boot_direct_populate() {
 		rm -f $dest/initrd
 		for fs in ${INITRD}
 		do
-			if [ -n "${fs}" ] && [ -s "${fs}" ]; then
+			if [ -s "${fs}" ]; then
 				cat ${fs} >> $dest/initrd
+			else
+				bbfatal "${fs} is invalid. initrd image creation failed."
 			fi
 		done
 		chmod 0644 $dest/initrd
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 7b3ce65..859d517 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -75,6 +75,8 @@ populate() {
 		do
 			if [ -s "${fs}" ]; then
 				cat ${fs} >> ${DEST}/initrd
+			else
+				bbfatal "${fs} is invalid. initrd image creation failed."
 			fi
 		done
 		chmod 0644 ${DEST}/initrd
-- 
1.8.1.4



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

* Re: [PATCH 1/2] INITRD var: documentation changes
  2014-08-05 21:39 ` [PATCH 1/2] INITRD var: documentation changes nitin.a.kamble
@ 2014-08-05 22:27   ` Hart, Darren
  0 siblings, 0 replies; 5+ messages in thread
From: Hart, Darren @ 2014-08-05 22:27 UTC (permalink / raw)
  To: Kamble, Nitin A, richard.purdie, Wold, Saul, Openembedded-core

On 8/5/14, 14:39, "Kamble, Nitin A" <nitin.a.kamble@intel.com> wrote:

>From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
>The use of the INITRD variable is changed in a recent commit. Instead of
>specifying a single filesystem image, it specifies a list of file system
>images. Reflecting this change in the documentation.
>
>Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>

Reviewed-by: Darren Hart <dvhart@linux.intel.com>

-- 
Darren Hart					Open Source Technology Center
darren.hart@intel.com				            Intel Corporation




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

* Re: [PATCH 2/2] code cleanup for INITRD variable handing
  2014-08-05 21:39 ` [PATCH 2/2] code cleanup for INITRD variable handing nitin.a.kamble
@ 2014-08-05 22:35   ` Hart, Darren
  0 siblings, 0 replies; 5+ messages in thread
From: Hart, Darren @ 2014-08-05 22:35 UTC (permalink / raw)
  To: Kamble, Nitin A, richard.purdie, Wold, Saul, Openembedded-core

On 8/5/14, 14:39, "Kamble, Nitin A" <nitin.a.kamble@intel.com> wrote:

>From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
>* Remove an unnecessary check
>* Instead of ignoring, report the errors

This isn't enough to ask for a resend, but please be a bit more explicit
in what is going on in future commit messages, for example:

INITRD: Cleanup file tests and report errors

The null string test (-n) is no longer necessary as it is inherent in the
for loop.

If the INITRD file element is missing or of zero size, abort with bbfatal.

>
>Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>

Reviewed-by: Darren Hart <dvhart@linux.intel.com>


>---
> meta/classes/boot-directdisk.bbclass | 4 +++-
> meta/classes/bootimg.bbclass         | 2 ++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/meta/classes/boot-directdisk.bbclass
>b/meta/classes/boot-directdisk.bbclass
>index 995d3e7..5107d7f 100644
>--- a/meta/classes/boot-directdisk.bbclass
>+++ b/meta/classes/boot-directdisk.bbclass
>@@ -76,8 +76,10 @@ boot_direct_populate() {
> 		rm -f $dest/initrd
> 		for fs in ${INITRD}
> 		do
>-			if [ -n "${fs}" ] && [ -s "${fs}" ]; then
>+			if [ -s "${fs}" ]; then
> 				cat ${fs} >> $dest/initrd
>+			else
>+				bbfatal "${fs} is invalid. initrd image creation failed."
> 			fi
> 		done
> 		chmod 0644 $dest/initrd
>diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
>index 7b3ce65..859d517 100644
>--- a/meta/classes/bootimg.bbclass
>+++ b/meta/classes/bootimg.bbclass
>@@ -75,6 +75,8 @@ populate() {
> 		do
> 			if [ -s "${fs}" ]; then
> 				cat ${fs} >> ${DEST}/initrd
>+			else
>+				bbfatal "${fs} is invalid. initrd image creation failed."
> 			fi
> 		done
> 		chmod 0644 ${DEST}/initrd
>-- 
>1.8.1.4
>
>


-- 
Darren Hart					Open Source Technology Center
darren.hart@intel.com				            Intel Corporation




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

end of thread, other threads:[~2014-08-05 22:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 21:39 [PATCH 0/2] INITRD commit feedback changes nitin.a.kamble
2014-08-05 21:39 ` [PATCH 1/2] INITRD var: documentation changes nitin.a.kamble
2014-08-05 22:27   ` Hart, Darren
2014-08-05 21:39 ` [PATCH 2/2] code cleanup for INITRD variable handing nitin.a.kamble
2014-08-05 22:35   ` Hart, Darren

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.