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=
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
# 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
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"