4 %define buildtype debug
5 %define compile_flags BUILD_STRING="" LOG_LEVEL=40 DEBUG=1 V=0 CRASH_REPORTING=1 SPD=opteed
7 %define buildtype release
8 %define compile_flags BUILD_STRING="" LOG_LEVEL=20 DEBUG=0 V=0 CRASH_REPORTING=1 SPD=opteed
12 Summary: Trusted firmware for Embedded boards based on ARM processor
17 ExclusiveArch: aarch64
18 URL: https://github.com/linaro-swg/arm-trusted-firmware.git
19 Source0: %{name}-%{version}.tar.bz2
22 BuildRequires: optee-os
23 BuildRequires: u-boot-rpi3
24 BuildRequires: u-boot-tools
29 Trusted firmware for Embedded boards based on ARM processor
37 export CFLAGS="-O0 -gdwarf-2"
38 make %{?_smp_mflags} BL32=/boot/tee.bin %{compile_flags} PLAT=%{buildplat} all
40 dd if=/dev/zero of=scratch bs=1c count=131072
41 cat build/%{buildplat}/%{buildtype}/bl31.bin scratch > bl31.tmp
42 dd if=bl31.tmp of=bl31.head bs=1c count=131072
43 cat bl31.head /boot/tee-pager.bin > optee.bin
45 rm scratch bl31.tmp bl31.head
47 cp /boot/spl/bcm2837-rpi-3-b.dtb .
48 cp /boot/spl/fit_spl_atf.its .
49 cp /boot/spl/u-boot-nodtb.bin .
50 cp %{_bindir}/mkimage .
53 mkimage -E -f fit_spl_atf.its u-boot.img
54 mkdir -p %{buildroot}/boot/
55 install u-boot.img %{buildroot}/boot/
60 %defattr(-,root,root,-)