Discussion:
[meta-freescale] [PATCH v5 2/4] recipes: Limit BSP specific recipes on relevant SOCs
Khem Raj
2018-09-28 20:18:49 UTC
Permalink
This helps in using meta-freescale with other BSP layers in same
projects, which is common usecase

Signed-off-by: Khem Raj <***@gmail.com>
Cc: Andreas Müller <***@gmail.com>
Cc: Zhenhua Luo <***@nxp.com>
Cc: Otavio Salvador <***@ossystems.com.br>
---
v2: nativesdk-mxsldr is needed in SDK packagegroups
v3: Fine tune the overrides for qorq and mainline bsp specific recipes
v4: Set COMPATIBLE_HOST to (imx)
v5: Use COMAPTIBLE_MACHINE instead of COMPATIBLE_HOST, add more recipes

dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb | 1 +
recipes-bsp/firmware-imx/firmware-imx_7.6.bb | 2 ++
recipes-bsp/imx-uuc/imx-uuc_git.bb | 2 ++
recipes-bsp/u-boot/u-boot-fslc-common_2018.09.inc | 2 ++
recipes-bsp/uefi/uefi_git.bb | 1 +
recipes-dpaa/fmlib/fmlib_git.bb | 1 +
recipes-graphics/drm/libdrm-armada_git.bb | 2 ++
recipes-graphics/xorg-driver/xf86-video-armada_git.bb | 2 ++
recipes-kernel/dtc/dtc-145_git.bb | 1 +
.../kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb | 1 +
.../kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.6.bb | 1 +
recipes-security/optee/optee-client-qoriq.bb | 2 ++
12 files changed, 18 insertions(+)

diff --git a/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb b/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
index 76ece625..d839b6fc 100644
--- a/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
+++ b/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
@@ -45,3 +45,4 @@ PARALLEL_MAKE = ""

PACKAGE_ARCH = "${MACHINE_SOCARCH}"

+COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-bsp/firmware-imx/firmware-imx_7.6.bb b/recipes-bsp/firmware-imx/firmware-imx_7.6.bb
index 6c5f73ce..4f7b3890 100644
--- a/recipes-bsp/firmware-imx/firmware-imx_7.6.bb
+++ b/recipes-bsp/firmware-imx/firmware-imx_7.6.bb
@@ -100,3 +100,5 @@ PACKAGES =+ "${PN}-epdc ${PN}-brcm"

FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/"
FILES_${PN}-brcm = "${base_libdir}/firmware/bcm/*/*.bin ${base_libdir}/firmware/bcm/*/*.cal ${sysconfdir}/firmware/"
+
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-bsp/imx-uuc/imx-uuc_git.bb b/recipes-bsp/imx-uuc/imx-uuc_git.bb
index 381c214a..a3a8387b 100644
--- a/recipes-bsp/imx-uuc/imx-uuc_git.bb
+++ b/recipes-bsp/imx-uuc/imx-uuc_git.bb
@@ -16,3 +16,5 @@ SRCREV = "323efa5e4c799c40503ac92a8104c33b090e6731"
S = "${WORKDIR}/git"

FILES_${PN} += "/linuxrc /fat"
+
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-bsp/u-boot/u-boot-fslc-common_2018.09.inc b/recipes-bsp/u-boot/u-boot-fslc-common_2018.09.inc
index aaefd67f..18be28a3 100644
--- a/recipes-bsp/u-boot/u-boot-fslc-common_2018.09.inc
+++ b/recipes-bsp/u-boot/u-boot-fslc-common_2018.09.inc
@@ -14,3 +14,5 @@ SRCBRANCH = "2018.09+fslc"
PV = "v2018.09+git${SRCPV}"

S = "${WORKDIR}/git"
+
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb
index f157d03d..baf430d8 100644
--- a/recipes-bsp/uefi/uefi_git.bb
+++ b/recipes-bsp/uefi/uefi_git.bb
@@ -28,3 +28,4 @@ FILES_${PN}-image += "/uefi/*"

PACKAGE_ARCH = "${MACHINE_SOCARCH}"

+COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-dpaa/fmlib/fmlib_git.bb b/recipes-dpaa/fmlib/fmlib_git.bb
index bbe1e535..1f31f631 100644
--- a/recipes-dpaa/fmlib/fmlib_git.bb
+++ b/recipes-dpaa/fmlib/fmlib_git.bb
@@ -28,3 +28,4 @@ ALLOW_EMPTY_${PN} = "1"

PACKAGE_ARCH = "${MACHINE_ARCH}"

+COMPATIBLE_MACHINE ?= "(qoriq)"
diff --git a/recipes-graphics/drm/libdrm-armada_git.bb b/recipes-graphics/drm/libdrm-armada_git.bb
index 937c68d7..0a14e371 100644
--- a/recipes-graphics/drm/libdrm-armada_git.bb
+++ b/recipes-graphics/drm/libdrm-armada_git.bb
@@ -13,3 +13,5 @@ SRC_URI = "git://git.armlinux.org.uk/~rmk/libdrm-armada.git"
inherit autotools pkgconfig

S = "${WORKDIR}/git"
+
+COMPATIBLE_MACHINE ?= "(imx)"
diff --git a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb b/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
index 30e3ae47..30372eff 100644
--- a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
+++ b/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
@@ -44,3 +44,5 @@ EXTRA_OECONF = "--disable-etnaviv \
--disable-vivante \
--with-etnaviv-source=${WORKDIR}/etna_viv \
"
+
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-kernel/dtc/dtc-145_git.bb b/recipes-kernel/dtc/dtc-145_git.bb
index 2776cc5e..bdd83990 100644
--- a/recipes-kernel/dtc/dtc-145_git.bb
+++ b/recipes-kernel/dtc/dtc-145_git.bb
@@ -16,3 +16,4 @@ do_install () {
install -d ${D}/${bindir}
install -m 755 dtc ${D}/${bindir}/dtc-145
}
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb
index 19f2dc7f..f9307fb4 100644
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb
@@ -17,3 +17,4 @@ S = "${WORKDIR}/git"
inherit module

KERNEL_MODULE_AUTOLOAD = "galcore"
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.6.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.6.bb
index 0170695b..32279493 100644
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.6.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.6.bb
@@ -24,3 +24,4 @@ inherit module
EXTRA_OEMAKE += "CONFIG_MXC_GPU_VIV=m"

KERNEL_MODULE_AUTOLOAD = "galcore"
+COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-security/optee/optee-client-qoriq.bb b/recipes-security/optee/optee-client-qoriq.bb
index 0a76743b..a5042703 100644
--- a/recipes-security/optee/optee-client-qoriq.bb
+++ b/recipes-security/optee/optee-client-qoriq.bb
@@ -27,3 +27,5 @@ do_install() {

cp -a ${S}/out/export/include ${D}/usr/
}
+
+COMPATIBLE_MACHINE = "(qoriq)"
--
2.19.0

--
Khem Raj
2018-09-28 20:18:50 UTC
Permalink
* Respect OE flags inside makefiles
* Its not a autotooled recipe but a simple makefile based one

Fixes
NOTE: i586-yoe-linux-musl-objdump -p
TOPDIR/build/tmp/work/i586-yoe-linux-musl/mxsldr/0.0.0+gitAUTOINC+c40d804725-r0/packages-split/mxsldr/usr/bin/mxsldr
ERROR: QA Issue: No GNU_HASH in the elf binary:
'TOPDIR/build/tmp/work/i586-yoe-linux-musl/mxsldr/0.0.0+gitAUTOINC+c40d804725-r0/packages-split/mxsldr/usr/bin/mxsldr'
[ldflags]

Signed-off-by: Khem Raj <***@gmail.com>
---
...-Do-not-ignore-OE-cflags-and-ldflags.patch | 28 +++++++++++++++++++
recipes-bsp/mxsldr/mxsldr_git.bb | 12 ++++++--
2 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 recipes-bsp/mxsldr/mxsldr/0001-Do-not-ignore-OE-cflags-and-ldflags.patch

diff --git a/recipes-bsp/mxsldr/mxsldr/0001-Do-not-ignore-OE-cflags-and-ldflags.patch b/recipes-bsp/mxsldr/mxsldr/0001-Do-not-ignore-OE-cflags-and-ldflags.patch
new file mode 100644
index 00000000..c8c8413a
--- /dev/null
+++ b/recipes-bsp/mxsldr/mxsldr/0001-Do-not-ignore-OE-cflags-and-ldflags.patch
@@ -0,0 +1,28 @@
+From 2f2e1ca77b4459475e5d649bd22e6bc8c3873695 Mon Sep 17 00:00:00 2001
+From: Khem Raj <***@gmail.com>
+Date: Tue, 25 Sep 2018 01:23:02 -0700
+Subject: [PATCH] Do not ignore OE cflags and ldflags
+
+Signed-off-by: Khem Raj <***@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index afb4e32..d2763ed 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,8 +3,8 @@ prefix ?= "/usr/local"
+
+ all: mxsldr
+
+-CFLAGS = `pkg-config --cflags libusb-1.0`
+-LDFLAGS = `pkg-config --libs libusb-1.0`
++CFLAGS += `pkg-config --cflags libusb-1.0`
++LDFLAGS += `pkg-config --libs libusb-1.0`
+
+ mxsldr: mxsldr.c
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lusb-1.0
+--
+2.19.0
+
diff --git a/recipes-bsp/mxsldr/mxsldr_git.bb b/recipes-bsp/mxsldr/mxsldr_git.bb
index 5c4b874b..a7df725f 100644
--- a/recipes-bsp/mxsldr/mxsldr_git.bb
+++ b/recipes-bsp/mxsldr/mxsldr_git.bb
@@ -7,12 +7,20 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

SRCREV = "c40d80472525e1d57dae5317c028b745968c0399"
-SRC_URI = "git://git.denx.de/mxsldr.git"
+SRC_URI = "git://git.denx.de/mxsldr.git \
+ file://0001-Do-not-ignore-OE-cflags-and-ldflags.patch \
+ "

PV = "0.0.0+git${SRCPV}"

S = "${WORKDIR}/git"

-inherit autotools-brokensep pkgconfig
+inherit pkgconfig

+do_compile() {
+ oe_runmake
+}
+do_install() {
+ oe_runmake install DESTDIR="${D}"
+}
BBCLASSEXTEND = "native nativesdk"
--
2.19.0

--
Khem Raj
2018-09-28 20:18:51 UTC
Permalink
2.6 is called thud and is upcoming

Signed-off-by: Khem Raj <***@gmail.com>
---
conf/layer.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index 843277b9..d2a81521 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -8,7 +8,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "freescale-layer"
BBFILE_PATTERN_freescale-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_freescale-layer = "5"
-LAYERSERIES_COMPAT_freescale-layer = "sumo"
+LAYERSERIES_COMPAT_freescale-layer = "sumo thud"

# Add the Freescale-specific licenses into the metadata
LICENSE_PATH += "${LAYERDIR}/custom-licenses"
--
2.19.0

--
Otavio Salvador
2018-09-28 20:37:29 UTC
Permalink
Post by Khem Raj
This helps in using meta-freescale with other BSP layers in same
projects, which is common usecase
I applied the whole series and also backported it for sumo. Thanks for
the good work!
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
--
Andreas Müller
2018-10-01 11:12:42 UTC
Permalink
On Fri, Sep 28, 2018 at 10:38 PM Otavio Salvador
Post by Otavio Salvador
Post by Khem Raj
This helps in using meta-freescale with other BSP layers in same
projects, which is common usecase
I applied the whole series and also backported it for sumo. Thanks for
the good work!
FYI: From use_mainline_bsp point of view this series is fine and does
not cause issues.

Thanks also from my side for doing this enhancements

Andreas
--

Loading...