packaging: add vcgencmd aarch64 package 13/263313/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 5 Mar 2021 06:42:05 +0000 (15:42 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 1 Sep 2021 01:16:59 +0000 (01:16 +0000)
To support vcgencmd in aarch64, add aarch64 build and package.

Change-Id: Ic9f69971c2451b0c21864e59d2d0a782caf6a0c6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
packaging/libomxil-vc4.spec

index 8bd2583..88ee7c1 100755 (executable)
@@ -9,11 +9,12 @@ License:       BSD-3-Clause
 BuildRequires: cmake
 BuildRequires: gcc-c++
 BuildRequires: pkgconfig(libtbm)
-ExclusiveArch: %{arm}
+ExclusiveArch: %{arm} aarch64
 
 %description
 Libraries for interfacing to Raspberry Pi GPU.
 
+%ifarch %{arm}
 %package       utils
 Group:         System/Tools
 Summary:       System tools for the Raspberry Pi
@@ -29,6 +30,7 @@ Requires:      %{name} = %{version}
 
 %description   devel
 This package contains libraries and header files for developing applications that use Raspberry Pi GPU.
+%endif
 
 %package -n    vcgencmd
 Group:         System/Tools
@@ -42,12 +44,18 @@ Source: https://github.com/raspberrypi/userland.git
 %setup -q
 
 %build
+%ifarch %{arm}
+       ARM64=OFF
+%else
+       ARM64=ON
+%endif
 BUILDTYPE=Release
 BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
 mkdir -p build/armv7l-linux/$BUILDSUBDIR
 pushd build/armv7l-linux/$BUILDSUBDIR
 cmake -DCMAKE_BUILD_TYPE=Release ../../../ \
-       -DCMAKE_INSTALL_RPATH=%{_libdir}/vc
+       -DCMAKE_INSTALL_RPATH=%{_libdir}/vc \
+       -DARM64=$ARM64
 make %{?_smp_mflags}
 popd
 
@@ -58,6 +66,7 @@ popd
 /sbin/ldconfig
 
 %install
+%ifarch %{arm}
 mkdir -p %{buildroot}/etc/ld.so.conf.d/
 cp %{_builddir}/%{name}-%{version}/packaging/libomxil-vc4.conf %{buildroot}/etc/ld.so.conf.d
 mkdir -p %{buildroot}/opt/vc/lib/plugins
@@ -97,6 +106,7 @@ cp -a %{_builddir}/%{name}-%{version}/interface/vmcs_host ./interface/
 cp -a %{_builddir}/%{name}-%{version}/vcinclude ./
 cp %{_builddir}/%{name}-%{version}/host_applications/linux/libs/bcm_host/include/bcm_host.h ./
 popd
+%endif
 
 # install and package vcgencmd with RPATH
 BUILDTYPE=Release
@@ -116,6 +126,7 @@ cp build/armv7l-linux/install/opt/vc/lib/libvcos.so %{buildroot}/%{_libdir}/vc
 %clean
 [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
 
+%ifarch %{arm}
 %files
 %manifest packaging/%{name}.manifest
 %defattr(-,root,root)
@@ -141,6 +152,7 @@ cp build/armv7l-linux/install/opt/vc/lib/libvcos.so %{buildroot}/%{_libdir}/vc
 /opt/vc/include/vcinclude
 /opt/vc/include/*.h
 /opt/vc/lib/pkgconfig/*.pc
+%endif
 
 %files -n vcgencmd
 %manifest packaging/%{name}.manifest