[yocto] [PATCH] meta-yocto-bsp: mpc8315e-rdb: Change kernel provider assignment to a weaker one

2018-06-15 Thread He Zhe
Currently mpc8315e-rdb.conf comes after local.conf during parsing. We should
give local.conf a chance to overwrite the kernel provider assignment, like
other BSPs.

Signed-off-by: He Zhe 
---
 meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf 
b/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
index 34f12303a1..72f52912eb 100644
--- a/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
+++ b/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
@@ -15,7 +15,7 @@ SERIAL_CONSOLE = "115200 ttyS0"
 MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
 
 PREFERRED_VERSION_linux-yocto ?= "4.15%"
-PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
 
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
 XSERVER ?= "xserver-xorg \
-- 
2.11.0

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH] meta-yocto-bsp: Let yocto BSPs be able to build with linux-yocto-dev

2018-06-15 Thread He Zhe
Signed-off-by: He Zhe 
---
 .../recipes-kernel/linux/linux-yocto-dev.bbappend | 15 +++
 1 file changed, 15 insertions(+)
 create mode 100644 meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend

diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend 
b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend
new file mode 100644
index 00..f044dafb4d
--- /dev/null
+++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -0,0 +1,15 @@
+KBRANCH_genericx86  = "standard/base"
+KBRANCH_genericx86-64  = "standard/base"
+KBRANCH_edgerouter = "standard/edgerouter"
+KBRANCH_beaglebone-yocto = "standard/beaglebone"
+KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
+
+KMACHINE_genericx86 ?= "common-pc"
+KMACHINE_genericx86-64 ?= "common-pc-64"
+KMACHINE_beaglebone-yocto ?= "beaglebone"
+
+COMPATIBLE_MACHINE_genericx86 = "genericx86"
+COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
+COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-- 
2.11.0

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-cgl][PATCH] kernel: Fix config warning for CONFIG_I2C_ALGOBIT

2017-10-09 Thread He Zhe
Ping.

Zhe

On 2017年09月29日 14:10, zhe...@windriver.com wrote:
> From: He Zhe 
>
> CONFIG_DRM in yocto-kernel-cache selects CONFIG_I2C_ALGOBIT as "y".
> Change CONFIG_I2C_ALGOBIT 00026-lm-sensors.cfg from "m" to "y" to
> avoid following config conflict.
>
> -- CONFIG_I2C_ALGOBIT -
> Config: CONFIG_I2C_ALGOBIT
> From: /PATH/TO/i915.cfg /PATH/TO/00026-lm-sensors.cfg
> Requested value:  CONFIG_I2C_ALGOBIT=m
> Actual value: CONFIG_I2C_ALGOBIT=y
>
> Signed-off-by: He Zhe 
> ---
>  meta-cgl-common/recipes-kernel/linux/files/cfg/00026-lm-sensors.cfg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git 
> a/meta-cgl-common/recipes-kernel/linux/files/cfg/00026-lm-sensors.cfg 
> b/meta-cgl-common/recipes-kernel/linux/files/cfg/00026-lm-sensors.cfg
> index f28bdf6..71c4cad 100644
> --- a/meta-cgl-common/recipes-kernel/linux/files/cfg/00026-lm-sensors.cfg
> +++ b/meta-cgl-common/recipes-kernel/linux/files/cfg/00026-lm-sensors.cfg
> @@ -1,5 +1,5 @@
>  CONFIG_I2C_SMBUS=m
> -CONFIG_I2C_ALGOBIT=m
> +CONFIG_I2C_ALGOBIT=y
>  CONFIG_I2C_ALGOPCA=m
>  CONFIG_I2C_ALI1535=m
>  CONFIG_I2C_ALI1563=m

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-dpdk][PATCH] dpdk: Fix do_compile failure for qemux86 and qemux86-64

2019-06-11 Thread He Zhe



On 6/11/19 2:31 PM, Mittal, Anuj wrote:
> On Tue, 2019-06-11 at 11:06 +0800, zhe...@windriver.com wrote:
>> From: He Zhe 
>>
>> DPDK_TARGET_MACHINE in bbappend in other layers forms the dpdk-
>> internal variable
>> MACHINE_CFLAGS which is passed to dpdk compilation command line
>> containing the
>> first -march parameter. And EXTRA_CFLAGS in dpdk.inc is passed to
>> dpdk command
>> line containing the second -march parameter. By mistake, the first
>> -march had
>> always overwritten the second one until the following commit of GCC
>> v9.1.0
>> 8c0f695d83d1 ("driver: Also prune joined switches with negation").
>>
>> Since it was fixed, the second -march, which was core2 for qemux86-64 
>> or
>> core2-32 for qemux86, began to take effect. But core2* does not have
>> SSE4.2
>> feature which is required by some dpdk instruction optimization and
>> thus cause
>> the following compilation failure.
>>
>> 9.1.0/include/smmintrin.h:179:1: error: inlining failed in call to
>> always_inline
>> '_mm_blendv_epi8': target specific option mismatch
>>   179 | _mm_blendv_epi8 (__m128i __X, __m128i __Y, __m128i __M)
>>   | ^~~
>>
>> This patch adds DPDK_EXTRA_CFLAGS to append appropriate -march,
>> corei7 which is
>> minimum and clear and independent of host machine, to dpdk
>> compilation command
>> line to overwrite all previous ones, without having to change dpdk
>> source code.
>>
>> Note that as we do not want to change the default tune core2* for
>> qemux86*, this
>> patch just fixes the compilation error. It would probably not be able
>> to run on
>> qemux86* with corei7 tune.
> I don't think overriding arch values in recipe is appropriate. Also the
> recipe is setting COMPATIBLE_MACHINE to be null because of this reason.
> If the MACHINE that we're building for doesn't support the features
> required, then we shouldn't be building dpdk for it in my opinion.

This is largely a fix for those who want to test building qemux86* with dpdk.
It does no harm to the rest of the configuration, and can be use as a way to
append potential flags to dpdk building command line.

But it's fine to me to drop it if it does not make much sense to you.

Thanks,
Zhe

>
> Thanks,
>
> Anuj
>
>> Signed-off-by: He Zhe 
>> ---
>>  recipes-extended/dpdk/dpdk.inc | 9 ++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-
>> extended/dpdk/dpdk.inc
>> index a0e081a..0275e0c 100644
>> --- a/recipes-extended/dpdk/dpdk.inc
>> +++ b/recipes-extended/dpdk/dpdk.inc
>> @@ -61,6 +61,9 @@ DPDK_RTE_TARGET_x86-64 = "x86_64-native-linuxapp-
>> gcc"
>>  DPDK_RTE_TARGET_x86 = "i686-native-linuxapp-gcc"
>>  DPDK_RTE_TARGET_aarch64 = "arm64-${DPDK_TARGET_MACH}-linuxapp-gcc"
>>  export RTE_TARGET = "${DPDK_RTE_TARGET}"
>> +DPDK_EXTRA_CFLAGS = ""
>> +DPDK_EXTRA_CFLAGS_qemux86 ?= "-march=corei7"
>> +DPDK_EXTRA_CFLAGS_qemux86-64 ?= "-march=corei7"
>>  
>>  # The list of intel Comms platforms and their target machine
>>  # process mapping. The supported target machine is listed under
>> @@ -100,18 +103,18 @@ do_compile () {
>>  
>>  cd ${S}/${RTE_TARGET}
>>  oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" 
>> \
>> -   EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
>> -I${STAGING_INCDIR}" \
>> +   EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
>> ${DPDK_EXTRA_CFLAGS} -I${STAGING_INCDIR}" \
>> CROSS="${TARGET_PREFIX}" \
>> prefix=""  LDFLAGS="${TUNE_LDARGS}"  WERROR_FLAGS="-
>> w" V=1
>>  
>>  cd ${S}/examples/
>>  oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu
>> -fuse-ld=bfd" \
>> -   EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
>> -I${STAGING_INCDIR}" \
>> +   EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
>> ${DPDK_EXTRA_CFLAGS} -I${STAGING_INCDIR}" \
>> CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
>>  
>>  cd ${S}/test/
>>  oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu
>> -fuse-ld=bfd" \
>> -   EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
>> -I${STAGING_INCDIR}" \
>> +   EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
>> ${DPDK_EXTRA_CFLAGS} -I${STAGING_INCDIR}" \
>> CROSS="${TARGET_PREFIX}" O="${S}/test/$@/"
>>  }
>>  

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-dpdk][PATCH] dpdk: Remove 18.05

2019-06-30 Thread He Zhe


On 7/1/19 6:46 AM, Anuj Mittal wrote:
> On 25-Jun-19 05:43 PM, zhe...@windriver.com wrote:
>> From: He Zhe 
>>
>> We have already had 18.11 and 18.05 is not a stable version.
>>
>> Signed-off-by: He Zhe 
>> ---
>>   recipes-extended/dpdk/dpdk_18.05.bb | 15 ---
>>   1 file changed, 15 deletions(-)
>>   delete mode 100644 recipes-extended/dpdk/dpdk_18.05.bb
>
> Can you please also remove the patches that are specific to this version?

OK. v2 sent.

Zhe

>
> Thanks,
>
> Anuj
>

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-dpdk][PATCH] dpdk: Fix exmples and test _FORTIFY_SOURCE build failure

2019-07-18 Thread He Zhe
Kindly ping.

Zhe

On 7/10/19 4:45 PM, zhe...@windriver.com wrote:
> From: He Zhe 
>
> When building examples and tests with GCC9, the following errors come up,
>
>  error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) 
> [-Werror=cpp]
>   382 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
>   |^~~
> cc1: all warnings being treated as errors
>
> dpdk itself already appends -O3 the EXTRA_CFLAGS for some of those cases, but
> dpdk.inc overwrites EXTRA_CFLAGS when evoking make. This patches adds it back.
>
> Signed-off-by: He Zhe 
> ---
>  recipes-extended/dpdk/dpdk.inc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
> index a0e081a..9dcec76 100644
> --- a/recipes-extended/dpdk/dpdk.inc
> +++ b/recipes-extended/dpdk/dpdk.inc
> @@ -106,12 +106,12 @@ do_compile () {
>  
>   cd ${S}/examples/
>   oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu 
> -fuse-ld=bfd" \
> -EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} 
> -I${STAGING_INCDIR}" \
> +EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 
> -I${STAGING_INCDIR}" \
>  CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
>  
>   cd ${S}/test/
>   oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu 
> -fuse-ld=bfd" \
> -EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} 
> -I${STAGING_INCDIR}" \
> +EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 
> -I${STAGING_INCDIR}" \
>  CROSS="${TARGET_PREFIX}" O="${S}/test/$@/"
>  }
>  

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-dpdk][PATCH] dpdk: igb_uio: fix build on Linux 5.3 for fall through

2019-08-05 Thread He Zhe
Please ignore.

Zhe

On 8/5/19 3:51 PM, zhe...@windriver.com wrote:
> From: He Zhe 
>
> Since kernel v5.3 "-Wimplicit-fallthrough=3" gcc flag is enabled by default by
> a035d552a93b ("Makefile: Globally enable fall-through warning") and would 
> cause
> the following build failure.
>
> x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:248:
> 6: error: this statement may fall through [-Werror=implicit-fallthrough=]
>
> Backport a patch from upstream and adjust context respectively for v17 and 
> v18.
> c96bbbd010f7abb88c2ca2ed9dfc5ecd37e9027d
>
> Signed-off-by: He Zhe 
> ---
>  ...o-fix-build-on-Linux-5.3-for-fall-through.patch | 81 
> ++
>  ...o-fix-build-on-Linux-5.3-for-fall-through.patch | 80 +
>  recipes-extended/dpdk/dpdk_17.11.6.bb  |  1 +
>  recipes-extended/dpdk/dpdk_18.11.2.bb  |  4 ++
>  4 files changed, 166 insertions(+)
>  create mode 100644 
> recipes-extended/dpdk/dpdk/dpdk-17.11-igb_uio-fix-build-on-Linux-5.3-for-fall-through.patch
>  create mode 100644 
> recipes-extended/dpdk/dpdk/dpdk-18.11-igb_uio-fix-build-on-Linux-5.3-for-fall-through.patch
>
> diff --git 
> a/recipes-extended/dpdk/dpdk/dpdk-17.11-igb_uio-fix-build-on-Linux-5.3-for-fall-through.patch
>  
> b/recipes-extended/dpdk/dpdk/dpdk-17.11-igb_uio-fix-build-on-Linux-5.3-for-fall-through.patch
> new file mode 100644
> index 000..90901eb
> --- /dev/null
> +++ 
> b/recipes-extended/dpdk/dpdk/dpdk-17.11-igb_uio-fix-build-on-Linux-5.3-for-fall-through.patch
> @@ -0,0 +1,81 @@
> +From c0307019689d5f8b4d5ca7d92a5585c94088afeb Mon Sep 17 00:00:00 2001
> +From: Ferruh Yigit 
> +Date: Mon, 29 Jul 2019 13:32:16 +0100
> +Subject: [PATCH] igb_uio: fix build on Linux 5.3 for fall through
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +build error:
> +kernel/linux/igb_uio/igb_uio.c:
> +   In function ‘igbuio_pci_enable_interrupts’:
> +   kernel/linux/igb_uio/igb_uio.c:230:6:
> +   error: this statement may fall through
> +   [-Werror=implicit-fallthrough=]
> +  230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, 
> +kernel/linux/igb_uio/igb_uio.c:240:2: note: here
> +  240 |  case RTE_INTR_MODE_MSI:
> +  |  ^~~~
> +
> +The build error is caused by Linux kernel commit in 5.3 that enables the
> +"-Wimplicit-fallthrough=3" gcc flag.
> +Commit a035d552a93b ("Makefile: Globally enable fall-through warning")
> +
> +To fix the error, either a gcc attribute can be provided [1] or a code
> +comment with some defined syntax need to be provided [2], since there is
> +already comments, updated them slightly to match the required syntax to
> +fix the build error.
> +
> +[1]
> +"__attribute__ ((fallthrough));"
> +
> +[2]
> +[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
> +fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?
> +
> +Cc: sta...@dpdk.org
> +
> +Signed-off-by: Ferruh Yigit 
> +
> +commit c96bbbd010f7abb88c2ca2ed9dfc5ecd37e9027d upstream
> +Adjust code context
> +
> +Signed-off-by: He Zhe 
> +---
> + lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c 
> b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +index 45d7027..3073bca 100644
> +--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>  b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +@@ -254,7 +254,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev 
> *udev)
> + }
> + #endif
> + 
> +-/* fall back to MSI */
> ++/* falls through - to MSI */
> + case RTE_INTR_MODE_MSI:
> + #ifndef HAVE_ALLOC_IRQ_VECTORS
> + if (pci_enable_msi(udev->pdev) == 0) {
> +@@ -273,7 +273,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev 
> *udev)
> + break;
> + }
> + #endif
> +-/* fall back to INTX */
> ++/* falls through - to INTX */
> + case RTE_INTR_MODE_LEGACY:
> + if (pci_intx_mask_supported(udev->pdev)) {
> + dev_dbg(&udev->pdev->dev, "using INTX");
> +@@ -283,7 +283,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev 
> *udev)
> + break;
> + }
> + dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n");
> +-/* fall back to no IRQ */
> ++/* falls through - to no IRQ */
> + case RTE_INTR_MODE_NONE:
> + udev->mode = RTE_INTR_MODE_NONE;
> + udev->info.irq = UIO_IRQ_NONE;
> +-- 
> +2.7.4
> 

Re: [yocto] [meta-selinux][PATCH] kernel: Remove non-existing kernel option

2019-10-24 Thread He Zhe
typo in commit log, v2 will be sent.

Zhe

On 10/24/19 4:42 PM, zhe...@windriver.com wrote:
> From: He Zhe 
>
> CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION has been remove from mainline kernel
> by the commit 4c145dce2601 ("xfrm: make xfrm modes builtin").
>
> Signed-off-by: He Zhe 
> ---
>  recipes-kernel/linux/files/selinux.cfg | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/recipes-kernel/linux/files/selinux.cfg 
> b/recipes-kernel/linux/files/selinux.cfg
> index 2edd366..7d16dc5 100644
> --- a/recipes-kernel/linux/files/selinux.cfg
> +++ b/recipes-kernel/linux/files/selinux.cfg
> @@ -23,7 +23,6 @@ CONFIG_SECURITYFS=y
>  CONFIG_SECURITY_NETWORK=y
>  CONFIG_SECURITY_SELINUX=y
>  CONFIG_SECURITY_SELINUX_BOOTPARAM=y
> -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
>  CONFIG_SECURITY_SELINUX_DISABLE=y
>  CONFIG_SECURITY_SELINUX_DEVELOP=y
>  CONFIG_SECURITY_SELINUX_AVC_STATS=y

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-cgl][PATCH] kernel: Remove non-existing kernel option

2019-10-24 Thread He Zhe
typo in commit log, v2 will be sent.

Zhe


On 10/24/19 4:48 PM, zhe...@windriver.com wrote:
> From: He Zhe 
>
> CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION has been removed from mainline kernel
> by commit 4c145dce2601 ("xfrm: make xfrm modes builtin").
>
> Signed-off-by: He Zhe 
> ---
>  meta-cgl-common/recipes-kernel/linux/files/cfg/00014-selinux.cfg | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/meta-cgl-common/recipes-kernel/linux/files/cfg/00014-selinux.cfg 
> b/meta-cgl-common/recipes-kernel/linux/files/cfg/00014-selinux.cfg
> index 1efd63e..b10b839 100644
> --- a/meta-cgl-common/recipes-kernel/linux/files/cfg/00014-selinux.cfg
> +++ b/meta-cgl-common/recipes-kernel/linux/files/cfg/00014-selinux.cfg
> @@ -19,7 +19,6 @@ CONFIG_REISERFS_FS_SECURITY=y
>  CONFIG_JFFS2_FS_SECURITY=y
>  CONFIG_SECURITYFS=y
>  CONFIG_SECURITY_SELINUX_BOOTPARAM=y
> -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
>  CONFIG_SECURITY_SELINUX_DISABLE=y
>  CONFIG_SECURITY_SELINUX_DEVELOP=y
>  CONFIG_SECURITY_SELINUX_AVC_STATS=y

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto