%global commit 9c7530a3a071f0d65ab0d92e256c5fe749b8b8b6 %global commitdate 20240929 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # We want to specify multiple separate build-dirs for the different variants %global __cmake_in_source_build 1 Name: ipu6-camera-hal Summary: Hardware abstraction layer for Intel IPU6 URL: https://github.com/intel/ipu6-camera-hal Version: 0.0 Release: 24.%{commitdate}git%{shortcommit}%{?dist} License: Apache-2.0 Source0: https://github.com/intel/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: 60-icamera-ipu6.rules Source2: v4l2-relayd-ipu6 Source3: v4l2-relayd-ipu6ep Source4: icamera_ipu6_isys.conf Source5: ipu6-driver-select.sh BuildRequires: systemd-rpm-macros BuildRequires: ipu6-camera-bins-devel >= 0.0-12 BuildRequires: cmake BuildRequires: gcc BuildRequires: g++ BuildRequires: expat-devel BuildRequires: libdrm-devel ExclusiveArch: x86_64 Requires: ipu6-camera-bins >= 0.0-16 %if 0%{?el9} Provides: %{name}%{?_isa} = %{version}-%{release} %endif %description ipu6-camera-hal provides the basic hardware access APIs for IPU6. %package devel Summary: IPU6 header files for HAL Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ipu6-camera-bins-devel %description devel This provides the necessary header files for IPU6 HAL development. %prep %autosetup -p1 -n %{name}-%{commit} %build export PKG_CONFIG_PATH=%{_libdir}/pkgconfig/ %cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DBUILD_CAMHAL_TESTS=OFF \ -DBUILD_CAMHAL_ADAPTOR=ON \ -DBUILD_CAMHAL_PLUGIN=ON \ -DIPU_VERSIONS="ipu6;ipu6ep;ipu6epmtl" \ -DUSE_PG_LITE_PIPE=ON %make_build %install %make_install # new icamerasrc must use hal_adaptor, drop libcamhal.pc #rm -r %{buildroot}%{_libdir}/$i/pkgconfig # udev-rules set the ipu_xxx /run/v4l2-relayd cfg link + /dev/ipu-psys0 uaccess install -p -m 0644 -D %{SOURCE1} %{buildroot}%{_udevrulesdir}/60-icamera-ipu6.rules # v4l2-relayd configuration examples (ipu6epmtl uses same config as ipu6ep) install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/camera/ipu6/v4l2-relayd install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/camera/ipu6ep/v4l2-relayd install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/camera/ipu6epmtl/v4l2-relayd # Make kmod-intel-ipu6 use /dev/video8-15 leaving /dev/video0 for loopback install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_modprobedir}/icamera_ipu6_isys.conf # Script to switch between kmod and kernel ipu6 stacks install -p -D -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/ipu6-driver-select %posttrans # posttrans to ensure that v4l2-relayd service enabled by ipu6-driver-select is installed if [ ! -f /etc/modprobe.d/ipu6-driver-select.conf ]; then /usr/bin/ipu6-driver-select kmod fi # skip triggering if udevd isn't even accessible, e.g. containers or # rpm-ostree-based systems if [ -S /run/udev/control ]; then /usr/bin/udevadm control --reload /usr/bin/udevadm trigger /sys/devices/pci0000:00/0000:00:05.0 fi %files %license LICENSE %doc *.md %{_bindir}/ipu6-driver-select %dir %{_libdir}/libcamhal/plugins %{_libdir}/libcamhal/plugins/ipu6.so %{_libdir}/libcamhal/plugins/ipu6ep.so %{_libdir}/libcamhal/plugins/ipu6epmtl.so %{_libdir}/libcamhal.so* %dir %{_sysconfdir}/camera %{_sysconfdir}/camera/* %{_modprobedir}/icamera_ipu6_isys.conf %{_udevrulesdir}/60-icamera-ipu6.rules %files devel %{_includedir}/libcamhal %{_libdir}/pkgconfig/libcamhal.pc %{_libdir}/libcamhal/plugins/ipu6.a %{_libdir}/libcamhal/plugins/ipu6ep.a %{_libdir}/libcamhal/plugins/ipu6epmtl.a %changelog * Sat Oct 05 2024 Jean-Marc Liger - 0.0-24.20240929git9c7530a - Update to commit 9c7530a3a071f0d65ab0d92e256c5fe749b8b8b6 - These release ends former ipu_tgl ipu_adl ipu_mtl subdirectories * Wed Oct 02 2024 Jean-Marc Liger - 0.0-23.20240812git9c87043 - Fib lib64 installation * Sat Sep 21 2024 Jean-Marc Liger - 0.0-22.20240812git9c87043 - Update to commit 9c870439800a85cf315b0a5c4cceaf95fe40e0a6 (v1.0.1-nex-v6.6) * Sun Jul 21 2024 Jean-Marc Liger - 0.0-21.20240718git8863bda - Update to commit 8863bda8b15bef415f112700d0fb04e00a48dbee - Backport last changes from Hans de Goede : . Add ipu6-driver-select script to switch between proprietary and foss stacks . New icamerasrc must use hal_adaptor, drop libcamhal files from -devel - Move config to /etc/camera * Sun Jun 30 2024 Jean-Marc Liger - 0.0-20.20240509git289e645 - Update to commit 289e645dffbd0ea633f10bb4f93855f1e4429e9a - Add missing hal_adaptor build - Revert libcamhal.so* in ipu_{tgl,jsl,adl,mtl} directories instead of ipu6{,se,ep,epmtl} - Backport last changes from Hans de Goede : . Dymically set mainline IVSC media-entity src-pad index . Update /lib/modprobe.d/intel_ipu6_isys.conf for the out of tree module being renamed to icamera_ipu6_isys * Tue Jun 04 2024 Jean-Marc Liger - 0.0-19.20240415gited12d90 - Generate new libcamal/plugins/ipu6se.so for pciID, "0x4e19" - Move each libcamhal.so* in ipu6{,se,ep,epmtl} directories instead of ipu_{tgl,adl,mtl} * Sat May 25 2024 Jean-Marc Liger - 0.0-18.20240415gited12d90 - Update to the latest upstream commit - Include new libraries libcamhal/plugins/ipu6{,ep,epmtl}.so to replace hal_adaptor.so * Thu Apr 18 2024 Jean-Marc Liger - 0.0-17.20230208git884b81a.1 - Fix x86-64 for EL9 * Tue Mar 12 2024 Kate Hsuan - 0.0-17.20230208git884b81a - Update to the latest upstream commit - Include a new library hal_adaptor.so * Sun Feb 04 2024 RPM Fusion Release Engineering - 0.0-17.20230208git884b81a - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Oct 10 2023 Hans de Goede - 0.0-16.20230208git884b81a - Update /lib/modprobe.d/intel_ipu6_isys.conf for newer versions of intel-ipu6-kmod creating up to 8 /dev/video# nodes * Tue Aug 08 2023 Kate Hsuan - 0.0-15.20230208git884b81a - Updated to commit 884b81aae0ea19a974eb8ccdaeef93038136bdd4 * Thu Aug 03 2023 RPM Fusion Release Engineering - 0.0-14.20221112gitcc0b859 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 8 2023 Hans de Goede - 0.0-13.20221112gitcc0b859 - Add Raptor Lake IPU6EP PCI-id to 60-intel-ipu6.rules * Tue May 30 2023 Kate Hsuan - 0.0-12.20221112gitcc0b859 - Fix 11 and skip udev command for container and rpm-ostree environments * Mon May 29 2023 Kate Hsuan - 0.0-11.20221112gitcc0b859 - Add a sysfs path check for rpm-ostree since udev is unable to access in a container * Mon May 15 2023 Hans de Goede - 0.0-10.20221112gitcc0b859 - Add intel_ipu6_isys.conf to make ipu6-driver not clobber /dev/video0 * Mon May 08 2023 Kate Hsuan - 0.0-9.20221112gitcc0b859 - Fix settings for Tiger lake CPU * Wed Mar 22 2023 Kate Hsuan - 0.0-8.20221112gitcc0b859 - Included v4l2-relayd configuration examples * Mon Mar 20 2023 Kate Hsuan - 0.0-7.20221112gitcc0b859 - udev rules for supporting v4l2-relayd * Wed Feb 15 2023 Kate Hsuan - 0.0-6.20221112gitcc0b859 - Allow ordinary users to access the camera * Fri Feb 3 2023 Kate Hsuan - 0.0-5.20221112gitcc0b859 - Patch path settings for the configuration files - Remove udev workaround - Fix rpmlint warnings * Tue Jan 31 2023 Kate Hsuan - 0.0-4.20221112gitcc0b859 - Remove udev scripts and the simplified rules are used - Fix and patch gcc13 compile issues * Tue Jan 17 2023 Kate Hsuan - 0.0-3.20221112gitcc0b859 - Add symbolic link for camera configuration files * Fri Nov 25 2022 Kate Hsuan - 0.0-2.20221112gitcc0b859 - push udev rules - format and style fixes * Fri Nov 25 2022 Kate Hsuan - 0.0-1.20221112gitcc0b859 - First commit