uboot/package.inc
Pratham Patel 9074b22ca6
Try fixing COPR builds
COPR builds fail with the following error:
```
cc1: warning: unknown register name: x18
cc1: error: bad value ('armv8-a+crc') for '-march=' switch
cc1: note: valid arguments to '-march=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 native
make[1]: *** [scripts/Makefile.build:146: lib/asm-offsets.s] Error 1
```

Try fixing it by exporting CROSS_COMPILE as 'aarch64-redhat-linux-'
2023-10-28 13:32:19 +05:30

58 lines
1.6 KiB
PHP

# disable the '-debug{info,source}' pkgs
%define debug_package %{nil}
# also disable packaging files in '/usr/lib/.build-id/'
%define _build_id_links none
%if "%{?non_standard_release}" == ""
Source2: release-stable.inc
%else
Source2: release-%{non_standard_release}.inc
%endif
%include %{SOURCE2}
Name: uboot-%{board_name}-tfg
Version: %{major_ver}.%{minor_ver}
Release: %{rel_ver}%{?rc_ver:.%{rc_ver}}%{?master_commit:.%{master_commit}}%{?dist}
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
Summary: U-Boot for %{board_name}
URL: http://www.denx.de/wiki/U-Boot
%ifarch aarch64
BuildRequires: arm-trusted-firmware-armv8
%endif
BuildRequires: bc bison dtc flex gcc gnutls-devel libuuid-devel make ncurses-devel openssl-devel perl-interpreter python3-devel python3-libfdt python3-pyelftools python3-setuptools SDL2-devel swig
Requires: dtc
%global make make -j$(( $(nproc) + 2 ))
%description
This package contains images for the %{board_name}.
%prep
%setup -q -n %{src_dir}
export CROSS_COMPILE=aarch64-redhat-linux-
%{make} distclean
%{make} %{board_defconfig}
%build
export CROSS_COMPILE=aarch64-redhat-linux-
%if "%{?rkbin_git_commit}" != ""
pushd ..
cp %{_sourcedir}/%{?rkbin_git_commit}.tar.gz .
tar xf %{?rkbin_git_commit}.tar.gz
export RKBIN_DIRECTORY="%{_builddir}/rkbin-%{?rkbin_git_commit}"
export BL31="${RKBIN_DIRECTORY}/bin/rk35/rk3588_bl31_v1.40.elf"
export ROCKCHIP_TPL="${RKBIN_DIRECTORY}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin"
popd
%endif
%{make}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/uboot/%{board_name}
cp -v %{output_files} %{buildroot}/usr/share/uboot/%{board_name}
%files
/usr/share/uboot/%{board_name}