aboutsummaryrefslogtreecommitdiff
path: root/board/qemu
Commit message (Collapse)AuthorAgeFilesLines
* configs/qemu_arm_vexpress_tz: bump versions and updateGravatar Vincent Stehlé2021-03-203-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | - Bump TF-A to version 2.4. - Bump u-boot to version 2021.01. - Bump kernel to version 5.11.3. We switch TF-A to a single FIP image. Thanks to this, TF-A does not need to use semihosting to load the various BL* anymore (but U-Boot still does). Update the readme.txt accordingly. We switch to a u-boot image for the ramdisk. This removes the need to update the fdt chosen node manually in the bootcmd. While at it, we drop the generation of the kernel dtb, which we do not use. In this config, we are indeed using the dtb generated on-the-fly by qemu and amended by TF-A. Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Gerome Burlats <gerome.burlats@smile.fr> Cc: Romain Naour <romain.naour@gmail.com> Cc: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Romain Naour <romain.naour@gmail.com> Tested-by: Romain Naour <romain.naour@gmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu: Add ppc-e500mc configurationGravatar Bin Meng2021-03-012-0/+15
| | | | | | | | This adds a 32-bit equivalent configuration of ppc64-e5500 board. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* board/qemu/sh4*: Remove linux-headers patchGravatar Geoffrey Le Gourriérec2021-01-302-152/+0
| | | | | | | | | | | | | | Previous patch about time data structures [1] provided a dirty fix that did not solve the real issue. After discussing with Linux folks on the SuperH mailing list [2], the patch was deemed unnecessary, as the problem lied in uclibc. [1] https://git.buildroot.net/buildroot/commit/?id=742f37de8d0e3797698411dfc6a63bd7e98aafe2 [2] https://patchwork.kernel.org/project/linux-sh/patch/20210123165652.10884-1-geoffrey.legourrierec@gmail.com/ Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* configs/qemu_ppc_virtex_ml507: remove defconfigGravatar Geoffrey Le Gourriérec2021-01-212-41/+0
| | | | | | | | | | | | Support for this board was removed in Linux upstream [1] since Xilinx new design tools dropped these platforms in 2013, along with all PPC405/PPC440 new designs. They are not maintained nor tested anymore. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ade8495dcfd788a76e6877c9ea86f5207369ea4 Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_*: bump kernel version to 5.10.7Gravatar Geoffrey Le Gourriérec2021-01-2110-112/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump most QEMU defconfigs (every one that was previously on 5.4.y) to latest longterm kernel 5.10.7. Please note the following exceptions/modifications: - board/qemu/qemu_s390x_defconfig: ignored (already up to date) - board/qemu/sh4*-r2d: - Remove the remaining kernel patch [1] provided by Alan Modra fixing rodata alignment, carried here by Romain Naour [2] to fix an issue preventing kernel from booting with binutils 2.23. Patch is present in upstream Linux now. - Fix compile-time error regarding 64-bit time data structures from kernel headers when building with uclibc. Previous fix [3] existed upstream; but see details below. - board/qemu/ppc-mpc8544ds: Updated kernel patch - board/qemu/arm-versatile: Updated kernel patch - board/qemu/mips*r6*: Updated kernel patch Tested on all configs/qemu* configurations. [4] [1] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html [2] https://git.busybox.net/buildroot/commit/?id=a2331c8a61bdd71c47492efc818fb0458a349219 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc94cf2092c7c1267fa2deb8388d624f50eba808 [4] https://gitlab.com/clumsyape/buildroot/-/pipelines/244024195 Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_*: bump kernel version to 5.4.88Gravatar Geoffrey Le Gourriérec2021-01-112-59/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bump QEMU defconfigs to latest longterm kernel 5.4.88. Please note that QEMU boards not based on 5.4.y were ignored: - qemu_csky810_virt_defconfig - qemu_csky807_virt_defconfig - qemu_csky610_virt_defconfig - qemu_csky860_virt_defconfig Tests were carried out on all QEMU boards using Gitlab [1] (commit message was slightly different, but the patch is identical) Additional actions needed were: - board/qemu/sh4-r2d: Remove one of the two kernel patches [2] provided by Alan Modra fixing rodata alignment, carried here by Romain Naour [3] to fix an issue preventing kernel from booting with binutils 2.23. Patch is present in upstream Linux now. [1] https://gitlab.com/clumsyape/buildroot/-/pipelines/239483891 [2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html [3] https://git.busybox.net/buildroot/commit/?id=a2331c8a61bdd71c47492efc818fb0458a349219 Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* configs/qemu_arm_vexpress_tz_defconfig: build start-qemu.shGravatar Romain Naour2020-12-052-1/+4
| | | | | | | | | | | | | | | | | When tags was added by commit 011206b2bffd509b29365bc1eaa761414ee13726 to detect the qemu command line, the qemu_arm_vexpress_tz_defconfig was ignored due to a build issue. This build issue has been fixed by previous patches, so we can enable the runtime testing by adding the tag in the readme.txt and the post-image script in the defconfig. Since Qemu from HOST_DIR is now executed directly from BINARIES_DIR, we can remove all the string before "qemu-system-*". Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/post-image.sh: execute from BINARIES_DIRGravatar Romain Naour2020-12-051-3/+6
| | | | | | | | | | | | | | | | | | | | | Usually the qemu command line start directly with "qemu-system-<arch> ...". But the command line for qemu_arm_vexpress_tz_defconfig start by doing "cd output/images && ../host/bin/qemu-system-arm". This is necessary since boot binaries, except BL1, are primarily loaded via semi-hosting so all binaries has to reside in the same directory as QEMU is started from [1]. To order to handle this case correctly, update the post-image.sh used by all qemu defconfigs to execute qemu from BINARIES_DIR. Since we have to change the current directory use a subshell to restore the current directory after Qemu execution. [1] https://github.com/ARM-software/arm-trusted-firmware/blob/4ebbea9592ab37fc62217d0ac62fa13a3e063527/docs/plat/qemu.rst Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/post-image.sh: rename IMAGE_DIR to BINARIES_DIRGravatar Romain Naour2020-12-051-3/+3
| | | | | | | | | The output/images directory is called BINARIES_DIR in the Buildroot manual, not IMAGE_DIR. Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/ppc-mpc8544ds: apply Debian patch fixing wrong mcpuGravatar Romain Naour2020-11-091-0/+53
| | | | | | | | | | | | | | | | | | | | | | When building the linux kernel for PPC_85xx cpus with GCC 8, the build fail with: powerpc-e500v2-linux-gnuspe-gcc: error: unrecognized argument in option '-mcpu=powerpc' powerpc-e500v2-linux-gnuspe-gcc: note: valid arguments to '-mcpu=' are: 8540 8548 native "GCC started treating "PowerPC" and "PowerPC SPE" as two different architectures and that's the reason for the reduced -mcpu list." [1] As suggested in the crosstool-ng issue [1], apply the Debian patch to avoid -mcpu=powerpc or -mcpu=powerpc64. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/830981654 [1] https://github.com/crosstool-ng/crosstool-ng/issues/1152 [2] https://salsa.debian.org/kernel-team/linux/-/blob/buster/debian/patches/bugfix/powerpc/powerpc-fix-mcpu-options-for-spe-only-compiler.patch Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* board/qemu/riscv64-virt: update qemu cmdline for Qemu >= 5.1Gravatar Romain Naour2020-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Since 52f188140cd28e90103edf67db6c2cabb979f5d6 (qemu version bump to 5.1), the image generated by qemu_riscv64_virt_defconfig doesn't boot anyore with the following error: rom: requested regions overlap (rom phdr #0: [...]/images//fw_jump.elf. free=0x000000008000e240, addr=0x0000000080000000) qemu-system-riscv64: rom check and register reset failed Update the qemu command line as described in the Qemu wiki for riscv64 [1] Fixes: https://gitlab.com/jugurthaB/buildroot/-/jobs/686104707 [1] https://wiki.qemu.org/Documentation/Platforms/RISCV#Booting_64-bit_OpenEmbedded_Images Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> Cc: Alistair Francis <alistair.francis@wdc.com> Cc: Mark Corbin <mark@dibsco.co.uk> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* board/qemu: add IBM s390x and Z arch supportGravatar Alexander Egorenkov2020-09-241-0/+8
| | | | | | | | | | Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> [yann.morin.1998@free.fr: - don't force network range - don't forward TCP port - drop post-build script to add tty1 ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* configs/qemu_riscv32_virt: use Linux 5.4 kernelGravatar Alistair Francis2020-09-032-67/+1
| | | | | | | | Now that RISC-V 32-bit (RV32) support has been merged into mainline glibc, we can use the Linux 5.4 kernel. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_mips64r6: fix Linux kernel build with gcc 10.xGravatar Romain Naour2020-08-052-0/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | From [1] "GCC 10 (PR 91233) won't silently allow registers that are not architecturally available to be present in the clobber list anymore, resulting in build failure for mips*r6 targets in form of: ... .../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target 146 | __asm__ volatile ( \ | ^~~~~~~ This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. This patch provides the alternative clobber list for r6 targets that won't include those registers." Since kernel 5.4 and mips support for generic vDSO [2], the kernel fails to build for mips r6 cpus with gcc 10 for the same reason as glibc. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d Fixes: https://gitlab.com/kubu93/buildroot/-/jobs/655618363 https://gitlab.com/kubu93/buildroot/-/jobs/655618364 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_mips32r6: fix Linux kernel build with gcc 10.xGravatar Romain Naour2020-08-052-0/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | From [1]: "GCC 10 (PR 91233) won't silently allow registers that are not architecturally available to be present in the clobber list anymore, resulting in build failure for mips*r6 targets in form of: ... .../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target 146 | __asm__ volatile ( \ | ^~~~~~~ This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. This patch provides the alternative clobber list for r6 targets that won't include those registers." Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build for mips r6 cpus with gcc 10 for the same reason as glibc. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d Fixes: https://gitlab.com/kubu93/buildroot/-/jobs/655618359 https://gitlab.com/kubu93/buildroot/-/jobs/655618360 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: enable VIRTIO_FS driverGravatar Romain Naour2020-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | virtio-fs allow sharing a directory between the host and the guest. It require virtiofsd daemon running before starting Qemu. The wiki [1] recommand to enable the following kernel options: CONFIG_VIRTIO CONFIG_VIRTIO_FS CONFIG_DAX CONFIG_FS_DAX CONFIG_DAX_DRIVER CONFIG_ZONE_DEVICE But virtio-fs works fine with only VIRTIO_FS. Note: ZONE_DEVICE can only be enabled on aarch64 since kernel >= 5.7. ARCH_ENABLE_MEMORY_HOTREMOVE support is missing for previous kernel [2]. [1] https://virtio-fs.gitlab.io/howto-qemu.html [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bbd6ec605c0fc286c3f8ce60b4ed44635361d58b Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: enable TPM tis supportGravatar Romain Naour2020-07-111-0/+2
| | | | | | | | | | | Qemu aarch64 virt machine support TPM using a swtmp [1] TPM emulator provided on the qemu command line [2]. [1] https://github.com/stefanberger/swtpm/wiki [2] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=c294ac327ca99342b90bd3a83d2cef9b447afaa7 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: enable ARM_SMMU_V3Gravatar Romain Naour2020-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | >From [1]: Support for implementations of the ARM System MMU architecture version 3 providing translation support to a PCIe root complex. ARM SMMU is supported since Qemu v3.0.0 [2]. ARM_SMMU_V3 can be enabled with: -M virt,iommu=smmuv3 dmesg: arm-smmu-v3 9050000.smmuv3: ias 44-bit, oas 44-bit (features 0x00000305) arm-smmu-v3 9050000.smmuv3: allocated 262144 entries for cmdq arm-smmu-v3 9050000.smmuv3: allocated 131072 entries for evtq [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/iommu/Kconfig?h=v5.4.42#n390 [2] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=527773eeef9f2225370f9c17c35074b2ed0ced92 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: enable QEMU firmware configuration ↵Gravatar Romain Naour2020-07-111-0/+2
| | | | | | | | | | | | | | | | | (fw_cfg) >From [1]: This kernel option allow exporting of the QEMU firmware configuration (fw_cfg) file entries via sysfs. Entries are found under /sys/firmware/fw_cfg when this option is enabled and loaded. Enable the suboption to allow the qemu_fw_cfg device to be initialized via the kernel command line or using a module parameter. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/firmware/Kconfig?h=v5.4.42#n187 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: enable VIRTIO_GPU driverGravatar Romain Naour2020-07-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is intended to be used by mesa virgl Gallium on the guest. virtio-gpu is enabled by adding "-device virtio-gpu-pci" on the qemu command line. It's detected by lspci and dmesg log: $ lspci 00:01.0 Display controller: Red Hat, Inc. Virtio GPU (rev 01) $ dmesg virtio-pci 0000:00:01.0: enabling device (0000 -> 0002) [drm] pci: virtio-gpu-pci detected at 0000:00:01.0 [drm] virgl 3d acceleration not supported by host [drm] EDID support available. [TTM] Zone kernel: Available graphics memory: 51876 KiB [TTM] Initializing pool allocator [TTM] Initializing DMA pool allocator [drm] number of scanouts: 1 [drm] number of cap sets: 0 [drm] Initialized virtio_gpu 0.1.0 0 for virtio2 on minor 0 The framebuffer interface fb0 is now present in /dev $ ls /dev/fb* /dev/fb0 See: https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/ https://at.projects.genivi.org/wiki/display/WIK4/GENIVI+Technical+Summit+Session+Content+2018?preview=%2F28412356%2F28412481%2F2018-10-11_GeniviBangalorTechSummit_Virtio_GPU.pdf Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: enable PCIe and PCI host generic driverGravatar Romain Naour2020-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the CONFIG_PCI symbol due a change in kernel 5.0 [1]. The option was previously enabled by default (default y). "PCI: consolidate PCI config entry in drivers/pci There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAVE_PCI symbol that indicates availability of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the rest in drivers/pci." Qemu aarch64 provide a PCIe Host bridge but it require CONFIG_PCI_HOST_GENERIC enabled in the kernel. With CONFIG_PCI_HOST_GENERIC enabled PCIe host bridge is detected: $ dmesg pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges: pci-host-generic 4010000000.pcie: IO 0x3eff0000..0x3effffff -> 0x00000000 pci-host-generic 4010000000.pcie: MEM 0x10000000..0x3efeffff -> 0x10000000 pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000 pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000 $ lspci 00:00.0 Host bridge: Red Hat, Inc. QEMU PCIe Host bridge [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=eb01d42a77785ff96b6e66a2a2e7027fc6d78e4a Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: add RTC PL031 driverGravatar Romain Naour2020-07-111-0/+1
| | | | | | | | | | | Qemu for the aarch64 virt emulate an RTC PL031 device. Enable the kernel support to allow setting the system time. "date" now return the current time: Sun Jul 5 20:38:50 UTC 2020 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/aarch64-virt/linux.config: regenerate after kernel version bumpGravatar Romain Naour2020-07-111-3/+3
| | | | | | | Regenerate the with savedefconfig. Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/sh4-r2d: fix sh4 kernel bug with binutils 2.33Gravatar Romain Naour2020-06-244-0/+123
| | | | | | | | | | | | Remove the binutils patch reverting [1] that triggers a sh4 kernel bug with binutils >= 2.33. Instead, add two kernel patches provided by Alan Modra [2] that fix alignment of rodata. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e [2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_sh4{, eb}-r2d: remove kernel patch "restore the old sh-sci ↵Gravatar Romain Naour2020-04-272-122/+0
| | | | | | | | | | | | | | | | | | driver behaviour" This reverts commit f7a887c3682282a281206bca61724a750c326b3d and 23aee3eac497f15f901ddf99ab3aa81af747f7e5 since the kernel patch is not needed as soon as qemu >= 3.1.0 is used with a kernel >= 4.11-rc1. The qemu emulation of sh-sci driver was fixed by adding basic timeout handling for 9600 bps [1]. [1] https://git.qemu.org/?p=qemu.git;a=commit;h=71bb4ce1b5592cdc03abc48cdf4ecb15b2db81a0 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu: remove the Qemu version from readme.txtGravatar Romain Naour2020-04-2634-69/+0
| | | | | | | | | | | | | | | | | | | | | | The Qemu version present in readme.txt files was needed when the Buildroot's Qemu defconfig was tested manually using the qemu-system-<arch> binary already present on the host. This information is now incorrect since we are using host-qemu package, currently at 4.2.0 version, to do a runtime test since 0c7935063851accf3db4c9eb2fc4f11c3da0c391. For m68k-q800, we can use the upstream qemu since 4.2.0 release [1]. So, remove this line from the readme.txt. [1] https://www.qemu.org/2019/12/13/qemu-4-2-0/ Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* configs/qemu: update defconfigs to Linux 5.4.35Gravatar Romain Naour2020-04-253-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux version are changed to the new LTS kernel 5.4.35 for all qemu defconfigs, except for riscv and csky. Thoses defconfigs are left unchanged because they require either a custom Linux repository or a specific kernel header version causing some difficulties when upgrading to 5.4.35. Update the nios2-10m50 linux.fragment to update the .dtb build directory due to a change in kernel 4.20 [1]: nios2: build .dtb files in dts directory Align nios2 with other architectures which build the dtb files in the same directory as the dts files. This is also in line with most other build targets which are located in the same directory as the source. This move will help enable the 'dtbs' target which builds all the dtbs regardless of kernel config. This transition could break some scripts if they expect dtb files in the old location. For x86 and x86_64 kernel, add the CONFIG_PCI symbol due a change in kernel 5.0 [2]. The option was previously enabled by default (default y). PCI: consolidate PCI config entry in drivers/pci There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAVE_PCI symbol that indicates availability of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the rest in drivers/pci. Update the kernel of ppc-mac99 defconfig added in Buildroot 2019.08. This version bump was tested on gitlab [4] using the newly introduced boot-qemu-image.py script [5]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=118864869805123bf82d666062542440a0fda5dd [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=eb01d42a77785ff96b6e66a2a2e7027fc6d78e4a [3] a8fac3fcfc2c71c8a30d28c3d2e74646490502c2 [4] https://gitlab.com/kubu93/buildroot/pipelines/139819874 [5] 0c7935063851accf3db4c9eb2fc4f11c3da0c391 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/microblaze: convert kernel patch to git formatGravatar Romain Naour2020-04-254-22/+68
| | | | | | | | | | | | Convert the patch for microblaze kernel added for kernel 3.14 by Waldemar to git format. Note: the Waldemar Sob line is missing in the original patch: fa2798548368d51998fad18d7f6d1ae0ed065b33 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu: add post-image script for gitlab qemu testingGravatar Romain Naour2020-04-131-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit add a post-image script to be used by each qemu board defconfig in order to generate start-qemu.sh in BINARIES_DIR. The start-qemu.sh script can be used by Buildroot user to start Qemu or by a gitlab CI. To find the correct qemu command line, we use the second post script argument which must contain "$(BR2_DEFCONFIG)" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" The post-image script expect something like "/path/to/qemu_aarch64_virt_defconfig" in BR2_DEFCONFIG. Doing a basename allow to retrieve the name of the defconfig file that should match on on the "tag" previously introduced in readme.txt files. For running in the CI, as well as running from a remote machine (e.g. on a remote build machine), it is better not to start in graphical mode, but only with the serial line attached to the terminal. The post-build script prepares two sets of arguments for each case, graphical or serial, and stores them in the start-qemu.sh script, which then decodes which to use, based on an argument on the command line (default is still graphical) sh4/sh4eb needs a special handling by adding "-serial stdio -display none"; others only require "-nographics". Some qemu command lines already contain "-serial stdio", but that does not play nicely with "-nographics", we remove that when going serial-only (although this might seem counter-intuitive). Finally, we ensure the script uses our qemu-system (if it was built). Signed-off-by: Romain Naour <romain.naour@smile.fr> [yann.morin.1998@free.fr: - drop the knowledge about gitlab-ci, replace with an argument to pass to start-qemu.sh - adapt the commit log accordingly ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* board/qemu: add defconfig file name as tag after the qemu command lineGravatar Romain Naour2020-04-1334-38/+43
| | | | | | | | | | | | | | | | | This commit add the name of the Qemu defconfig file after each qemu command line in order to retrieve it easily. Since a readme.txt can be shared between several Qemu defconfig, we need at least one qemu command line in readme.txt for each defconfig. For now, ignore the qemu_arm_vexpress_tz_defconfig since it fail to build due to python script issue [1]. Anyway the arm vexpress boot is tested with qemu_arm_vexpress_defconfig. [1] http://lists.busybox.net/pipermail/buildroot/2020-February/273738.html Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* configs/qemu{x86, x86_64}: add a serial consoleGravatar Romain Naour2020-02-164-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Buildroot defconfigs for qemu_x86 and qemu_x86_64 instantiate a console on tty1, which appears on QEMU's graphical window. Add a console on the serial port (ttyS0) to be used later for gitlab testing. This change is need since the script used for gitlab testing needs to use a serial output with pexpect. This change is similar to the one made for raspberrypi [1] to handle HDMI and serial console: This requires three changes: 1. have two 'console=' entries in the kernel command line: tty1, then ttyS0; 2. change BR2_TARGET_GENERIC_GETTY_PORT to "console", so it starts a getty on the last console= passed to the kernel, ttyS0; 3. add a new getty on tty1 to the generated inittab. Step 2 is actually obtained by removing BR2_TARGET_GENERIC_GETTY_PORT entirely from the defconfigs, since "console" is the default value. Step 3 requires a post-build script since the Buildroot makefiles can configure only one console. Note: instead of simply adding a new getty on ttyS0 (which would work) this patch actually changes BR2_TARGET_GENERIC_GETTY_PORT to instantiate a console on UART, then adds back tty1 via post-build.sh. This is done only to avoid the "GENERIC_SERIAL" comment where we instantiate a console on QEMU graphical window, then instantiate a really-serial console on another line. The result is these two inittab lines: console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window [1] 20878a1017e2bf7eb8c5f870dc6d2641493cb0f9 Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* board/qemu/arm-vexpress-tz: fixup GDB config infoGravatar Etienne Carriere2019-10-291-2/+2
| | | | | | | | | | | Fixes reference path "../build/optee_os-" to "./output/build/optee-os-" as package is optee-os and symbol file here is reached from BR top dir and assuming output in output/. Updates GDB tool name to arm-linux-gdb. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* configs/qemu_arm_vexpress_tz: Armv7-A emulation with TrustZone servicesGravatar Etienne Carriere2019-10-274-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a Qemu board for an Armv7-A target executing with OP-TEE secure world services. The target Linux based normal world embeds the standard minimal filesystem with OP-TEE non-secure components embedded files from OP-TEE test, examples and benchmark packages. qemu_arm_vexpress_tz_defconfig differs from qemu_arm_vexpress_defconfig. Supporting both secure and non-secure worlds on the Arm target mandates a secure world, here OP-TEE OS, and a bootloader to boot both worlds, here TF-A (boot/arm-trusted-firmware). Here non-secure Linux kernel is booted through U-boot TF-A bootloader (BL1/BL2) => OP-TEE (BL32) => U-boot (BL33). | Executes as secure | Secure | Execs as Non-secure | Loads BL32/BL33 in RAM | Jumps to BL33 | Always booted after | Jumps to BL32 once done | as Non-secure | secure world inits Vexpress and vexpress-tz defconfigs also differs in that Qemu emulates a Cortex-A9 in the former and a Cortex-A15 in the later. Cortex-A15 is the Armv7-A CPU used in upstream TF-A and OP-TEE OS packages hence selected here. Defconfig adds a fragment to the Linux kernel native configuration to enable OP-TEE driver support. Defconfig adds a fragment to the U-Boot native configuration set boot command, enable semihosting and remove U-Boot persistent environment storage support. The defconfig also enables build of the Qemu emulator in case the system installed Qemu does not yet support CPU TrustZone secure state. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> [Arnout, with the help of Peter: correct spelling mistakes in readme, fix U-Boot version to 2019.01, download tarball of TF-A instead of git] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* configs/csky_gx6605s: bump kernel to 5.0 and use buildroot toolchainGravatar Guo Ren2019-08-021-0/+1
| | | | | | | | | | | | | | | The most important change is to use the toolchain compiled by buildroot itself. We also bump kernel to 5.0 with kernel.org. Gx6605s' PHYS_OFFSET if 0x10000000 and we make qemu and gx6605s the same to ease maintaince. This PHYS_OFFSET is also OK for 610 qemu. In this patch we add gx6605s.dts in board/csky, because linux-5.0 doesn't contain gx6605s.dts in its tree. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_cskyXXX_virt: new defconfigGravatar Guo Ren2019-08-025-0/+36
| | | | | | | | Add C-SKY defconfig for QEMU virt machine. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board: Add PowerPC mac99Gravatar Joel Stanley2019-08-012-0/+8
| | | | | | | | | | | PowerPC kernel developers were after a userspace for testing 32-bit powerpc kernels. This machine both suits that requirement and has support in qemu. It's also a fairly common piece of 32-bit ppc hardware. Signed-off-by: Joel Stanley <joel@jms.id.au> Tested-by: Daniel Axtens <dja@axtens.net> [Peter: lock kernel/headers to 5.2.4] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* board/qemu: ensure root is available before mounting itGravatar Yann E. MORIN2019-06-2524-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | On my machine, it happens once in a while that the virtualised machine boots too fast for the rootfs to be available at the time the kernel tries to mount it. For example, board/qemu/arm-vexpress/readme.txt suggested changing "-smp 1" up to "-smp 4". But doing so here causes a kernel panic: VFS: Cannot open root device "mmcblk0" or unknown-block(0,0): error -6 Please append a correct "root=" boot option; here are the available partitions: 1f00 131072 mtdblock0 (driver?) 1f01 32768 mtdblock1 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) So, add the oh-so-useful 'rootwait' option to all kernel command lines for qemu defconfigs. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Joel Stanley <joel@jms.id.au> Cc: Mark Corbin <mark.corbin@embecosm.com> Cc: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* configs/qemu_riscv32_virt: update to 5.1 kernelGravatar Alistair Francis2019-06-202-12/+66
| | | | | | | | Update the 32-bit defconfig to use the latest kernel. This requires a patch to revert a ABI to ensure that the glibc port continues to work. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_riscv*_virt: use OpenSBI by defaultGravatar Alistair Francis2019-03-262-6/+6
| | | | | | | Use OpenSBI by default instead of riscv-pk (BBL). Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/riscv32-virt: simplify the linux configGravatar Alistair Francis2019-03-261-96/+4
| | | | | | | | | Reduce the config fragment to the bare minimum to enable 32-bit support. This means we are as close as possible to the arch defconfig. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* board/qemu/riscv32-virt: convert Linux defconfig into a fragmentGravatar Alistair Francis2019-03-262-23/+104
| | | | | | | | | Convert the config to the arch defconfig plus a fragment. When this fragment is applied we will generate the same config as we previously did. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu: Update defconfigs to Linux 4.19.16Gravatar Gerome Burlats2019-02-132-22/+52
| | | | | | | | | | | | | | | | | | | | | | Linux version are changed to 4.19.16 (LTS) for all qemu defconfigs, except for riscv. riscv defconfigs are left unchanged because they have a custom Linux repository causing more difficulties when upgrading to 4.19 for riscv32. And for the riscv64, it has been updated recently to Linux 4.20 by another contributor. Patch for arm-versatile-nommu is changed into a git format Add cache attributes for xtensa-lx60-nommu config because the commit https://github.com/torvalds/linux/commit/7bb516ca5424e12b42124fab2906b6da9c81ba9c added a new config variable for memory cache attribute: CONFIG_MEMMAP_CACHEATTR All these updated configs have been built successfully. Signed-off-by: Gerome Burlats <gerome.burlats@smile.fr> Cc: Romain Naour <romain.naour@smile.fr> Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* qemu/aarch64-virt: Emulate cortex-a53 in qemu to match Buildroot configGravatar Gerome Burlats2019-01-271-1/+1
| | | | | | | | | | | qemu_aarch64_virt_defconfig (implicitly) specifies cortex-a53, so adjust the QEMU command line to also emulate a a53 instead of a57. Also adjust the defconfig to explicitly specify a53 for consistency/clarity. Signed-off-by: Gerome Burlats <gerome.burlats@smile.fr> Cc: Romain Naour <romain.naour@smile.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* configs/qemu_riscv64_virt_defconfig: bump Linux versionGravatar Gwenhael Goavec-Merou2019-01-221-23/+0
| | | | | | | | Since riscv64 works with linux default defconfig, this patch drop custom config. Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Tested-by: Mark Corbin <mark.corbin@embecosm.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* configs/qemu_riscv32_virt: new defconfigGravatar Mark Corbin2019-01-062-0/+30
| | | | | | | | | | | Add RISC-V 32-bit defconfig for QEMU virt machine. Tested with QEMU 2.12.1 Signed-off-by: Mark Corbin <mark.corbin@embecosm.com> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> [Thomas: regenerate .gitlab-ci.yml, update DEVELOPERS file] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_riscv64_virt: new defconfigGravatar Mark Corbin2018-09-252-0/+30
| | | | | | | | | Add RISC-V 64-bit defconfig for QEMU virt machine. Tested with QEMU 2.12.1 Signed-off-by: Mark Corbin <mark.corbin@embecosm.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_sh4eb-r2d: restore the old sh-sci driver behaviourGravatar Romain Naour2018-08-051-0/+61
| | | | | | | | | | | As for sh4-r2d (little-endian) restore the old sh-sci driver behaviour for sh4eb-r2d. Tested with qemu_sh4eb_r2d_defconfig. Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* configs/qemu_sh4-r2d: restore the old sh-sci driver behaviourGravatar Romain Naour2018-08-051-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 18e8cf159177100e69d528293f8cf6875c0b1bca (kernel) The last Qemu kernel update [1] introduced a regresion in sh4 SCIF serial device. Some keyboard presses are very slow to be taken into account, perhaps not even taken into account at all. This would explain why our test infrastructure doesn’t manage to login as root [2][3][4]. git bisect reported a kernel patch from 4.11, increasing RX FIFO trigger defaults value for sh-sci (H)SCIF. The kernel patch itself looks good but the Qemu emulation is not ready to handle this new setting. >From Qemu (2.12.0): target/sh4/README.sh4 "Configuration of the second serial port (SCIF) is supported. FIFO handling infrastructure has been started but is not completed yet." We can't use the first serial port (ttySC0) because it's the second SH UART that's emulated by Qemu. In order to be able to test sh4 architecture with newer kernel, revert to the old behaviour. [1] 03fb00f2175cdb4565e26fcb9b3da1c1059de1bd [2] https://gitlab.com/free-electrons/toolchains-builder/-/jobs/72006425 [3] https://gitlab.com/free-electrons/toolchains-builder/-/jobs/72006427 [4] https://gitlab.com/free-electrons/toolchains-builder/-/jobs/72006426 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* qemu: update defconfigs to Linux 4.16.7Gravatar Waldemar Brodkorb2018-06-0258-57/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All linux configs are renamed to a version neutral filename to avoid further renaming on kernel bumps. Defconfig Kernel Qemu Network Status -------------------------------------------------------------- aarch64_virt 4.16.7 2.12.0 YES OK arm_versatile 4.16.7 2.12.0 YES OK arm_versatile_nommu 4.16.7 2.12.0 YES OK (3) arm_vexpress 4.16.7 2.12.0 YES OK m68k_mcf5208 4.16.7 2.12.0 YES OK m68k_q800 4.16.7 q800-v2.11.0 NO (2) OK microblazebe 4.16.7 2.12.0 YES OK microblazeel 4.16.7 2.12.0 YES OK mips32r2el_malta 4.16.7 2.12.0 YES OK mips32r2_malta 4.16.7 2.12.0 YES OK mips32r6el_malta 4.16.7 2.12.0 YES OK mips32r6_malta 4.16.7 2.12.0 YES OK mips64el_malta 4.16.7 2.12.0 YES OK mips64_malta 4.16.7 2.12.0 YES OK mips64r6el_malta 4.16.7 2.12.0 YES OK mips64r6_malta 4.16.7 2.12.0 YES OK nios2-10m50 4.16.7 2.12.0 NO OK or1k 4.16.7 2.12.0 NO OK ppc_g3beige 4.16.7 2.12.0 YES OK ppc_mpc8544ds 4.16.7 2.12.0 YES OK ppc_virtex_ml507 4.16.7 2.12.0 NO OK ppc64_pseries 4.16.7 2.12.0 YES OK ppc64le_pseries 4.16.7 2.12.0 YES OK ppc64_e5500 4.16.7 2.12.0 YES OK sh4 4.16.7 2.12.0 YES OK sh4eb 4.16.7 2.12.0 NO (1) OK sparc_ss10 4.16.7 2.12.0 YES OK sparc64_sun4u 4.16.7 2.12.0 YES OK x86 4.16.7 2.12.0 YES OK x86_64 4.16.7 2.12.0 YES OK xtensa_lx60 4.16.7 2.12.0 YES OK xtensa_lx60_nommu 4.16.7 2.12.0 YES OK (1) - Probably an endian issue with 8139 emulation/driver (2) - There's a network interface, but enabling it in qemu fails (3) - Kernel patch required, switched to devicetree usage Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* qemu_ppc64_e5500_defconfig: convert quotes in readme.txt emulation exampleGravatar Matt Weber2018-04-031-1/+1
| | | | | | | | | | | Resolves an error in the way the bootlin toolchain-builder uses the board/qemu/ppc64-e5500/readme.txt to generate the qemu test command. https://github.com/free-electrons/toolchains-builder/blob/master/build.sh#L186 Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>