%define _wrong_version_format_terminate_build 0
%define config_name tizen_bcm2711_defconfig
+%ifarch aarch64
+%define buildarch arm64
+%else
%define buildarch arm
+%endif
%define target_board rpi4
%define variant %{buildarch}-%{target_board}
Version: 5.4.40
Release: 0
License: GPL-2.0
-ExclusiveArch: %{arm}
+ExclusiveArch: %{arm} aarch64
Group: System/Kernel
Vendor: The Linux Community
URL: https://www.kernel.org
mkdir -p %{buildroot}/lib/modules
# 2-2. Install kernel binary and DTB
+%ifarch aarch64
+install -m 644 arch/%{buildarch}/boot/Image %{buildroot}/boot/
+install -m 644 arch/%{buildarch}/boot/dts/broadcom/bcm*.dtb %{buildroot}/boot/
+%else
install -m 644 arch/%{buildarch}/boot/zImage %{buildroot}/boot/
install -m 644 arch/%{buildarch}/boot/dts/bcm*.dtb %{buildroot}/boot/
+%endif
# 2-3. Install modules
make INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=%{buildroot} modules_install
# 2-4. Install boot binary files
+%ifarch aarch64
+install -m 644 rpi4/boot/config_64bit.txt %{buildroot}/boot/config.txt
+%else
install -m 644 rpi4/boot/config.txt %{buildroot}/boot/
+%endif
install -m 644 rpi4/boot/LICENCE.broadcom %{buildroot}/boot/
install -m 644 rpi4/boot/start*.elf %{buildroot}/boot/
install -m 644 rpi4/boot/fixup*.dat %{buildroot}/boot/
%files -n %{variant}-linux-kernel
%license COPYING
+%ifarch aarch64
+/boot/Image
+%else
/boot/zImage
+%endif
/boot/bcm*.dtb
/boot/config.txt
/boot/LICENCE.broadcom