Re: [linux-yocto] [kernel-cache][PATCH 1/2] features: add qemu-guest

2019-06-09 Thread Bruce Ashfield
On Sun, Jun 9, 2019 at 8:49 AM Adrian Freihofer
 wrote:
>
> Purpose: Provide an easy way to add ARCH_VIRT=y to the kernel configuration.
> This allows to boot ARM images compiled for real hardware in Qemu as well.
> Including this feature e.g. into the Beaglebone BSP allows to:

We already have the qemuarma15 BSP, and calling it that  for the purposes of
qemu booting was entirely on purpose.

History has shown us many times that maintaining a BSP for both h/w and
virtual boots eventually leads to conflicting requirements and compromise on
both the h/w and virtual variant.

i.e. there's not a lot of benefit outside of asking for the qemu* machines to
be used when someone wants to do a virtual boot . .and yes, I understand the
request and justification for it, I've been asked many times for something
similar to this.

That being said, if we do take something like this, the CONFIG_ARCH_VIRT, etc
of this fragment should be used by qemuarma15 as well, since that is the variant
that gets regular boot testing.

So the summary is, with some refactoring, I don't see why this can't merge.

>
>   export MACHINE="beaglebone-yocto"
>   bitbake core-image-minimale
>   runqemu
>
> This also works with the eSDK. Whithout this feature usually two different
> SDKs need to be compiled and maintained. One SDK is used for development
> in Qemu, another one is used to develop for the real target hardware.
>
> Note: For newer aarch64 devices a pci variant of this config snipped
>   might be beneficial.
>
> [Yocto #13384]
>
> Signed-off-by: Adrian Freihofer 
> ---
>  features/qemu-guest/qemu-arm-virt.cfg | 10 ++
>  features/qemu-guest/qemu-arm-virt.scc |  4 
>  2 files changed, 14 insertions(+)
>  create mode 100644 features/qemu-guest/qemu-arm-virt.cfg
>  create mode 100644 features/qemu-guest/qemu-arm-virt.scc
>
> diff --git a/features/qemu-guest/qemu-arm-virt.cfg 
> b/features/qemu-guest/qemu-arm-virt.cfg
> new file mode 100644
> index ..7aec61de
> --- /dev/null
> +++ b/features/qemu-guest/qemu-arm-virt.cfg
> @@ -0,0 +1,10 @@
> +CONFIG_ARCH_VIRT=y
> +CONFIG_VIRTIO_BLK=y
> +CONFIG_VIRTIO_BLK_SCSI=y
> +CONFIG_VIRTIO_NET=y
> +CONFIG_SERIAL_AMBA_PL011=y
> +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
> +CONFIG_HW_RANDOM=y
> +CONFIG_HW_RANDOM_VIRTIO=y
> +CONFIG_VIRTIO_MMIO=y
> +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y

We already have configuration blocks for virtio, and they should be
reused here. If
there are issues with those config fragments, we should refactor them
so they can be
reused.

Cheers,

Bruce

> diff --git a/features/qemu-guest/qemu-arm-virt.scc 
> b/features/qemu-guest/qemu-arm-virt.scc
> new file mode 100644
> index ..54682dcf
> --- /dev/null
> +++ b/features/qemu-guest/qemu-arm-virt.scc
> @@ -0,0 +1,4 @@
> +define KFEATURE_DESCRIPTION "Enable options for ARM images in Qemu"
> +define KFEATURE_COMPATIBILITY board
> +
> +kconf hardware qemu-arm-virt.cfg
> --
> 2.11.0
>
> --
> ___
> linux-yocto mailing list
> linux-yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/linux-yocto



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][PATCH 1/2] features: add qemu-guest

2019-06-09 Thread Adrian Freihofer
Purpose: Provide an easy way to add ARCH_VIRT=y to the kernel configuration.
This allows to boot ARM images compiled for real hardware in Qemu as well.
Including this feature e.g. into the Beaglebone BSP allows to:

  export MACHINE="beaglebone-yocto"
  bitbake core-image-minimale
  runqemu

This also works with the eSDK. Whithout this feature usually two different
SDKs need to be compiled and maintained. One SDK is used for development
in Qemu, another one is used to develop for the real target hardware.

Note: For newer aarch64 devices a pci variant of this config snipped
  might be beneficial.

[Yocto #13384]

Signed-off-by: Adrian Freihofer 
---
 features/qemu-guest/qemu-arm-virt.cfg | 10 ++
 features/qemu-guest/qemu-arm-virt.scc |  4 
 2 files changed, 14 insertions(+)
 create mode 100644 features/qemu-guest/qemu-arm-virt.cfg
 create mode 100644 features/qemu-guest/qemu-arm-virt.scc

diff --git a/features/qemu-guest/qemu-arm-virt.cfg 
b/features/qemu-guest/qemu-arm-virt.cfg
new file mode 100644
index ..7aec61de
--- /dev/null
+++ b/features/qemu-guest/qemu-arm-virt.cfg
@@ -0,0 +1,10 @@
+CONFIG_ARCH_VIRT=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_BLK_SCSI=y
+CONFIG_VIRTIO_NET=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
diff --git a/features/qemu-guest/qemu-arm-virt.scc 
b/features/qemu-guest/qemu-arm-virt.scc
new file mode 100644
index ..54682dcf
--- /dev/null
+++ b/features/qemu-guest/qemu-arm-virt.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable options for ARM images in Qemu"
+define KFEATURE_COMPATIBILITY board
+
+kconf hardware qemu-arm-virt.cfg
-- 
2.11.0

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto