Arm-generic build of chromium OS not working on QEMU

275 views
Skip to first unread message

vineet bajaj

unread,
Dec 14, 2016, 7:08:44 AM12/14/16
to Chromium OS discuss
Hi,

I have been trying to get arm64-llvmpipe to boot on qemu but with no luck. After that i tried x86-generic build of chromiuym os which worked fine. After that i tried arm-generic which again is not working. Doesnt qemu has support for arm architecture. 

I ran the following sequence of Commands

within chroot:
export BOARD=arm-generic
./setup_board --board=${BOARD}
./image_to_vm.sh --board=${BOARD} --test_image
./build_image --board=${BOARD} --noenable_rootfs_verification test
./image_to_vm.sh --board=${BOARD} --test_image


Outside chroot:
./bin/cros_start_vm --image_path=../build/images/${BOARD}/latest/chromiumos_qemu_image.bin


cros_start_vm runs the following command to start the KVM qemu:

INFO    : Launching: /home/mahesh/chromiumos/chroot/usr/bin/qemu-system-x86_64 -enable-kvm -m 2G -smp 4 -vga cirrus -pidfile /tmp/kvm.17296.pid -chardev pipe,id=control_pipe,path=/tmp/kvm.17296.monitor -serial file:/tmp/kvm.17296.serial -mon chardev=control_pipe -daemonize -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9222-:22 -drive file=../build/images/arm-generic/latest/chromiumos_qemu_image.bin,index=0,media=disk,cache=unsafe



Above is the exact same command that is run for x86-generic. Do we need to specify somewhere the type of build flavour?

Any help is greatly appreciated.

Thanks,
Vineet







Nathan

unread,
Dec 14, 2016, 9:37:15 AM12/14/16
to Chromium OS discuss
Have you tried running the qemu command manually but using qemu-system-arm instead?

Nathan

Mike Frysinger

unread,
Dec 14, 2016, 11:13:38 AM12/14/16
to friendl...@gmail.com, Chromium OS discuss
currently you have to specify the qemu-system-xxx binary to use via the --qemu_binary flag to cros_start_vm
-mike

--
--
Chromium OS discuss mailing list: chromium-os-discuss@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en


vineet bajaj

unread,
Dec 20, 2016, 5:17:27 AM12/20/16
to Chromium OS discuss, friendl...@gmail.com
Hi,

I tried the following command 
/bin/cros_start_vm --image_path=../build/images/${BOARD}/latest/chromiumos_qemu_image.bin --qemu_binary=/home/mahesh/chromiumos/chroot/usr/bin/qemu-system-arm

But, with this i am getting following error: 


"Starting a KVM instance
INFO    : Launching: /home/mahesh/chromiumos/chroot/usr/bin/qemu-system-arm -m 2G -smp 4 -vga cirrus -pidfile /tmp/kvm.32229.pid -chardev pipe,id=control_pipe,path=/tmp/kvm.32229.monitor -serial file:/tmp/kvm.32229.serial -mon chardev=control_pipe -daemonize -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9222-:22 -drive file=../build/images/arm-generic/latest/chromiumos_qemu_image.bin,index=0,media=disk,cache=unsafe
qemu-system-arm: No machine specified, and there is no default
Use -machine help to list supported machines"


Then i tried with the qemu_system_arm binary directly with -machine virt. The full command was following: 

/home/mahesh/chromiumos/chroot/usr/bin/qemu-system-arm -m 2G -machine virt -smp 4 -vga cirrus -pidfile /tmp/kvm.32229.pid -chardev pipe,id=control_pipe,path=/tmp/kvm.32229.monitor -serial file:/tmp/kvm.32229.serial -mon chardev=control_pipe -daemonize -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9222-:22 -drive file=../build/images/arm-generic/latest/chromiumos_qemu_image.bin,index=0,media=disk,cache=unsafe

Even with the above command i got following error: 
qemu-system-arm: -chardev pipe,id=control_pipe,path=/tmp/kvm.32229.monitor: Could not open '/tmp/kvm.32229.monitor': No such file or directory


Any pointers that i can try?

Regards,
Vineet

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org

vineet bajaj

unread,
Dec 20, 2016, 7:52:11 AM12/20/16
to Chromium OS discuss, Mike Frysinger, nat...@lenovo-chrome.com, vineet bajaj
Hi Mike and Nathan,

Anything that I can give a try. A bit stumped here.

Regards,
Vineet

Nathan

unread,
Dec 20, 2016, 9:27:55 AM12/20/16
to Chromium OS discuss, friendl...@gmail.com
Hi Vineet,

You can just remove the -chardev, -serial, and -monitor command line flags if you don't intend to use that functionality.

If you do, you can type 'mkfifo /tmp/kvm.monitor' and then use that file as the parameter to -chardev (32229 is the pid of your particular KVM instance and allows you to run multiple QEMU sessions in parallel; it's not some magic number).

Cheers,

Nathan

vineet bajaj

unread,
Jan 4, 2017, 6:11:16 AM1/4/17
to Nathan, Chromium OS discuss
Hi,

I have removed all the above command line flags. After that I am getting following error: 

"kvm" accelerator not found.
No accelerator found!


I used the following command: 

mahesh@mahesh-chrome:~/chromiumos/src/scripts$ /home/mahesh/chromiumos/chroot/usr/bin/qemu-system-arm -machine virt -enable-kvm -m 2G -smp 4 -vga cirrus -pidfile /tmp/kvm.3666.pid -daemonize -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9222-:22 -drive file=../build/images/x86-generic/latest/chromiumos_qemu_image.bin,index=0,media=disk,cache=unsafe



The following command worked for x86-generic board::
/home/mahesh/chromiumos/chroot/usr/bin/qemu-system-x86_64 -enable-kvm -m 2G -smp 4 -vga cirrus -pidfile /tmp/kvm.3666.pid -daemonize -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9222-:22 -drive file=../build/images/x86-generic/latest/chromiumos_qemu_image.bin,index=0,media=disk,cache=unsafe

If i Use the same command line flags for qemu-system-arm then it throws up error as no default machine specified. So i added one extra flag in qemu-system-arm command which is  -machine virt. After this it throws up the above mentioned error of "kvm" accelerator not found.



Regards,
Vineet










Mike Frysinger

unread,
Jan 4, 2017, 2:13:23 PM1/4/17
to vineet bajaj, Nathan, Chromium OS discuss
-enable-kvm only works when using a target that matches the host cpu.  i.e. if you're running on an x86_64 desktop, it only works with qemu-system-x86_64.  so drop the flag.
-mike

Chromium OS discuss mailing list: chromium-os-discuss@chromium.org
Reply all
Reply to author
Forward
0 new messages