All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 6/6] core-image-tiny-initramfs: Fix error message shown after a successful initrd boot
Date: Tue,  3 Jan 2017 22:30:42 +0000	[thread overview]
Message-ID: <5c0e4c3b4851df52c8df67a8990865f214d7cc7c.1482363237.git.alejandro.hernandez@linux.intel.com> (raw)
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

When booting core-image-tiny-initramfs, since we want to live on initrd,
on purpose, we never find a rootfs image to switch root to,
this causes init to show an error as it would with other images,
this patch replaces the message shown to the user, avoiding confusion
when it was indeed a successful boot.

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
 meta/recipes-core/images/core-image-tiny-initramfs.bb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb b/meta/recipes-core/images/core-image-tiny-initramfs.bb
index 216f3e0..a1a4f66 100644
--- a/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -29,3 +29,15 @@ BAD_RECOMMENDATIONS += "busybox-syslog"
 
 # Use the same restriction as initramfs-live-install
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+python tinyinitrd () {
+  # Modify our init file so the user knows we drop to shell prompt on purpose
+  newinit = None
+  with open(d.expand('${IMAGE_ROOTFS}/init'), 'r') as init:
+    newinit = init.read()
+    newinit = newinit.replace('Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell ', 'Poky Tiny Reference Distribution:')
+  with open(d.expand('${IMAGE_ROOTFS}/init'), 'w') as init:
+    init.write(newinit)
+}
+
+IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"
-- 
2.6.6



      parent reply	other threads:[~2017-01-03 22:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 22:30 [PATCH 0/6] poky-tiny improvements Alejandro Hernandez
2017-01-03 22:30 ` [PATCH 1/6] image-live-artifacts: Add support for creating image artifacts only Alejandro Hernandez
2017-01-03 22:41   ` Richard Purdie
2017-01-03 22:30 ` [PATCH 2/6] core-image-tiny-initramfs: Add and image " Alejandro Hernandez
2017-01-04 18:29   ` Leonardo Sandoval
2017-01-03 22:30 ` [PATCH 3/6] ksize.py: Python 3 fixes Alejandro Hernandez
2017-01-04  6:39   ` Khem Raj
2017-01-04 18:21     ` Alejandro Hernandez
2017-01-04 22:18       ` Alejandro Hernandez
2017-01-04 23:52         ` Khem Raj
2017-01-03 22:30 ` [PATCH 4/6] scripts/tiny/ksum.py: New tool Alejandro Hernandez
2017-01-04  6:38   ` Khem Raj
2017-01-03 22:30 ` [PATCH 5/6] bootimg-efi: Look for image artifacts in a common location Alejandro Hernandez
2017-01-03 22:30 ` Alejandro Hernandez [this message]

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=5c0e4c3b4851df52c8df67a8990865f214d7cc7c.1482363237.git.alejandro.hernandez@linux.intel.com \
    --to=alejandro.hernandez@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.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.