packaging: add vcgencmd aarch64 package 17/254617/1 accepted/tizen/unified/20210309.140634 submit/tizen/20210309.010410
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>
Fri, 5 Mar 2021 09:06:31 +0000 (18:06 +0900)
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 936ea6c..969a972 100755 (executable)
@@ -10,11 +10,12 @@ BuildRequires: cmake
 BuildRequires: gcc-c++
 BuildRequires: pkgconfig(libtbm)
 BuildRequires: hal-api-common-devel
-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
@@ -30,6 +31,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
@@ -43,12 +45,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=%{_hal_libdir}/vc
+       -DCMAKE_INSTALL_RPATH=%{_hal_libdir}/vc \
+       -DARM64=$ARM64
 make %{?_smp_mflags}
 popd
 
@@ -59,6 +67,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
@@ -98,6 +107,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 to /hal with RPATH
 BUILDTYPE=Release
@@ -119,6 +129,7 @@ cp LICENSE %{buildroot}/%{_hal_licensedir}/vcgencmd
 %clean
 [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
 
+%ifarch %{arm}
 %files
 %manifest packaging/%{name}.manifest
 %defattr(-,root,root)
@@ -144,6 +155,7 @@ cp LICENSE %{buildroot}/%{_hal_licensedir}/vcgencmd
 /opt/vc/include/vcinclude
 /opt/vc/include/*.h
 /opt/vc/lib/pkgconfig/*.pc
+%endif
 
 %files -n vcgencmd
 %manifest packaging/%{name}.manifest