diff --git a/uboot-tools.spec b/uboot-tools.spec index 3e1a5f3834f92cb6ae66ed47c7de35a8a81cc291..02c05c120a8881642dd5b8bd40f4be98188df0ac 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,10 +1,14 @@ -%define anolis_release 1 +%define anolis_release 2 + %bcond_without toolsonly +%bcond_with rk3328 +%bcond_with rk3399 + Name: uboot-tools +Summary: U-Boot utilities Version: 2022.04 Release: %{anolis_release}%{?dist} -Summary: U-Boot utilities License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot @@ -12,30 +16,23 @@ ExcludeArch: s390x Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 Source1: aarch64-boards -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: SDL-devel -BuildRequires: swig +BuildRequires: bc bison dtc flex gcc +BuildRequires: gnutls-devel libuuid-devel ncurses-devel openssl-devel +BuildRequires: perl-interpreter python3-devel python3-setuptools python3-libfdt +BuildRequires: SDL-devel swig %ifarch aarch64 BuildRequires: arm-trusted-firmware-armv8 %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. +Uboot-tools is a collection of tools used to manipulate and configure +the U-Boot bootloader for embedded systems. These tools include mkimage, +which creates images suitable for booting with U-Boot, fw_printenv and fw_setenv, +which allows reading and writing of the U-Boot environment variables, +and fw_printenv, which prints the contents of the U-Boot environment variables +to the console. Uboot-tools are commonly used in embedded systems development +for configuring and debugging the bootloader. %if %{with toolsonly} %ifarch aarch64 @@ -49,6 +46,13 @@ U-Boot firmware binaries for aarch64 boards %endif +%package doc +Summary: Documents files for %{name}-doc +BuildArch: noarch + +%description doc +Documents files for %{name}-doc + %prep %autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}} @@ -61,7 +65,6 @@ mkdir builds %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/ %if %{with toolsonly} -# U-Boot device firmwares don't currently support LTO %define _lto_cflags %{nil} %ifarch aarch64 @@ -70,7 +73,6 @@ do echo "Building board: $board" mkdir builds/$(echo $board)/ - # ATF selection, needs improving, suggestions of ATF SoC to Board matrix welcome sun50i=(a64-olinuxino amarula_a64_relic bananapi_m2_plus_h5 bananapi_m64 libretech_all_h3_cc_h5 nanopi_a64 nanopi_neo2 nanopi_neo_plus2 orangepi_pc2 orangepi_prime orangepi_win orangepi_zero_plus orangepi_zero_plus2 pine64-lts pine64_plus pinebook pinephone pinetab sopine_baseboard teres_i) if [[ " ${sun50i[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_a64" @@ -81,29 +83,32 @@ do echo "Board: $board using sun50i_h6" cp /usr/share/arm-trusted-firmware/sun50i_h6/* builds/$(echo $board)/ fi + %if %{with rk3328} rk3328=(evb-rk3328 nanopi-r2s-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328) if [[ " ${rk3328[*]} " == *" $board "* ]]; then echo "Board: $board using rk3328" cp /usr/share/arm-trusted-firmware/rk3328/* builds/$(echo $board)/ fi + %endif + + %if %{with rk3399} 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 puma-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)/ fi - # End ATF + %endif make $(echo $board)_defconfig O=builds/$(echo $board)/ %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ - # build spi images for rockchip boards with SPI flash + %if %{with rk3399} rkspi=(evb-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 nanopc-t4-rk3399 pinebook-pro-rk3399 rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399) if [[ " ${rkspi[*]} " == *" $board "* ]]; then echo "Board: $board with SPI flash" builds/$(echo $board)/tools/mkimage -n rk3399 -T rkspi -d builds/$(echo $board)/tpl/u-boot-tpl.bin:builds/$(echo $board)/spl/u-boot-spl.bin builds/$(echo $board)/idbloader.spi fi - # build spi, and uart images for mvebu boards - # mvebu=(clearfog helios4 turris_omnia) + %endif if [[ " ${mvebu[*]} " == *" $board "* ]]; then for target in spi uart do @@ -138,7 +143,6 @@ do done %endif -# Bit of a hack to remove binaries we don't use as they're large %ifarch aarch64 for board in $(ls builds) do @@ -176,25 +180,23 @@ 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 ) -# Copy some useful docs over mkdir -p builds/docs -cp -p board/hisilicon/hikey/README builds/docs/README.hikey cp -p board/Marvell/db-88f6820-gp/README builds/docs/README.mvebu-db-88f6820 -cp -p board/rockchip/evb_rk3399/README builds/docs/README.evb_rk3399 -cp -p board/solidrun/clearfog/README builds/docs/README.clearfog cp -p board/solidrun/mx6cuboxi/README builds/docs/README.mx6cuboxi -cp -p board/sunxi/README.sunxi64 builds/docs/README.sunxi64 +cp -p board/solidrun/clearfog/README builds/docs/README.clearfog cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand +cp -p board/sunxi/README.sunxi64 builds/docs/README.sunxi64 cp -p board/ti/omap5_uevm/README builds/docs/README.omap5_uevm cp -p board/udoo/README builds/docs/README.udoo cp -p board/wandboard/README builds/docs/README.wandboard -cp -p board/warp/README builds/docs/README.warp cp -p board/warp7/README builds/docs/README.warp7 +cp -p board/warp/README builds/docs/README.warp +cp -p board/hisilicon/hikey/README builds/docs/README.hikey +%if %{with rk3399} +cp -p board/rockchip/evb_rk3399/README builds/docs/README.evb_rk3399 +%endif %files -%doc README doc/README.kwbimage doc/develop/distro.rst doc/README.gpt -%doc doc/README.odroid doc/README.rockchip doc/develop/uefi doc/uImage.FIT doc/arch/arm64.rst -%doc builds/docs/* doc/board/amlogic/ doc/board/rockchip/ doc/board/ti/am335x_evm.rst %{_bindir}/* %{_mandir}/man1/mkimage.1* %dir %{_datadir}/uboot/ @@ -206,7 +208,15 @@ cp -p board/warp7/README builds/docs/README.warp7 %endif %endif +%files doc +%doc README doc/README.kwbimage doc/develop/distro.rst doc/README.gpt +%doc doc/README.odroid doc/README.rockchip doc/develop/uefi doc/uImage.FIT doc/arch/arm64.rst +%doc builds/docs/* doc/board/amlogic/ doc/board/rockchip/ doc/board/ti/am335x_evm.rst + %changelog +* Mon Apr 17 2023 Heng Qi - 2022.04-2 +- disable rk3328/rk3399 and refactor the spec file + * Wed Apr 13 2022 Chunmei Xu - 2022.04-1 - init from upstream - remove unsupported pinephone-pro-rk3399