Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp318571rwd; Mon, 12 Jun 2023 14:08:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6d0Crptd+PxiB/G+Rk2UiMGPQ7Z+vfYLUS47n4mOYK7l/i88K1+dPDgPM6+NP0kOMJKvzn X-Received: by 2002:a05:6402:281:b0:510:f6e9:6d92 with SMTP id l1-20020a056402028100b00510f6e96d92mr6452636edv.0.1686604126389; Mon, 12 Jun 2023 14:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686604126; cv=none; d=google.com; s=arc-20160816; b=nAYOQq1ctE8yjxvFxvUNm3U+zGpCAzsJOzJJFq3LVqAO1GREZ2d7BOaSw1SKqfRqtA OLkulzZFdbSVRVf+cobejhspTs+DsG69OqaIn/rlSMxnB/RRZafvGPdi2OLud0naAKd/ ZtYO548hgVkh6xParq0jg8w5IOx/nvcKotPRMJyyoLHa3LMbTf5nRJ+TyY7rU+2cfH5I oQQyZpV1Nj4G/DhOVkv1kO0xQOrsdIey6e4kRbuLMYWFBJBxLI7Z4PlBhUCBgDK4n/eP KKLOSUoSJTsrJ1IQP2dJbsEhyxXj3MXT20B0GxIUVyvN1B196q6SevVvzn0B5l8p52bN 0h8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zBTvu6NE5crB6HnYa9pqK1Ktt0Dxc1Gg4WdcJO+/ujI=; b=PlcV7s8mq5R+zFMWn8KHJ95G0KmUD6atoNTpnIqScshX3qNPDuaJOaDanlAvO1i6Mq vGjjr5H8iU2xEviiq1AhcQJ5tGUibPs9dIh7j/lZhkUVXlKvHkS1lpJiy8rKzvfgmSIe oe6Ir5Iws78mxipfp2E4qMh1Fp8mphjAx9BkcWai8gbOd+X327HsQRwZ5xPa7OQdqQQp w5E8QZu0bk9MMrA8e2dYjCTib76lYgdqvTH2+Tiew/OqE5vGKylsPnx4hdF4yCua9oT0 M0ITKzljfQ5FGZ5L27D8kTTSMmBBsnlqGg3Xk+UXdOV6yVgGK0owapk70mSEta9o4/8N qswA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M0m4+Gw2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020aa7ce0b000000b0050bca41879csi6679589edv.89.2023.06.12.14.08.21; Mon, 12 Jun 2023 14:08:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M0m4+Gw2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238032AbjFLUut (ORCPT + 99 others); Mon, 12 Jun 2023 16:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237816AbjFLUsD (ORCPT ); Mon, 12 Jun 2023 16:48:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A565119AB for ; Mon, 12 Jun 2023 13:46:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D2DD062F1C for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FAF5C4332E; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602717; bh=aVqOtwmx537eWDCmSDJwrEESzYvq7/Do2SB85XSCprw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M0m4+Gw20RtEfRWkpnsxaIZ4QVmx9svEupWtYqPIuH09CgLPYnTyS/dws3buXQOMf qEltOAQJeHpPfJtHSFVVY92O6BQ0WmyvZlr6Ln77x7o1ISW7nicsJMpGQ2EikcMqET niDWnICFABYmCvpc+VZgMZUj2ZJd+x5O+nlm07CKOz3gNdQHQywzKKfpAJTyNTQTfW mdhJJ9BwrntgNTnBkeB6q0Ed+YZetfLyFU+v1T7IoFKwpE+s84MzsDZROlVW/p1VpQ U586gEuzIL1b/3ijOLbItcXr2OyU00ja5ZhzUxqdcW4FlSIIb72oZl1RUXIlVGeWDF e8bOvRMsEG7CQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 1706ECE3A8A; Mon, 12 Jun 2023 13:45:16 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, Zhangjin Wu , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 43/53] selftests/nolibc: allow specify extra arguments for qemu Date: Mon, 12 Jun 2023 13:45:04 -0700 Message-Id: <20230612204514.292087-43-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhangjin Wu The opensbi package from Ubuntu 20.04 only provides rv64 firmwares: $ dpkg -S opensbi | grep -E "fw_.*bin|fw_.*elf" | uniq opensbi: /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_dynamic.bin opensbi: /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin opensbi: /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_dynamic.elf opensbi: /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf To run this nolibc test for rv32, users must build opensbi or download a prebuilt one from qemu repository: https://gitlab.com/qemu-project/qemu/-/blob/master/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin And then use -bios to tell qemu use it to avoid such failure: $ qemu-system-riscv32 -display none -no-reboot -kernel /path/to/arch/riscv/boot/Image -serial stdio -M virt -append "console=ttyS0 panic=-1" qemu-system-riscv32: Unable to load the RISC-V firmware "opensbi-riscv32-generic-fw_dynamic.bin" To run from makefile, QEMU_ARGS_EXTRA is added to allow pass extra arguments like -bios: $ make run QEMU_ARGS_EXTRA="-bios /path/to/opensbi-riscv32-generic-fw_dynamic.bin" ... Suggested-by: Thomas Weißschuh Link: https://lore.kernel.org/linux-riscv/2ab94136-d341-4a26-964e-6d6c32e66c9b@t-8ch.de/ Signed-off-by: Zhangjin Wu Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 47c3c89092e4..44088535682e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -64,7 +64,7 @@ QEMU_ARGS_mips = -M malta -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" -QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) +QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) $(QEMU_ARGS_EXTRA) # OUTPUT is only set when run from the main makefile, otherwise # it defaults to this nolibc directory. -- 2.40.1