From patchwork Thu Jul 26 09:26:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 949566 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=boundarydevices.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b="ECAtbDod"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41bmvK2JM2z9ryl for ; Thu, 26 Jul 2018 19:26:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 91B342502A; Thu, 26 Jul 2018 09:26:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pbu4eNcMdI+i; Thu, 26 Jul 2018 09:26:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 295DA25085; Thu, 26 Jul 2018 09:26:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5B19D1C115B for ; Thu, 26 Jul 2018 09:26:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5822B86542 for ; Thu, 26 Jul 2018 09:26:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rvqI8DkbWjB0 for ; Thu, 26 Jul 2018 09:26:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id AAEDA86511 for ; Thu, 26 Jul 2018 09:26:45 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id r24-v6so1618999wmh.0 for ; Thu, 26 Jul 2018 02:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iNuvPcMTSWpYrrRzW/jetDeilzVPz6dvt53fx5N4l2Y=; b=ECAtbDodSnO6xXM0oSKq4Z4zF9Fxk+kANJw+GrsaCPnt1jYS2/M/rpMr0JZzLtHQfG iL5c0wVBqzNcQd1AS+lrJjBdFuHaRhqCnQqL9FlGbYLONjxBYi9UXXYSc14OmzPmJCYD 5Jz6xH4qt0accfTqtk2btqBRy6f74vCeOMDQpGfZqghUMR9gIioqkfjCOXETYfuP3FKL wg0Yys6IELfGS7BNs0jF6XlCLg5iau+LwOOMWO5TdL7Ibi5rnJsoypiB77lpTu5k3oZe OGfbVmuU8iOFqmVQkVTcHTP9o1Cg3iGuqmSosoGCaZr+H0J3cDN03vbTWktEOdADh2Z6 mN2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iNuvPcMTSWpYrrRzW/jetDeilzVPz6dvt53fx5N4l2Y=; b=D+G2LSlX4pQfjXJMC+htnaQAcBAFd+WtkQGaAibM+kEIjvT+/VGa32jC4/b4mwvged 0BzYimuGM0RKur0w+uMuZOdGxw1FmNQEioSwcVfJBmUMybOWmC1I5i+Jqd5XK28j9GDe iLO07EFyWQMlnL1BpQ0fFdnZdbEaPXBtJHUdnVlXApAdpfWKIjCnGBz1BI4FpG/mq9gJ vPKC5S/XjGTSo5aBx/EOOHQd5sHljeGvoWYGXEHDcbbBiG9M8riPqVP6s0LSulsIwZbE IK130Y0zosP7YF6Vuzc1H8H8p4FD72S/+fzcj/W1YKZt7kL7YuGHbUHdlXq18/Zx2QKB kxJA== X-Gm-Message-State: AOUpUlEn29JFSdbEQTeTGC3IqeCn0zYCiTbZqN5TDZqHyHCrTsiAL8EZ qF7bARLXjuz1lPJB3cuAi8RfyMpXDTc= X-Google-Smtp-Source: AAOMgpeG1F9doWWyWD7nPX5KdfEPth6aBvqen+yQ6q+9vUhuHRjvn9IezkLAMotPQRR9W8mgXTBIFg== X-Received: by 2002:a1c:5f82:: with SMTP id t124-v6mr1076061wmb.14.1532597204039; Thu, 26 Jul 2018 02:26:44 -0700 (PDT) Received: from t450s.lan ([217.167.133.46]) by smtp.googlemail.com with ESMTPSA id v5-v6sm1689691wrp.87.2018.07.26.02.26.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 02:26:43 -0700 (PDT) From: Gary Bisson To: buildroot@buildroot.org Date: Thu, 26 Jul 2018 11:26:27 +0200 Message-Id: <20180726092631.4888-5-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726092631.4888-1-gary.bisson@boundarydevices.com> References: <20180726092631.4888-1-gary.bisson@boundarydevices.com> Subject: [Buildroot] [PATCH v2 4/8] imx-vpu-hantro: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@bootlin.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This package provides the user-space libraries needed to use the Hantro VPU present in processors such as the i.MX8MQ. Signed-off-by: Gary Bisson --- Changelog v2: - Mention i.MX8Mx in Config.in help text (Baruch) --- package/freescale-imx/Config.in | 4 +- ...on.h-header-inclusion-to-be-standard.patch | 44 +++++++++++++++++++ .../freescale-imx/imx-vpu-hantro/Config.in | 17 +++++++ .../imx-vpu-hantro/imx-vpu-hantro.hash | 2 + .../imx-vpu-hantro/imx-vpu-hantro.mk | 42 ++++++++++++++++++ 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch create mode 100644 package/freescale-imx/imx-vpu-hantro/Config.in create mode 100644 package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.hash create mode 100644 package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.mk diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 5e0c7ff291..9b47958ff3 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -63,7 +63,8 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 || \ - BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU bool @@ -80,6 +81,7 @@ source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" source "package/freescale-imx/imx-vpu-cnm/Config.in" +source "package/freescale-imx/imx-vpu-hantro/Config.in" source "package/freescale-imx/imx-vpuwrap/Config.in" source "package/freescale-imx/firmware-imx/Config.in" if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53) diff --git a/package/freescale-imx/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch b/package/freescale-imx/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch new file mode 100644 index 0000000000..951ead9824 --- /dev/null +++ b/package/freescale-imx/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch @@ -0,0 +1,44 @@ +From 872c82e7cbb9a0a0e761e8ac70fc28e19a55b4c3 Mon Sep 17 00:00:00 2001 +From: Gary Bisson +Date: Thu, 12 Jul 2018 11:38:28 +0200 +Subject: [PATCH] Fix ion.h header inclusion to be standard + +NXP "solution" was to manually copy the header to include/linux. +Let's point the Makefile to the proper (mainline) location instead: +https://elixir.bootlin.com/linux/v4.17/source/drivers/staging/android/uapi/ion.h + +Signed-off-by: Gary Bisson +--- + Makefile | 2 ++ + decoder_sw/software/linux/dwl/dwl_linux.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index b74e23a..a5ce22b 100755 +--- a/Makefile ++++ b/Makefile +@@ -11,6 +11,8 @@ INCLUDE_HEADERS = -I./decoder_sw -I$(SOURCE_ROOT)/source/inc -I$(SOURCE_ROOT)/so + INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/memalloc + #INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/ldriver + INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include ++# ION header location ++INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi + + CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \ + -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \ +diff --git a/decoder_sw/software/linux/dwl/dwl_linux.c b/decoder_sw/software/linux/dwl/dwl_linux.c +index 8183660..ed37d86 100644 +--- a/decoder_sw/software/linux/dwl/dwl_linux.c ++++ b/decoder_sw/software/linux/dwl/dwl_linux.c +@@ -41,7 +41,7 @@ + #include "dwl.h" + #include + #ifdef USE_ION +-#include ++#include + #ifdef ANDROID + #include + #endif +-- +2.18.0 + diff --git a/package/freescale-imx/imx-vpu-hantro/Config.in b/package/freescale-imx/imx-vpu-hantro/Config.in new file mode 100644 index 0000000000..5c6fdf44ed --- /dev/null +++ b/package/freescale-imx/imx-vpu-hantro/Config.in @@ -0,0 +1,17 @@ +comment "imx-vpu-hantro needs an i.MX platform with VPU support" + depends on BR2_aarch64 + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + +config BR2_PACKAGE_IMX_VPU_HANTRO + bool "imx-vpu-hantro" + depends on BR2_aarch64 # Only relevant for i.MX8 + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + help + Library of userspace helpers specific for the NXP i.MX SoC + integrating a Hantro Video Processing Unit (VPU) such as the + i.MX8MQ/i.MX8MM. + It requires a kernel that includes the i.MX specific headers + to be built. + + This library is provided by NXP as-is and doesn't have an + upstream. diff --git a/package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.hash b/package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.hash new file mode 100644 index 0000000000..3b1a545b3f --- /dev/null +++ b/package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.hash @@ -0,0 +1,2 @@ +sha256 cbc648e41f005aad209f74c9e5dd346138dca12efeb7b27e471de7474c4da302 imx-vpu-hantro-1.6.0.bin +sha256 0f34f6175247762e2e1c38319aadf657a53f00ce124e569dfc61b30451549e7a COPYING diff --git a/package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.mk b/package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.mk new file mode 100644 index 0000000000..57ce411e63 --- /dev/null +++ b/package/freescale-imx/imx-vpu-hantro/imx-vpu-hantro.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# imx-vpu-hantro +# +################################################################################ + +IMX_VPU_HANTRO_VERSION = 1.6.0 +IMX_VPU_HANTRO_SITE = $(FREESCALE_IMX_SITE) +IMX_VPU_HANTRO_SOURCE = imx-vpu-hantro-$(IMX_VPU_HANTRO_VERSION).bin + +IMX_VPU_HANTRO_INSTALL_STAGING = YES + +IMX_VPU_HANTRO_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + $(TARGET_CONFIGURE_OPTS) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + SDKTARGETSYSROOT=$(STAGING_DIR) \ + LINUX_KERNEL_ROOT=$(LINUX_DIR) + +IMX_VPU_HANTRO_LICENSE = NXP Semiconductor Software License Agreement +IMX_VPU_HANTRO_LICENSE_FILES = EULA COPYING +IMX_VPU_HANTRO_REDISTRIBUTE = NO + +define IMX_VPU_HANTRO_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_VPU_HANTRO_DL_DIR)/$(IMX_VPU_HANTRO_SOURCE)) +endef + +define IMX_VPU_HANTRO_BUILD_CMDS + $(IMX_VPU_HANTRO_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define IMX_VPU_HANTRO_INSTALL_STAGING_CMDS + $(IMX_VPU_HANTRO_MAKE_ENV) $(MAKE1) -C $(@D) \ + DEST_DIR=$(STAGING_DIR) libdir=/usr/lib install +endef + +define IMX_VPU_HANTRO_INSTALL_TARGET_CMDS + $(IMX_VPU_HANTRO_MAKE_ENV) $(MAKE1) -C $(@D) \ + DEST_DIR=$(TARGET_DIR) libdir=/usr/lib install +endef + +$(eval $(generic-package))