diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-06-28 02:02:10 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-07-30 02:48:15 +0200 |
commit | 935776c63a3ea7f0cee77f5af5d66fbd97def3d4 (patch) | |
tree | 0df5db2e23febd9911592f04ae36d322e5c0f9c9 | |
parent | wireguard: selftests: support UML (diff) | |
download | wireguard-linux-935776c63a3ea7f0cee77f5af5d66fbd97def3d4.tar.xz wireguard-linux-935776c63a3ea7f0cee77f5af5d66fbd97def3d4.zip |
wireguard: selftests: support OpenRISCjd/new-archs
Stafford and I have been using this to shake out OpenRISC bugs, and it's
been a great help, so it's time OpenRISC support for the WireGuard test
suite is made into a proper commit. The QEMU changes necessary for this
to work should also be around the corner now, and they seem some what
stationary in their interface too.
Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | tools/testing/selftests/wireguard/qemu/Makefile | 13 | ||||
-rw-r--r-- | tools/testing/selftests/wireguard/qemu/arch/or1k.config | 22 |
2 files changed, 34 insertions, 1 deletions
diff --git a/tools/testing/selftests/wireguard/qemu/Makefile b/tools/testing/selftests/wireguard/qemu/Makefile index fda76282d34b..11e367c962f2 100644 --- a/tools/testing/selftests/wireguard/qemu/Makefile +++ b/tools/testing/selftests/wireguard/qemu/Makefile @@ -248,13 +248,24 @@ QEMU_MACHINE := -cpu host,accel=kvm -machine s390-ccw-virtio -append $(KERNEL_CM else QEMU_MACHINE := -cpu max -machine s390-ccw-virtio -append $(KERNEL_CMDLINE) endif +else ifeq ($(ARCH),or1k) +CHOST := or1k-linux-musl +QEMU_ARCH := or1k +KERNEL_ARCH := openrisc +KERNEL_BZIMAGE := $(KERNEL_BUILD_PATH)/vmlinux +QEMU_VPORT_RESULT := virtio-serial-device +ifeq ($(HOST_ARCH),$(ARCH)) +QEMU_MACHINE := -cpu host,accel=kvm -machine virt +else +QEMU_MACHINE := -cpu or1200 -machine virt +endif else ifeq ($(ARCH),um) CHOST := $(HOST_ARCH)-linux-musl KERNEL_BZIMAGE := $(KERNEL_BUILD_PATH)/vmlinux KERNEL_ARCH := um KERNEL_CMDLINE := $(shell sed -n 's/CONFIG_CMDLINE=\(.*\)/\1/p' arch/um.config) else -$(error I only build: x86_64, i686, arm, armeb, aarch64, aarch64_be, mips, mipsel, mips64, mips64el, powerpc64, powerpc64le, powerpc, m68k, riscv64, riscv32, s390x, um) +$(error I only build: x86_64, i686, arm, armeb, aarch64, aarch64_be, mips, mipsel, mips64, mips64el, powerpc64, powerpc64le, powerpc, m68k, riscv64, riscv32, s390x, or1k, um) endif TOOLCHAIN_FILENAME := $(CHOST)-cross.tgz diff --git a/tools/testing/selftests/wireguard/qemu/arch/or1k.config b/tools/testing/selftests/wireguard/qemu/arch/or1k.config new file mode 100644 index 000000000000..164dce530ccb --- /dev/null +++ b/tools/testing/selftests/wireguard/qemu/arch/or1k.config @@ -0,0 +1,22 @@ +CONFIG_OPENRISC_HAVE_INST_FF1=y +CONFIG_OPENRISC_HAVE_INST_FL1=y +CONFIG_OPENRISC_HAVE_INST_MUL=y +CONFIG_OPENRISC_HAVE_INST_DIV=y +CONFIG_OPENRISC_HAVE_INST_CMOV=y +CONFIG_OPENRISC_HAVE_INST_ROR=y +CONFIG_OPENRISC_HAVE_INST_RORI=y +CONFIG_OPENRISC_HAVE_INST_SEXT=y +CONFIG_OPENRISC_NO_SPR_SR_DSX=y +CONFIG_JUMP_UPON_UNHANDLED_EXCEPTION=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_VIRTIO_MENU=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_CMDLINE="console=ttyS0 wg.success=vport0p1 panic_on_warn=1" |