From owner-freebsd-current@freebsd.org Mon Dec 7 22:28:40 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 617D74B8FA4 for ; Mon, 7 Dec 2020 22:28:40 +0000 (UTC) (envelope-from editor@callfortesting.org) Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqdJ81X2Tz3wSZ for ; Mon, 7 Dec 2020 22:28:39 +0000 (UTC) (envelope-from editor@callfortesting.org) Received: by mail-pf1-x436.google.com with SMTP id q22so11724319pfk.12 for ; Mon, 07 Dec 2020 14:28:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hnebSAPDkbeff5+omkXKB+HPgVCTSuIp/iQ9KsiERGk=; b=cwWeCplP1ojtPzGYANnnV7jaw1YC2JzbJ52mC7xyWA8c9KRNZiVm9XQgl2Khr09cBt SdZJ7REe8otgHWl53SGXAoogF8s7Y9GWczfuvgXpp84TQPlw5zTxUEiZMh8t99nB5yRk B2rzmz/mL2amwT7YkdO9WxCSAvWA06KVlIX8RDbqHpWIZz1oGnEp88H/DKQXsmfY4ldi 8VzJGp9ptvAo8pEqkYIAQeboxx2BgXSlthi2ebpAp2giPgezF9apeHjzsmtRTote+N73 CscWLMyQP0ykBtP5HEvGAgibI+UcTPFzS4E1jINigXr6qcd5UXe+5DkPHoYdBtgvMrHl IFtg== X-Gm-Message-State: AOAM531xTcq5mC82Bz9ra+k+ag9JKlXATcci9VH3XBMXhGIfoADCqyKv FRb36Yk+509ViaWg0cW6ZXhrlPf8IAPfVytt X-Google-Smtp-Source: ABdhPJyLtMzD+w2nfhbK8TG6AVdpHDExtw7ybuQS8J31BYTNMBISR+IKvQY3PmdISNUIBctq7SYNEw== X-Received: by 2002:a63:c945:: with SMTP id y5mr20369923pgg.118.1607380118309; Mon, 07 Dec 2020 14:28:38 -0800 (PST) Received: from macbook-2.local (c-67-170-137-52.hsd1.or.comcast.net. [67.170.137.52]) by smtp.gmail.com with ESMTPSA id f123sm15234638pfa.89.2020.12.07.14.28.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Dec 2020 14:28:37 -0800 (PST) Subject: Re: RISC-V root device question To: Mitchell Horne Cc: FreeBSD Current References: <4fcf5f35-481b-a321-cb52-7264fc10d1d4@callfortesting.org> From: Michael Dexter Message-ID: Date: Mon, 7 Dec 2020 14:28:34 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CqdJ81X2Tz3wSZ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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:28:40 -0000 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 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. > 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