commit fe0efd8f5ec0744995684c6f114c3a322723f262
Author: Kate Hsuan <hpa(a)redhat.com>
Date: Sat Mar 16 20:41:22 2024 +0800
Update to the latest commit
Update to the commit da2e2821244f21b95bcb37a1271bf73360c4669e
.gitignore | 1 +
...Patch-lib-path-to-align-fedora-path-usage.patch | 25 ++++++++++++
60-intel-ipu6.rules | 18 +++++----
ipu6-camera-hal.spec | 47 +++++++++++++++++-----
sources | 2 +-
5 files changed, 74 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 871b735..b20861b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/ipu6-camera-hal-cc0b859.tar.gz
/ipu6-camera-hal-884b81a.tar.gz
+/ipu6-camera-hal-da2e282.tar.gz
diff --git a/0001-Patch-lib-path-to-align-fedora-path-usage.patch
b/0001-Patch-lib-path-to-align-fedora-path-usage.patch
new file mode 100644
index 0000000..4ce1f07
--- /dev/null
+++ b/0001-Patch-lib-path-to-align-fedora-path-usage.patch
@@ -0,0 +1,25 @@
+From 50bfe3c1d2d2d357b518e5951244dd244b03ad78 Mon Sep 17 00:00:00 2001
+From: Kate Hsuan <hpa(a)redhat.com>
+Date: Fri, 15 Mar 2024 14:09:39 +0800
+Subject: [PATCH] Patch lib path to align fedora path usage
+
+---
+ src/hal/hal_adaptor/HalAdaptor.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/hal/hal_adaptor/HalAdaptor.cpp b/src/hal/hal_adaptor/HalAdaptor.cpp
+index e14418a..17e9697 100644
+--- a/src/hal/hal_adaptor/HalAdaptor.cpp
++++ b/src/hal/hal_adaptor/HalAdaptor.cpp
+@@ -62,7 +62,7 @@ static void load_camera_hal_library() {
+ CheckAndLogError((strlen(pciID) == 0), VOID_VALUE, "%s, Failed to read PCI id.
%d", __func__,
+ ret);
+
+- std::string libName = "/usr/lib/";
++ std::string libName = "/usr/lib64/";
+ if (strstr(pciID, "0xa75d") != nullptr /* RPL */ ||
+ strstr(pciID, "0x462e") != nullptr /* ADLN */ ||
+ strstr(pciID, "0x465d") != nullptr /* ADLP */) {
+--
+2.44.0
+
diff --git a/60-intel-ipu6.rules b/60-intel-ipu6.rules
index 123a415..566d81a 100644
--- a/60-intel-ipu6.rules
+++ b/60-intel-ipu6.rules
@@ -1,21 +1,23 @@
# Tiger Lake
-SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0x9a19", GOTO="ipu6"
+SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0x9a19", GOTO="ipu6_tgl"
# Alder Lake-N
-SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0x465d", GOTO="ipu6ep"
+SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0x465d", GOTO="ipu6_adl"
# Alder Lake-P
-SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0x462e", GOTO="ipu6ep"
+SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0x462e", GOTO="ipu6_adl"
# Raptor Lake-P
-SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0xa75d", GOTO="ipu6ep"
+SUBSYSTEM=="pci", ATTR{vendor}=="0x8086",
ATTR{device}=="0xa75d", GOTO="ipu6_adl"
GOTO="ipu6_end"
-LABEL="ipu6"
-RUN+="/bin/ln -sf /usr/lib64/ipu6/libcamhal.so /run/libcamhal.so"
+LABEL="ipu6_tgl"
+RUN+="/bin/ln -sf /usr/lib64/ipu_tgl/libcamhal.so /run/libcamhal.so"
+RUN+="/bin/ln -sf /usr/lib64/ipu_tgl/libhal_adaptor.so /run/libhal_adaptor.so"
RUN+="/bin/ln -sf /usr/share/defaults/etc/ipu6/v4l2-relayd /run/v4l2-relayd"
GOTO="ipu6_end"
-LABEL="ipu6ep"
-RUN+="/bin/ln -sf /usr/lib64/ipu6ep/libcamhal.so /run/libcamhal.so"
+LABEL="ipu6_adl"
+RUN+="/bin/ln -sf /usr/lib64/ipu_adl/libcamhal.so /run/libcamhal.so"
+RUN+="/bin/ln -sf /usr/lib64/ipu_adl/libhal_adaptor.so /run/libhal_adaptor.so"
RUN+="/bin/ln -sf /usr/share/defaults/etc/ipu6ep/v4l2-relayd /run/v4l2-relayd"
GOTO="ipu6_end"
diff --git a/ipu6-camera-hal.spec b/ipu6-camera-hal.spec
index 19053ea..c080e0a 100644
--- a/ipu6-camera-hal.spec
+++ b/ipu6-camera-hal.spec
@@ -1,5 +1,5 @@
-%global commit 884b81aae0ea19a974eb8ccdaeef93038136bdd4
-%global commitdate 20230208
+%global commit da2e2821244f21b95bcb37a1271bf73360c4669e
+%global commitdate 20240226
%global shortcommit %(c=%{commit}; echo ${c:0:7})
# We want to specify multiple separate build-dirs for the different variants
@@ -19,6 +19,7 @@ Source3: v4l2-relayd-tgl
Source4: intel_ipu6_isys.conf
# Patches
+Patch01: 0001-Patch-lib-path-to-align-fedora-path-usage.patch
BuildRequires: systemd-rpm-macros
BuildRequires: ipu6-camera-bins-devel
@@ -47,40 +48,58 @@ This provides the necessary header files for IPU6 HAL development.
%build
-for i in ipu6 ipu6ep; do
+for i in ipu_tgl ipu_adl ipu_mtl; do
export PKG_CONFIG_PATH=%{_libdir}/$i/pkgconfig/
export LDFLAGS="$RPM_LD_FLAGS -Wl,-rpath=%{_libdir}/$i"
sed -i.orig "s|/usr/share/defaults/etc/camera/|/usr/share/defaults/etc/$i/|g"
\
src/platformdata/PlatformData.h
mkdir $i && pushd $i
- %cmake -DCMAKE_BUILD_TYPE=Release -DIPU_VER=$i \
- -DENABLE_VIRTUAL_IPU_PIPE=OFF -DUSE_PG_LITE_PIPE=ON \
- -DUSE_STATIC_GRAPH=OFF ..
+ if [ $i = "ipu_tgl" ]; then
+ IPU_VERSION=ipu6
+ elif [ $i = "ipu_adl" ]; then
+ IPU_VERSION=ipu6ep
+ elif [ $i = "ipu_mtl" ]; then
+ IPU_VERSION=ipu6epmtl
+ else
+ IPU_VERSION=ipu
+ fi
+ %cmake -DCMAKE_BUILD_TYPE=Release -DIPU_VER=$IPU_VERSION \
+ -DBUILD_CAMHAL_TESTS=OFF -DUSE_PG_LITE_PIPE=ON ..
%make_build
popd
+
+ mkdir $i"_adaptor" && pushd $i"_adaptor"
+ %cmake ../src/hal/hal_adaptor
+ popd
mv src/platformdata/PlatformData.h.orig src/platformdata/PlatformData.h
done
%install
-for i in ipu6 ipu6ep; do
+for i in ipu_tgl ipu_adl ipu_mtl; do
pushd $i
%make_install
mkdir %{buildroot}%{_libdir}/$i
- mv %{buildroot}%{_libdir}/libcamhal.so %{buildroot}%{_libdir}/$i/
+ mv %{buildroot}%{_usr}/lib/libcamhal.so %{buildroot}%{_libdir}/$i/
mv %{buildroot}%{_datadir}/defaults/etc/camera %{buildroot}%{_datadir}/defaults/etc/$i
popd
+ pushd $i"_adaptor"
+ %make_install
+ mv %{buildroot}%{_usr}/lib64/libhal_adaptor.so %{buildroot}%{_libdir}/$i/
+ popd
done
# We don't want static libs
-rm %{buildroot}%{_libdir}/libcamhal.a
+rm %{buildroot}%{_usr}/lib/libcamhal.a
# symbolic link + udev is used to resolve the library name conflict.
ln -sf %{_rundir}/libcamhal.so %{buildroot}%{_libdir}/libcamhal.so
+ln -sf %{_rundir}/libhal_adaptor.so %{buildroot}%{_libdir}/libhal_adaptor.so
install -p -m 0644 -D %{SOURCE1} %{buildroot}%{_udevrulesdir}/60-intel-ipu6.rules
# Make sure libcamhal.so can be found when building code on systems without an IPU6
-sed -i -e "s|}/lib64|}/lib64/ipu6|"
%{buildroot}%{_libdir}/pkgconfig/libcamhal.pc
+sed -i -e "s|\${prefix}/lib|\${prefix}/lib64/ipu_tgl|g"
%{buildroot}%{_libdir}/pkgconfig/libcamhal.pc
+sed -i -e "s|\${prefix}/lib|\${prefix}/lib64/ipu_tgl|g"
%{buildroot}%{_libdir}/pkgconfig/hal_adaptor.pc
# v4l2-relayd configuration examples
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/defaults/etc/ipu6ep/v4l2-relayd
@@ -102,7 +121,9 @@ fi
%files
%license LICENSE
%{_libdir}/*/libcamhal.so
+%{_libdir}/*/libhal_adaptor.so
%{_libdir}/libcamhal.so
+%{_libdir}/libhal_adaptor.so
%{_datadir}/defaults/etc/*
%{_modprobedir}/intel_ipu6_isys.conf
%{_udevrulesdir}/60-intel-ipu6.rules
@@ -110,10 +131,16 @@ fi
%files devel
%{_includedir}/libcamhal
+%{_includedir}/hal_adaptor
%{_libdir}/pkgconfig/libcamhal.pc
+%{_libdir}/pkgconfig/hal_adaptor.pc
%changelog
+* Tue Mar 12 2024 Kate Hsuan <hpa(a)redhat.com> - 0.0-17.20240226gitda2e282
+- Update to the latest upstream commit
+- Include a new library hal_adaptor.so
+
* Tue Oct 10 2023 Hans de Goede <hdegoede(a)redhat.com> - 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
diff --git a/sources b/sources
index 4fefb52..2a613c0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ipu6-camera-hal-884b81a.tar.gz) =
71e47dde184f92de4140f140e18863996012b83f122a5e00936bfebab45c968b3f30fd64425e4ae56369083ef9ffb8d127d81abbf08063d22f8bede56057fa99
+SHA512 (ipu6-camera-hal-da2e282.tar.gz) =
d6d61db6b88989ad44da930bb7953eb0d63629797680e987975453a2aea6f2664cac043c0ff91e8f8af544cebabc2bf9d8e3e43fb14a1d523d03e9cfa501e9bd