From patchwork Fri Dec 23 11:16:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13080901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5520C4332F for ; Fri, 23 Dec 2022 11:16:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.468887.728091 (Exim 4.92) (envelope-from ) id 1p8g2Y-0002BS-73; Fri, 23 Dec 2022 11:16:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 468887.728091; Fri, 23 Dec 2022 11:16:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2Y-0002BL-3p; Fri, 23 Dec 2022 11:16:38 +0000 Received: by outflank-mailman (input) for mailman id 468887; Fri, 23 Dec 2022 11:16:36 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2W-0001vi-HA for xen-devel@lists.xenproject.org; Fri, 23 Dec 2022 11:16:36 +0000 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [2a00:1450:4864:20::32a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 43000505-82b3-11ed-8fd4-01056ac49cbb; Fri, 23 Dec 2022 12:16:35 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id ay2-20020a05600c1e0200b003d22e3e796dso3337155wmb.0 for ; Fri, 23 Dec 2022 03:16:35 -0800 (PST) Received: from fedora.. ([195.234.76.149]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b003c6c5a5a651sm4015400wmb.28.2022.12.23.03.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 03:16:34 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 43000505-82b3-11ed-8fd4-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bojZ+BqHhvZXTf8zMnMZHqyICjgS2oNaXrHozMSW7ig=; b=f2n4vVRroXeruv0VuASOOKa2qpZxgN5ilRx0aaJoeT25SEHd4WmSYNyfJsunZgg56j tVshykRLVO7o0UcD1xL7augBxAWpZB4ToHutWC29Jsly7u/U/VLRQu2KMJwLJGge5EQn PHl6mz0OV7US5Js4FMg4ZgfZbnNIwbgMSsQOB8k3gTepAwBzIIeiw89QALf4Aojo1jMv 3inu7aHNyU01VXE3IZlEenmylgWRBP7c4KOV30pAzKkPlWxYrPLv5nXn/G5chXKpTk7E QVVvDnu4n7Nfr+TxMq3rYP9tFvrAAyxWkqcqqhhMV17X0js4w5OjiC5hXZvUeLyiyW8d oU1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bojZ+BqHhvZXTf8zMnMZHqyICjgS2oNaXrHozMSW7ig=; b=2sUvYDZV6MrX1lFRnf04wECNEy0V/vMFor/tkYfA1FAGs/ThJrbP5PD/KDc84Ra0Pp 4GELb9ifMzfuMjLbkVCqxu4QYUaeJpnZQkqelsgPz8SKyQ1QKqzfUSLQZJvOSTST6vQV drOeJuYNXuqcFof2RDhu/3tTPQt88AqtGopGYlmeLItzDBNrnsm2/jFkXcyCT+db0dbK XUBvx7G1LChBmn1VSropZAJm+6fIWNAnSbLJaBEXOvURW6gy+IxMILpYwoVlx2lHmYsp 9ws6bagtt5n5RdapZeS2zMgjdi+hhjeTj3t/9s6zRGxII99nEHd14BsN29MQy/2kqAna j0vA== X-Gm-Message-State: AFqh2kprP5o4RAPrQJi+micO7wO7kWnFZezFE7dCAeutFS5TSV8t0CaL usrLeOqwIc4NMe+HfZr0lkVsTIvHhGoY3Rnp X-Google-Smtp-Source: AMrXdXuxrsI9MU6JO2oUl7oA4afGts0iNNIcb2VO9yFEPV394cXXLAv973aMjjqgo8tAZqQXONU1Yw== X-Received: by 2002:a05:600c:4e11:b0:3d3:4012:8da8 with SMTP id b17-20020a05600c4e1100b003d340128da8mr6727895wmq.40.1671794194743; Fri, 23 Dec 2022 03:16:34 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [XEN PATCH v1 1/4] arch/riscv: initial RISC-V support to build/run minimal Xen Date: Fri, 23 Dec 2022 13:16:20 +0200 Message-Id: <5d5ec5fbd8787ed8f86bf84a5ac291d07a20b307.1671789736.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 The patch provides a minimal amount of changes to start build and run minimal Xen binary at GitLab CI&CD that will allow continuous checking of the build status of RISC-V Xen. RISC-V Xen can be built by the following instructions: $ CONTAINER=riscv64 ./automation/scripts/containerize \ make XEN_TARGET_ARCH=riscv64 tiny64_defconfig $ CONTAINER=riscv64 ./automation/scripts/containerize \ make XEN_TARGET_ARCH=riscv64 -C xen build RISC-V Xen can be run as: $ qemu-system-riscv64 -M virt -smp 1 -nographic -m 2g \ -kernel xen/xen To run in debug mode should be done the following instructions: $ qemu-system-riscv64 -M virt -smp 1 -nographic -m 2g \ -kernel xen/xen -s -S # In separate terminal: $ riscv64-buildroot-linux-gnu-gdb $ target remote :1234 $ add-symbol-file /xen/xen-syms 0x80200000 $ hb *0x80200000 $ c # it should stop at instruction j 0x80200000 Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile | 30 +++++++++++++ xen/arch/riscv/arch.mk | 10 +++++ xen/arch/riscv/include/asm/config.h | 26 ++++++++++- xen/arch/riscv/include/asm/types.h | 11 +++++ xen/arch/riscv/riscv64/Makefile | 2 +- xen/arch/riscv/riscv64/head.S | 2 +- xen/arch/riscv/xen.lds.S | 69 +++++++++++++++++++++++++++++ 7 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 xen/arch/riscv/include/asm/types.h create mode 100644 xen/arch/riscv/xen.lds.S diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile index 942e4ffbc1..893dd19ea6 100644 --- a/xen/arch/riscv/Makefile +++ b/xen/arch/riscv/Makefile @@ -1,2 +1,32 @@ +obj-$(CONFIG_RISCV_64) += riscv64/ + +$(TARGET): $(TARGET)-syms + $(OBJCOPY) -O binary -S $< $@ + +$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ + $(SYMBOLS_DUMMY_OBJ) -o $(@D)/.$(@F).0 + $(NM) -pa --format=sysv $(@D)/.$(@F).0 \ + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S + $(MAKE) $(build)=$(@D) $(@D)/.$(@F).0.o + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ + $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 + $(NM) -pa --format=sysv $(@D)/.$(@F).1 \ + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S + $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ + $(@D)/.$(@F).1.o -o $@ + $(NM) -pa --format=sysv $(@D)/$(@F) \ + | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ + >$(@D)/$(@F).map + rm -f $(@D)/.$(@F).[0-9]* + +$(obj)/xen.lds: $(src)/xen.lds.S FORCE + $(call if_changed_dep,cpp_lds_S) + +.PHONY: clean +clean:: + rm -f $(objtree)/.xen-syms.[0-9]* + .PHONY: include include: diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index ae8fe9dec7..9292b72718 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -11,3 +11,13 @@ riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c # -mcmodel=medlow would force Xen into the lower half. CFLAGS += -march=$(riscv-march-y) -mstrict-align -mcmodel=medany + +# TODO: Drop override and SYMBOLS_DUMMY_OBJ when more +# of the build is working +override ALL_OBJS-y = arch/$(TARGET_ARCH)/built_in.o +override ALL_LIBS-y = +ifneq ($(wildcard $(objtree)/common/symbols-dummy.o),) +SYMBOLS_DUMMY_OBJ=$(objtree)/common/symbols-dummy.o +else +SYMBOLS_DUMMY_OBJ= +endif diff --git a/xen/arch/riscv/include/asm/config.h b/xen/arch/riscv/include/asm/config.h index e2ae21de61..756607a4a2 100644 --- a/xen/arch/riscv/include/asm/config.h +++ b/xen/arch/riscv/include/asm/config.h @@ -28,7 +28,7 @@ /* Linkage for RISCV */ #ifdef __ASSEMBLY__ -#define ALIGN .align 2 +#define ALIGN .align 4 #define ENTRY(name) \ .globl name; \ @@ -36,6 +36,30 @@ name: #endif +/* + * Definition of XEN_VIRT_START should look like: + * define XEN_VIRT_START _AT(vaddr_t,0x00200000) + * It requires including of additional headers which + * will increase an amount of files unnecessary for + * minimal RISC-V Xen build so set value of + * XEN_VIRT_START explicitly. + * + * TODO: change it to _AT(vaddr_t,0x00200000) when + * necessary header will be pushed. + */ +#define XEN_VIRT_START 0x80200000 +/* + * PAGE_SIZE is defined in <{asm,xen}/page-*.h> but to + * remove unnecessary headers for minimal + * build headers it will be better to set PAGE_SIZE + * explicitly. + * + * TODO: remove it when will be needed + * defintion of PAGE_SIZE should be remove from + * this header. + */ +#define PAGE_SIZE 4096 + #endif /* __RISCV_CONFIG_H__ */ /* * Local variables: diff --git a/xen/arch/riscv/include/asm/types.h b/xen/arch/riscv/include/asm/types.h new file mode 100644 index 0000000000..afbca6b15c --- /dev/null +++ b/xen/arch/riscv/include/asm/types.h @@ -0,0 +1,11 @@ +#ifndef __TYPES_H__ +#define __TYPES_H__ + +/* + * + * asm/types.h is required for xen-syms.S file which + * is produced by tools/symbols. + * + */ + +#endif diff --git a/xen/arch/riscv/riscv64/Makefile b/xen/arch/riscv/riscv64/Makefile index 15a4a65f66..3340058c08 100644 --- a/xen/arch/riscv/riscv64/Makefile +++ b/xen/arch/riscv/riscv64/Makefile @@ -1 +1 @@ -extra-y += head.o +obj-y += head.o diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S index 0dbc27ba75..0330b29c01 100644 --- a/xen/arch/riscv/riscv64/head.S +++ b/xen/arch/riscv/riscv64/head.S @@ -1,6 +1,6 @@ #include - .text + .section .text.header, "ax", %progbits ENTRY(start) j start diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S new file mode 100644 index 0000000000..60628b3856 --- /dev/null +++ b/xen/arch/riscv/xen.lds.S @@ -0,0 +1,69 @@ +#include + +#undef ENTRY +#undef ALIGN + +OUTPUT_ARCH(riscv) +ENTRY(start) + +PHDRS +{ + text PT_LOAD ; +#if defined(BUILD_ID) + note PT_NOTE ; +#endif +} + +SECTIONS +{ + . = XEN_VIRT_START; + _start = .; + .text : { + _stext = .; + *(.text.header) + *(.text) + *(.gnu.warning) + . = ALIGN(POINTER_ALIGN); + _etext = .; + } :text + + . = ALIGN(PAGE_SIZE); + .rodata : { + _srodata = .; + *(.rodata) + *(.rodata.*) + *(.data.rel.ro) + *(.data.rel.ro.*) + } :text + +#if defined(BUILD_ID) + . = ALIGN(4); + .note.gnu.build-id : { + __note_gnu_build_id_start = .; + *(.note.gnu.build-id) + __note_gnu_build_id_end = .; + } :note :text +#endif + + . = ALIGN(PAGE_SIZE); + .data : { /* Data */ + *(.data .data.*) + } :text + + . = ALIGN(PAGE_SIZE); + .bss : { + __bss_start = .; + *(.bss .bss.*) + . = ALIGN(POINTER_ALIGN); + __bss_end = .; + } :text + _end = . ; + + DWARF2_DEBUG_SECTIONS + + DISCARD_SECTIONS + + STABS_DEBUG_SECTIONS + + ELF_DETAILS_SECTIONS +} From patchwork Fri Dec 23 11:16:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13080900 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02CC0C41535 for ; Fri, 23 Dec 2022 11:16:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.468888.728102 (Exim 4.92) (envelope-from ) id 1p8g2c-0002TA-G1; Fri, 23 Dec 2022 11:16:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 468888.728102; Fri, 23 Dec 2022 11:16:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2c-0002T3-CL; Fri, 23 Dec 2022 11:16:42 +0000 Received: by outflank-mailman (input) for mailman id 468888; Fri, 23 Dec 2022 11:16:40 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2a-0001vi-Qj for xen-devel@lists.xenproject.org; Fri, 23 Dec 2022 11:16:40 +0000 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [2a00:1450:4864:20::32a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 45bb3902-82b3-11ed-8fd4-01056ac49cbb; Fri, 23 Dec 2022 12:16:40 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id f13-20020a1cc90d000000b003d08c4cf679so3302598wmb.5 for ; Fri, 23 Dec 2022 03:16:40 -0800 (PST) Received: from fedora.. ([195.234.76.149]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b003c6c5a5a651sm4015400wmb.28.2022.12.23.03.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 03:16:39 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 45bb3902-82b3-11ed-8fd4-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nMA9GaAKAwvSkcExFphr9K3QaVLSpIpDAhw9a6cKCNM=; b=gvDJniLm2Mwmt9UtGRo1qDm1eyfvbRTxTF7X14YgiSadYAvDfwBaHIvL7jIj9rGYM3 /hfMut0w2TTznEBZkRQX3+ZRP1yyDl0eORZUiXTLlekq9MPzU3KvWpIZH8oNa1bfUkoB 6IiI4VpsQhqXr96ceeDacK+Poc5JgMn1xwSYCY8T6Kibd66sId8nL+MqMXNPAaKEmZtU 0RwHXZUKqA0z5OlGdLw2tcxJzGWTRHfMf4ATwiU0cAlO6DLdlgVZyUHNUD70ItvLlaW4 jYRz3Tyd9I7yOtFrsHVTotAQBAvd6PXrdm1IKRadrI0pFrwicLEckMm+kce43jpgUZ2e CiXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nMA9GaAKAwvSkcExFphr9K3QaVLSpIpDAhw9a6cKCNM=; b=Ce/Ujh8uB0c7PxxckbFvh06arHCFsmmvYXOjYTDFGnyROdUi/g+L4ql6UlU3lknmEl Audmh0k1S0145XecJCbLfHIZ+YjzQ+l7cRd3fZkVaHCxULJLbcM5BFfjQrdLQOSpSqBJ Y7dj5HA9jTtlionH7WrkYatyp8o8rm31OoixZ5GJ8j27y1RuY2+bm+GsmzIkdB17GjtD w6xTXM1XLUxRZ7IvXm4jxXv3no3aad8QZ52InNpYllePPprpT9tFMrA94jcMGY2sVuH+ LXNK03ohZ/kawgRQJNGwwSBDQ2nULwRNTv87D8BQyjf++3EY7/MKdV7zNkdZkTGZXZbt tnlQ== X-Gm-Message-State: AFqh2krTUWeuSKpdtuoNXuanmfPV3Ak/sz/P+yvh2Pl6fP/wY6CXcEbz x3iXSzdQWBTFvb7GTlH1hBpfGME1MBYo0v72 X-Google-Smtp-Source: AMrXdXuuVKaWn+IuwicpenQafiKLQF6LsbpNCUjVJGrjAmGfmmCVzkEE+PMkHdhowPaYOp1MkAtpzw== X-Received: by 2002:a1c:6a16:0:b0:3c6:f732:bf6f with SMTP id f22-20020a1c6a16000000b003c6f732bf6fmr6821962wmc.13.1671794199369; Fri, 23 Dec 2022 03:16:39 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Doug Goldstein Subject: [XEN PATCH v1 2/4] automation: add cross-compiler support for the build script Date: Fri, 23 Dec 2022 13:16:21 +0200 Message-Id: <3c926f637c4738bd14db10e8fe8f72a6eae2dfd4.1671789736.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Docker images that are currently available and used for cross-compilation is additionally installed GCC/Binutils which is why the build script doesn't crash. RISC-V docker image doesn't have native GCC only           cross-compiler which will lead to the fact  that the build script will fail. Signed-off-by: Oleksii Kurochko --- automation/scripts/build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index a593419063..026f480e76 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -2,12 +2,12 @@ test -f /etc/os-release && cat "$_" -$CC --version +${CROSS_COMPILE}${CC} --version # Express the compiler version as an integer. e.g. GCC 4.9.2 => 0x040902 cc-ver() { - $CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }' + ${CROSS_COMPILE}${CC} -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }' } # random config or default config @@ -66,7 +66,7 @@ if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); ex fi # SeaBIOS requires GCC 4.6 or later -if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then +if [[ "${CROSS_COMPILE}${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then cfgargs+=("--with-system-seabios=/bin/false") fi From patchwork Fri Dec 23 11:16:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13080902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD70EC4167B for ; Fri, 23 Dec 2022 11:16:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.468889.728113 (Exim 4.92) (envelope-from ) id 1p8g2f-0002me-OU; Fri, 23 Dec 2022 11:16:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 468889.728113; Fri, 23 Dec 2022 11:16:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2f-0002mT-LB; Fri, 23 Dec 2022 11:16:45 +0000 Received: by outflank-mailman (input) for mailman id 468889; Fri, 23 Dec 2022 11:16:43 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2d-0001vi-Qn for xen-devel@lists.xenproject.org; Fri, 23 Dec 2022 11:16:43 +0000 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [2a00:1450:4864:20::333]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 47b28286-82b3-11ed-8fd4-01056ac49cbb; Fri, 23 Dec 2022 12:16:43 +0100 (CET) Received: by mail-wm1-x333.google.com with SMTP id h12so2109487wmq.0 for ; Fri, 23 Dec 2022 03:16:43 -0800 (PST) Received: from fedora.. ([195.234.76.149]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b003c6c5a5a651sm4015400wmb.28.2022.12.23.03.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 03:16:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 47b28286-82b3-11ed-8fd4-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4piGybnIUpDzfW0IXQY8Y5SgBUwXtFTXUdrpnAUYp18=; b=Kd/g0bPlVd0qUtUIOoA5ZldHfcNjR1qtiYUpSmnzlVpQB63q+EGiuz0ssJ0uvkzTVp 5psm8UfVxZs/xMWjhR61vOxHyS1DS95C83yYEqMFSuS1TfwE+76e0NI6rndBZ7adsx/R TGup8LWOPYWIAjLXaWvD3Uw+fD6Q0JFa78EcucaKdx22rK+FmOIeR6Xk5DCGsv5ma93I PAGWolweh/J4zHTd9UzGN3rlboFwaKJhvNTTkj0ljamhbYnlQRBAJCKom2ulGSxNv1Ev 3RikbwXcdG+3qCDghB8uNrHI9eu8iKCgw2Pct3pSEMoIOn/9z1EHk4/PAfLyGWDk2qvW iUBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4piGybnIUpDzfW0IXQY8Y5SgBUwXtFTXUdrpnAUYp18=; b=h6EGXKQ5wcO7WnpTdjqPycYAUQEmk5H7eBzSX/ecDcboaDltBI+ju11TjVZNowcB9B pP7jBdVsCXWS0+qNV820d78BeiLbXKxa6GAvDLGEE9IKJsKjRV/X7l4qOxJNRyJtK8g4 20YgFBsYtJREiueYadW3gtef0w5sDXU9QbhnuSyh27mcCpAJ4+HqQrayD0FCyTZkQyRW BJBxsOseyrIhJhLuLjrmAmjnBrZAyZbz/JvvHZ7S1ucbVSYJUJy5GsFqsPy+LgvFqnab WlzdLfViqZVKhByuMg+fwlfU73eO9NGt2SizeUGc5vlnIo9ywWLHxrwfy07F9FSxV/GB bVrQ== X-Gm-Message-State: AFqh2kr2PiqZAcwpeLxZzaLfYdOnkSO+sZF0Btd+soRaDEewwN2g/O3D xQ/OQXPwtQ/7bZFdVn1v9npZrWf+VyUrlFFb X-Google-Smtp-Source: AMrXdXseWLwF9FPYLaJ367T4eEMth/pZMqMJL8iiU/RgleLUarqwjEsLgJs/DLE8e0ova0LkXXel9A== X-Received: by 2002:a05:600c:4e11:b0:3d3:4012:8da8 with SMTP id b17-20020a05600c4e1100b003d340128da8mr6728223wmq.40.1671794202758; Fri, 23 Dec 2022 03:16:42 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Doug Goldstein Subject: [XEN PATCH v1 3/4] automation: add python3 package for riscv64.dockerfile Date: Fri, 23 Dec 2022 13:16:22 +0200 Message-Id: <55e2c865a0c2ab3ef405c427c0b1bcaf0abff2ab.1671789736.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Pyhton3 package is requited by automation/scripts/build script so it shoud be installed to riscv64 docker image Signed-off-by: Oleksii Kurochko --- automation/build/archlinux/riscv64.dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automation/build/archlinux/riscv64.dockerfile b/automation/build/archlinux/riscv64.dockerfile index ff8b2b955d..a52852c2f7 100644 --- a/automation/build/archlinux/riscv64.dockerfile +++ b/automation/build/archlinux/riscv64.dockerfile @@ -9,7 +9,8 @@ RUN pacman --noconfirm --needed -Syu \ inetutils \ riscv64-linux-gnu-binutils \ riscv64-linux-gnu-gcc \ - riscv64-linux-gnu-glibc + riscv64-linux-gnu-glibc \ + python3 # Add compiler path ENV CROSS_COMPILE=riscv64-linux-gnu- From patchwork Fri Dec 23 11:16:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13080904 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E15FDC4708D for ; Fri, 23 Dec 2022 11:16:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.468890.728124 (Exim 4.92) (envelope-from ) id 1p8g2h-00033t-3L; Fri, 23 Dec 2022 11:16:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 468890.728124; Fri, 23 Dec 2022 11:16:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2h-00033k-0A; Fri, 23 Dec 2022 11:16:47 +0000 Received: by outflank-mailman (input) for mailman id 468890; Fri, 23 Dec 2022 11:16:46 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p8g2g-0001vi-BA for xen-devel@lists.xenproject.org; Fri, 23 Dec 2022 11:16:46 +0000 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [2a00:1450:4864:20::32d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 48fdefe1-82b3-11ed-8fd4-01056ac49cbb; Fri, 23 Dec 2022 12:16:45 +0100 (CET) Received: by mail-wm1-x32d.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so303838wmb.2 for ; Fri, 23 Dec 2022 03:16:45 -0800 (PST) Received: from fedora.. ([195.234.76.149]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b003c6c5a5a651sm4015400wmb.28.2022.12.23.03.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 03:16:44 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 48fdefe1-82b3-11ed-8fd4-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fVyGLZWjJ9kbK2S5/NmxoXvE/MItjsZJIic+Vk1nkXc=; b=BYq17mjcOlyfPQg4benY4Uz7Kb1cvBW+qS541FQAZjzUk64U19IKpIZEUXkuZhav3x VZxxfRHDK6agxW3YiHCWbgasGQUbjI9IwfukBBF6BfCtARb/tTAwO2QCejyMpPb+UfwT bBQor/imfNBAYPVz0iGyW7PVPZTgfllbSsIWMn2hYwgzu1LQw0fUQv2/gRU5sy/LnDg1 VcgbMB8oIWAkRF4ofE2NY+R7ic+T4VrW3zYimzF6OIqMacsyCAyr7ayz/LqvC1bWT2Wu qW+CeeKwkbwyyCHQxjA9dm3uI0/xom18MxsSRfp0LcIctbEcv7B+cmK4qZlGbLnUp1by tHUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fVyGLZWjJ9kbK2S5/NmxoXvE/MItjsZJIic+Vk1nkXc=; b=1rSfcBwbEO0U9sWg+eZdicmhKLYgbIkJW1Bn+REe6WPpv1Tqkpo30wJT+UQ5BBY0sc QlS2nO55HpG/cmgUh6g/WNqz1eKSujETeDXp1NjGW8skIu1tsZtKm9bvm99ibzuwqf69 v6ocme9pp2upeYOcWeeISO68w6ozKMr9o3vLA2M026he5arnUeeMCn3rzZ1f4QVAgARP c4DHVxf3pXdHdeIEpM+6vnKh4SpxFDAUki6M/PBt6paE9CoJQ1YSIf0+B+TtJmtXM1IL Y59F+3s60rchI5Qo3IAkR9pufzkpl4NX1ID5eD4kBtB+mtrQHMcOeh89DvAD0Dlaj6Qg oJWw== X-Gm-Message-State: AFqh2ko1m9rWT881hJUVusXWGTm5KP2MgwumuCuG7uHsuuluf9aqFULT OcW02vHhVTC5jmGJw0YuniPLW+Vkc0rdnTcZ X-Google-Smtp-Source: AMrXdXtvhTIgBi0ObNo2e+NrFKzemWZGmn4EFBa4HZLVmgbpn8vnvHkFFkFWBmqS3zydtBfN/xQBAQ== X-Received: by 2002:a05:600c:d1:b0:3d3:4d21:704d with SMTP id u17-20020a05600c00d100b003d34d21704dmr6827553wmm.14.1671794204919; Fri, 23 Dec 2022 03:16:44 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Doug Goldstein Subject: [XEN PATCH v1 4/4] automation: add RISC-V 64 cross-build tests for Xen Date: Fri, 23 Dec 2022 13:16:23 +0200 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Add build jobs to cross-compile Xen-only for RISC-V 64. Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis --- automation/gitlab-ci/build.yaml | 43 +++++++++++++++++++++++++++++++++ automation/scripts/build | 4 +-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 93d9ff69a9..d97b2aa788 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -172,6 +172,33 @@ variables: <<: *gcc +.riscv64-cross-build-tmpl: + <<: *build + variables: + XEN_TARGET_ARCH: riscv64 + tags: + - x86_64 + +.riscv64-cross-build: + extends: .riscv64-cross-build-tmpl + variables: + debug: n + +.riscv64-cross-build-debug: + extends: .riscv64-cross-build-tmpl + variables: + debug: y + +.gcc-riscv64-cross-build: + extends: .riscv64-cross-build + variables: + <<: *gcc + +.gcc-riscv64-cross-build-debug: + extends: .riscv64-cross-build-debug + variables: + <<: *gcc + # Jobs below this line archlinux-gcc: @@ -615,6 +642,19 @@ alpine-3.12-gcc-debug-arm64-boot-cpupools: EXTRA_XEN_CONFIG: | CONFIG_BOOT_TIME_CPUPOOLS=y +# RISC-V 64 cross-build +riscv64-cross-gcc: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: archlinux:riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + +riscv64-cross-gcc-debug: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: archlinux:riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + ## Test artifacts common .test-jobs-artifact-common: @@ -690,3 +730,6 @@ kernel-5.10.74-export: - binaries/bzImage tags: - x86_64 + +# # RISC-V 64 test artificats +# # TODO: add RISC-V 64 test artitifacts diff --git a/automation/scripts/build b/automation/scripts/build index 026f480e76..d0632a2bd5 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -34,8 +34,8 @@ fi # to exit early -- bash is invoked with -e. cp xen/.config xen-config -# arm32 only cross-compiles the hypervisor -if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then +# arm32 & riscv64 only cross-compiles the hypervisor +if [[ "${XEN_TARGET_ARCH}" = "arm32" ]] || [[ "${XEN_TARGET_ARCH}" = "riscv64" ]]; then hypervisor_only="y" fi