From nobody Sun May 12 02:39:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1674818166; cv=none; d=zohomail.com; s=zohoarc; b=iYBWyg5wmBsIdXAOgot2ZqSVvcbfwY9siGAdPV2Pg3f0ZEIZLnmApuo9CB075h15vqrt8CDQ70ED+EGfIXsKMI1gFZvN5HmYclceBjGeQZ7Y+ntwUZLqAwC7KYw6N5lHsnWxm8LdFJ1gRw+Ce172CRGvY0REzNC9hfBs8kg+x/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674818166; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Hy0V7Beg+Or9woWn4Y+M3sCQn1S9+9nvXmkH0E6MOKk=; b=DfP6vQxHH1+IKuB6Jl93To7TgV3iQ1bnnFW70rqa+Ljzn3UlVvtR/H1ynDin1fDD11z+DgA2ajVsBZ4SdJ8EFaQwFqyGRIcpUxfSNgNIq5f6hZmksZlkXttqREB2ndp0Mr4j1eO7s0eWVRj4bXmiRwIFABqSt0bcD2uFBgbQQfI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1674818166221660.1017595898834; Fri, 27 Jan 2023 03:16:06 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.485449.752681 (Exim 4.92) (envelope-from ) id 1pLMhl-0003Mv-Pd; Fri, 27 Jan 2023 11:15:37 +0000 Received: by outflank-mailman (output) from mailman id 485449.752681; Fri, 27 Jan 2023 11:15:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pLMhl-0003Mo-Mh; Fri, 27 Jan 2023 11:15:37 +0000 Received: by outflank-mailman (input) for mailman id 485449; Fri, 27 Jan 2023 11:15: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 1pLMhk-00037V-4g for xen-devel@lists.xenproject.org; Fri, 27 Jan 2023 11:15:36 +0000 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [2a00:1450:4864:20::434]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id eac0ac04-9e33-11ed-b8d1-410ff93cb8f0; Fri, 27 Jan 2023 12:15:33 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id q10so4661539wrm.4 for ; Fri, 27 Jan 2023 03:15:33 -0800 (PST) Received: from localhost.localdomain (lfbn-gre-1-240-53.w90-112.abo.wanadoo.fr. [90.112.199.53]) by smtp.gmail.com with ESMTPSA id b11-20020adfd1cb000000b002bcaa47bf78sm4106257wrd.26.2023.01.27.03.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 03:15:32 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: eac0ac04-9e33-11ed-b8d1-410ff93cb8f0 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=Hy0V7Beg+Or9woWn4Y+M3sCQn1S9+9nvXmkH0E6MOKk=; b=i0jMNwOaBLTDEbH4sRYt2ki1XPyoDA8OVxTmNwmxeVxOPZto8zdpCTB4Y60BGv/MwK 8yyRp4Oj/hoeHy8A+PRRM2GfgsCHZN+JaCAUHc/dsnFMJ4biFHAOsHRaZghppOEKe7Q+ AlFDmxdaVWYvIS62lmF38ugnKBMqq/x1ulcAY18MkBUwPu2SkxJB1b9ilWYcCflCdccv ZhwY9wwJ54v6C2P+azAs4cJKydPJKmT6yGlOAdGWciuzDiGY7cIZItjWSwF2KweFzK9b C+1bNFZn/2+7TBD++Q1fvsb66AkJmmUp7vXBCF07AZwqyc+efBSt82NmSD8nxo0LDeMr RQgQ== 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=Hy0V7Beg+Or9woWn4Y+M3sCQn1S9+9nvXmkH0E6MOKk=; b=TKGuwOTItfL9Th4OV0qPIDtUWWQdAk1EODQoPEZPRgbHFZmqCVdSu0k8fU7aVOIIO9 nvJxRv8ebxCJ2eneBrOjaqzc0QejF5vZazFygKqLfrsuNmo56+DxjTZGlOUnza+vyuaV TE++DAh99jErnGkH7ynSuSLP3SfX6umOcpuUJ3XadvYjr+5wd2vYCyVDaq3WmQ8WHOMa hvHU3UVn4WVPBabhKoTwa/Nid92h1XhQYrb5TMNJunXL4Iqugvy2H3WFI94UHXvCQQf2 cFNjyDOtMe7LOlnVYdwgxsV1fUQxb/OgkGIDwn18WxlI+XSjhIi8lloZtmg2HEI6+rK8 HXVA== X-Gm-Message-State: AFqh2kr4oHTc1snDPfRO7e3NSM8aHL2g7QWQSM5p+5JNusLs+IPYZ1GU RNcVSpdN9drA7yWjQMLVEnd6StvCKLg= X-Google-Smtp-Source: AMrXdXtzGgrz+WD/SW7Uw7PgH/Aeoslx8A4SKQLuEG0c3llKjQ8Rwlym0melZBNBTzn/lIwMSsTmXA== X-Received: by 2002:adf:e48e:0:b0:2bd:ed75:808c with SMTP id i14-20020adfe48e000000b002bded75808cmr44313463wrm.38.1674818133016; Fri, 27 Jan 2023 03:15:33 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Julien Grall , Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis , Bobby Eshleman Subject: [PATCH v6 1/2] xen/riscv: introduce early_printk basic stuff Date: Fri, 27 Jan 2023 13:15:23 +0200 Message-Id: <06c2c36bd68b2534c757dc4087476e855253680a.1674816429.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1674818167540100007 Content-Type: text/plain; charset="utf-8" Because printk() relies on a serial driver (like the ns16550 driver) and drivers require working virtual memory (ioremap()) there is not print functionality early in Xen boot. The patch introduces the basic stuff of early_printk functionality which will be enough to print 'hello from C environment". Originally early_printk.{c,h} was introduced by Bobby Eshleman (https://github.com/glg-rv/xen/commit/a3c9916bbdff7ad6030055bbee7e53d1aab71= 384) but some functionality was changed: early_printk() function was changed in comparison with the original as common isn't being built now so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko Reviewed-by: Bobby Eshleman --- Changes in V6: - Remove __riscv_cmodel_medany check from early_printk.c --- Changes in V5: - Code style fixes - Change an error message of #error in case of __riscv_cmodel_medany isn't defined --- Changes in V4: - Remove "depends on RISCV*" from Kconfig.debug as it is located in arch specific folder so by default RISCV configs should be ebabled. - Add "ifdef __riscv_cmodel_medany" to be sure that PC-relative address= ing is used as early_*() functions can be called from head.S with MMU-off= and before relocation (if it would be needed at all for RISC-V) - fix code style --- Changes in V3: - reorder headers in alphabetical order - merge changes related to start_xen() function from "[PATCH v2 7/8] xen/riscv: print hello message from C env" to this patch - remove unneeded parentheses in definition of STACK_SIZE --- Changes in V2: - introduce STACK_SIZE define. - use consistent padding between instruction mnemonic and operand(s) --- xen/arch/riscv/Kconfig.debug | 5 ++++ xen/arch/riscv/Makefile | 1 + xen/arch/riscv/early_printk.c | 33 +++++++++++++++++++++++ xen/arch/riscv/include/asm/early_printk.h | 12 +++++++++ xen/arch/riscv/setup.c | 4 +++ 5 files changed, 55 insertions(+) create mode 100644 xen/arch/riscv/early_printk.c create mode 100644 xen/arch/riscv/include/asm/early_printk.h diff --git a/xen/arch/riscv/Kconfig.debug b/xen/arch/riscv/Kconfig.debug index e69de29bb2..608c9ff832 100644 --- a/xen/arch/riscv/Kconfig.debug +++ b/xen/arch/riscv/Kconfig.debug @@ -0,0 +1,5 @@ +config EARLY_PRINTK + bool "Enable early printk" + default DEBUG + help + Enables early printk debug messages diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile index fd916e1004..1a4f1a6015 100644 --- a/xen/arch/riscv/Makefile +++ b/xen/arch/riscv/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_EARLY_PRINTK) +=3D early_printk.o obj-$(CONFIG_RISCV_64) +=3D riscv64/ obj-y +=3D sbi.o obj-y +=3D setup.o diff --git a/xen/arch/riscv/early_printk.c b/xen/arch/riscv/early_printk.c new file mode 100644 index 0000000000..b66a11f1bc --- /dev/null +++ b/xen/arch/riscv/early_printk.c @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * RISC-V early printk using SBI + * + * Copyright (C) 2021 Bobby Eshleman + */ +#include +#include + +/* + * TODO: + * sbi_console_putchar is already planned for deprecation + * so it should be reworked to use UART directly. +*/ +void early_puts(const char *s, size_t nr) +{ + while ( nr-- > 0 ) + { + if ( *s =3D=3D '\n' ) + sbi_console_putchar('\r'); + sbi_console_putchar(*s); + s++; + } +} + +void early_printk(const char *str) +{ + while ( *str ) + { + early_puts(str, 1); + str++; + } +} diff --git a/xen/arch/riscv/include/asm/early_printk.h b/xen/arch/riscv/inc= lude/asm/early_printk.h new file mode 100644 index 0000000000..05106e160d --- /dev/null +++ b/xen/arch/riscv/include/asm/early_printk.h @@ -0,0 +1,12 @@ +#ifndef __EARLY_PRINTK_H__ +#define __EARLY_PRINTK_H__ + +#include + +#ifdef CONFIG_EARLY_PRINTK +void early_printk(const char *str); +#else +static inline void early_printk(const char *s) {}; +#endif + +#endif /* __EARLY_PRINTK_H__ */ diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 13e24e2fe1..d09ffe1454 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,12 +1,16 @@ #include #include =20 +#include + /* Xen stack for bringing up the first CPU. */ unsigned char __initdata cpu0_boot_stack[STACK_SIZE] __aligned(STACK_SIZE); =20 void __init noreturn start_xen(void) { + early_printk("Hello from C env\n"); + for ( ;; ) asm volatile ("wfi"); =20 --=20 2.39.0 From nobody Sun May 12 02:39:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1674818162; cv=none; d=zohomail.com; s=zohoarc; b=K9A1+rAhj8Bez8qy1yV43SYiyAeZnA9yr34EIl/FqpdSyLxrbsk4p0Zz9ZM98H/KL3K2hEI7gNcqRaGLKBQidfMP6DejiMsQUDtyuiiYhk15zMH8AbGey6h2wAApPwpjh+ukoqT47xyKyr//Uw19nC9jEF8TzHrdtHDcKIKLzWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674818162; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qFP8ING4UzVnUkEuxsmFa3m3vfqvjFoN/0VbfFaV0lo=; b=WHTlkAaq3iHpYRff6FwgNpcnhMKDXIo0nA/tXk101L4F5fOwl+1w25jcHhsA9Yi0Wia68mGLuMfspfesTbJDupP9QA+FArHY/1rSpKQjOUYsgtxnNvuhvTb069u3vjpKHlEK0K/P6LL9bT1oRBaMUU0kYOLXVG0BpT2+BmwgZbI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1674818162757927.8596482015271; Fri, 27 Jan 2023 03:16:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.485450.752690 (Exim 4.92) (envelope-from ) id 1pLMhn-0003cf-13; Fri, 27 Jan 2023 11:15:39 +0000 Received: by outflank-mailman (output) from mailman id 485450.752690; Fri, 27 Jan 2023 11:15:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pLMhm-0003cY-UM; Fri, 27 Jan 2023 11:15:38 +0000 Received: by outflank-mailman (input) for mailman id 485450; Fri, 27 Jan 2023 11:15:37 +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 1pLMhl-00037V-4j for xen-devel@lists.xenproject.org; Fri, 27 Jan 2023 11:15:37 +0000 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [2a00:1450:4864:20::434]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id eb35ad3d-9e33-11ed-b8d1-410ff93cb8f0; Fri, 27 Jan 2023 12:15:34 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id t18so4679807wro.1 for ; Fri, 27 Jan 2023 03:15:34 -0800 (PST) Received: from localhost.localdomain (lfbn-gre-1-240-53.w90-112.abo.wanadoo.fr. [90.112.199.53]) by smtp.gmail.com with ESMTPSA id b11-20020adfd1cb000000b002bcaa47bf78sm4106257wrd.26.2023.01.27.03.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 03:15:33 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: eb35ad3d-9e33-11ed-b8d1-410ff93cb8f0 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=qFP8ING4UzVnUkEuxsmFa3m3vfqvjFoN/0VbfFaV0lo=; b=fZupR+cGz2/cY4+KqtP+vPnS3moL+zV4Q+RVcUC4N2VS4yKuRj7EOk9imAy+Kdx78m bWgRars7oHHgZZqilRsjMAT4Pw8q4QjVVjv7vlGMLiPe85y0S12jF9CbNTYBcfGw77oq 1WTP6A2IwSAPAHPSNg888BXt9Zyr5VARyhDE8kDKbje89vCCZuLMi/DfvAIkz0ZSWpX5 u3aDXXElHCKTtKf95yFVMJ+dpZZci07Yd68Nd8CmZrAp9kd319mu1TBBNH0aFLefsaJ/ U3228Esdy41GT12P9SAoe3ySa0oTJlMgSf+RyeOgqTdp+KZ2Ml9l+sa6xjOjcz2+ownX VoRw== 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=qFP8ING4UzVnUkEuxsmFa3m3vfqvjFoN/0VbfFaV0lo=; b=MgZ7tAT/nK4TPhtW0zEbwKImweK9b4YRjuP9Bi6PSEuIk8n+UqQUfxi5siGsCe/Dmy fizFQ7kzhBxz7IcRJM0cKRcZjevubiB8YPP/P0R7DDrd9LpGPz7yEOYFcaZtoNreuqCv EsboZb8qkCvfXXtI6xYv3eOXTIO2mOSH8G04MIUYs1mQnuLA4PAQHIg4dqY7MyTBsy5y Hfzi0ah4+r3SX+1sEORaemdheOj+mILLt37HQ2tP4vUacp4bUNEvhpaHJkR4pR/nTgWa MUwtyRpuLTV127loATd6fGpcFJkFUmHxs8ckgUTPJ/RYvYx/Izf2wv/iRAkCAovCiWbo LqlA== X-Gm-Message-State: AO0yUKW2j2cjlJC9MvvZZ7V0Q0QN5M3XD/LY7ONmFtOZvuZlMh98ADKq inM/hPFCSZcgiC3z4ubRG/KJeO7lSRI= X-Google-Smtp-Source: AK7set8oVYDYFNPryV3eLsRpHPeeu7to+lwgFqoz5xDyRc7WqbECdj0idljGVzfKhAEIOkR1Y4NXog== X-Received: by 2002:a05:6000:154d:b0:2bf:d0b4:2ccf with SMTP id 13-20020a056000154d00b002bfd0b42ccfmr2946885wry.37.1674818133936; Fri, 27 Jan 2023 03:15:33 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Julien Grall , Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Doug Goldstein , Alistair Francis Subject: [PATCH v6 2/2] automation: add RISC-V smoke test Date: Fri, 27 Jan 2023 13:15:24 +0200 Message-Id: <22314025ad141e44e4cf46c29875af86113e631a.1674816429.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1674818163594100001 Content-Type: text/plain; charset="utf-8" Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V6: - Rename container name in test.yaml for .qemu-riscv64. --- Changes in V5: - Nothing changed --- Changes in V4: - Nothing changed --- Changes in V3: - Nothing changed - All mentioned comments by Stefano in Xen mailing list will be fixed as a separate patch out of this patch series. --- automation/gitlab-ci/test.yaml | 20 ++++++++++++++++++++ automation/scripts/qemu-smoke-riscv64.sh | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 automation/scripts/qemu-smoke-riscv64.sh diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index afd80adfe1..d3c62e0995 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -54,6 +54,19 @@ tags: - x86_64 =20 +.qemu-riscv64: + extends: .test-jobs-common + variables: + CONTAINER: archlinux:current-riscv64 + LOGFILE: qemu-smoke-riscv64.log + artifacts: + paths: + - smoke.serial + - '*.log' + when: always + tags: + - x86_64 + .yocto-test: extends: .test-jobs-common script: @@ -234,6 +247,13 @@ qemu-smoke-x86-64-clang-pvh: needs: - debian-unstable-clang-debug =20 +qemu-smoke-riscv64-gcc: + extends: .qemu-riscv64 + script: + - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee ${LOGFILE} + needs: + - riscv64-cross-gcc + # Yocto test jobs yocto-qemuarm64: extends: .yocto-test-arm64 diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/= qemu-smoke-riscv64.sh new file mode 100755 index 0000000000..e0f06360bc --- /dev/null +++ b/automation/scripts/qemu-smoke-riscv64.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ex + +# Run the test +rm -f smoke.serial +set +e + +timeout -k 1 2 \ +qemu-system-riscv64 \ + -M virt \ + -smp 1 \ + -nographic \ + -m 2g \ + -kernel binaries/xen \ + |& tee smoke.serial + +set -e +(grep -q "Hello from C env" smoke.serial) || exit 1 +exit 0 --=20 2.39.0