[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4414/8267] core-image-tiny-initramfs: Fix error message shown after a successful initrd boot



commit 01997345a089d738e0b2d70e6d94b3fed27196f6
Author: Alejandro Hernandez <alejandro hernandez linux intel com>
Date:   Tue Dec 20 23:08:40 2016 +0000

    core-image-tiny-initramfs: Fix error message shown after a successful initrd boot
    
    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.
    
    (From OE-Core rev: 3378c322247f5c261f40d06480379da9a24e3082)
    
    Signed-off-by: Alejandro Hernandez <alejandro hernandez linux intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 .../images/core-image-tiny-initramfs.bb            |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb 
b/meta/recipes-core/images/core-image-tiny-initramfs.bb
index 846d589..184727d 100644
--- a/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -28,3 +28,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;"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]