Name: s32g-vendor-boot Version: bsp41.0 Release: 1%{?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 # Disable this as is not really required for the NXP build. # BuildRequires: arm-trusted-firmware-armv8 %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 build package to help ease build and deploy of various NXP S32G Boards. This packes uses the vendor components with 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 for board in $(cat %{_arch}-boards) do echo "Building boot firmware for: $board" # First build the u-boot bootloader echo "-%{release}" > u-boot/localversion cd u-boot make O=build/$(echo $board) $(echo $board)_defconfig make O=build/$(echo $board) cd .. # Then build ARM Trusted Firmware cd arm-trusted-firmware if [ $(echo $board)=="s32g399ardb3_qspi" ]; then PLATFORM="s32g399ardb3" else PLATFORM=$(echo $board) fi 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 * Wed Aug 27 2025 Enric Balletbo Serra - bsp41.0-1 - Vendor boot firmware for S32G devices