mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
Merge pull request #273590 from NixOS/backport-268618-to-staging-23.11
[Backport staging-23.11] nixos/hardware/ipu6: update all related packages
This commit is contained in:
@@ -13,11 +13,12 @@ in
|
||||
enable = mkEnableOption (lib.mdDoc "support for Intel IPU6/MIPI cameras");
|
||||
|
||||
platform = mkOption {
|
||||
type = types.enum [ "ipu6" "ipu6ep" ];
|
||||
type = types.enum [ "ipu6" "ipu6ep" "ipu6epmtl" ];
|
||||
description = lib.mdDoc ''
|
||||
Choose the version for your hardware platform.
|
||||
|
||||
Use `ipu6` for Tiger Lake and `ipu6ep` for Alder Lake respectively.
|
||||
Use `ipu6` for Tiger Lake, `ipu6ep` for Alder Lake or Raptor Lake,
|
||||
and `ipu6epmtl` for Meteor Lake.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -29,9 +30,7 @@ in
|
||||
ipu6-drivers
|
||||
];
|
||||
|
||||
hardware.firmware = with pkgs; [ ]
|
||||
++ optional (cfg.platform == "ipu6") ipu6-camera-bin
|
||||
++ optional (cfg.platform == "ipu6ep") ipu6ep-camera-bin;
|
||||
hardware.firmware = [ pkgs.ipu6-camera-bins ];
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="intel-ipu6-psys", MODE="0660", GROUP="video"
|
||||
@@ -44,14 +43,13 @@ in
|
||||
|
||||
extraPackages = with pkgs.gst_all_1; [ ]
|
||||
++ optional (cfg.platform == "ipu6") icamerasrc-ipu6
|
||||
++ optional (cfg.platform == "ipu6ep") icamerasrc-ipu6ep;
|
||||
++ optional (cfg.platform == "ipu6ep") icamerasrc-ipu6ep
|
||||
++ optional (cfg.platform == "ipu6epmtl") icamerasrc-ipu6epmtl;
|
||||
|
||||
input = {
|
||||
pipeline = "icamerasrc";
|
||||
format = mkIf (cfg.platform == "ipu6ep") (mkDefault "NV12");
|
||||
format = mkIf (cfg.platform != "ipu6") (mkDefault "NV12");
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
, Security
|
||||
, VideoToolbox
|
||||
, ipu6ep-camera-hal
|
||||
, ipu6epmtl-camera-hal
|
||||
}:
|
||||
|
||||
{
|
||||
@@ -47,6 +48,9 @@
|
||||
icamerasrc-ipu6ep = callPackage ./icamerasrc {
|
||||
ipu6-camera-hal = ipu6ep-camera-hal;
|
||||
};
|
||||
icamerasrc-ipu6epmtl = callPackage ./icamerasrc {
|
||||
ipu6-camera-hal = ipu6epmtl-camera-hal;
|
||||
};
|
||||
|
||||
# note: gst-python is in ../../python-modules/gst-python - called under python3Packages
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
, libdrm
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}";
|
||||
version = "unstable-2023-03-09";
|
||||
version = "unstable-2023-10-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "icamerasrc";
|
||||
rev = "17841ab6249aaa69bd9b3959262bf182dee74111";
|
||||
hash = "sha256-j8ZYe4nyy5yfo10CGeXDwbAaAPvdr0ptMWB8hQDyESQ=";
|
||||
rev = "528a6f177732def4d5ebc17927220d8823bc8fdc";
|
||||
hash = "sha256-Ezcm5OpF/NKvJf5sFeJyvNc2Uq0166GukC9MuNUV2Fs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -8,20 +8,32 @@
|
||||
|
||||
# runtime
|
||||
, expat
|
||||
, ipu6-camera-bin
|
||||
, ipu6-camera-bins
|
||||
, libtool
|
||||
, gst_all_1
|
||||
}:
|
||||
|
||||
# Pick one of
|
||||
# - ipu6 (Tiger Lake)
|
||||
# - ipu6ep (Alder Lake)
|
||||
# - ipu6epmtl (Meteor Lake)
|
||||
, ipuVersion ? "ipu6"
|
||||
}:
|
||||
let
|
||||
ipuTarget = {
|
||||
"ipu6" = "ipu_tgl";
|
||||
"ipu6ep" = "ipu_adl";
|
||||
"ipu6epmtl" = "ipu_mtl";
|
||||
}.${ipuVersion};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "${ipu6-camera-bin.ipuVersion}-camera-hal";
|
||||
version = "unstable-2023-02-08";
|
||||
pname = "${ipuVersion}-camera-hal";
|
||||
version = "unstable-2023-09-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "ipu6-camera-hal";
|
||||
rev = "884b81aae0ea19a974eb8ccdaeef93038136bdd4";
|
||||
hash = "sha256-AePL7IqoOhlxhfPRLpCman5DNh3wYS4MUcLgmgBUcCM=";
|
||||
rev = "9fa05a90886d399ad3dda4c2ddc990642b3d20c9";
|
||||
hash = "sha256-yS1D7o6dsQ4FQkjfwcisOxcP7Majb+4uQ/iW5anMb5c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -29,25 +41,23 @@ stdenv.mkDerivation {
|
||||
pkg-config
|
||||
];
|
||||
|
||||
PKG_CONFIG_PATH = "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}/pkgconfig";
|
||||
|
||||
cmakeFlags = [
|
||||
"-DIPU_VER=${ipu6-camera-bin.ipuVersion}"
|
||||
"-DIPU_VER=${ipuVersion}"
|
||||
# missing libiacss
|
||||
"-DUSE_PG_LITE_PIPE=ON"
|
||||
# missing libipu4
|
||||
"-DENABLE_VIRTUAL_IPU_PIPE=OFF"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-error"
|
||||
"-I${lib.getDev ipu6-camera-bin}/include/ia_imaging"
|
||||
"-I${lib.getDev ipu6-camera-bin}/include/ia_camera"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [
|
||||
expat
|
||||
ipu6-camera-bin
|
||||
ipu6-camera-bins
|
||||
libtool
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
@@ -59,12 +69,13 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/lib/pkgconfig/libcamhal.pc \
|
||||
--replace 'prefix=/usr' "prefix=$out"
|
||||
for lib in $out/lib/*.so; do
|
||||
patchelf --add-rpath "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}" $lib
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit (ipu6-camera-bin) ipuVersion;
|
||||
inherit ipuVersion;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -4,26 +4,19 @@
|
||||
, autoPatchelfHook
|
||||
, expat
|
||||
, zlib
|
||||
|
||||
# Pick one of
|
||||
# - ipu6 (Tiger Lake)
|
||||
# - ipu6ep (Alder Lake)
|
||||
, ipuVersion ? "ipu6"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "${ipuVersion}-camera-bin";
|
||||
version = "unstable-2023-02-08";
|
||||
pname = "ipu6-camera-bins";
|
||||
version = "unstable-2023-10-26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "ipu6-camera-bins";
|
||||
rev = "276859fc6de83918a32727d676985ec40f31af2b";
|
||||
hash = "sha256-QnedM2UBbGyd2wIF762Mi+VkDZYtC6MifK4XGGxlUzw=";
|
||||
rev = "af5ba0cb4a763569ac7514635013e9d870040bcf";
|
||||
hash = "sha256-y0pT5M7AKACbquQWLZPYpTPXRC5hipLNL61nhs+cst4=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/${ipuVersion}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
stdenv.cc.cc.lib
|
||||
@@ -40,32 +33,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
include \
|
||||
$out/
|
||||
|
||||
install -m 0644 -D ../LICENSE $out/share/doc/LICENSE
|
||||
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 'exec_prefix=/usr' 'exec_prefix=''${prefix}' \
|
||||
--replace 'prefix=/usr' "prefix=$out" \
|
||||
--replace 'libdir=/usr/lib' 'libdir=''${prefix}/lib' \
|
||||
--replace 'includedir=/usr/include' 'includedir=''${prefix}/include'
|
||||
--replace 'prefix=/usr' "prefix=$out"
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit ipuVersion;
|
||||
};
|
||||
|
||||
meta = let
|
||||
generation = {
|
||||
ipu6 = "Tiger Lake";
|
||||
ipu6ep = "Alder Lake";
|
||||
}.${ipuVersion};
|
||||
in with lib; {
|
||||
description = "${generation} IPU firmware and proprietary image processing libraries";
|
||||
meta = with lib; {
|
||||
description = "IPU firmware and proprietary image processing libraries";
|
||||
homepage = "https://github.com/intel/ipu6-camera-bins";
|
||||
license = licenses.issl;
|
||||
sourceProvenance = with sourceTypes; [
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "ivsc-firmware";
|
||||
version = "unstable-2022-11-02";
|
||||
version = "unstable-2023-08-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "ivsc-firmware";
|
||||
rev = "29c5eff4cdaf83e90ef2dcd2035a9cdff6343430";
|
||||
hash = "sha256-GuD1oTnDEs0HslJjXx26DkVQIe0eS+js4UoaTDa77ME=";
|
||||
rev = "10c214fea5560060d387fbd2fb8a1af329cb6232";
|
||||
hash = "sha256-kEoA0yeGXuuB+jlMIhNm+SBljH+Ru7zt3PzGb+EPBPw=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "ipu6-drivers";
|
||||
version = "unstable-2023-08-28";
|
||||
version = "unstable-2023-11-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "ipu6-drivers";
|
||||
rev = "7c3d6ab1e9e234563a0af51286b0a8d60445f2a3";
|
||||
hash = "sha256-D782v6hIqAl2EO1+zKeakURD3UGVP3c7p3ba/61yfW4=";
|
||||
rev = "07f0612eabfdc31df36f5e316a9eae115807804f";
|
||||
hash = "sha256-8JRZG6IKJT0qtoqJHm8641kSQMLc4Z+DRzK6FpL9Euk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "ivsc-driver";
|
||||
version = "unstable-2023-03-10";
|
||||
version = "unstable-2023-11-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "ivsc-driver";
|
||||
rev = "c8db12b907e2e455d4d5586e5812d1ae0eebd571";
|
||||
hash = "sha256-OM9PljvaMKrk72BFeSCqaABFeAws+tOdd3oC2jyNreE=";
|
||||
rev = "73a044d9633212fac54ea96cdd882ff5ab40573e";
|
||||
hash = "sha256-vE5pOtVqjiWovlUMSEoBKTk/qvs8K8T5oY2r7njh0wQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
{ lib, stdenv, fetchFromGitHub, kernel, kmod }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "v4l2loopback";
|
||||
version = "unstable-2023-02-19-${kernel.version}";
|
||||
version = "unstable-2023-11-23-${kernel.version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "umlaeute";
|
||||
repo = "v4l2loopback";
|
||||
rev = "fb410fc7af40e972058809a191fae9517b9313af";
|
||||
hash = "sha256-gLFtR7s+3LUQ0BZxHbmaArHbufuphbtAX99nxJU3c84=";
|
||||
rev = "850a2e36849f6ad3c9bf74f2ae3f603452bd8a71";
|
||||
hash = "sha256-LqP5R3oKbjUQUfDZUWpkrmyopWhOt4wlgSgGywTPJXM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix bug https://github.com/umlaeute/v4l2loopback/issues/535
|
||||
./revert-pr518.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" "pic" ];
|
||||
|
||||
preBuild = ''
|
||||
|
||||
@@ -28001,16 +28001,16 @@ with pkgs;
|
||||
|
||||
iproute2 = callPackage ../os-specific/linux/iproute { };
|
||||
|
||||
ipu6-camera-bin = callPackage ../os-specific/linux/firmware/ipu6-camera-bins {};
|
||||
ipu6-camera-bins = callPackage ../os-specific/linux/firmware/ipu6-camera-bins {};
|
||||
|
||||
ipu6-camera-hal = callPackage ../development/libraries/ipu6-camera-hal {};
|
||||
|
||||
ipu6ep-camera-bin = callPackage ../os-specific/linux/firmware/ipu6-camera-bins {
|
||||
ipu6ep-camera-hal = callPackage ../development/libraries/ipu6-camera-hal {
|
||||
ipuVersion = "ipu6ep";
|
||||
};
|
||||
|
||||
ipu6ep-camera-hal = callPackage ../development/libraries/ipu6-camera-hal {
|
||||
ipu6-camera-bin = ipu6ep-camera-bin;
|
||||
ipu6epmtl-camera-hal = callPackage ../development/libraries/ipu6-camera-hal {
|
||||
ipuVersion = "ipu6epmtl";
|
||||
};
|
||||
|
||||
ivsc-firmware = callPackage ../os-specific/linux/firmware/ivsc-firmware { };
|
||||
|
||||
Reference in New Issue
Block a user