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