From 1fda5d77107e72a87d0f9be452fcb15c947a1455 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 19 Jan 2024 14:29:23 +0100 Subject: [PATCH] Set the bootcmd in u-boot In QEMU the kernel is loaded at the ${kernel_addr_r} address and we need to use booti instead of bootm. --- overlay.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overlay.nix b/overlay.nix index c1fb5f0..7a4eb27 100644 --- a/overlay.nix +++ b/overlay.nix @@ -22,8 +22,9 @@ final: prev: qemu = prev.qemu.override { rutabagaSupport = false; }; uboot-custom = prev.ubootQemuRiscv64Smode.override { + # Override preboot to set 'bootcmd' directly to the kernel address in RAM extraConfig = '' - CONFIG_CMD_QFW=y + CONFIG_PREBOOT="setenv fdt_addr ''${fdtcontroladdr}; fdt addr ''${fdtcontroladdr}; setenv bootcmd booti ''${kernel_addr_r} - ''${fdtcontroladdr};" ''; };