arm-trusted-firmware/arm-trusted-firmware.spec
2024-01-23 11:17:47 +08:00

86 lines
3.0 KiB
RPMSpec

%global debug_package %{nil}
Name: arm-trusted-firmware
Version: 1.6
Release: 4
Summary: ARM Trusted Firmware
License: BSD
URL: https://github.com/ARM-software/arm-trusted-firmware/wiki
Source0: https://github.com/ARM-software/arm-trusted-firmware/archive/v1.6-rc0.tar.gz
Patch0000: AArch32-Disable-Secure-Cycle-Counter.patch
Patch0001: cleanup-context--handing-library.patch
Patch0002: use-helper-function-to-save-registers-in-SMC-handler.patch
Patch0003: AArch64-Disable-Secure-Cycle-Counter.patch
# https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=fd37982a19a4a291
Patch0004: CVE-2022-47630-1.patch
# https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=72460f50e2437a85
Patch0005: CVE-2022-47630-2.patch
# https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=f5c51855d36e399e
Patch0006: CVE-2022-47630-3.patch
# https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=abb8f936fd0ad085
Patch0007: CVE-2022-47630-4.patch
# https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=a7eff3477dcf3624
Patch0008: CVE-2023-49100.patch
ExclusiveArch: aarch64
BuildRequires: dtc
%description
Trusted Firmware-A is a reference implementation of secure world software
for Arm A-Profile architectures (Armv8-A and Armv7-A), including an Exception Level 3 (EL3) Secure Monitor.
%package -n arm-trusted-firmware-armv8
Summary: ARMv8-A Trusted Firmware
%description -n arm-trusted-firmware-armv8
ARM Trusted Firmware for various ARMv8-A SoCs.
%prep
%autosetup -p1 -n %{name}-%{version}-rc0
sed -i 's/arm-none-eabi-/arm-linux-gnu-/' plat/rockchip/rk3399/drivers/m0/Makefile
%build
for soc in hikey hikey960 imx8qm imx8qx juno rk3368 rk3328 rpi3 sun50i_a64 sun50i_h6 zynqmp
do
make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" PLAT=$(echo $soc) bl31
done
%install
install -d %{buildroot}%{_datadir}/%{name}
for soc in hikey hikey960 imx8qm imx8qx juno rpi3 sun50i_a64 sun50i_h6 zynqmp
do
install -d %{buildroot}%{_datadir}/%{name}/$(echo $soc)/
if [ -f build/$(echo $soc)/release/bl31.bin ]; then
install -p -m 0644 build/$(echo $soc)/release/bl31.bin /%{buildroot}%{_datadir}/%{name}/$(echo $soc)/
fi
done
for soc in rk3368 rk3328
do
install -d %{buildroot}%{_datadir}/%{name}/$(echo $soc)/
for file in bl31/bl31.elf m0/rk3399m0.bin m0/rk3399m0.elf
do
if [ -f build/$(echo $soc)/release/$(echo $file) ]; then
install -p -m 0644 build/$(echo $soc)/release/$(echo $file) /%{buildroot}%{_datadir}/%{name}/$(echo $soc)/
fi
done
done
%files -n arm-trusted-firmware-armv8
%license license.rst
%doc readme.rst
%{_datadir}/%{name}
%changelog
* Tue Jan 23 2024 yaoxin <yao_xin001@hoperun.com> - 1.6-4
- Fix CVE-2023-49100
* Fri Dec 01 2023 yaoxin <yao_xin001@hoperun.com> - 1.6-3
- Fix CVE-2022-47630
* Wed Sep 16 2020 wangyue <wangyue92@huawei.com> - 1.6-2
- fix CVE-2017-15031
* Tue Dec 31 2019 Shuaishuai Song <songshuaishuai2@huawei.com> 1.6-0.2
- package init