Name: s32g-vendor-boot Version: bsp41.0 Release: 2%{?dist} Summary: S32G Bootloader License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: https://github.com/nmenon/k3-upstream-boot-build Source0: file://%{name}.tar.xz Source1: file://aarch64-boards Exclusivearch: aarch64 BuildRequires: bc BuildRequires: bison BuildRequires: dtc BuildRequires: flex BuildRequires: gcc BuildRequires: gnutls-devel BuildRequires: libuuid-devel BuildRequires: make BuildRequires: ncurses-devel BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: perl-interpreter BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-libfdt BuildRequires: SDL-devel BuildRequires: swig %ifarch aarch64 %if 0%{?fedora} > 40 || 0%{?rhel} > 9 # https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine BuildRequires: openssl-devel-engine BuildRequires: xxd %else # the xxd related file were shipped in vim-common for rhel < 10 BuildRequires: vim-common %endif %endif %define debug_package %{nil} %description This is a package to help ease build and deploy the boot firmware for the various NXP S32G Boards. This packages uses the vendor components, but can contain slightly modifications. %prep %autosetup -p1 -n %{name} cp %SOURCE1 . %build unset LDFLAGS unset CFLAGS unset CXXFLAGS unset LT_SYS_LIBRARY_PATH unset CC unset CXX # The boot firmware is composed by U-Boot + ARM Trusted Firmware, the board # name matches the defconfig name in U-Boot for board in $(cat %{_arch}-boards) do echo "Building boot firmware for: $board" # Set the release version in U-Boot echo "-%{release}" > u-boot/localversion # First build U-Boot cd u-boot # Enable the DISTRO_DEFAULTS option to support a variety of generic boot mechanisms echo "CONFIG_DISTRO_DEFAULTS=y" >> configs/$(echo $board)_defconfig make O=build/$(echo $board) $(echo $board)_defconfig make O=build/$(echo $board) cd .. # Now build the ARM Trusted Firmware cd arm-trusted-firmware # This is a workaround for the qspi variant of the "s32g399ardb3" board, which has a different defconfig name in U-Boot if [ $(echo $board)=="s32g399ardb3_qspi" ]; then PLATFORM="s32g399ardb3" else PLATFORM=$(echo $board) fi # The BL33 is provided by U-Boot build make BUILD_BASE=build/$(echo $board) ARCH=aarch64 PLAT=$(echo $PLATFORM) BL33=$(pwd)/../u-boot/build/$(echo $board)/u-boot-nodtb.bin cd .. done %install mkdir -p %{buildroot}%{_datadir}/%{name}/ for board in $(cat %{_arch}-boards) do cp -fr arm-trusted-firmware/build/* %{buildroot}%{_datadir}/%{name}/ done %files %dir %{_datadir}/%{name}/ %{_datadir}/%{name}/* %changelog * Mon Sep 1 2025 Enric Balletbo Serra - bsp41.0-2 - Enable the DISTRO_DEFAULTS option to support a variety of generic boot mechanisms * Wed Aug 27 2025 Enric Balletbo Serra - bsp41.0-1 - Vendor boot firmware for S32G devices