| Summary: | Support runqemu for MACHINE=beaglebone-yocto | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Adrian Freihofer <adrian.freihofer> |
| Component: | Scripts and Tools | Assignee: | Adrian Freihofer <adrian.freihofer> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | adrian.freihofer, randy.macleod, ross.burton |
| Version: | 3.0 | ||
| Target Milestone: | 3.0 | ||
| Hardware: | BeagleBone | ||
| OS: | arm | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Adrian Freihofer
2019-06-09 12:37:58 UTC
Step 1: Kernel config feature has been sent to the mailing list: https://lists.yoctoproject.org/pipermail/linux-yocto/2019-June/007754.html Step 2: Is blocked until step 1 is merged. The patch is ready and will be sent to the mailing list if this enhancement gets accepted: diff --git a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf index 35814cd8f1..5991f50e0c 100644 --- a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf +++ b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf @@ -20,7 +20,7 @@ WKS_FILE ?= "beaglebone-yocto.wks" IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage" do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot u-boot:do_deploy" -SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0" +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" @@ -39,3 +39,21 @@ UBOOT_LOADADDRESS = "0x80008000" MACHINE_FEATURES = "usbgadget usbhost vfat alsa" IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" + +# support runqemu +EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" +IMAGE_CLASSES += "qemuboot" +QB_DEFAULT_FSTYPE = "wic" +QB_FSINFO = "wic:no-kernel-in-fs" +QB_KERNEL_ROOT = "/dev/vda2" +QB_SYSTEM_NAME = "qemu-system-arm" +QB_MEM = "-m 512" +QB_MACHINE = "-machine virt" +QB_CPU = "-cpu cortex-a15" +QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0 systemd.mask=systemd-networkd" +QB_OPT_APPEND = "-device virtio-rng-device -nographic" +QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" +QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" +QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" +QB_SERIAL_OPT = "" +QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" This would be convenient but it would require work to maintain and do QA for this machine. If this is accepted, are you able to commit to doing this work? Hi Randy, It's a fair question. But I don't see much effort for maintenance. Of course I will try to keep this feature running in the future. But just to make that clear. It's not my intention to make "MACHINE=beaglebone runqemu" an important Yocto feature with QA and a build job on the autombuilder. I don't see much value in it, because qemuarm MACHINE is 99% equal and well maintained. The current situation is that runqemu does not work for MACHINE=beaglebone. I just want to fix this because it is easy to fix and could serve as a general example for booting ARM-based devices in Qemu without compiling an additional MACHINE such as qemuarm. My main goal is to be able to perform image tests on a CI infrastructure with as little additional build effort as possible. The patch will be very simple, without affecting anything else in Yocto. Regards, Adrian A v2 kernel config for bb was sent to the list: https://lists.yoctoproject.org/pipermail/linux-yocto/2019-June/007768.html With this patch runqemu just runs, also with graphics. 2.8 is now 3.0 so fix up the Version and Milestone entries. |