1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

ipu6: update packages (#347918)

This commit is contained in:
Florian Klink 2024-10-12 19:27:43 +03:00 committed by GitHub
commit 2afe930c60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 52 additions and 37 deletions

View file

@ -26,9 +26,9 @@ in
config = mkIf cfg.enable {
# Module is upstream as of 6.10
boot.extraModulePackages = with config.boot.kernelPackages;
optional (kernelOlder "6.10") ipu6-drivers;
# Module is upstream as of 6.10,
# but still needs various out-of-tree i2c and the `intel-ipu6-psys` kernel driver
boot.extraModulePackages = with config.boot.kernelPackages; [ ipu6-drivers ];
hardware.firmware = with pkgs; [
ipu6-camera-bins

View file

@ -6,17 +6,18 @@
, gst_all_1
, ipu6-camera-hal
, libdrm
, libva
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}";
version = "unstable-2023-10-23";
version = "unstable-2024-09-29";
src = fetchFromGitHub {
owner = "intel";
repo = "icamerasrc";
rev = "528a6f177732def4d5ebc17927220d8823bc8fdc";
hash = "sha256-Ezcm5OpF/NKvJf5sFeJyvNc2Uq0166GukC9MuNUV2Fs=";
rev = "refs/tags/20240926_1446";
hash = "sha256-BpIZxkPmSVKqPntwBJjGmCaMSYFCEZHJa4soaMAJRWE=";
};
nativeBuildInputs = [
@ -34,8 +35,10 @@ stdenv.mkDerivation {
buildInputs = [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
ipu6-camera-hal
libdrm
libva
];
NIX_CFLAGS_COMPILE = [

View file

@ -11,6 +11,7 @@
, ipu6-camera-bins
, libtool
, gst_all_1
, libdrm
# Pick one of
# - ipu6 (Tiger Lake)
@ -27,13 +28,13 @@ let
in
stdenv.mkDerivation {
pname = "${ipuVersion}-camera-hal";
version = "unstable-2023-09-25";
version = "unstable-2024-09-29";
src = fetchFromGitHub {
owner = "intel";
repo = "ipu6-camera-hal";
rev = "9fa05a90886d399ad3dda4c2ddc990642b3d20c9";
hash = "sha256-yS1D7o6dsQ4FQkjfwcisOxcP7Majb+4uQ/iW5anMb5c=";
rev = "f98f72b156563fe8373e4f8d017a9f609676bb33";
hash = "sha256-zVcgKW7/GHYd1oMvsaI77cPyj3G68dL+OXBJDz5+Td4=";
};
nativeBuildInputs = [
@ -41,12 +42,16 @@ stdenv.mkDerivation {
pkg-config
];
PKG_CONFIG_PATH = "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}/pkgconfig";
cmakeFlags = [
"-DIPU_VER=${ipuVersion}"
"-DTARGET_SUFFIX=-${ipuVersion}"
# missing libiacss
"-DUSE_PG_LITE_PIPE=ON"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DCMAKE_INSTALL_SUB_PATH=${ipuTarget}"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
NIX_CFLAGS_COMPILE = [
@ -61,21 +66,28 @@ stdenv.mkDerivation {
libtool
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
libdrm
];
postPatch = ''
substituteInPlace src/platformdata/PlatformData.h \
--replace '/usr/share/' "${placeholder "out"}/share/"
--replace '/usr/share/' "${placeholder "out"}/share/" \
--replace '#define CAMERA_DEFAULT_CFG_PATH "/etc/camera/"' '#define CAMERA_DEFAULT_CFG_PATH "${placeholder "out"}/etc/camera/"'
'';
postInstall = ''
mkdir -p $out/include/${ipuTarget}/
cp -r $src/include $out/include/${ipuTarget}/libcamhal
'';
postFixup = ''
for lib in $out/lib/*.so; do
patchelf --add-rpath "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}" $lib
patchelf --add-rpath "${ipu6-camera-bins}/lib" $lib
done
'';
passthru = {
inherit ipuVersion;
inherit ipuVersion ipuTarget;
};
meta = with lib; {

View file

@ -6,15 +6,15 @@
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: rec {
pname = "ipu6-camera-bins";
version = "unstable-2023-10-26";
version = "unstable-2024-09-27";
src = fetchFromGitHub {
owner = "intel";
repo = "ipu6-camera-bins";
rev = "af5ba0cb4a763569ac7514635013e9d870040bcf";
hash = "sha256-y0pT5M7AKACbquQWLZPYpTPXRC5hipLNL61nhs+cst4=";
owner = "intel";
rev = "98ca6f2a54d20f171628055938619972514f7a07";
hash = "sha256-DAjAzHMqX41mrfQVpDUJLw4Zjb9pz6Uy3TJjTGIkd6o=";
};
nativeBuildInputs = [
@ -33,13 +33,14 @@ stdenv.mkDerivation (finalAttrs: {
include \
$out/
install -m 0644 -D LICENSE $out/share/doc/LICENSE
# There is no LICENSE file in the src
# install -m 0644 -D LICENSE $out/share/doc/LICENSE
runHook postInstall
'';
postFixup = ''
for pcfile in $out/lib/*/pkgconfig/*.pc; do
for pcfile in $out/lib/pkgconfig/*.pc; do
substituteInPlace $pcfile \
--replace 'prefix=/usr' "prefix=$out"
done

View file

@ -5,13 +5,13 @@
stdenv.mkDerivation {
pname = "ivsc-firmware";
version = "unstable-2023-08-11";
version = "unstable-2024-06-14";
src = fetchFromGitHub {
owner = "intel";
repo = "ivsc-firmware";
rev = "10c214fea5560060d387fbd2fb8a1af329cb6232";
hash = "sha256-kEoA0yeGXuuB+jlMIhNm+SBljH+Ru7zt3PzGb+EPBPw=";
rev = "74a01d1208a352ed85d76f959c68200af4ead918";
hash = "sha256-kHYfeftMtoOsOtVN6+XoDMDHP7uTEztbvjQLpCnKCh0=";
};
dontBuild = true;

View file

@ -5,17 +5,19 @@
, kernel
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "ipu6-drivers";
version = "unstable-2023-11-24";
version = "unstable-2024-10-10";
src = fetchFromGitHub {
owner = "intel";
repo = "ipu6-drivers";
rev = "07f0612eabfdc31df36f5e316a9eae115807804f";
hash = "sha256-8JRZG6IKJT0qtoqJHm8641kSQMLc4Z+DRzK6FpL9Euk=";
rev = "118952d49ec598f56add50d93fa7bc3ac4a05643";
hash = "sha256-xdMwINoKrdRHCPMpdZQn86ATi1dAXncMU39LLXS16mc=";
};
patches = [ "${src}/patches/0001-v6.10-IPU6-headers-used-by-PSYS.patch" ];
postPatch = ''
cp --no-preserve=mode --recursive --verbose \
${ivsc-driver.src}/backport-include \
@ -47,7 +49,7 @@ stdenv.mkDerivation {
license = lib.licenses.gpl2Only;
maintainers = [ ];
platforms = [ "x86_64-linux" ];
# requires 6.1.7 https://github.com/intel/ipu6-drivers/pull/84
broken = kernel.kernelOlder "6.1.7";
# requires 6.10
broken = kernel.kernelOlder "6.10";
};
}

View file

@ -6,13 +6,13 @@
stdenv.mkDerivation {
pname = "ivsc-driver";
version = "unstable-2023-11-09";
version = "unstable-2024-09-18";
src = fetchFromGitHub {
owner = "intel";
repo = "ivsc-driver";
rev = "73a044d9633212fac54ea96cdd882ff5ab40573e";
hash = "sha256-vE5pOtVqjiWovlUMSEoBKTk/qvs8K8T5oY2r7njh0wQ=";
rev = "10f440febe87419d5c82d8fe48580319ea135b54";
hash = "sha256-jc+8geVquRtaZeIOtadCjY9F162Rb05ptE7dk8kuof0=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;

View file

@ -367,10 +367,7 @@ in {
intel-speed-select = if lib.versionAtLeast kernel.version "5.3" then callPackage ../os-specific/linux/intel-speed-select { } else null;
ipu6-drivers =
if kernelOlder "6.10"
then callPackage ../os-specific/linux/ipu6-drivers {}
else null;
ipu6-drivers = callPackage ../os-specific/linux/ipu6-drivers {};
ivsc-driver = callPackage ../os-specific/linux/ivsc-driver {};