diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2016-12-20 23:08:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-31 14:43:02 +0000 |
commit | 01997345a089d738e0b2d70e6d94b3fed27196f6 (patch) | |
tree | 04f2c905ec57eae0dd484daf6f4c09f2da1fd26f | |
parent | 5d847e64247bc856b9369cccd2775320135eb7b6 (diff) | |
download | poky-01997345a089d738e0b2d70e6d94b3fed27196f6.tar.gz |
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>
-rw-r--r-- | meta/recipes-core/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 846d58930e..184727ddf7 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" | |||
28 | 28 | ||
29 | # Use the same restriction as initramfs-live-install | 29 | # Use the same restriction as initramfs-live-install |
30 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | 30 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" |
31 | |||
32 | python tinyinitrd () { | ||
33 | # Modify our init file so the user knows we drop to shell prompt on purpose | ||
34 | newinit = None | ||
35 | with open(d.expand('${IMAGE_ROOTFS}/init'), 'r') as init: | ||
36 | newinit = init.read() | ||
37 | newinit = newinit.replace('Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell ', 'Poky Tiny Reference Distribution:') | ||
38 | with open(d.expand('${IMAGE_ROOTFS}/init'), 'w') as init: | ||
39 | init.write(newinit) | ||
40 | } | ||
41 | |||
42 | IMAGE_PREPROCESS_COMMAND += "tinyinitrd;" | ||