Date   

[meta-zephyr][PATCH V2 02/15] zephyr-flash-pyocd.bbclass: Add missing do_flash_usb dependency on do_deploy

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
classes/zephyr-flash-pyocd.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/zephyr-flash-pyocd.bbclass b/classes/zephyr-flash-pyocd.bbclass
index 04500af..eca30c9 100644
--- a/classes/zephyr-flash-pyocd.bbclass
+++ b/classes/zephyr-flash-pyocd.bbclass
@@ -10,7 +10,7 @@ python do_flash_usb() {
session.board.target.reset()
}

-addtask do_flash_usb
+addtask do_flash_usb after do_deploy

do_flash_usb[nostamp] = "1"
do_flash_usb[vardepsexclude] = "BB_ORIGENV"
--
2.30.1


[meta-zephyr][PATCH V2 01/15] zephyr-flash-dfu.bbclass: Add missing do_flash_usb dependency on do_deploy

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
classes/zephyr-flash-dfu.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/zephyr-flash-dfu.bbclass b/classes/zephyr-flash-dfu.bbclass
index 32f589a..b4f3d49 100644
--- a/classes/zephyr-flash-dfu.bbclass
+++ b/classes/zephyr-flash-dfu.bbclass
@@ -59,7 +59,7 @@ python do_flash_usb() {
bb.utils.unlockfile(lock)
}

-addtask do_flash_usb
+addtask do_flash_usb after do_deploy

do_flash_usb[nostamp] = "1"
do_flash_usb[vardepsexclude] = "BB_ORIGENV"
--
2.30.1


do compile error while installing openjdk-8 (meta-java) #dunfell #yocto

Vijay Rakesh Munganda
 

Hi,

I'm trying to install openjdk-8 from meta-java layer, but I got below error while installing it. Please anyone help me with this error.

| g++: error: unrecognized command line option ‘-fmacro-prefix-map=/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0=/usr/src/debug/openjdk-8/272-r0’
| /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u272-b10/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/dict2.o' failed
| make[6]: *** [../generated/adfiles/dict2.o] Error 1
| g++: error: unrecognized command line option ‘-fmacro-prefix-map=/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0=/usr/src/debug/openjdk-8/272-r0’
| /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u272-b10/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/formsopt.o' failed
| make[6]: *** [../generated/adfiles/formsopt.o] Error 1
| /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u272-b10/hotspot/make/linux/makefiles/top.make:91: recipe for target 'ad_stuff' failed
| make[5]: *** [ad_stuff] Error 2
| /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u272-b10/hotspot/make/linux/Makefile:284: recipe for target 'product' failed
| make[4]: *** [product] Error 2
| Makefile:230: recipe for target 'generic_build2' failed
| make[3]: *** [generic_build2] Error 2
| Makefile:177: recipe for target 'product' failed
| make[2]: *** [product] Error 2
| HotspotWrapper.gmk:44: recipe for target '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/build/hotspot/_hotspot.timestamp' failed
| make[1]: *** [/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/build/hotspot/_hotspot.timestamp] Error 2
| /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u272-b10//make/Main.gmk:109: recipe for target 'hotspot-only' failed
| make: *** [hotspot-only] Error 2
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/openjdk-8/272-r0/temp/run.do_compile.27188:1 exit 1 from 'exit 1'
|
ERROR: Task (/home/bl-docker/rity/src/meta-java/recipes-core/openjdk/openjdk-8_272.bb:do_compile) failed with exit code '1'

Thanks & Regards,
Vijay Rakesh.


Re: [meta-zephy][PATCH 13/14] zephyr-flash-pyocd.bbclass: Implement configurable probe IDs to program

Naveen Saini
 

Thanks Andrei for adding support for v2.5-rc4 and re-structuring.

Could you fix a whitespace in this patch ? Other patches looks good to me.

Later I will fix subject-prefix meta-zephyr typo in README.

Regards,
Naveen

-----Original Message-----
From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On
Behalf Of Andrei Gherzan
Sent: Monday, February 15, 2021 7:20 PM
To: yocto@lists.yoctoproject.org
Cc: Andrei Gherzan <andrei.gherzan@huawei.com>
Subject: [yocto] [meta-zephy][PATCH 13/14] zephyr-flash-pyocd.bbclass:
Implement configurable probe IDs to program

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Implement logic to configure what probes to program based on the
PYOCD_FLASH_IDS variable:
1. by default program all attached probes 2. change default behaviour by
listing the probe IDs to flash

CONNECT_TIMEOUT_SECONDS was also renamed to maintain consistency
with the PYOCD_FLASH_IDS variable.

One can query the IDs using `pyocd list`.

The value of PYOCD_FLASH_IDS can also be injected into the datastore using
BB_ENV_EXTRAWHITE.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
README.txt | 9 +++++
classes/zephyr-flash-pyocd.bbclass | 57 ++++++++++++++++++++----------
2 files changed, 48 insertions(+), 18 deletions(-)

diff --git a/README.txt b/README.txt
index bda872b..ce5338b 100644
--- a/README.txt
+++ b/README.txt
@@ -67,6 +67,15 @@ dfu-util and/or pyocd need to be installed in your
system. If you observe permission errors or the flashing process seem to
hang, follow those instructions:
https://github.com/pyocd/pyOCD/tree/master/udev

+By default, pyocd tries to flash all the attached probes. This
+behaviour can be customised by defining the PYOCD_FLASH_IDS variable as
+a space-separated list of IDs. Once that is set, the tool will only try
+to program these IDs. You can query for the IDs by running `pyocd list`
+on your host while having the probes attached. Besides setting this
+variable through the build's configuration or metadata, you can also inject
its value from command line with something like:
+
+ $ PYOCD_FLASH_IDS='<ID1> <ID2> <ID3>'
+ BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS"
bitbake
+ <TARGET> -c flash_usb
+
Building and Running Zephyr Tests
=================================
Presently only toolchains for ARM, x86, IAMCU and Nios2 are supported.
diff --git a/classes/zephyr-flash-pyocd.bbclass b/classes/zephyr-flash-
pyocd.bbclass
index 4d24e6a..7e1cec5 100644
--- a/classes/zephyr-flash-pyocd.bbclass
+++ b/classes/zephyr-flash-pyocd.bbclass
@@ -1,4 +1,5 @@
-CONNECT_TIMEOUT_SECONDS ?= "30"
+PYOCD_CONNECT_TIMEOUT_SECONDS ?= "30"
+PYOCD_FLASH_IDS ?= "all"

python do_flash_usb() {
try:
@@ -7,26 +8,46 @@ python do_flash_usb() {
except ImportError:
bb.fatal("Flashing with pyocd needs the relevant python package. Make
sure your host provides it or consult your distribution packages for how to
install this prerequisite.")

- timeout = int(d.getVar('CONNECT_TIMEOUT_SECONDS'))
+ try:
+ timeout = int(d.getVar('PYOCD_CONNECT_TIMEOUT_SECONDS'))
+ except ValueError:
+ bb.fatal(f"PYOCD_CONNECT_TIMEOUT_SECONDS was set to an invalid
+ value: {d.getVar('PYOCD_CONNECT_TIMEOUT_SECONDS')}.")
image = f"{d.getVar('DEPLOY_DIR_IMAGE')}/{d.getVar('PN')}.elf"
- bb.plain(f"Attempting to flash {image} to board {d.getVar('BOARD')}")
+ ids = d.getVar('PYOCD_FLASH_IDS')
+
+ # Compute the list of IDs to program
+ if ids == 'all':
+ ids = []
+ for probe in
ConnectHelper.get_all_connected_probes(blocking=False):
+ ids.append(probe.unique_id)
+ if not ids:
+ bb.fatal("No probe detected. Make sure your target is connected.")
+ else:
+ ids = ids.split()
+ if not ids:
+ bb.fatal("No probe requested for programming. Make sure
+ PYOCD_FLASH_IDS is set.")

- # Try to connect to a probe with a timeout
- now = 0
- step = 3
- while True:
- session = ConnectHelper.session_with_chosen_probe(blocking=False,
return_first=True)
- if session:
- break
- if now >= timeout:
- bb.fatal("Timeout while trying to connect to a probe. Make sure the
target device is connected and the udev is configured accordingly. See
<https://github.com/mbedmicro/pyOCD/tree/master/udev> for help.")
- bb.warn("Can't connect to the probe. Retrying in %d seconds..." % step)
- time.sleep(step)
- now += step
+ # Program each ID
+ for id in ids:
+ bb.plain(f"Attempting to flash {os.path.basename(image)} to
+ board {d.getVar('BOARD')} [{id}]")

- with session:
- FileProgrammer(session).program(image)
- session.board.target.reset()
+ # Try to connect to a probe with a timeout
+ now = 0
+ step = 3
+ while True:
+ session =
ConnectHelper.session_with_chosen_probe(blocking=False,
return_first=True, unique_id=id)
+ if session:
+ break
+ if now >= timeout:
+ bb.fatal(f"Timeout while trying to connect to probe ID: {id}. Make
sure the target device is connected and the udev is configured accordingly.
See <https://github.com/mbedmicro/pyOCD/tree/master/udev> for help.")
+ bb.warn(f"Can't connect to the probe ID: {id}. Retrying in {step}
seconds...")
+ time.sleep(step)
+ now += step
+
+ # Program the sepected probe
+ with session:
+ FileProgrammer(session).program(image)
+ session.board.target.reset()
}

addtask do_flash_usb after do_deploy
--
2.30.1


[meta-mingw] [PATCH] binutils: Package static libdep linker plugins

Samuli Piippo
 

this is new plugin added in binutils 2.36

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
recipes-devtools/binutils/binutils-cross-canadian_2.%.bbappend | 2 ++
1 file changed, 2 insertions(+)

diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.%.bbappend b/recipes-devtools/binutils/binutils-cross-canadian_2.%.bbappend
index 5845fe0..0d376bb 100644
--- a/recipes-devtools/binutils/binutils-cross-canadian_2.%.bbappend
+++ b/recipes-devtools/binutils/binutils-cross-canadian_2.%.bbappend
@@ -3,3 +3,5 @@ LDFLAGS_append_sdkmingw32 = " -Wl,-static"

DEPENDS_remove_sdkmingw32 = "nativesdk-gettext"
DEPENDS_remove_sdkmingw32 = "nativesdk-flex"
+
+FILES_${PN}-staticdev_append_sdkmingw32 = " ${libdir}/bfd-plugins/lib*.a"
--
2.17.1


Re: Timing a recipe

Yocto
 


On 2/16/21 3:12 AM, Konrad Weihmann wrote:
buildstats [1] maybe? That can be inherited globally and does give some neat results and insights

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/buildstats.bbclass

how about "time bitbake recipe"  :)


On 15.02.21 21:08, rustyhowell@... wrote:
Is there a way to automatically record build time of a recipe without modifying the recipe itself?  I have a recipe that is a monster, it has many git URIs and produces many packages that are coupled. It should be broken up but company deadlines have kept us from taking the time to do this. I was talking to my boss about this. He said we really needs some concrete data about how much this monster recipe is costing us before green-lighting the massive effort to split up the recipe.  I agree with him, so I would like to know how much time is spent repeatedly building this recipe.  I figure I could do this by adding do_fetch_prepend() and writing the time to a file, and then do_install_append() and writing the time to the file. So after a week or so, I would have many start/end data points to discuss.

However, I did not want to modify the recipe itself. I was hoping to augment the recipe via local.conf. Another bbappend in a new layer would work I guess, but I was hoping there was something simpler. Thanks in advance.









M+ & H bugs with Milestone Movements WW07

Stephen Jolley
 

All,

YP M+ or high bugs which moved to a new milestone in WW07 are listed below:

Priority

Bug ID

Short Description

Changer

Owner

Was

Became

High

14229

pseudo doesn't compile with glibc 2.33

richard.purdie@...

richard.purdie@...

3.3 M3

3.0.5

Medium+

11449

Allow overriding classes to override overridden classes

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

11746

oe-selftest: capture self.logger messages in XML output

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

12090

bitbake resident server reconnect needed ?

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

12368

persistent bitbake server does not re-parse if previous build was ctrl+C'd

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

12970

uninative file should be versionned

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

12986

Failed to expand SRCPV on updateding SRC_URI using pn overrides and BBCLASSEXTEND

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13183

bitbake-layers crashes with incorrect layer configuration data is given (expected proper error printing and exit with error)

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13278

If git protocol doesn't work, you get a tar.gz clone from PREMIRROR which has git protocol origin

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13424

devupstream doesn't work with mutilib

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13448

bitbake master appears to expand variables it should not need to

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13599

Enhancement: Detect variables that shouldn't be defined in image scope, but in global (distro) scope

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13699

Prolonged recipe parsing times after removing tmp when the resident bitbake server is used

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13701

intermittent race in runtime parse logs failure in X on qemux86-64

timothy.t.orling@...

anuj.mittal@...

3.3 M2

3.3 M3

 

13711

Parsing fails on externalsrc recipe containing both git and file in SRC_URI

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13729

Changing siteinfo files doesn't change task checksum

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13810

systemd file executable bits disappearing

randy.macleod@...

randy.macleod@...

3.3

3.3 M3

 

13823

fetch2: PREMIRROR and SRC_URI with users on both url yields invalid username

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13886

bitbake resident server does not honour --runonly or --runall options

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

13973

change siginfo data format to json for reproducibility? (siginfo files currently not reproducible)

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

14051

[QA 3.2 M3 RC1] failure in ptest : valgrind.drd and valgrind.helgrind

timothy.t.orling@...

anuj.mittal@...

3.3 M2

3.3 M3

 

14054

bitbake-layers allows adding invalid layer configuration

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

14060

devtool modify fails when applied on recipes using patches

timothy.t.orling@...

bluelightning@...

3.3 M2

3.3 M3

 

14077

devtool doesn't handle server failing to startup gracefully

randy.macleod@...

stacygaikovaia@...

3.3 M2

3.3 M3

 

14088

Attempting to override RDEPENDS_${PN} from global config doesn't work

richard.purdie@...

richard.purdie@...

3.3 M2

3.3 M3

 

14168

#new-recipe-makefile-based-package does not exist anymore

richard.purdie@...

nicolas.dechesne@...

3.3 M2

3.3 M3

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Enhancements/Bugs closed WW07!

Stephen Jolley
 

All,

The below were the owners of enhancements or bugs closed during the last week!

Who

Count

richard.purdie@...

8

randy.macleod@...

5

scott.branden@...

1

Grand Total

14

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Current high bug count owners for Yocto Project 3.3

Stephen Jolley
 

All,

Below is the list as of top 50 bug owners as of the end of WW07 of who have open medium or higher bugs and enhancements against YP 3.3.   There are 52 possible work days left until the final release candidates for YP 3.3 needs to be released.

Who

Count

richard.purdie@...

32

ross@...

25

david.reyna@...

20

bluelightning@...

15

bruce.ashfield@...

12

JPEWhacker@...

10

trevor.gamblin@...

9

akuster808@...

8

kai.kang@...

7

yifan.yu@...

7

mark.morton@...

7

chee.yang.lee@...

6

raj.khem@...

5

Qi.Chen@...

5

sakib.sajal@...

5

idadelm@...

4

yi.zhao@...

4

randy.macleod@...

4

timothy.t.orling@...

3

mingli.yu@...

3

saul.wold@...

3

stacygaikovaia@...

3

hongxu.jia@...

3

mostthingsweb@...

3

alejandro@...

3

jon.mason@...

2

jeanmarie.lemetayer@...

2

pokylinux@...

2

sangeeta.jain@...

2

matthewzmd@...

2

jaewon@...

2

limon.anibal@...

2

nicolas.dechesne@...

2

ydirson@...

2

anuj.mittal@...

2

mister_rs@...

1

dorindabassey@...

1

kamensky@...

1

kexin.hao@...

1

shachar@...

1

mark.hatle@...

1

twoerner@...

1

yoctoproject@...

1

changqing.li@...

1

steve@...

1

mhalstead@...

1

kergoth@...

1

charles.davies@...

1

matt.ranostay@...

1

quaresma.jose@...

1

aehs29@...

1

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Yocto Project Newcomer & Unassigned Bugs - Help Needed

Stephen Jolley
 

All,

 

The triage team is starting to try and collect up and classify bugs which a newcomer to the project would be able to work on in a way which means people can find them. They're being listed on the triage page under the appropriate heading:

https://wiki.yoctoproject.org/wiki/Bug_Triage#Newcomer_Bugs  Also please review: https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded and how to create a bugzilla account at: https://bugzilla.yoctoproject.org/createaccount.cgi

The idea is these bugs should be straight forward for a person to help work on who doesn't have deep experience with the project.  If anyone can help, please take ownership of the bug and send patches!  If anyone needs help/advice there are people on irc who can likely do so, or some of the more experienced contributors will likely be happy to help too.

 

Also, the triage team meets weekly and does its best to handle the bugs reported into the Bugzilla. The number of people attending that meeting has fallen, as have the number of people available to help fix bugs. One of the things we hear users report is they don't know how to help. We (the triage team) are therefore going to start reporting out the currently 351 unassigned or newcomer bugs.

 

We're hoping people may be able to spare some time now and again to help out with these.  Bugs are split into two types, "true bugs" where things don't work as they should and "enhancements" which are features we'd want to add to the system.  There are also roughly four different "priority" classes right now, “3.2”, “3.3, "3.99" and "Future", the more pressing/urgent issues being in "3.2" and then “3.3”.

 

Please review this link and if a bug is something you would be able to help with either take ownership of the bug, or send me (sjolley.yp.pm@...) an e-mail with the bug number you would like and I will assign it to you (please make sure you have a Bugzilla account).  The list is at: https://wiki.yoctoproject.org/wiki/Bug_Triage_Archive#Unassigned_or_Newcomer_Bugs

 

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Re: Timing a recipe

Konrad Weihmann <kweihmann@...>
 

buildstats [1] maybe? That can be inherited globally and does give some neat results and insights

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/buildstats.bbclass

On 15.02.21 21:08, rustyhowell@gmail.com wrote:
Is there a way to automatically record build time of a recipe without modifying the recipe itself?  I have a recipe that is a monster, it has many git URIs and produces many packages that are coupled. It should be broken up but company deadlines have kept us from taking the time to do this. I was talking to my boss about this. He said we really needs some concrete data about how much this monster recipe is costing us before green-lighting the massive effort to split up the recipe.  I agree with him, so I would like to know how much time is spent repeatedly building this recipe.  I figure I could do this by adding do_fetch_prepend() and writing the time to a file, and then do_install_append() and writing the time to the file. So after a week or so, I would have many start/end data points to discuss.
However, I did not want to modify the recipe itself. I was hoping to augment the recipe via local.conf. Another bbappend in a new layer would work I guess, but I was hoping there was something simpler. Thanks in advance.


Timing a recipe

Rusty Howell
 

Is there a way to automatically record build time of a recipe without modifying the recipe itself?  I have a recipe that is a monster, it has many git URIs and produces many packages that are coupled. It should be broken up but company deadlines have kept us from taking the time to do this. I was talking to my boss about this. He said we really needs some concrete data about how much this monster recipe is costing us before green-lighting the massive effort to split up the recipe.  I agree with him, so I would like to know how much time is spent repeatedly building this recipe.  I figure I could do this by adding do_fetch_prepend() and writing the time to a file, and then do_install_append() and writing the time to the file. So after a week or so, I would have many start/end data points to discuss.  

However, I did not want to modify the recipe itself. I was hoping to augment the recipe via local.conf. Another bbappend in a new layer would work I guess, but I was hoping there was something simpler. Thanks in advance.


[meta-zephy][PATCH 14/14] zephyr-kernel-src: Upgrade 2.5.0-rc3 to rc4

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
...rnel-src-2.5.0-rc3.inc => zephyr-kernel-src-2.5.0-rc4.inc} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename recipes-kernel/zephyr-kernel/{zephyr-kernel-src-2.5.0-rc3.inc => zephyr-kernel-src-2.5.0-rc4.inc} (86%)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0-rc3.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0-rc4.inc
similarity index 86%
rename from recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0-rc3.inc
rename to recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0-rc4.inc
index 4ee9883..b8aa4dc 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0-rc3.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0-rc4.inc
@@ -1,5 +1,5 @@
SRCREV_FORMAT = "default_cmsis"
-SRCREV_default = "v2.5.0-rc3"
+SRCREV_default = "v2.5.0-rc4"
SRCREV_cmsis = "c3bd2094f92d574377f7af2aec147ae181aa5f8e"
SRCREV_nordic = "f3434da6446380fcdd426dbe2866af21d0d549b6"
SRCREV_stm32 = "cc8731dba4fd9c57d7fe8ea6149828b89c2bd635"
@@ -7,4 +7,4 @@ SRCREV_open-amp = "de1b85a13032a2de1d8b6695ae5f800b613e739d"
SRCREV_libmetal = "9d4ee2c3cfd5f49861939447990f3b7d7bf9bf94"
SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"

-PV = "2.5.0-rc3+git${SRCPV}"
+PV = "2.5.0-rc4+git${SRCPV}"
--
2.30.1


[meta-zephy][PATCH 13/14] zephyr-flash-pyocd.bbclass: Implement configurable probe IDs to program

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Implement logic to configure what probes to program based on the
PYOCD_FLASH_IDS variable:
1. by default program all attached probes
2. change default behaviour by listing the probe IDs to flash

CONNECT_TIMEOUT_SECONDS was also renamed to maintain consistency with
the PYOCD_FLASH_IDS variable.

One can query the IDs using `pyocd list`.

The value of PYOCD_FLASH_IDS can also be injected into the datastore
using BB_ENV_EXTRAWHITE.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
README.txt | 9 +++++
classes/zephyr-flash-pyocd.bbclass | 57 ++++++++++++++++++++----------
2 files changed, 48 insertions(+), 18 deletions(-)

diff --git a/README.txt b/README.txt
index bda872b..ce5338b 100644
--- a/README.txt
+++ b/README.txt
@@ -67,6 +67,15 @@ dfu-util and/or pyocd need to be installed in your system. If you observe
permission errors or the flashing process seem to hang, follow those instructions:
https://github.com/pyocd/pyOCD/tree/master/udev

+By default, pyocd tries to flash all the attached probes. This behaviour can be
+customised by defining the PYOCD_FLASH_IDS variable as a space-separated list
+of IDs. Once that is set, the tool will only try to program these IDs. You can
+query for the IDs by running `pyocd list` on your host while having the probes
+attached. Besides setting this variable through the build's configuration or
+metadata, you can also inject its value from command line with something like:
+
+ $ PYOCD_FLASH_IDS='<ID1> <ID2> <ID3>' BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS" bitbake <TARGET> -c flash_usb
+
Building and Running Zephyr Tests
=================================
Presently only toolchains for ARM, x86, IAMCU and Nios2 are supported.
diff --git a/classes/zephyr-flash-pyocd.bbclass b/classes/zephyr-flash-pyocd.bbclass
index 4d24e6a..7e1cec5 100644
--- a/classes/zephyr-flash-pyocd.bbclass
+++ b/classes/zephyr-flash-pyocd.bbclass
@@ -1,4 +1,5 @@
-CONNECT_TIMEOUT_SECONDS ?= "30"
+PYOCD_CONNECT_TIMEOUT_SECONDS ?= "30"
+PYOCD_FLASH_IDS ?= "all"

python do_flash_usb() {
try:
@@ -7,26 +8,46 @@ python do_flash_usb() {
except ImportError:
bb.fatal("Flashing with pyocd needs the relevant python package. Make sure your host provides it or consult your distribution packages for how to install this prerequisite.")

- timeout = int(d.getVar('CONNECT_TIMEOUT_SECONDS'))
+ try:
+ timeout = int(d.getVar('PYOCD_CONNECT_TIMEOUT_SECONDS'))
+ except ValueError:
+ bb.fatal(f"PYOCD_CONNECT_TIMEOUT_SECONDS was set to an invalid value: {d.getVar('PYOCD_CONNECT_TIMEOUT_SECONDS')}.")
image = f"{d.getVar('DEPLOY_DIR_IMAGE')}/{d.getVar('PN')}.elf"
- bb.plain(f"Attempting to flash {image} to board {d.getVar('BOARD')}")
+ ids = d.getVar('PYOCD_FLASH_IDS')
+
+ # Compute the list of IDs to program
+ if ids == 'all':
+ ids = []
+ for probe in ConnectHelper.get_all_connected_probes(blocking=False):
+ ids.append(probe.unique_id)
+ if not ids:
+ bb.fatal("No probe detected. Make sure your target is connected.")
+ else:
+ ids = ids.split()
+ if not ids:
+ bb.fatal("No probe requested for programming. Make sure PYOCD_FLASH_IDS is set.")

- # Try to connect to a probe with a timeout
- now = 0
- step = 3
- while True:
- session = ConnectHelper.session_with_chosen_probe(blocking=False, return_first=True)
- if session:
- break
- if now >= timeout:
- bb.fatal("Timeout while trying to connect to a probe. Make sure the target device is connected and the udev is configured accordingly. See <https://github.com/mbedmicro/pyOCD/tree/master/udev> for help.")
- bb.warn("Can't connect to the probe. Retrying in %d seconds..." % step)
- time.sleep(step)
- now += step
+ # Program each ID
+ for id in ids:
+ bb.plain(f"Attempting to flash {os.path.basename(image)} to board {d.getVar('BOARD')} [{id}]")

- with session:
- FileProgrammer(session).program(image)
- session.board.target.reset()
+ # Try to connect to a probe with a timeout
+ now = 0
+ step = 3
+ while True:
+ session = ConnectHelper.session_with_chosen_probe(blocking=False, return_first=True, unique_id=id)
+ if session:
+ break
+ if now >= timeout:
+ bb.fatal(f"Timeout while trying to connect to probe ID: {id}. Make sure the target device is connected and the udev is configured accordingly. See <https://github.com/mbedmicro/pyOCD/tree/master/udev> for help.")
+ bb.warn(f"Can't connect to the probe ID: {id}. Retrying in {step} seconds...")
+ time.sleep(step)
+ now += step
+
+ # Program the sepected probe
+ with session:
+ FileProgrammer(session).program(image)
+ session.board.target.reset()
}

addtask do_flash_usb after do_deploy
--
2.30.1


[meta-zephy][PATCH 12/14] zephyr-flash-pyocd.bbclass: Handle import error for pyocd modules

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
classes/zephyr-flash-pyocd.bbclass | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/classes/zephyr-flash-pyocd.bbclass b/classes/zephyr-flash-pyocd.bbclass
index df3b631..4d24e6a 100644
--- a/classes/zephyr-flash-pyocd.bbclass
+++ b/classes/zephyr-flash-pyocd.bbclass
@@ -1,8 +1,11 @@
CONNECT_TIMEOUT_SECONDS ?= "30"

python do_flash_usb() {
- from pyocd.core.helpers import ConnectHelper
- from pyocd.flash.file_programmer import FileProgrammer
+ try:
+ from pyocd.core.helpers import ConnectHelper
+ from pyocd.flash.file_programmer import FileProgrammer
+ except ImportError:
+ bb.fatal("Flashing with pyocd needs the relevant python package. Make sure your host provides it or consult your distribution packages for how to install this prerequisite.")

timeout = int(d.getVar('CONNECT_TIMEOUT_SECONDS'))
image = f"{d.getVar('DEPLOY_DIR_IMAGE')}/{d.getVar('PN')}.elf"
--
2.30.1


[meta-zephy][PATCH 11/14] zephyr-flash-pyocd.bbclass: Flash the first probe found with a timeout

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Currently the code flashes the firmware in a blocking way. If the host
is not configured accordingly (for example in terms of permissions),
this would hang undefinitely. This can easily confuse users and in order
to avoid this, the patch changes to unblocking session creation and
opening call, wrapping the tries in some relevant logging. The timeout
can be defined with `CONNECT_TIMEOUT_SECONDS` which defaults to 30
seconds.

Also, by default, when multiple probes are attached, the session call
will return a selection choice. This would obviously break under bitbake
with an exception:
Exception: EOFError: EOF when reading a line
Avoid this by selecting the first found probe.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
classes/zephyr-flash-pyocd.bbclass | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/classes/zephyr-flash-pyocd.bbclass b/classes/zephyr-flash-pyocd.bbclass
index eca30c9..df3b631 100644
--- a/classes/zephyr-flash-pyocd.bbclass
+++ b/classes/zephyr-flash-pyocd.bbclass
@@ -1,11 +1,27 @@
+CONNECT_TIMEOUT_SECONDS ?= "30"
+
python do_flash_usb() {
from pyocd.core.helpers import ConnectHelper
from pyocd.flash.file_programmer import FileProgrammer

+ timeout = int(d.getVar('CONNECT_TIMEOUT_SECONDS'))
image = f"{d.getVar('DEPLOY_DIR_IMAGE')}/{d.getVar('PN')}.elf"
bb.plain(f"Attempting to flash {image} to board {d.getVar('BOARD')}")

- with ConnectHelper.session_with_chosen_probe() as session:
+ # Try to connect to a probe with a timeout
+ now = 0
+ step = 3
+ while True:
+ session = ConnectHelper.session_with_chosen_probe(blocking=False, return_first=True)
+ if session:
+ break
+ if now >= timeout:
+ bb.fatal("Timeout while trying to connect to a probe. Make sure the target device is connected and the udev is configured accordingly. See <https://github.com/mbedmicro/pyOCD/tree/master/udev> for help.")
+ bb.warn("Can't connect to the probe. Retrying in %d seconds..." % step)
+ time.sleep(step)
+ now += step
+
+ with session:
FileProgrammer(session).program(image)
session.board.target.reset()
}
--
2.30.1


[meta-zephy][PATCH 10/14] zephyr-peripheral-hr: Add recipe for BT HR sample

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb

diff --git a/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb b/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb
new file mode 100644
index 0000000..e6ef7b8
--- /dev/null
+++ b/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb
@@ -0,0 +1,5 @@
+include zephyr-sample.inc
+
+ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/peripheral_hr"
+
+ZEPHYR_MODULES_append = "\;${S}/modules/crypto/tinycrypt"
--
2.30.1


[meta-zephy][PATCH 09/14] Use an include file for the common parts of the sample recipes

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb | 16 ++--------------
.../zephyr-kernel/zephyr-helloworld.bb | 13 +------------
.../zephyr-kernel/zephyr-kernel-test.bb | 4 ----
.../zephyr-kernel/zephyr-kernel-test.inc | 2 --
.../zephyr-kernel/zephyr-peripheral-esp.bb | 17 +++--------------
.../zephyr-kernel/zephyr-philosophers.bb | 13 +------------
recipes-kernel/zephyr-kernel/zephyr-sample.inc | 13 +++++++++++++
7 files changed, 20 insertions(+), 58 deletions(-)
create mode 100644 recipes-kernel/zephyr-kernel/zephyr-sample.inc

diff --git a/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb b/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb
index ec6b13e..c66c7ec 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb
@@ -1,17 +1,5 @@
-require zephyr-kernel.inc
-require zephyr-kernel-common.inc
-inherit deploy
-
-COMPATIBLE_MACHINE = "(96b-nitrogen)"
+include zephyr-sample.inc

ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/hci_uart"
-ZEPHYR_BASE = "${S}"
-
-OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"

-do_deploy () {
- install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
-}
-
-addtask deploy after do_compile
-do_install[noexec] = "1"
+COMPATIBLE_MACHINE = "(96b-nitrogen)"
diff --git a/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb b/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
index 84db068..ac5ce62 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
@@ -1,14 +1,3 @@
-require zephyr-kernel.inc
-require zephyr-kernel-common.inc
-inherit deploy
+include zephyr-sample.inc

ZEPHYR_SRC_DIR = "${S}/samples/hello_world"
-ZEPHYR_BASE = "${S}"
-OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
-
-do_deploy () {
- install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
-}
-
-addtask deploy after do_compile
-do_install[noexec] = "1"
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.bb b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.bb
index 46d93f0..2918d2d 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.bb
@@ -2,7 +2,3 @@ require zephyr-image.inc
require zephyr-kernel-test.inc

BBCLASSEXTEND = '${@" ".join(["zephyrtest:" + x for x in d.getVar("ZEPHYRTESTS", True).split()])}'
-
-
-
-
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
index a1e62af..b6b4766 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
@@ -2,11 +2,9 @@ ZEPHYRTESTS_remove = "fifo fpu_sharing lifo mbox mem_heap mem_pool \
mem_protect mem_slab msgq mutex pipe profiling sched semaphore \
stack threads tickless timer workq"

-
# Exclude tests which does not build for various reasons
ZEPHYRTESTS_remove = "gen_isr_table spinlock smp mp"

-
# test_context will fail because QEMU for ARM does not emulate CortexM3 BASEPRI register
#ZEPHYRTESTS_remove_arm += ""

diff --git a/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb b/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
index 24f030a..8be90d1 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
@@ -1,16 +1,5 @@
-require zephyr-kernel.inc
-require zephyr-kernel-common.inc
-inherit deploy
+include zephyr-sample.inc

-ZEPHYR_SAMPLE_NAME="samples/bluetooth/peripheral_esp"
-ZEPHYR_SRC_DIR = "${S}/${ZEPHYR_SAMPLE_NAME}"
-ZEPHYR_BASE = "${S}"
-OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
-ZEPHYR_MODULES_append = "\;${S}/modules/crypto/tinycrypt"
-
-do_deploy () {
- install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
-}
+ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/peripheral_esp"

-addtask deploy after do_compile
-do_install[noexec] = "1"
+ZEPHYR_MODULES_append = "\;${S}/modules/crypto/tinycrypt"
diff --git a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
index b8262ca..a2afb57 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
@@ -1,14 +1,3 @@
-require zephyr-kernel.inc
-require zephyr-kernel-common.inc
-inherit deploy
+include zephyr-sample.inc

ZEPHYR_SRC_DIR = "${S}/samples/philosophers"
-ZEPHYR_BASE = "${S}"
-OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
-
-do_deploy () {
- install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
-}
-
-addtask deploy after do_compile
-do_install[noexec] = "1"
diff --git a/recipes-kernel/zephyr-kernel/zephyr-sample.inc b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
new file mode 100644
index 0000000..f7621d1
--- /dev/null
+++ b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
@@ -0,0 +1,13 @@
+require zephyr-kernel-src.inc
+require zephyr-kernel-common.inc
+inherit deploy
+
+ZEPHYR_BASE = "${S}"
+OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
+
+do_install[noexec] = "1"
+
+do_deploy () {
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
+}
+addtask deploy after do_compile
--
2.30.1


[meta-zephy][PATCH 08/14] zephyr-kernel.inc: Remove include file

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

This file has little advantage and can be easily replaced by just
directly including the src include file.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
recipes-kernel/zephyr-kernel/zephyr-image.inc | 2 +-
recipes-kernel/zephyr-kernel/zephyr-kernel.inc | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
delete mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel.inc

diff --git a/recipes-kernel/zephyr-kernel/zephyr-image.inc b/recipes-kernel/zephyr-kernel/zephyr-image.inc
index e8b8871..c77692d 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-image.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-image.inc
@@ -1,4 +1,4 @@
-require zephyr-kernel.inc
+require zephyr-kernel-src.inc
require zephyr-kernel-common.inc

inherit testimage
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
deleted file mode 100644
index 903973d..0000000
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-
-inherit zephyr-kernel-src
-
-S = "${WORKDIR}/git"
--
2.30.1


[meta-zephy][PATCH 07/14] zephyr-kernel-common.inc: Reformat EXTRA_OECMAKE

Andrei Gherzan
 

From: Andrei Gherzan <andrei.gherzan@huawei.com>

This will improve diffs readability in the future.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index abc55ba..330fe59 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -13,7 +13,16 @@ ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"

ZEPHYR_MAKE_OUTPUT = "zephyr.elf"

-EXTRA_OECMAKE = " -DZEPHYR_BASE=${S} -DZEPHYR_GCC_VARIANT=yocto -DBOARD=${BOARD} -DARCH=${ARCH} -DCROSS_COMPILE=${CROSS_COMPILE} -DZEPHYR_SYSROOT=${ZEPHYR_SYSROOT} -DZEPHYR_TOOLCHAIN_VARIANT=yocto -DEXTRA_CPPFLAGS=${CPPFLAGS}"
+EXTRA_OECMAKE = "\
+ -DZEPHYR_BASE=${S} \
+ -DZEPHYR_GCC_VARIANT=yocto \
+ -DBOARD=${BOARD} \
+ -DARCH=${ARCH} \
+ -DCROSS_COMPILE=${CROSS_COMPILE} \
+ -DZEPHYR_SYSROOT=${ZEPHYR_SYSROOT} \
+ -DZEPHYR_TOOLCHAIN_VARIANT=yocto \
+ -DEXTRA_CPPFLAGS=${CPPFLAGS} \
+ "

ZEPHYR_MODULES = ""
ZEPHYR_MODULES_append_arm = "\;${S}/modules/cmsis"
--
2.30.1

4761 - 4780 of 57064