From 7e954f674b9d7ec74aef405f3443f23443fc43ab Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 1 Feb 2020 01:21:12 +0000 Subject: gnu: u-boot-qemu-riscv64-smode: Add package. * gnu/packages/bootloaders (u-boot-qemu-riscv64-smode): New variable. --- gnu/packages/bootloaders.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/bootloaders.scm') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index c072ff8c8e..5b2db2cf9f 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -751,6 +751,9 @@ to Novena upstream, does not load u-boot.img from the first partition.") ("firmware-m0" ,rk3399-cortex-m0) ,@(package-native-inputs base)))))) +(define-public u-boot-qemu-riscv64-smode + (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")) + (define-public u-boot-rock64-rk3328 (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu"))) (package -- cgit v1.2.3 From 7d06364563bb800d8242be54011716c1b627ee91 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 1 Feb 2020 04:18:12 +0000 Subject: gnu: Add u-boot-sifive-fu540. * gnu/packages/bootloaders (u-boot-sifive-fu540): New variable. --- gnu/packages/bootloaders.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/bootloaders.scm') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 5b2db2cf9f..2d39d51e1f 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -754,6 +754,9 @@ to Novena upstream, does not load u-boot.img from the first partition.") (define-public u-boot-qemu-riscv64-smode (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")) +(define-public u-boot-sifive-fu540 + (make-u-boot-package "sifive_fu540" "riscv64-linux-gnu")) + (define-public u-boot-rock64-rk3328 (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu"))) (package -- cgit v1.2.3 From 10f31af9e36061e1fb7df8c394eecc1c1136b4bc Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 1 Feb 2020 04:19:11 +0000 Subject: gnu: Add u-boot-qemu-riscv64. * gnu/packages/bootloaders (u-boot-qemu-riscv64): New variable. --- gnu/packages/bootloaders.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/bootloaders.scm') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 2d39d51e1f..be5e4eebb1 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -751,6 +751,9 @@ to Novena upstream, does not load u-boot.img from the first partition.") ("firmware-m0" ,rk3399-cortex-m0) ,@(package-native-inputs base)))))) +(define-public u-boot-qemu-riscv64 + (make-u-boot-package "qemu-riscv64" "riscv64-linux-gnu")) + (define-public u-boot-qemu-riscv64-smode (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")) -- cgit v1.2.3 From 1f9fae008d52a9901d016d418d3931f6e9ccbd00 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 2 Feb 2020 02:07:17 +0000 Subject: gnu: u-boot-qemu-riscv64-smode: Patch to fix boot menu. * gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch: New patch. * gnu/local.mk (dist_patch_DATA): Update accordingly. * gnu/packages/bootloaders (u-boot-qemu-riscv64-smode): Add patch. --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 8 +++- .../patches/u-boot-riscv64-fix-extlinux.patch | 54 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch (limited to 'gnu/packages/bootloaders.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 24ab39a6a8..42516544cc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1430,6 +1430,7 @@ dist_patch_DATA = \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/txr-shell.patch \ + %D%/packages/patches/u-boot-riscv64-fix-extlinux.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/udiskie-no-appindicator.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index be5e4eebb1..63a88dd7ec 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -755,7 +755,13 @@ to Novena upstream, does not load u-boot.img from the first partition.") (make-u-boot-package "qemu-riscv64" "riscv64-linux-gnu")) (define-public u-boot-qemu-riscv64-smode - (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")) + (let ((base (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu"))) + (package + (inherit base) + (source (origin + (inherit (package-source u-boot)) + (patches + (search-patches "u-boot-riscv64-fix-extlinux.patch"))))))) (define-public u-boot-sifive-fu540 (make-u-boot-package "sifive_fu540" "riscv64-linux-gnu")) diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch new file mode 100644 index 0000000000..3feeb1dc5e --- /dev/null +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -0,0 +1,54 @@ +From 3fc056f0b9f7c26e58a1e947c8c0184e55919614 Mon Sep 17 00:00:00 2001 +From: David Abdurachmanov +Date: Wed, 21 Aug 2019 12:07:20 -0700 +Subject: [PATCH] qemu-riscv64_smode, sifive-fu540: fix extlinux (define + preboot) +Forwarded: https://patchwork.ozlabs.org/patch/1151125/ + +Commit 37304aaf60bf92a5dc3ef222ba520698bd862a44 removed preboot +commands in RISC-V targets and broke extlinux support as reported +by Fu Wei . + +The patch finishes migration of CONFIG_USE_PREBOOT and CONFIG_REBOOT +to Kconfig. + +Signed-off-by: David Abdurachmanov +--- + configs/qemu-riscv64_smode_defconfig | 2 ++ + configs/sifive_fu540_defconfig | 2 ++ + include/configs/sifive-fu540.h | 4 ---- + 3 files changed, 4 insertions(+), 4 deletions(-) + +Index: u-boot/configs/qemu-riscv64_smode_defconfig +=================================================================== +--- u-boot.orig/configs/qemu-riscv64_smode_defconfig ++++ u-boot/configs/qemu-riscv64_smode_defconfig +@@ -14,3 +14,5 @@ CONFIG_CMD_NVEDIT_EFI=y + CONFIG_OF_PRIOR_STAGE=y + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_DM_MTD=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" +Index: u-boot/configs/sifive_fu540_defconfig +=================================================================== +--- u-boot.orig/configs/sifive_fu540_defconfig ++++ u-boot/configs/sifive_fu540_defconfig +@@ -12,3 +12,5 @@ CONFIG_DISPLAY_BOARDINFO=y + CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_DM_MTD=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" +Index: u-boot/include/configs/sifive-fu540.h +=================================================================== +--- u-boot.orig/include/configs/sifive-fu540.h ++++ u-boot/include/configs/sifive-fu540.h +@@ -40,8 +40,4 @@ + "ramdisk_addr_r=0x88300000\0" \ + BOOTENV + +-#define CONFIG_PREBOOT \ +- "setenv fdt_addr ${fdtcontroladdr};" \ +- "fdt addr ${fdtcontroladdr};" +- + #endif /* __CONFIG_H */ -- cgit v1.2.3