From 4caac69d4472dcc1b4e6e15088a84535f8c6ea8e Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Thu, 26 Sep 2019 19:10:33 +0200 Subject: [PATCH] Set fdt_addr to fdt_addr_r value for PXE/EXTLINUX Signed-off-by: David Abdurachmanov --- riscv64-set-fdt_addr.patch | 31 +++++++++++++++++++++++++++++++ uboot-tools.spec | 14 +++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 riscv64-set-fdt_addr.patch diff --git a/riscv64-set-fdt_addr.patch b/riscv64-set-fdt_addr.patch new file mode 100644 index 0000000..dc61cb9 --- /dev/null +++ b/riscv64-set-fdt_addr.patch @@ -0,0 +1,31 @@ +diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h +index fa9b9af9..bc831a84 100644 +--- a/include/configs/qemu-riscv.h ++++ b/include/configs/qemu-riscv.h +@@ -56,6 +56,7 @@ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_addr_r=0x84000000\0" \ + "fdt_addr_r=0x88000000\0" \ ++ "fdt_addr=0x88000000\0" \ + "scriptaddr=0x88100000\0" \ + "pxefile_addr_r=0x88200000\0" \ + "ramdisk_addr_r=0x88300000\0" \ +diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h +index 736ceb1f..59cf0281 100644 +--- a/include/configs/sifive-fu540.h ++++ b/include/configs/sifive-fu540.h +@@ -36,13 +36,10 @@ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_addr_r=0x84000000\0" \ + "fdt_addr_r=0x88000000\0" \ ++ "fdt_addr=0x88000000\0" \ + "scriptaddr=0x88100000\0" \ + "pxefile_addr_r=0x88200000\0" \ + "ramdisk_addr_r=0x88300000\0" \ + BOOTENV + +-#define CONFIG_PREBOOT \ +- "setenv fdt_addr ${fdtcontroladdr};" \ +- "fdt addr ${fdtcontroladdr};" +- + #endif /* __CONFIG_H */ diff --git a/uboot-tools.spec b/uboot-tools.spec index 90c9356..2541afe 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -2,7 +2,7 @@ Name: uboot-tools Version: 2019.10 -Release: 0.5%{?candidate:.%{candidate}}%{?dist} +Release: 0.5%{?candidate:.%{candidate}}.1.riscv64%{?dist} Summary: U-Boot utilities License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot @@ -29,6 +29,15 @@ Patch8: ARM-tegra-Add-NVIDIA-Jetson-Nano.patch Patch9: arm-tegra-defaine-fdtfile-for-all-devices.patch Patch10: env-fix-build-error-for-envtools.patch +# PXE depends on fdt_addr (mandatory) +# fdt_addr is an address to DTB in HW (e.g. ROM) +# While off-chip NVM QSPI Flash is mapped to the memory our DTB comes from +# FSBL or OpenSBI (most likely). +# Both (FSBL and OpenSBI) incl. the latest DTB directly from the kernel build. +# Thus we have to set fdt_addr to the save value as fdt_addr_r which matches +# the location where OpenSBI will place embedded DTB. +Patch20: riscv64-set-fdt_addr.patch + BuildRequires: bc BuildRequires: dtc BuildRequires: make @@ -286,6 +295,9 @@ cp -p board/warp7/README builds/docs/README.warp7 %endif %changelog +* Thu Sep 26 2019 David Abdurachmanov 2019.10-0.5-rc4.1.riscv64 +- Set fdt_addr to fdt_addr_r value for PXE/EXTLINUX + * Tue Sep 24 2019 David Abdurachmanov 2019.10-0.5-rc4.0.riscv64 - Add support for RISC-V (riscv64)