Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 0A1CCE00AC5; Wed, 3 Oct 2018 03:24:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.221.45 listed in list.dnswl.org] * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id E52DAE0095C for ; Wed, 3 Oct 2018 03:24:52 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id 61-v6so4754046wrb.6 for ; Wed, 03 Oct 2018 03:24:52 -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 :mime-version:content-transfer-encoding; bh=k5E72RQUXCqoehr+BPYqMZenU7Kq6MlO5/HlOzd6DJc=; b=w4dn3PJMm75zxlggwajJz7qh0KCMWibwo+5fFBqAyOD9l5WPk8aBn/dwiH5aip1l9p BmCDFvwg3qW9vMCK1IdGA4niMi9yT4rbieqbEAZ3PF/RhFABGRo58oiIxOVzRZdUkJum Wo+S3tFS+tfWGA2RmdWoEgaThOPepWyKkTtbs0SpMgBxz9RE2Ja2VIziDg6+Z0Zyo5sn Ww6829bJZWeIiLhIJxHjGMF8rvrPU/bV0uyiB5dBRgZBcQu1O3OGnI/EvNcRoyizfGT1 ql84FYynGa8GcaWavsKcdJbtpZJ/TIPyBiyYBoTJC4640Z6MlZdNKvmJwg8yLxh6oyN9 J1+g== 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:mime-version:content-transfer-encoding; bh=k5E72RQUXCqoehr+BPYqMZenU7Kq6MlO5/HlOzd6DJc=; b=r8YK1VUIlXKVkfUnHc6xDCwB5hDxYVvmgeH8IRG1rF2k+fFEMMhlO6ODp1ePffuXXh TUIxLKG8kK6+XNSN9ZG41RHBNXIs2arKOnzJrZ/dN2QdxDE6+nKWE4LEWbqb7rjyh0rW qjAetk6Wrg5xfJapdCf9rW40mhRqMgeKlJC3pB+9799iif7wMaoQW2xac2sHyVpGPPWx HykmPp0KNjjAZKvkJc2ipzMDMdbFMW8DuCY1fLyrWa4biQghwnULQyERqlWpIqZz8XIk LsuFbAq2I31czKm7/gHgA3KThBVNezhBFZJO5jc2B+Yyny82TxlwNJOW15vEKo/umOuu Qf0A== X-Gm-Message-State: ABuFfojaKff9AbY+5b/PLaNJSbETNMix4jwZGBm0rP/xYEeehJrdJZWY JVmBsHifmCY7e5bvSaLgcPQ91YGMuuM= X-Google-Smtp-Source: ACcGV61VxKgyOwW5hAJwtGE63bDyzEIWMnsouM2+S6xTYNbxYw7Iw3UcQj5kDVN5TEToGD0EXQjYfw== X-Received: by 2002:adf:ade3:: with SMTP id w90-v6mr733687wrc.73.1538562291635; Wed, 03 Oct 2018 03:24:51 -0700 (PDT) Received: from g751.home (2a01cb040a7dd500657cd9152dd94705.ipv6.abo.wanadoo.fr. [2a01:cb04:a7d:d500:657c:d915:2dd9:4705]) by smtp.googlemail.com with ESMTPSA id q135-v6sm1905432wmd.4.2018.10.03.03.24.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 03:24:51 -0700 (PDT) From: Gary Bisson To: meta-freescale@yoctoproject.org Date: Wed, 3 Oct 2018 12:24:42 +0200 Message-Id: <20181003102443.29749-2-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181003102443.29749-1-gary.bisson@boundarydevices.com> References: <20181003102443.29749-1-gary.bisson@boundarydevices.com> MIME-Version: 1.0 Cc: carol.zhu@nxp.com Subject: [PATCH 1/2] imx-vpu-hantro: fix build issue X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2018 10:24:55 -0000 Content-Transfer-Encoding: 8bit The source code uses LINUX_VERSION_CODE at many places which constraints the package to be built with a toolchain whose headers match the kernel. This is a far from ideal solution, especially if one wants to use a prebuilt toolchain (with unknown kernel header version). So change the CFLAGS to consider the kernel build folder so that the Linux version test actually matches the kernel built. Signed-off-by: Gary Bisson --- ...clusion-to-be-from-kernel-build-fold.patch | 44 +++++++++++++++++++ .../imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb | 5 ++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch new file mode 100644 index 00000000..e9bf9257 --- /dev/null +++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch @@ -0,0 +1,44 @@ +From 1d7b7046c8f735e150e92aeace3fe6d0686b9bc9 Mon Sep 17 00:00:00 2001 +From: Gary Bisson +Date: Wed, 3 Oct 2018 10:52:29 +0200 +Subject: [PATCH] Fix version.h inclusion to be from kernel build folder + +Instead of relying on Toolchain headers which can be from newer kernel. + +Signed-off-by: Gary Bisson +--- + Makefile_G1G2 | 3 +++ + Makefile_H1 | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/Makefile_G1G2 b/Makefile_G1G2 +index 29866a4..c473bcb 100755 +--- a/Makefile_G1G2 ++++ b/Makefile_G1G2 +@@ -16,6 +16,9 @@ INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/in + # ION header location + INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi + ++# LINUX_VERSION_CODE from kernel build folder instead of toolchain headers ++INCLUDE_HEADERS += -I$(LINUX_KERNEL_BUILD)/include/generated/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 \ + -DDEC_X170_OUTPUT_FORMAT=0 -DDEC_X170_TIMEOUT_LENGTH=-1 -DENABLE_HEVC_SUPPORT \ +diff --git a/Makefile_H1 b/Makefile_H1 +index 56b4332..0be43ce 100755 +--- a/Makefile_H1 ++++ b/Makefile_H1 +@@ -23,6 +23,9 @@ ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include + # ION header location + ENV += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi + ++# LINUX_VERSION_CODE from kernel build folder instead of toolchain headers ++INCLUDE_HEADERS += -I$(LINUX_KERNEL_BUILD)/include/generated/uapi ++ + LIBENCNAME = libcodec_enc + LIBSENC = -L./ -lhantro_h1 -lpthread + +-- +2.19.0 + diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb index 243f1f35..b5fc8468 100644 --- a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb +++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb @@ -12,6 +12,7 @@ PROVIDES = "virtual/imxvpu" SRC_URI = " \ ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ file://0001-Fix-ion.h-header-inclusion-to-be-standard.patch \ + file://0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch \ " SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" @@ -24,7 +25,9 @@ PLATFORM_mx8mm = "IMX8MM" PLATFORM_mx8mq = "IMX8MQ" do_compile () { - oe_runmake CROSS_COMPILE="${HOST_PREFIX}" LINUX_KERNEL_ROOT="${STAGING_KERNEL_DIR}" SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" PLATFORM="${PLATFORM}" all + oe_runmake CROSS_COMPILE="${HOST_PREFIX}" LINUX_KERNEL_BUILD="${STAGING_KERNEL_BUILDDIR}" \ + LINUX_KERNEL_ROOT="${STAGING_KERNEL_DIR}" SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \ + PLATFORM="${PLATFORM}" all } do_install () { -- 2.19.0