1 Summary: ARM Trusted Firmware
2 Name: arm-trusted-firmware
7 Source0: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-%{version}.tar.gz
8 # Source0-md5: 590ae90bccde7ce8b7f5963b25500bfd
9 Patch0: rk3399-dram.patch
10 URL: https://developer.arm.com/tools-and-software/open-source-software/firmware/trusted-firmware
11 BuildRequires: crossarm-gcc
13 ExclusiveArch: aarch64
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 ARM Trusted firmware is a reference implementation of secure world
18 software for ARMv8-A including Exception Level 3 (EL3) software. It
19 provides a number of standard ARM interfaces like Power State
20 Coordination (PSCI), Trusted Board Boot Requirements (TBBR) and Secure
23 Note: the contents of this package are generally just consumed by
24 bootloaders such as u-boot. As such the binaries aren't of general
27 %package -n arm-trusted-firmware-armv8
28 Summary: ARM Trusted Firmware for ARMv8-A
30 %description -n arm-trusted-firmware-armv8
31 ARM Trusted Firmware binaries for various ARMv8-A SoCs.
33 Note: the contents of this package are generally just consumed by
34 bootloaders such as u-boot. As such the binaries aren't of general
37 Note: the contents of this package are generally just consumed by
38 bootloaders such as u-boot. As such the binaries aren't of general
42 %setup -q -n trusted-firmware-a-%{version}
49 HOSTCC="%{__cc} %{rpmcflags}" \
51 M0_CROSS_COMPILE="arm-linux-gnueabi-" \
55 %{__make} -C tools/fiptool \
58 HOSTCCFLAGS="%{rpmcflags}" \
59 CPPFLAGS="%{rpmcppflags}"
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name}}
66 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/$soc
67 for file in bl31/bl31.elf m0/rk3399m0.bin m0/rk3399m0.elf; do
68 if [ -f build/$soc/release/$file ]; then
69 cp -p build/$soc/release/$file $RPM_BUILD_ROOT%{_datadir}/%{name}/$soc
74 cp -p tools/fiptool/fiptool $RPM_BUILD_ROOT%{_bindir}
77 rm -rf $RPM_BUILD_ROOT
79 %files -n arm-trusted-firmware-armv8
80 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_bindir}/fiptool