#global candidate rc0 %bcond_without toolsonly Name: uboot-tools Version: 2024.10 Release: 5%{?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 ExcludeArch: s390x Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 Source1: aarch64-boards # 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 # build fix for swig-4.3.0 in rawhide, to be dropped with v2025.01 Patch7: libfdt-Fix-build-with-swig-4.3.0.patch # Rockchips improvements Patch10: rockchip-Enable-preboot-start-for-pci-usb.patch Patch11: FUSB302-USB-C-controller-support.patch Patch12: rockchip-Modernise-Geekbox-config.patch # QCom Patch15: Qualcomm-add-support-for-SC7280-and-the-RB3-Gen-2.patch # RPi Patch20: rpi-Pass-CMA-through-from-firmware-DT.patch # Build with OPENSSL_NO_ENGINE Patch51: openssl-no-engine.patch # Asahi patches from gen-asahi-patches.sh # input: apple: Split off report handling into a separate file Patch100: https://github.com/AsahiLinux/u-boot/commit/61796eeaa06502b84183920b7a7abe404fe4e5cf.patch#/asahi-61796eeaa06502b84183920b7a7abe404fe4e5cf.patch # arm: apple: rtkit: Add support for AP power & syslogs Patch101: https://github.com/AsahiLinux/u-boot/commit/2d0962c6a319a52cb9584a325297f254c2181c3a.patch#/asahi-2d0962c6a319a52cb9584a325297f254c2181c3a.patch # arm: apple: rtkit: Add default buffer handlers Patch102: https://github.com/AsahiLinux/u-boot/commit/0d83504f7d56a63a66fc8a25f8c4373ad086d382.patch#/asahi-0d83504f7d56a63a66fc8a25f8c4373ad086d382.patch # arm: apple: rtkit: Add a generic RTKit helper driver Patch103: https://github.com/AsahiLinux/u-boot/commit/1d8dae5caf048dc084951de80ae8768a2ba60535.patch#/asahi-1d8dae5caf048dc084951de80ae8768a2ba60535.patch # input: apple: Add support for Apple MTP keyboard Patch104: https://github.com/AsahiLinux/u-boot/commit/c2d3d5f69fead8d660413b4c105522975882aa52.patch#/asahi-c2d3d5f69fead8d660413b4c105522975882aa52.patch # arm: apple: Add MTP keyboard options to defconfig Patch105: https://github.com/AsahiLinux/u-boot/commit/c85eced5d8501abbc05dbc81c04654e965c561e0.patch#/asahi-c85eced5d8501abbc05dbc81c04654e965c561e0.patch # apple: Set up file system firmware loader Patch106: https://github.com/AsahiLinux/u-boot/commit/c3ca9823a44baffab4b6c1fefde0c28ce6db1e53.patch#/asahi-c3ca9823a44baffab4b6c1fefde0c28ce6db1e53.patch # iopoll: Add readb_poll_sleep_timeout Patch107: https://github.com/AsahiLinux/u-boot/commit/10e35437374daa93e6409bcf4ebd59fe67864803.patch#/asahi-10e35437374daa93e6409bcf4ebd59fe67864803.patch # usb: xhci-pci: Load ASMedia XHCI controller firmware Patch108: https://github.com/AsahiLinux/u-boot/commit/2566e35a1077fdd18da35d39ea7ccfa0d4938b2d.patch#/asahi-2566e35a1077fdd18da35d39ea7ccfa0d4938b2d.patch # env: apple: Enable ENV_IS_IN_FAT Patch109: https://github.com/AsahiLinux/u-boot/commit/93165e50bb2f9c517567235ae044052bbc2b6b59.patch#/asahi-93165e50bb2f9c517567235ae044052bbc2b6b59.patch # apple: Nail down the EFI system partition Patch110: https://github.com/AsahiLinux/u-boot/commit/5a186e55b7a712f71031975d74562c5c15f8bd03.patch#/asahi-5a186e55b7a712f71031975d74562c5c15f8bd03.patch # scripts/dtc: Add support for floating-point literals Patch111: https://github.com/AsahiLinux/u-boot/commit/e5982b64f556d0d51dee1db30645c819db962f1d.patch#/asahi-e5982b64f556d0d51dee1db30645c819db962f1d.patch # arm: dts: apple: Update Apple M1 device trees Patch112: https://github.com/AsahiLinux/u-boot/commit/bd003c8fd757b040231e6cb037eea34bd5ffb34b.patch#/asahi-bd003c8fd757b040231e6cb037eea34bd5ffb34b.patch # arm: dts: apple: Add Apple M1 Pro/Max/Ultra device trees Patch113: https://github.com/AsahiLinux/u-boot/commit/ed55c3c869e5371ad4fbe3fb39a78308a9ee46ed.patch#/asahi-ed55c3c869e5371ad4fbe3fb39a78308a9ee46ed.patch # arm: dts: apple: Add Apple M2 device trees Patch114: https://github.com/AsahiLinux/u-boot/commit/3249b15abee21c61a5adaaac907391bd9be1e77b.patch#/asahi-3249b15abee21c61a5adaaac907391bd9be1e77b.patch # arm: dts: apple: Add Apple M2 Pro/Max device trees Patch115: https://github.com/AsahiLinux/u-boot/commit/2dcd4c3be4ecc51334f146e45b0e302793978f94.patch#/asahi-2dcd4c3be4ecc51334f146e45b0e302793978f94.patch # arm: apple: rtkit: Add OSLog buffer support Patch116: https://github.com/AsahiLinux/u-boot/commit/f28a7aef995f2e716165e28165fd56c9d72a7682.patch#/asahi-f28a7aef995f2e716165e28165fd56c9d72a7682.patch # arm: apple: rtkit: Add endpoint field to buffers Patch117: https://github.com/AsahiLinux/u-boot/commit/731fdee5c6d89a4c9eb1e0ff2f71bca6ca0034f7.patch#/asahi-731fdee5c6d89a4c9eb1e0ff2f71bca6ca0034f7.patch # arm: apple: rtkit: Support allocating OSLog out of SRAM in helper Patch118: https://github.com/AsahiLinux/u-boot/commit/f5cd23ceb04062283e9e2811b78b5b269604bc64.patch#/asahi-f5cd23ceb04062283e9e2811b78b5b269604bc64.patch # efi_loader: prefer EFI system partition Patch119: https://github.com/AsahiLinux/u-boot/commit/fb8250939a64350f84e9076f03a3edbb2199dc62.patch#/asahi-fb8250939a64350f84e9076f03a3edbb2199dc62.patch # apple_m1_defconfig: Disable EFI variable store Patch120: https://github.com/AsahiLinux/u-boot/commit/652e4164ed90ad5b4db137609aa537a62cec9103.patch#/asahi-652e4164ed90ad5b4db137609aa537a62cec9103.patch # usb: xhci: Add more debugging Patch121: https://github.com/AsahiLinux/u-boot/commit/6a1639d92d485195bc7a42f878090b0b04f9f92d.patch#/asahi-6a1639d92d485195bc7a42f878090b0b04f9f92d.patch # usb: storage: Clear endpoint stalls properly Patch122: https://github.com/AsahiLinux/u-boot/commit/4d2f4ab7cbf5d1ceb71cf77da62a4da9f6c33dbc.patch#/asahi-4d2f4ab7cbf5d1ceb71cf77da62a4da9f6c33dbc.patch # usb: Pass through timeout to drivers Patch123: https://github.com/AsahiLinux/u-boot/commit/c92fdae194d4fb1a3f3b438e36b0ea3216067b95.patch#/asahi-c92fdae194d4fb1a3f3b438e36b0ea3216067b95.patch # usb: xhci: Hook up timeouts Patch124: https://github.com/AsahiLinux/u-boot/commit/6a6a89b56a08379bb0146d9ae4c52942adf36ecb.patch#/asahi-6a6a89b56a08379bb0146d9ae4c52942adf36ecb.patch # scsi: Fix a bunch of SCSI definitions. Patch125: https://github.com/AsahiLinux/u-boot/commit/71cdf1c7ca643c16b08713877ce2b60e2c233cb9.patch#/asahi-71cdf1c7ca643c16b08713877ce2b60e2c233cb9.patch # usb: storage: Increase read/write timeout Patch126: https://github.com/AsahiLinux/u-boot/commit/071ee82d85aa70f42b6c701883cd8068a1fdffdf.patch#/asahi-071ee82d85aa70f42b6c701883cd8068a1fdffdf.patch # usb: storage: Implement 64-bit LBA support Patch127: https://github.com/AsahiLinux/u-boot/commit/55e29e5c80702b48638e84b42fb214b757b88e07.patch#/asahi-55e29e5c80702b48638e84b42fb214b757b88e07.patch # usb: Ignore endpoints in non-zero altsettings Patch128: https://github.com/AsahiLinux/u-boot/commit/2f9b841c4850251811c65eaf89dc4cc14f7f1d30.patch#/asahi-2f9b841c4850251811c65eaf89dc4cc14f7f1d30.patch # video: console: Select default font based on video_priv.font_size Patch129: https://github.com/AsahiLinux/u-boot/commit/189dc6f2b63a9dbc9c80d621de2d6b32b42c34f9.patch#/asahi-189dc6f2b63a9dbc9c80d621de2d6b32b42c34f9.patch # video: simplefb: HACK: Set video font size Patch130: https://github.com/AsahiLinux/u-boot/commit/e4c3d1f0eee510ac40429694226eec56184583f0.patch#/asahi-e4c3d1f0eee510ac40429694226eec56184583f0.patch # configs: apple: Do not show the boot menu automatically Patch131: https://github.com/AsahiLinux/u-boot/commit/45274bdbc11008d1f1c179589018fa2787c43fa1.patch#/asahi-45274bdbc11008d1f1c179589018fa2787c43fa1.patch # FEDORA: configs: apple: Disable AUTOBOOT_KEYED Patch132: https://github.com/AsahiLinux/u-boot/commit/893e8c82af5829f0ad7fa6c82f01a88c1f90b0d9.patch#/asahi-893e8c82af5829f0ad7fa6c82f01a88c1f90b0d9.patch # efi_loader: remove non vital devices first Patch133: https://github.com/AsahiLinux/u-boot/commit/df8e2019586c12f2f1ed0b0ed14982abe114e0c8.patch#/asahi-df8e2019586c12f2f1ed0b0ed14982abe114e0c8.patch # iommu: apple: Mark device as vital Patch134: https://github.com/AsahiLinux/u-boot/commit/4b6e0ff9087fba59f189b8f0ca3c3f6cf26e704f.patch#/asahi-4b6e0ff9087fba59f189b8f0ca3c3f6cf26e704f.patch BuildRequires: bc BuildRequires: bison BuildRequires: dtc BuildRequires: flex BuildRequires: gcc BuildRequires: gnutls-devel BuildRequires: libuuid-devel BuildRequires: make BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: perl-interpreter BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-libfdt BuildRequires: SDL2-devel BuildRequires: swig %if %{with toolsonly} %ifarch aarch64 BuildRequires: arm-trusted-firmware-armv8 BuildRequires: crust-firmware BuildRequires: python3-pyelftools BuildRequires: xxd %endif %endif Requires: dtc %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. %if %{with toolsonly} %ifarch aarch64 %package -n uboot-images-armv8 Summary: U-Boot firmware images for aarch64 boards BuildArch: noarch %description -n uboot-images-armv8 U-Boot firmware binaries for aarch64 boards %endif %endif %prep %autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}} cp %SOURCE1 . %build mkdir builds %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-only_defconfig O=builds/ %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/ %if %{with toolsonly} %ifarch aarch64 for board in $(cat %{_arch}-boards) do echo "Building board: $board" mkdir builds/$(echo $board)/ # ATF selection, needs improving, suggestions of ATF SoC to Board matrix welcome sun50i=(a64-olinuxino a64-olinuxino-emmc amarula_a64_relic bananapi_m64 nanopi_a64 oceanic_5205_5inmfd orangepi_win pine64-lts pine64_plus pine64_plus pinebook pinephone pinephone pinetab sopine_baseboard teres_i) if [[ " ${sun50i[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_a64" cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31 cp /usr/share/crust-firmware/a64/scp.bin builds/$(echo $board)/ fi sun50h5=(bananapi_m2_plus_h5 emlid_neutis_n5_devboard libretech_all_h3_cc_h5 libretech_all_h3_it_h5 libretech_all_h5_cc_h5 nanopi_neo2 nanopi_neo_plus2 nanopi_r1s_h5 orangepi_pc2 orangepi_prime orangepi_zero_plus2 orangepi_zero_plus) if [[ " ${sun50h5[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_h6" cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31 cp /usr/share/crust-firmware/h5/scp.bin builds/$(echo $board)/ fi sun50h6=(beelink_gs1 emlid_neutis_n5_devboard orangepi_3 orangepi_lite2 orangepi_one_plus pine_h64 tanix_tx6) if [[ " ${sun50h6[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_h6" cp /usr/share/arm-trusted-firmware/sun50i_h6/bl31.bin builds/$(echo $board)/atf-bl31 cp /usr/share/crust-firmware/h6/scp.bin builds/$(echo $board)/ fi sun50i_h616=(orangepi_zero2 orangepi_zero2w orangepi_zero3 transpeed-8k618-t x96_mate) if [[ " ${sun50i_h616[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_h616" cp /usr/share/arm-trusted-firmware/sun50i_h616/bl31.bin builds/$(echo $board)/atf-bl31 fi rk3328=(evb-rk3328 nanopi-r2c-plus-rk3328 nanopi-r2c-rk3328 nanopi-r2s-rk3328 orangepi-r1-plus-lts-rk3328 orangepi-r1-plus-rk3328 roc-cc-rk3328 rock64-rk3328 rock-pi-e-rk3328 rock-pi-e-v3-rk3328) if [[ " ${rk3328[*]} " == *" $board "* ]]; then echo "Board: $board using rk3328" cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31 fi rk3368=(evb-px5 geekbox) if [[ " ${rk3368[*]} " == *" $board "* ]]; then echo "Board: $board using rk3368" cp /usr/share/arm-trusted-firmware/rk3368/bl31.elf builds/$(echo $board)/atf-bl31 fi rk3399=(eaidk-610-rk3399 evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399) if [[ " ${rk3399[*]} " == *" $board "* ]]; then echo "Board: $board using rk3399" cp /usr/share/arm-trusted-firmware/rk3399/* builds/$(echo $board)/ cp builds/$(echo $board)/bl31.elf builds/$(echo $board)/atf-bl31 fi # End ATF make $(echo $board)_defconfig O=builds/$(echo $board)/ BL31=builds/$(echo $board)/atf-bl31 %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ done %endif %endif %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_datadir}/uboot/ %if %{with toolsonly} %ifarch aarch64 for board in $(ls builds) do for file in u-boot.bin u-boot.img u-boot-dtb.img u-boot.itb u-boot-sunxi-with-spl.bin u-boot-rockchip-spi.bin u-boot-rockchip.bin idbloader.img idbloader-spi.img spl/boot.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 # For Apple M-series we also need the nodtb variant install -pD -m 0644 builds/apple_m1/u-boot-nodtb.bin %{buildroot}%{_datadir}/uboot/apple_m1/u-boot-nodtb.bin # Bit of a hack to remove binaries we don't use as they're large for board in $(ls builds) do rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.dtb if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.* rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/sunxi-spl.bin fi if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/idbloader.img ]; then rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.img fi done %endif %endif for tool in dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder do install -p -m 0755 builds/tools/$tool %{buildroot}%{_bindir} done install -p -m 0644 doc/mkimage.1 %{buildroot}%{_mandir}/man1 install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir} ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv ) %files %license Licenses/* %doc README doc/develop/distro.rst doc/README.gpt %doc doc/develop/uefi doc/usage doc/arch/arm64.rst %{_bindir}/* %{_mandir}/man1/mkimage.1* %if %{with toolsonly} %ifarch aarch64 %files -n uboot-images-armv8 %license Licenses/* %dir %{_datadir}/uboot/ %{_datadir}/uboot/* %endif %endif %changelog * Tue Oct 29 2024 Janne Grunau - 1:2024.10-5 - import patch to fix libfdt/python build with swig-4.3.0 * Tue Oct 29 2024 Janne Grunau - 1:2024.10-4 - Import Asahi patches for v2014.10 * Sun Oct 27 2024 Davide Cavalca - 1:2024.10-3 - Build with OPENSSL_NO_ENGINE * Sun Oct 27 2024 Davide Cavalca - 1:2024.10-2 - Unconditionally build images * 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