generic_device
generic_device copied to clipboard
Help running linaro_x86_64-userdebug build in QEMU
I made an easy script in accord with instructions in https://github.com/robherring/generic_device/wiki/Running-QEMU-KVM but it does not run the build on QEMU. Could I have made a mistake in the script? The only message I get in the console is:
Gdk-WARNING **: gdk_gl_context_set_required_version - GL context versions less than 3.2 are not supported. gl_version 45 - core profile enabled
I compiled the kernel (4.13+ now?) from git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ${LINUX_PATH} make defconfig kvmconfig android-base.config android-recommended.config with CONFIG_DRM_BOCHS=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_SW_SYNC=y CONFIG_SYNC_FILE=y CONFIG_VT=y in android-recommended.config appended and in accord with other instructions in https://github.com/robherring/generic_device/wiki/Building
See the script:
#!/bin/bash export PROJECT_PATH="/media/monika/e9893cf9-c2a6-481a-b4a6-9b9b4ce62fa0/qemu_android" export VIRGLRENDERER_PATH="${PROJECT_PATH}/virglrenderer" export QEMU_PATH="${PROJECT_PATH}/qemu" export LINUX_PATH="${PROJECT_PATH}/linux" export ANDROID_PATH="${PROJECT_PATH}/android"
if [ ! -f system_x86_64.raw -o ${ANDROID_PATH}/out/target/product/linaro_x86_64/system.img -nt system_x86_64.raw ]; then simg2img ${ANDROID_PATH}/out/target/product/linaro_x86_64/system.img system_x86_64.raw fi
if [ ! -f cache_x86_64.raw -o system_x86_64.raw -nt cache_x86_64.raw ]; then rm -f cache_x86_64.raw userdata_x86_64.raw mkfs.ext4 -L cache cache_x86_64.raw 256M mkfs.ext4 -L data userdata_x86_64.raw 1024M fi
${QEMU_PATH}/build/x86_64-softmmu/qemu-system-x86_64
-enable-kvm -smp 4
-append "console=tty0 vt.global_cursor_default=0 androidboot.selinux=permissive debug drm.debug=1 qemu=1"
-m 1024
-serial mon:stdio
-kernel ${LINUX_PATH}/arch/x86/boot/bzImage
-initrd ${ANDROID_PATH}/out/target/product/linaro_x86_64/ramdisk.img
-drive index=0,if=none,id=system,file=${PROJECT_PATH}/system_x86_64.raw,format=raw
-device virtio-blk-pci,drive=system
-drive index=1,if=none,id=cache,file=${PROJECT_PATH}/cache_x86_64.raw,format=raw
-device virtio-blk-pci,drive=cache
-drive index=2,if=none,id=userdata,file=${PROJECT_PATH}/userdata_x86_64.raw,format=raw
-device virtio-blk-pci,drive=userdata
-netdev user,id=mynet,hostfwd=tcp::5400-:5555 -device virtio-net-pci,netdev=mynet
-device virtio-mouse-pci -device virtio-keyboard-pci
-d guest_errors
-nodefaults
-device virtio-gpu-pci,virgl -display gtk,gl=on
$*
Did you manage to resolve this issue?
No, it seams no one cares to help here as you see. There are instructions here https://github.com/robherring/generic_device/wiki/Running-QEMU-KVM but @robherring does not seem to care answering questions. Please inform me if you solve the issue.
Sorry, things have been in a state of flux since all the O bits have landed in AOSP master (which is the only branch I work on) recently and I don't work on this full time. The daily builds at http://snapshots.linaro.org/android/robher-aosp-gendev/ are working again.
For QEMU, you need this kernel branch: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/log/?h=virgl-fence-v2
I don't know anything about the GTK GL warning above. I've not seen it. Could be GPU related? I'm using Intel graphics and have never tried any other cards with virgl.
Hi Rob, I tried the latest daily build here: http://snapshots.linaro.org/android/robher-aosp-gendev/308/linaro_x86_64-userdebug/system.img But simg2img failed to parse this file. Invalid sparse file format at header magi
I didn't see this issue with locally generated "system.img". Any idea?
The daily build image is not a sparse image.