%global candidate rc4 %if 0%{?rhel} %bcond_with toolsonly %else %bcond_without toolsonly %endif %global debug_package %{nil} # Set it to "opensbi" (stable) or "opensbi-unstable" (unstable, git) %global opensbi opensbi Name: uboot-tools Version: 2025.04 Release: 0.6%{?candidate:.%{candidate}}%{?dist} Epoch: 1 Summary: U-Boot utilities # Automatically converted from old format: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ - review is highly recommended. License: GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LGPL-2.1-or-later AND LGPL-2.0-or-later URL: http://www.denx.de/wiki/U-Boot Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 Source1: aarch64-boards Source2: riscv64-boards Source10: rk3588-boards Source11: rk3568-boards Source12: rk3566-boards Source20: rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin Source21: rk3568_ddr_1056MHz_v1.23.bin Source22: rk3566_ddr_1056MHz_v1.23.bin # This is now legacy, most devices use bootflow, we keep this for the laggards Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch # Identify VFAT partitions as ESP, allows EFI setvar on our images Patch2: uefi-Add-all-options-for-EFI-System-Partitions.patch # New function to find fdt for loading from disk Patch3: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch # Fedora patches to enable/disable features Patch4: disable-VBE-by-default.patch Patch5: enable-bootmenu-by-default.patch # Should be upstream but it's taking time Patch6: Add-video-damage-tracking.patch # For HTTP boot installs Patch7: Add-pmem-node-for-preserving-distro-ISO-s.patch # USB-PD improvements Patch8: USB-PD-TCPM-improvements.patch # Device improvments # RPi Patch10: rpi-fixes.patch # Rockchips improvements Patch11: rockchip-Enable-preboot-start-for-pci-usb.patch #Patch12: rockchip-Modernise-Geekbox-config.patch ExclusiveArch: aarch64 BuildRequires: bc BuildRequires: bison BuildRequires: dtc BuildRequires: flex BuildRequires: gcc BuildRequires: gnutls-devel BuildRequires: libuuid-devel BuildRequires: make BuildRequires: openssl-devel-engine BuildRequires: perl-interpreter BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-libfdt BuildRequires: swig BuildRequires: arm-trusted-firmware-armv8 BuildRequires: python3-pyelftools BuildRequires: xxd %ifarch riscv64 BuildRequires: %{opensbi} %endif Requires: dtc BuildRequires: uboot-tools %description This package contains a few U-Boot utilities - mkimage for creating boot images and fw_printenv/fw_setenv for manipulating the boot environment variables. %package -n uboot-images-copr Summary: U-Boot firmware images for aarch64 boards BuildArch: noarch %description -n uboot-images-copr U-Boot firmware binaries for aarch64 boards %ifarch riscv64 %package -n uboot-images-riscv64 Summary: U-Boot firmware images for riscv64 boards BuildArch: noarch %description -n uboot-images-riscv64 U-Boot firmware binaries for riscv64 boards %endif %prep %autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}} cp %SOURCE1 %SOURCE2 . cp %SOURCE10 . cp %SOURCE11 . cp %SOURCE12 . cp %SOURCE20 . cp %SOURCE21 . cp %SOURCE22 . %build mkdir builds for board in $(cat rk3588-boards) do echo "Board: $board using rk3588" mkdir builds/$(echo $board)/ make $(echo $board)_defconfig O=builds/$(echo $board)/ BL31=/usr/share/arm-trusted-firmware/rk3588/bl31.elf \ ROCKCHIP_TPL=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin \ %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ done for board in $(cat rk3568-boards) do echo "Board: $board using rk3568" mkdir builds/$(echo $board)/ make $(echo $board)_defconfig O=builds/$(echo $board)/ BL31=/usr/share/arm-trusted-firmware/rk3568/bl31.elf \ ROCKCHIP_TPL=rk3568_ddr_1056MHz_v1.23.bin \ %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ done for board in $(cat rk3566-boards) do echo "Board: $board using rk3566" mkdir builds/$(echo $board)/ make $(echo $board)_defconfig O=builds/$(echo $board)/ BL31=/usr/share/arm-trusted-firmware/rk3568/bl31.elf \ ROCKCHIP_TPL=rk3566_ddr_1056MHz_v1.23.bin \ %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ done %install mkdir -p %{buildroot}%{_datadir}/uboot/ for board in $(ls builds) do for file in u-boot-rockchip-spi.bin u-boot-rockchip.bin do if [ -f builds/$(echo $board)/$(echo $file) ]; then install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) fi done done %files -n uboot-images-copr %license Licenses/* %dir %{_datadir}/uboot/ %{_datadir}/uboot/* %changelog * Wed Mar 12 2025 Peter Robinson - 1:2025.04-0.6.rc4 - Update to 2025.04 RC4 * Wed Feb 26 2025 Peter Robinson - 1:2025.04-0.5.rc3 - Update to 2025.04 RC3 * Tue Feb 18 2025 David Abdurachmanov - 1:2025.04-0.4.rc2 - Add support for riscv64 * Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.3.rc2 - Update to 2025.05 RC2 * Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.2.rc1 - Update to 2025.05 RC1 * Tue Jan 28 2025 Peter Robinson - 1:2025.01-3 - Add new fdt_add_pubkey tool * Sun Jan 19 2025 Fedora Release Engineering - 1:2025.01-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Tue Jan 07 2025 Peter Robinson - 1:2025.01-1 - Update to 2025.01 GA * Mon Jan 06 2025 Peter Robinson - 1:2025.01-0.2.rc6 - Rebuild for TF-A 2.12 * Tue Dec 31 2024 Peter Robinson - 1:2025.01-0.1.rc6 - Update to 2025.01 RC6 * Fri Oct 11 2024 Peter Robinson - 1:2024.10-1 - Update to 2024.10 GA - Fix passing RPi firmware CMA setting to kernel DT - Update Geekbox * Thu Oct 03 2024 Peter Robinson - 1:2024.10-0.8.rc6 - Pass CMA FW setting through to kernel DT for Raspberry Pi * Tue Oct 01 2024 Peter Robinson - 1:2024.10-0.7.rc6 - Update to 2024.10 RC6 * Mon Sep 16 2024 Peter Robinson - 1:2024.10-0.6.rc5 - Update to 2024.10 RC5 * Fri Sep 6 2024 Peter Robinson - 1:2024.10-0.5.rc4 - Add missing licenses directory * Tue Sep 03 2024 Peter Robinson - 1:2024.10-0.4.rc4 - Update to 2024.10 RC4 * Mon Sep 02 2024 Peter Robinson - 1:2024.10-0.3.rc3 - Fix Allwinner firmware chainloading (rhbz#2309138) - Fix ATF firmware selection on a number of devices - Support Allwinner SCP firmware (fixes suspend/resume) * Tue Aug 27 2024 Peter Robinson - 1:2024.10-0.2.rc3 - Update to 2024.10 RC3 - Enable initial QCM6490 SoC support * Thu Aug 15 2024 Peter Robinson - 1:2024.10-0.1.rc2 - Update to 2024.10 RC2 * Tue Jul 23 2024 Peter Robinson - 1:2024.07-1 - Update to 2024.07 * Sat Jul 20 2024 Fedora Release Engineering - 1:2024.07-0.3.rc4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Jun 18 2024 Peter Robinson - 1:2024.07-0.2.rc4 - Update to 2024.07 RC4 * Sat May 25 2024 Peter Robinson - 1:2024.07-0.1.rc3 - Update to 2024.07 RC3 * Wed Apr 03 2024 Peter Robinson - 1:2024.04-1 - Update to 2024.04 GA - Rockchip rk3328 USB fixes * Wed Mar 27 2024 Peter Robinson - 1:2024.04-0.8.rc5 - Update to 2024.04 RC5 * Thu Mar 21 2024 Peter Robinson - 1:2024.04-0.7.rc4 - Updated patch for DTB loading * Fri Mar 15 2024 Peter Robinson - 1:2024.04-0.6.rc4 - Updated fix for FDT load * Wed Mar 13 2024 Peter Robinson - 1:2024.04-0.5.rc4 - Fixes for Rockchip rk3399 autoboot * Tue Mar 12 2024 Peter Robinson - 1:2024.04-0.4.rc4 - Update to 2024.04 RC4 - Initial fix for loading DT off /boot (rhbz 2247873) * Thu Feb 29 2024 Peter Robinson - 1:2024.04-0.3.rc3 - Update to 2024.04 RC3 - Enable a number of new upstream devices - Upstream now builds Rockchip SPI artifacts - Various cleanups - Fix ESP partition detection to enable EFI vars * Wed Feb 14 2024 Peter Robinson - 1:2024.04-0.2.rc2 - Update to 2024.04 RC2 * Sat Jan 27 2024 Fedora Release Engineering - 1:2024.01-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 08 2024 Peter Robinson - 1:2024.01-1 - Update to 2024.01