Skip to contentSkip to conversation

runqemu-internal: Add cpio support for qemux86 so that we can boot poky-tiny images

PATCH In review Richard Purdie 2 participants 4 messages Mar 19, 2015 – Mar 20, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runqemu-internal: Add cpio support for qemux86 so that we can boot poky-tiny images

poky-tiny generates cpio.gz images, add support for these so we can boot them using runqemu.

scripts/runqemu-internal +5 -0
index 6594dc3..2db5566 100755
@@ -408,6 +408,11 @@ if [ "$MACHINE" = "qemux86" ]; then
         KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
     fi
+    if [ "${FSTYPE:0:4}" = "cpio" ]; then
+        KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=/dev/ram0 rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -initrd $ROOTFS $QEMU_UI_OPTIONS"
+    fi
+
     if [ "$FSTYPE" = "nfs" ]; then
         if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
             echo "Error: NFS mount point $ROOTFS doesn't exist."
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Richard Purdie

poky-tiny generates cpio.gz images, add support for these so we can boot
them using runqemu.

scripts/runqemu-internal +0 -0
index 6594dc3..2db5566 100755
@@ -408,6 +408,11 @@ if [ "$MACHINE" = "qemux86" ]; then
Quoted 6 lines

KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
fi
+ if [ "${FSTYPE:0:4}" = "cpio" ]; then

Is that positional handling mandated by the POSIX-1003.1 2008 shell?

Otherwise case $FSTYPE in ..
Would cleanup the rest if the mess below..

With that clarified it changed

Thanks,

Quoted 9 lines

+ KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32
root=/dev/ram0 rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
+ QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -initrd
$ROOTFS $QEMU_UI_OPTIONS"

scripts/runqemu-internal +2 -0
+    fi
+
    if [ "$FSTYPE" = "nfs" ]; then
        if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
            echo "Error: NFS mount point $ROOTFS doesn't exist."
#2 lore raw
Quoted 22 lines · Bernhard Reutner-Fischer
Quoted 11 lines · Richard Purdie

poky-tiny generates cpio.gz images, add support for these so we can boot
them using runqemu.

scripts/runqemu-internal +0 -0
index 6594dc3..2db5566 100755
@@ -408,6 +408,11 @@ if [ "$MACHINE" = "qemux86" ]; then
Quoted 6 lines

KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
fi
+ if [ "${FSTYPE:0:4}" = "cpio" ]; then

Is that positional handling mandated by the POSIX-1003.1 2008 shell?

Quoted 2 lines

Otherwise case $FSTYPE in ..
Would cleanup the rest if the mess below..

of the if, even ;)

I didn't see :n:m ranges in http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

but maybe I didn't look at the right spot?

Thanks,

Quoted 5 lines

With that clarified it changed

Thanks,

#3 lore raw
In reply to Bernhard Reutner-Fischer
Quoted 21 lines · Bernhard Reutner-Fischer
Quoted 11 lines · Richard Purdie

poky-tiny generates cpio.gz images, add support for these so we can boot
them using runqemu.

scripts/runqemu-internal +0 -0
index 6594dc3..2db5566 100755
@@ -408,6 +408,11 @@ if [ "$MACHINE" = "qemux86" ]; then
Quoted 6 lines

KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
fi
+ if [ "${FSTYPE:0:4}" = "cpio" ]; then

Is that positional handling mandated by the POSIX-1003.1 2008 shell?

Quoted 2 lines

Otherwise case $FSTYPE in ..
Would cleanup the rest if the mess below..

Its a bash script so it doesn't need to be mandated by POSIX and I was trying to be minimally invasive given the point we're at in the release cycle, the rest of the file uses that syntax.

I would like to change some other things but it isn't really the time...

Cheers,

Richard