make arm work for kvm builds
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 10 Mar 2010 20:04:22 +0000 (21:04 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Fri, 26 Mar 2010 14:35:45 +0000 (15:35 +0100)
Signed-off-by: Martin Mohring <martinmohring@linuxfoundation.org>
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
build
common_functions [changed mode: 0644->0755]
getchangetarget [changed mode: 0644->0755]
init_buildsystem

diff --git a/build b/build
index 69fe56a..b6c8b93 100755 (executable)
--- a/build
+++ b/build
@@ -32,7 +32,7 @@ uml_initrd=/boot/initrd-um
 kvm_kernel=/boot/vmlinuz
 kvm_initrd=/boot/initrd
 kvm_bin=/usr/bin/qemu-kvm
-mkinitrd_virtio_cmd=(env rootfstype=ext3 mkinitrd -d /dev/null -m "virtio_pci virtio_blk" -k $kvm_kernel -i $kvm_initrd-virtio)
+mkinitrd_virtio_cmd=(env rootfstype=ext3 mkinitrd -d /dev/null -m "binfmt_misc virtio_pci virtio_blk" -k $kvm_kernel -i $kvm_initrd-virtio)
 # whether we have virtio support
 kvm_virtio=
 
@@ -849,9 +849,11 @@ if [ "$VM_TYPE" = 'kvm' -a -z "$RUNNING_IN_VM" ]; then
            echo "creating $qemu_initrd-virtio"
            "${mkinitrd_virtio_cmd[@]}" || cleanup_and_exit 1
            kvm_virtio=1
+        else
+            kvm_virtio=0
        fi
     else
-       kvm_virtio=1
+       kvm_virtio=0
     fi
 
     if [ "$kvm_virtio" = 1 ]; then
@@ -1495,6 +1497,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
        # this is restricted to arm to make sure it doesn't interfere with x86
        if [ "$BUILD_ARCH" != "${BUILD_ARCH#arm}" ]; then
            echo "changing targetarch"
+           chmod a+x $BUILD_DIR/getchangetarget || cleanup_and_exit 1
            CHANGETARGET=$(getchangetarget --dist "$BUILD_DIST" --configdir "$BUILD_DIR/configs" --archpath "$BUILD_ARCH" )
            echo "NEW TARGET: $CHANGETARGET"
        fi
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index efa9712..99afc67 100755 (executable)
@@ -316,7 +316,7 @@ if [ x"$BUILD_ARCH" == xarmv4l -o x"$BUILD_ARCH" == xarmv5el -o x"$BUILD_ARCH" =
        fi
        # To initially run the init script, there needs to be also a static bash to register qemu in this chroot and though to start up /.build/build
        if [ -e /bin/bash-static -a -e /bin/mount-static ]; then
-           (mkdir -p  $BUILD_ROOT/bin && set -x && cp /bin/bash-static $BUILD_ROOT/bin && cp /bin/mount-static $BUILD_ROOT/bin)
+           (mkdir -p  $BUILD_ROOT/bin && set -x && cp /bin/bash-static $BUILD_ROOT/bin && cp /bin/mount-static $BUILD_ROOT/bin && chmod a+x $BUILD_ROOT/bin/*-static )
        fi
        if [ -e /proc/sys/fs/binfmt_misc/arm -o -e /proc/sys/fs/binfmt_misc/armeb -o -e /proc/sys/fs/binfmt_misc/sh4 ]; then
            echo "qemu-* already registered"