all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@debian.org>
To: Juliana Sims <juli@incana.org>, 64907@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Efraim Flashner" <efraim@flashner.co.il>
Subject: [bug#64907] [PATCH 1/2] gnu: Add u-boot-rvvm.
Date: Sat, 02 Sep 2023 19:17:47 -0700	[thread overview]
Message-ID: <87r0ngm244.fsf@wireframe> (raw)
In-Reply-To: <62cefdc5d6a4b0e3d6e611a6b6541f00acc19d9f.1690488628.git.juli@incana.org>

[-- Attachment #1: Type: text/plain, Size: 3396 bytes --]

On 2023-07-27, Juliana Sims wrote:
> * gnu/packages/bootloaders.scm (%u-boot-rvvm-support-patch, u-boot-rvvm): New
> symbol.
> * gnu/packages/patches/u-boot-rvvm-support.patch: New patch.
...
> diff --git a/gnu/packages/patches/u-boot-rvvm-support.patch b/gnu/packages/patches/u-boot-rvvm-support.patch
> new file mode 100644
> index 0000000000..1e62a2d61d
> --- /dev/null
> +++ b/gnu/packages/patches/u-boot-rvvm-support.patch
> @@ -0,0 +1,67 @@
> +Patch to support NVMe and RVVM board properly in U-Boot
> + - Enables NVMe PCI support & booting from it
> + - Enables framebuffer driver, passes it as EFI FB
> + - Enables Realtek RTL8169 driver
> + - Get rid of DHCP boot, it is confusing and not helpful
> +
> +Applies cleanly over U-Boot 2023.4
> +Reuses QEMU virt board config, build like this:
> + make qemu-riscv64_smode_defconfig
> + CROSS_COMPILE=riscv64-linux-gnu- make
> +
> +Resulting firmware works fine on both RVVM and QEMU
> +
> +diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> +index 48ca4ff4..faa17f33 100644
> +--- a/arch/riscv/Kconfig
> ++++ b/arch/riscv/Kconfig
> +@@ -15,7 +15,7 @@ config TARGET_MICROCHIP_ICICLE
> + 	bool "Support Microchip PolarFire-SoC Icicle Board"
> + 
> + config TARGET_QEMU_VIRT
> +-	bool "Support QEMU Virt Board"
> ++	bool "Support QEMU/RVVM Virt Boards"
> + 
> + config TARGET_SIFIVE_UNLEASHED
> + 	bool "Support SiFive Unleashed Board"

This seems unecessary, unless this is pulling from a patch submitted to
upstream u-boot that is likely to be merged.


> +diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig
> +index 6114e1b8..7c25825a 100644
> +--- a/board/emulation/qemu-riscv/Kconfig
> ++++ b/board/emulation/qemu-riscv/Kconfig
> +@@ -29,6 +29,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
> + 	def_bool y
> + 	select GENERIC_RISCV
> + 	select SUPPORT_SPL
> ++	imply OPTIMIZE_INLINING
> + 	imply AHCI
> + 	imply SMP
> + 	imply BOARD_LATE_INIT
> +@@ -50,7 +51,12 @@ config BOARD_SPECIFIC_OPTIONS # dummy
> + 	imply SCSI_AHCI
> + 	imply AHCI_PCI
> + 	imply E1000
> ++	imply RTL8169
> + 	imply NVME
> ++	imply NVME_PCI
> ++	imply VIDEO
> ++	imply VIDEO_SIMPLE
> ++	imply NO_FB_CLEAR
> + 	imply PCI
> + 	imply PCIE_ECAM_GENERIC
> + 	imply SCSI

I *think* all of these options could be done by passing #:configs ...

For example, how the u-boot-qemu-arm changes an option:

(define-public u-boot-qemu-arm
  (make-u-boot-package "qemu_arm" "arm-linux-gnueabihf"
                       #:configs '("# CONFIG_FIT_SIGNATURE is not set")))


> +diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
> +index 20135f56..821251a3 100644
> +--- a/include/configs/qemu-riscv.h
> ++++ b/include/configs/qemu-riscv.h
> +@@ -19,9 +19,9 @@
> + 
> + #define BOOT_TARGET_DEVICES(func) \
> + 	func(QEMU, qemu, na) \
> ++	func(NVME, nvme, 0) \
> + 	func(VIRTIO, virtio, 0) \
> +-	func(SCSI, scsi, 0) \
> +-	func(DHCP, dhcp, na)
> ++	func(SCSI, scsi, 0)
> + 
> + #include <config_distro_bootcmd.h>
> + 
> -- 
> 2.41.0

I would just leave the DHCP in; it surely cannot hurt *that* much... or?

... at which point, if all my other suggestions are accepted, the NVME
part might be the only patch to upstream sources, and you could fix it
with a snippet or phase or a one-line patch. :)

live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2023-09-03  2:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 20:13 [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages Juliana Sims
2023-07-27 21:18 ` [bug#64907] [PATCH 1/2] gnu: Add u-boot-rvvm Juliana Sims
2023-09-03  2:17   ` Vagrant Cascadian [this message]
2023-07-27 21:18 ` [bug#64907] [PATCH 2/2] gnu: Add opensbi-rvvm Juliana Sims
2023-09-03  2:24   ` Vagrant Cascadian
2023-08-12 20:54 ` [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages Ludovic Courtès
2023-08-29 23:07 ` Vagrant Cascadian
2023-08-29 23:24   ` Vagrant Cascadian
2023-09-03  1:42     ` Juliana Sims
2024-03-18 18:23 ` [bug#64907] [PATCH 2/2] gnu: Add opensbi-rvvm Eva Kurchatova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0ngm244.fsf@wireframe \
    --to=vagrant@debian.org \
    --cc=64907@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=juli@incana.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.