Compare commits
9 Commits
master
...
f33-riscv6
Author | SHA1 | Date | |
---|---|---|---|
101570ca24 | |||
83ae46aeb8 | |||
6c8cd85da5 | |||
d7e1cc216a | |||
807bfac64f | |||
f47f84a650 | |||
5fb280dcf6 | |||
0f9b26175b | |||
2c7fba2985 |
40
riscv-CONFIG_CMD_GPT_RENAME.patch
Normal file
40
riscv-CONFIG_CMD_GPT_RENAME.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
|
||||
index aa79abc1..625e7295 100644
|
||||
--- a/configs/qemu-riscv64_defconfig
|
||||
+++ b/configs/qemu-riscv64_defconfig
|
||||
@@ -14,3 +14,5 @@ CONFIG_OF_PRIOR_STAGE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_NR_CPUS=32
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_GPT_RENAME=y
|
||||
diff --git a/configs/qemu-riscv64_smode_defconfig b/configs/qemu-riscv64_smode_defconfig
|
||||
index 459011a2..f24afc48 100644
|
||||
--- a/configs/qemu-riscv64_smode_defconfig
|
||||
+++ b/configs/qemu-riscv64_smode_defconfig
|
||||
@@ -15,3 +15,5 @@ CONFIG_OF_PRIOR_STAGE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_NR_CPUS=32
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_GPT_RENAME=y
|
||||
diff --git a/configs/qemu-riscv64_spl_defconfig b/configs/qemu-riscv64_spl_defconfig
|
||||
index 56a84832..533be191 100644
|
||||
--- a/configs/qemu-riscv64_spl_defconfig
|
||||
+++ b/configs/qemu-riscv64_spl_defconfig
|
||||
@@ -15,3 +15,5 @@ CONFIG_OF_PRIOR_STAGE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_NR_CPUS=32
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_GPT_RENAME=y
|
||||
diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig
|
||||
index 5d3ee8da..a70283bd 100644
|
||||
--- a/configs/sifive_fu540_defconfig
|
||||
+++ b/configs/sifive_fu540_defconfig
|
||||
@@ -28,3 +28,5 @@ CONFIG_SPL_CLK=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_DM_RESET=y
|
||||
CONFIG_NR_CPUS=32
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_GPT_RENAME=y
|
26
riscv-compressed-booti.patch
Normal file
26
riscv-compressed-booti.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
|
||||
index aed9a4ae..07607710 100644
|
||||
--- a/include/configs/qemu-riscv.h
|
||||
+++ b/include/configs/qemu-riscv.h
|
||||
@@ -56,6 +56,8 @@
|
||||
"scriptaddr=0x88100000\0" \
|
||||
"pxefile_addr_r=0x88200000\0" \
|
||||
"ramdisk_addr_r=0x88300000\0" \
|
||||
+ "kernel_comp_addr_r=0x90000000\0" \
|
||||
+ "kernel_comp_size=0x4000000\0" \
|
||||
BOOTENV
|
||||
#endif
|
||||
|
||||
diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h
|
||||
index c1c79db1..9750381a 100644
|
||||
--- a/include/configs/sifive-fu540.h
|
||||
+++ b/include/configs/sifive-fu540.h
|
||||
@@ -66,6 +66,8 @@
|
||||
"script_size_f=0x1000\0" \
|
||||
"pxefile_addr_r=0x88200000\0" \
|
||||
"ramdisk_addr_r=0x88300000\0" \
|
||||
+ "kernel_comp_addr_r=0x90000000\0" \
|
||||
+ "kernel_comp_size=0x4000000\0" \
|
||||
"type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \
|
||||
"type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
|
||||
"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
|
36
riscv-set-nrcpus-32.patch
Normal file
36
riscv-set-nrcpus-32.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
|
||||
index daf5d655..aa79abc1 100644
|
||||
--- a/configs/qemu-riscv64_defconfig
|
||||
+++ b/configs/qemu-riscv64_defconfig
|
||||
@@ -13,3 +13,4 @@ CONFIG_CMD_NVEDIT_EFI=y
|
||||
CONFIG_OF_PRIOR_STAGE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_DM_MTD=y
|
||||
+CONFIG_NR_CPUS=32
|
||||
diff --git a/configs/qemu-riscv64_smode_defconfig b/configs/qemu-riscv64_smode_defconfig
|
||||
index 0000564e..459011a2 100644
|
||||
--- a/configs/qemu-riscv64_smode_defconfig
|
||||
+++ b/configs/qemu-riscv64_smode_defconfig
|
||||
@@ -14,3 +14,4 @@ CONFIG_CMD_NVEDIT_EFI=y
|
||||
CONFIG_OF_PRIOR_STAGE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_DM_MTD=y
|
||||
+CONFIG_NR_CPUS=32
|
||||
diff --git a/configs/qemu-riscv64_spl_defconfig b/configs/qemu-riscv64_spl_defconfig
|
||||
index 897adf6a..56a84832 100644
|
||||
--- a/configs/qemu-riscv64_spl_defconfig
|
||||
+++ b/configs/qemu-riscv64_spl_defconfig
|
||||
@@ -14,3 +14,4 @@ CONFIG_DISPLAY_BOARDINFO=y
|
||||
CONFIG_OF_PRIOR_STAGE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_DM_MTD=y
|
||||
+CONFIG_NR_CPUS=32
|
||||
diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig
|
||||
index e4dd2018..5d3ee8da 100644
|
||||
--- a/configs/sifive_fu540_defconfig
|
||||
+++ b/configs/sifive_fu540_defconfig
|
||||
@@ -27,3 +27,4 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_DM_RESET=y
|
||||
+CONFIG_NR_CPUS=32
|
4
riscv64-boards
Normal file
4
riscv64-boards
Normal file
@ -0,0 +1,4 @@
|
||||
qemu-riscv64
|
||||
qemu-riscv64_smode
|
||||
qemu-riscv64_spl
|
||||
sifive_fu540
|
@ -1,8 +1,11 @@
|
||||
#global candidate rc5
|
||||
|
||||
# Set it to "opensbi" (stable) or opensbi-unstable (unstable, git)
|
||||
%global opensbi opensbi-unstable
|
||||
|
||||
Name: uboot-tools
|
||||
Version: 2020.10
|
||||
Release: 2%{?candidate:.%{candidate}}%{?dist}
|
||||
Release: 2%{?candidate:.%{candidate}}.7.riscv64%{?dist}.rvre0
|
||||
Summary: U-Boot utilities
|
||||
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
||||
URL: http://www.denx.de/wiki/U-Boot
|
||||
@ -13,6 +16,7 @@ Source2: arm-chromebooks
|
||||
Source3: aarch64-boards
|
||||
Source4: aarch64-chromebooks
|
||||
Source5: 10-devicetree.install
|
||||
Source6: riscv64-boards
|
||||
|
||||
# Fedoraisms patches
|
||||
# Needed to find DT on boot partition that's not the first partition
|
||||
@ -40,6 +44,17 @@ Patch14: rk3399-Pinebook-pro-EDP-support.patch
|
||||
Patch15: rk3399-reset-display-hack.patch
|
||||
Patch16: rockchip-Rock960-Fix-up-USB-support.patch
|
||||
|
||||
# RISC-V (riscv64) patches
|
||||
# Add support for loading Image.{gz,xz,..} kernels with booti command
|
||||
Patch20: riscv-compressed-booti.patch
|
||||
|
||||
# Set max CPUs to 32 (same as Linux)
|
||||
Patch21: riscv-set-nrcpus-32.patch
|
||||
|
||||
# Enable CONFIG_CMD_GPT_RENAME
|
||||
# Allows to see full GPT partitions information and modify it
|
||||
Patch22: riscv-CONFIG_CMD_GPT_RENAME.patch
|
||||
|
||||
BuildRequires: bc
|
||||
BuildRequires: dtc
|
||||
BuildRequires: make
|
||||
@ -67,6 +82,9 @@ BuildRequires: vboot-utils
|
||||
%ifarch aarch64
|
||||
BuildRequires: arm-trusted-firmware-armv8
|
||||
%endif
|
||||
%ifarch riscv64
|
||||
BuildRequires: %{opensbi}
|
||||
%endif
|
||||
|
||||
Requires: dtc
|
||||
Requires: systemd
|
||||
@ -99,10 +117,20 @@ BuildArch: noarch
|
||||
U-Boot firmware binaries for armv7 boards
|
||||
%endif
|
||||
|
||||
%ifarch riscv64
|
||||
%package -n uboot-images-riscv64
|
||||
Summary: u-boot bootloader images for riscv64 boards
|
||||
Requires: uboot-tools
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n uboot-images-riscv64
|
||||
u-boot bootloader binaries for riscv64 boards
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}}
|
||||
|
||||
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 .
|
||||
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE6 .
|
||||
|
||||
%build
|
||||
mkdir builds
|
||||
@ -112,7 +140,11 @@ mkdir builds
|
||||
%{?enable_devtoolset7:%{enable_devtoolset7}}
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 %{arm}
|
||||
%ifarch riscv64
|
||||
export OPENSBI=%{_datadir}/%{opensbi}/generic/firmware/fw_dynamic.bin
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 %{arm} riscv64
|
||||
for board in $(cat %{_arch}-boards)
|
||||
do
|
||||
echo "Building board: $board"
|
||||
@ -198,6 +230,19 @@ do
|
||||
done
|
||||
%endif
|
||||
|
||||
%ifarch riscv64
|
||||
for board in $(cat %{_arch}-boards)
|
||||
do
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
|
||||
for file in u-boot.bin u-boot.dtb u-boot.img u-boot-nodtb.bin u-boot-dtb.bin u-boot.itb u-boot-dtb.img u-boot.its spl/u-boot-spl.bin spl/u-boot-spl-nodtb.bin spl/u-boot-spl.dtb spl/u-boot-spl-dtb.bin
|
||||
do
|
||||
if [ -f builds/$(echo $board)/$(echo $file) ]; then
|
||||
install -p -m 0644 builds/$(echo $board)/$(echo $file) $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
|
||||
fi
|
||||
done
|
||||
done
|
||||
%endif
|
||||
|
||||
for tool in bmp_logo dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc img2srec mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder ubsha1 xway-swap-bytes
|
||||
do
|
||||
install -p -m 0755 builds/tools/$tool $RPM_BUILD_ROOT%{_bindir}
|
||||
@ -251,7 +296,38 @@ cp -p board/warp7/README builds/docs/README.warp7
|
||||
%{_datadir}/uboot/*
|
||||
%endif
|
||||
|
||||
%ifarch riscv64
|
||||
%files -n uboot-images-riscv64
|
||||
%{_datadir}/uboot/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Nov 10 2021 David Abdurachmanov <david.abdurachmanov@gmail.com> - 2020.10-2.7.riscv64.rvre0
|
||||
- Rebuilt for Fedora RISCV, no changes
|
||||
|
||||
* Wed Apr 21 2021 David Abdurachmanov <david.abdurachmanov@gmail.com> - 2020.10-2.7.riscv64
|
||||
- Rebuild for a new OpenSBI
|
||||
|
||||
* Wed Jan 13 2021 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2020.10-2.6.riscv64
|
||||
- Enable CONFIG_CMD_GPT_RENAME for riscv64
|
||||
|
||||
* Thu Jan 07 2021 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2020.10-2.5.riscv64
|
||||
- Increase max CPU to 32 (same as Linux)
|
||||
- Add compressed Image.{gz,xz,..} kernel support for booti command
|
||||
|
||||
* Thu Jan 07 2021 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2020.10-2.4.riscv64
|
||||
- Remove u-boot-initial-env
|
||||
|
||||
* Thu Jan 07 2021 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2020.10-2.3.riscv64
|
||||
- Fix u-boot-initial-env make file
|
||||
|
||||
* Thu Jan 07 2021 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2020.10-2.2.riscv64
|
||||
- Include more binaries (e.g. SPL)
|
||||
- Generate u-boot-initial-env files
|
||||
|
||||
* Wed Jan 06 2021 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2020.10-2.0.riscv64
|
||||
- Add support for riscv64
|
||||
|
||||
* Wed Oct 28 08:21:56 GMT 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2020.10-2
|
||||
- Fix kernel installs for non EBBR systems
|
||||
- Fix for wired networks on some Allwinner devices
|
||||
|
Loading…
Reference in New Issue
Block a user