[elbe-devel] [PATCH v2] Fix silent command error in cpio examples

bage at linutronix.de bage at linutronix.de
Fri Aug 30 22:25:47 CEST 2019


From: Bastian Germann <bage at linutronix.de>

The *cpio.xml examples do not write the rcS file because the commands fails
silently, which is reported as #226. This will not be fixed anytime soon, so
work around the issue by using different means to create the file.

running cmd +chroot /var/cache/elbe/eec456e0-0fd1-45c9-b92f-e9a5616a1c50/target /bin/sh with STDIN echo "#!/bin/sh" | tee    /etc/init.d/rcS+
------------------------------------------------------------------------------
------------------------------------------------------------------------------

Command failed with errorcode 1
Finetuning Error, trying to continue anyways
running cmd +chroot /var/cache/elbe/eec456e0-0fd1-45c9-b92f-e9a5616a1c50/target /bin/sh with STDIN echo "mount -a"  | tee -a /etc/init.d/rcS+
------------------------------------------------------------------------------
qemu: unknown option 'a'
------------------------------------------------------------------------------

Command failed with errorcode 1
Finetuning Error, trying to continue anyways
running cmd +chroot /var/cache/elbe/eec456e0-0fd1-45c9-b92f-e9a5616a1c50/target /bin/sh with STDIN chmod +x /etc/init.d/rcS+
------------------------------------------------------------------------------
chmod: /etc/init.d/rcS: No such file or directory
------------------------------------------------------------------------------

Command failed with errorcode 1
Finetuning Error, trying to continue anyways

Signed-off-by: Bastian Germann <bage at linutronix.de>
---
 examples/armel-rescue-busybox-cpio.xml         | 7 ++++---
 examples/x86_64-pc-rescue-busybox-dyn-cpio.xml | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/examples/armel-rescue-busybox-cpio.xml b/examples/armel-rescue-busybox-cpio.xml
index 4b30d89d..cf521ebf 100644
--- a/examples/armel-rescue-busybox-cpio.xml
+++ b/examples/armel-rescue-busybox-cpio.xml
@@ -69,9 +69,10 @@
 			<mknod opts="c 5 1">/dev/console</mknod>
 			<mknod opts="c 1 3">/dev/null</mknod>
 			<!-- Add start script (may be moved to archive) -->
-			<command>echo "#!/bin/sh" | tee    /etc/init.d/rcS</command>
-			<command>echo "mount -a"  | tee -a /etc/init.d/rcS</command>
-			<command>chmod +x /etc/init.d/rcS</command>
+			<file dst="/etc/init.d/rcS" mode="+x">
+				#!/bin/sh
+				mount -a
+			</file>
 			<!-- Delete documentation and unused files -->
 			<rm>/usr/share</rm>
 		</finetuning>
diff --git a/examples/x86_64-pc-rescue-busybox-dyn-cpio.xml b/examples/x86_64-pc-rescue-busybox-dyn-cpio.xml
index 6b9496db..3c1fc37f 100644
--- a/examples/x86_64-pc-rescue-busybox-dyn-cpio.xml
+++ b/examples/x86_64-pc-rescue-busybox-dyn-cpio.xml
@@ -70,9 +70,10 @@
 			<mknod opts="c 5 1">/dev/console</mknod>
 			<mknod opts="c 1 3">/dev/null</mknod>
 			<!-- Add start script (may be moved to archive) -->
-			<command>echo "#!/bin/sh" | tee    /etc/init.d/rcS</command>
-			<command>echo "mount -a"  | tee -a /etc/init.d/rcS</command>
-			<command>chmod +x /etc/init.d/rcS</command>
+			<file dst="/etc/init.d/rcS" mode="+x">
+				#!/bin/sh
+				mount -a
+			</file>
 			<!-- Delete documentation and unused files -->
 			<rm>/usr/share</rm>
 		</finetuning>
-- 
2.20.1




More information about the elbe-devel mailing list