Skip to content

Commit

Permalink
kernel: add package for Intel VPU/NPU driver
Browse files Browse the repository at this point in the history
Intel NPU device is an AI inference accelerator integrated with Intel
client CPUs, starting from Intel Core Ultra generation of CPUs
(formerly known as Meteor Lake). It enables energy-efficient execution
of artificial neural network tasks.

The full device name is Neural Processing Unit, but the Linux kernel
driver uses the older name - Versatile Processing Unit (VPU).

This package is for NPU/VPU firmware.

Details in https://github.com/intel/linux-npu-driver

Signed-off-by: Joe Zheng <joe.zheng@intel.com>
  • Loading branch information
joez committed Feb 9, 2025
1 parent 719b725 commit 7b1175e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
41 changes: 41 additions & 0 deletions package/firmware/ivpu-firmware/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright (C) 2022 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=ivpu-firmware
PKG_VERSION:=1.10.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/intel/linux-npu-driver/archive/refs/tags
PKG_HASH:=a756de38cde7bd5a0402854d08429d271a33784835b80db3be672ade80570900
PKG_BUILD_DIR:=$(BUILD_DIR)/linux-npu-driver-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/ivpu-firmware
SECTION:=firmware
CATEGORY:=Firmware
TITLE:=Intel VPU firmware
URL:=$(PKG_SOURCE_URL)
DEPENDS:=
endef

define Build/Compile
true
endef

define Package/ivpu-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/intel/vpu
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/firmware/bin/*.bin \
$(1)/lib/firmware/intel/vpu
endef

$(eval $(call BuildPackage,ivpu-firmware))
17 changes: 17 additions & 0 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,23 @@ endef

$(eval $(call KernelPackage,drm-i915))

define KernelPackage/drm-ivpu
SUBMENU:=$(VIDEO_MENU)
TITLE:=Intel VPU DRM support
DEPENDS:=@TARGET_x86 +ivpu-firmware
KCONFIG:=CONFIG_DRM_ACCEL_IVPU \
CONFIG_DRM_ACCEL_HABANALABS=n \
CONFIG_DRM_ACCEL_QAIC=n \
CONFIG_DRM_ACCEL=y
FILES:=$(LINUX_DIR)/drivers/accel/ivpu/intel_vpu.ko
AUTOLOAD:=$(call AutoProbe,intel_vpu)
endef

define KernelPackage/drm-ivpu/description
Direct Rendering Manager (DRM) support for Intel VPU
endef

$(eval $(call KernelPackage,drm-ivpu))

define KernelPackage/drm-imx
SUBMENU:=$(VIDEO_MENU)
Expand Down

0 comments on commit 7b1175e

Please sign in to comment.