From owner-freebsd-current@freebsd.org Mon Dec 7 22:40:58 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 195424B8F7F for ; Mon, 7 Dec 2020 22:40:58 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqdZL0DdHz4RG5 for ; Mon, 7 Dec 2020 22:40:58 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id EA44485CF for ; Mon, 7 Dec 2020 22:40:57 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f177.google.com with SMTP id g15so14380649ybq.6 for ; Mon, 07 Dec 2020 14:40:57 -0800 (PST) X-Gm-Message-State: AOAM5309N/bMMc8YidGyhbO1/7BpjauluHGch6QWp9jwiYuxhR6mF5fW qMCbKDjtjkN8mpw2v7ZUGAyPw6+kHUpMbgcbrY0= X-Google-Smtp-Source: ABdhPJw/Qnbg60yxs576c0oh2XOZC/8jBix4fLMIsuRDigdg6nTncXusnpvbwX2Ulm5eLvfwhK+/BhZqArlF2mftWaU= X-Received: by 2002:a05:6902:4c7:: with SMTP id v7mr27292761ybs.226.1607380857511; Mon, 07 Dec 2020 14:40:57 -0800 (PST) MIME-Version: 1.0 References: <4fcf5f35-481b-a321-cb52-7264fc10d1d4@callfortesting.org> In-Reply-To: From: Mitchell Horne Date: Mon, 7 Dec 2020 18:40:45 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: RISC-V root device question To: Michael Dexter Cc: FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 22:40:58 -0000 On Mon, Dec 7, 2020 at 6:28 PM Michael Dexter wrote: > > On 12/7/20 1:56 PM, Mitchell Horne wrote: > > As you suggest, it is possible to overwrite the default root device in > > the kernel config, by adding a line such as: > > options ROOTDEVNAME=\"ufs:/dev/vtbd0p3\" > > Thank you for the syntax! > > > You can also override it using the QEMU commandline, which is simpler > > since you won't need to recompile anything. Adding the following > > argument should suffice: > > -append="vfs.root.mountfrom=ufs:/dev/vtbd0p3" > > Note that you can set arbitrary kernel environment variables this way ^^ > > My string: > > qemu-system-riscv64 -machine virt -m 2048M -smp 2 -nographic -kernel > /vms/riscv/kernel -bios > /usr/local/share/opensbi/lp64/generic/firmware/fw_jump.elf > -append="vfs.root.mountfrom=ufs:/dev/vtbd0p3" -drive > file=$1,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev > tap,ifname=tap0,script=no,id=net0 > > Reports: -append=vfs.root.mountfrom=ufs:/dev/vtbd0p3: invalid option > My bad, the extra '=' is a typo. It should be: -append "vfs.root.mountfrom=ufs:/dev/vtbd0p3" > I have tried it both there after ...elf and at the end of the string. Is > this perhaps the wrong position? > > > Finally, we do have support for loader.efi on RISC-V, although I have > > not yet documented how to use it on the wiki page. If you would like > > to try this method, please follow up with me and I can provide > > instructions. > > I am happy to if it is ready for public consumption. > Great, I will write that up soon. > > Otherwise, you can expect to see weekly RISC-V snapshots appear in the > > next week or two, and I will ensure that the wiki page is up to date > > with how to run them. > > Thank you and keep up the good work! > > Michael