[meta-zephyr][PATCH 4/5] zephyr-kernel: don't limit deploy to .elf file
Wojciech Zmuda
Depending on the target board and/or flashing method, it may be desirable
to have access to .bin or .hex files instead of .elf. Remove .elf extension from ZEPHYR_MAKE_OUTPUT and let users of that variable specify the extension. Append .elf to all identified users, since they worked with .elf so far. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@...> --- recipes-kernel/zephyr-kernel/zephyr-helloworld.bb | 2 +- recipes-kernel/zephyr-kernel/zephyr-image.inc | 2 +- recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 4 +++- recipes-kernel/zephyr-kernel/zephyr-philosophers.bb | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb b/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb index 84db068..1400e72 100644 --- a/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb +++ b/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb @@ -7,7 +7,7 @@ ZEPHYR_BASE = "${S}" OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" do_deploy () { - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT}.elf ${DEPLOYDIR}/${PN}.elf } addtask deploy after do_compile diff --git a/recipes-kernel/zephyr-kernel/zephyr-image.inc b/recipes-kernel/zephyr-kernel/zephyr-image.inc index e8b8871..48d3675 100644 --- a/recipes-kernel/zephyr-kernel/zephyr-image.inc +++ b/recipes-kernel/zephyr-kernel/zephyr-image.inc @@ -10,7 +10,7 @@ ZEPHYR_BASE = "${S}" OECMAKE_SOURCEPATH = "${S}/${ZEPHYR_SRC_DIR}" do_deploy () { - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${ZEPHYR_IMAGENAME} + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT}.elf ${DEPLOYDIR}/${ZEPHYR_IMAGENAME} } addtask deploy after do_compile diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc index a1f640d..ea6cd7a 100644 --- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc @@ -11,7 +11,9 @@ IMAGE_NO_MANIFEST = "1" ZEPHYR_GCC_VARIANT="yocto" ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}" -ZEPHYR_MAKE_OUTPUT = "zephyr.elf" +# Output image name. There are several variants i.e. .bin, .elf, .hex. +# Let the user append desired suffix. +ZEPHYR_MAKE_OUTPUT = "zephyr" 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" diff --git a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb index b8262ca..5f7fbcb 100644 --- a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb +++ b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb @@ -7,7 +7,7 @@ ZEPHYR_BASE = "${S}" OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" do_deploy () { - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT}.elf ${DEPLOYDIR}/${PN}.elf } addtask deploy after do_compile -- 2.25.1
|
|
[meta-zephyr][PATCH 3/5] conf: machine: add 96boards Nitrogen support
Wojciech Zmuda
The board is based on Nordic nRF52832 Cortex-M4 chip.
The support depends on Nordic HAL. It has been verified with zephyr-philosophers and zephyr-shell sample applications. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@...> --- conf/machine/96b-nitrogen.conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 conf/machine/96b-nitrogen.conf diff --git a/conf/machine/96b-nitrogen.conf b/conf/machine/96b-nitrogen.conf new file mode 100644 index 0000000..d1905f2 --- /dev/null +++ b/conf/machine/96b-nitrogen.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@NAME: 96b_nitrogen + +#@DESCRIPTION: Machine configuration for 96Boards Nitrogen Board. + +require conf/machine/include/nrf52832.inc +ARCH_96b-nitrogen = "arm" -- 2.25.1
|
|
[meta-zephyr][PATCH 2/5] conf: machine: add support for Nordic nRF52832 Cortex-M4 chip
Wojciech Zmuda
Add include for Cortex-M4 tunes and nRF52832. The nRF config
appends 'nordic' to MACHINEOVERRIDES, so the kernel recipe can include Nordic HAL when this override is detected. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@...> --- conf/machine/include/nrf52832.inc | 10 ++++++++++ conf/machine/include/tune-cortexm4.inc | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 conf/machine/include/nrf52832.inc create mode 100644 conf/machine/include/tune-cortexm4.inc diff --git a/conf/machine/include/nrf52832.inc b/conf/machine/include/nrf52832.inc new file mode 100644 index 0000000..73e628a --- /dev/null +++ b/conf/machine/include/nrf52832.inc @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@NAME: nrf52832 + +#@DESCRIPTION: Machine configuration for Nordic Semiconductor nRF52832 (Cortex-M4) SoC. + +require conf/machine/include/tune-cortexm4.inc + +MACHINEOVERRIDES =. "nordic:" + +TUNE_FEATURES = "armv7m cortexm4" diff --git a/conf/machine/include/tune-cortexm4.inc b/conf/machine/include/tune-cortexm4.inc new file mode 100644 index 0000000..a823b6b --- /dev/null +++ b/conf/machine/include/tune-cortexm4.inc @@ -0,0 +1,19 @@ +DEFAULTTUNE ?= "cortexm4" + +require conf/machine/include/arm/arch-armv7a.inc + +TUNEVALID[cortexm4] = "Enable Cortex-M4 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm4', ' -mcpu=cortex-m4', '', d)}" +AVAILTUNES += "cortexm4" + +TUNEVALID[armv7m] = "Enable Cortex-M4 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' -march=armv7e-m', '', d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 'armv7m:', '' ,d)}" + +TUNE_PKGARCH_tune-cortexm4 = "cortexm4" + +ARMPKGARCH_tune-cortexm4 = "armv7m" +PACKAGE_EXTRA_ARCHS_tune-cortexm4 ="cortexm4" + +TUNE_FEATURES_tune-cortexm4 = "armv7m vfp cortexm4" +PACKAGE_EXTRA_ARCHS_tune-cortexm4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7m-vfp armv7m" -- 2.25.1
|
|
[meta-zephyr][PATCH 1/5] zephyr-kernel: clone Nordic HAL
Wojciech Zmuda
HAL for Nordic chipsets is one of Zephyr subprojects. It is downloaded
by default by west. Clone the HAL repository so it can be used for building images for boards with Nordic chips. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@...> --- classes/zephyr-kernel-src.bbclass | 7 ++++--- recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/zephyr-kernel-src.bbclass b/classes/zephyr-kernel-src.bbclass index d245223..ea9b30b 100644 --- a/classes/zephyr-kernel-src.bbclass +++ b/classes/zephyr-kernel-src.bbclass @@ -5,12 +5,13 @@ PREFERRED_VERSION_zephyr-kernel ??= "2.4.0" SRCREV_FORMAT = "default_cmsis" SRCREV_default = "7a3b253ced7333f5c0269387a7f3ed1dee69739d" SRCREV_cmsis = "542b2296e6d515b265e25c6b7208e8fea3014f90" - +SRCREV_nordic = "d8a6ea9695ddf792bb18bb6035c13b1daac5d79c" SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.4-branch;name=default \ git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;destsuffix=git/modules/cmsis;name=cmsis \ - file://0001-cmake-add-yocto-toolchain.patch \ - " + git://github.com/zephyrproject-rtos/hal_nordic.git;protocol=https;destsuffix=git/modules/hal/nordic;name=nordic \ + file://0001-cmake-add-yocto-toolchain.patch \ + " PV = "2.4.0+git${SRCPV}" diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc index 3f82c20..a1f640d 100644 --- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc @@ -16,6 +16,7 @@ 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" EXTRA_OECMAKE_append_arm = " -DZEPHYR_MODULES=${S}/modules/cmsis" +EXTRA_OECMAKE_append_nordic = "\;${S}/modules/hal/nordic" export ZEPHYR_BASE="${S}" -- 2.25.1
|
|
[meta-zephyr][PATCH 0/5] Add 96Boards Nitrogen support
Wojciech Zmuda
Hello,
This patch set adds support for the Nitrogen board by 96Boards. The support consists of: - adding configs for Cortex-M4, nRF52832 SoC and Nitrogen board, - adding bbclass with pyocd-based do_flash_usb() implementation. Tested on Nitrogen and on QEMU so I hope I didn't accidentally break anything. Verification: 1. Install pyocd. 2. Connect Nitrogen and make sure you can see Bus 001 Device 004: ID 0d28:0204 NXP ARM mbed in lsusb. 3. Build a sample app: $ MACHINE=96b_nitrogen DISTRO=zephyr bitbake zephyr-philosophers 4. Flash app to the board: $ MACHINE=96b_nitrogen DISTRO=zephyr bitbake zephyr-philosophers -c flash_usb Wojciech Zmuda (5): zephyr-kernel: clone Nordic HAL conf: machine: add support for Nordic nRF52832 Cortex-M4 chip conf: machine: add 96boards Nitrogen support zephyr-kernel: don't limit deploy to .elf file zephyr-flash-pyocd.bbclass: support for flashing via pyocd README.txt | 23 +++++++++++++++++++ classes/zephyr-flash-pyocd.bbclass | 17 ++++++++++++++ classes/zephyr-kernel-src.bbclass | 7 +++--- conf/machine/96b-nitrogen.conf | 8 +++++++ conf/machine/include/nrf52832.inc | 10 ++++++++ conf/machine/include/tune-cortexm4.inc | 19 +++++++++++++++ .../zephyr-kernel/zephyr-helloworld.bb | 3 ++- recipes-kernel/zephyr-kernel/zephyr-image.inc | 2 +- .../zephyr-kernel/zephyr-kernel-common.inc | 5 +++- .../zephyr-kernel/zephyr-philosophers.bb | 3 ++- 10 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 classes/zephyr-flash-pyocd.bbclass create mode 100644 conf/machine/96b-nitrogen.conf create mode 100644 conf/machine/include/nrf52832.inc create mode 100644 conf/machine/include/tune-cortexm4.inc -- 2.25.1
|
|
Re: #uboot Problem compiling u-boot with bitbake
#uboot
On 2020-12-05 6:20 p.m., Andrew Ellis
wrote:
Ah, good.
You'll need to upgrade to a newer yocto release or cherry-pick: $ cd ../oe-core.git $ git log -1 --stat 0fb257121b68f38b40c078150db8f7d0979b7ea5
$ git tag --contains 0fb257121b68f38b40c078150db8f7d0979b7ea5
../Randy
-- # Randy MacLeod # Wind River Linux
|
|
Re: [OE-core] Python packaging without setup.py (PEP-517)
Konrad Weihmann <kweihmann@...>
Thanks Tim, for taking this discussion. I'm really glad to see that upstream finally recognizes our use case. Unfortunately as that looks pretty "beta" to me so I will keep on with the tiring process of filing tickets at upstream.
toggle quoted messageShow quoted text
Same goes btw for missing license information in the distribution tarballs (or now upcoming wheels). Also I'm slightly worried that it will all spiral into requiring always the latest of e.g. setuptools, which could turn into a problem for non-master branches (already have these issue on zeus a lot lately)
On 06.12.20 00:40, Tim Orling wrote:
Thanks to Konrad Weihmann, we have some communication occurring with the Python pypa folks about an important change in Python packaging [1][2]. This change is defined in PEP 517 [3][4]. Essentially, setup.py files will go away and wheels will be preferred over eggs. To make this more straight forward for distros, the pypa folks have created pypa/build [5][6]. Currently, there is no installer for wheels other than pip, but this is under active development [7].
|
|
Python packaging without setup.py (PEP-517)
Tim Orling
Thanks to Konrad Weihmann, we have some communication occurring with the Python pypa folks about an important change in Python packaging [1][2]. This change is defined in PEP 517 [3][4]. Essentially, setup.py files will go away and wheels will be preferred over eggs. To make this more straight forward for distros, the pypa folks have created pypa/build [5][6]. Currently, there is no installer for wheels other than pip, but this is under active development [7]. I have begun a WIP branch to support this new packaging mechanism [8]. Folks in our OE/YP Python community have actually been wishing for a way to install wheels for a while now... no promises on that working (installing random wheels off the internet is not a design goal), but we will at least be able to build wheels. Cheers, --TIm "moto-timo" Orling
|
|
Re: #uboot Problem compiling u-boot with bitbake
#uboot
Andrew Ellis
Hi Randy
Thank you for your reply.
Doing, "sudo apt install --reinstall
coreutils" fixed the problem with test not being found. I'm not
sure why it was not on the system, but that error is fixed.
Unfortunately I've run into another
problem when I try and run bitbake, the process fails witht he
following error:
ports/linux/pseudo_wrappers.c:68:16:
error: ‘__NR_renameat2’ undeclared (first use in this function)
I'll take another look at that issue in the morning.
Andrew
On 05/12/2020 20:27, Randy MacLeod
wrote:
|
|
Re: #uboot Problem compiling u-boot with bitbake
#uboot
On 2020-12-05 2:59 p.m., Andrew Ellis
wrote:
Hi Randy Andrew, Thanks for the info about your distro and YP version. It's odd that 'test' isn't part of your coreutils install. Is it possible that you have removed it somehow? $ sudo apt install --reinstall coreutils ../Randy
-- # Randy MacLeod # Wind River Linux
|
|
Re: #uboot Problem compiling u-boot with bitbake
#uboot
Andrew Ellis
Hi Randy
toggle quoted messageShow quoted text
Thank you for your reply. I'm using Ubuntu 14.04 . After reading what you said about coreutils in your last message, I tried installing coreutils and got a message saying the latest version is installed. Doing "which test" doesn't yield anything. I've looked in /usr/bin/ and there is no sign of test in there. The version of Yocto Project I'm using is 2.5 "poky" Andrew
On 05/12/2020 18:54, Randy MacLeod wrote:
On 2020-12-04 7:08 p.m., ajellisuk via lists.yoctoproject.org wrote:HiHi Andrew,
|
|
Dunfell :: Recipe fixes to install Webmin 1.962 and fix Perl CGI
mailings@...
Hello all:
Just a quick email to submit to the group. I needed to build a distro to include Webmin. The version that comes with OpenEmbedded (webmin 1.850) in meta-webserver/recipes-webadmin/webmin is kind of an old release, and there were issues with the build.
Below is a new recipe: webmin_1.962.bb (Attached MD5: 301394DDA264C712C1BF9496D409D3CF)
Just add "webmin" to your local.conf to add it to your distro. You can also override the default username and password in local.conf if desired. One issue...the "do_package" for Webmin takes around 25 minutes on my machine. Almost as long as the kernel. :) I'm not sure why. It's one of the things I need to look into.
Once built, you can go into the configuration and add any additional modules you wish. The utility will list them for you and download them from the Webmin site.
This recipe builds on the previous work, adds basic modules and themes to the build, and updates some of the build dependencies.
Also...in order to build this package, another recipe needs modification. I have not created a patch file for this yet. I'm not sure it would be appropriate as this library is kind of in limbo...but I did update the recipe to download the latest version of the file: libcgi-perl_4.51.bb (OpenEmbedded > meta-perl-recipes-perl/libcgi)
(Attached MD5: 0126F5119E9AA358C461ABC5BF777450)
Basically this recipe downloads the latest version of the library as Webmin depends on it.
Hope these help. I will get patches made up and submitted soon.
-Joe
Warped Electronics
|
|
Re: #uboot Problem compiling u-boot with bitbake
#uboot
On 2020-12-04 7:08 p.m., ajellisuk via lists.yoctoproject.org wrote:
HiHi Andrew, It seems odd that you don't have coreutils/test already... Test is part of coreutils on Ubuntu-20.04: $ which test /usr/bin/test $ dpkg -S /usr/bin/test coreutils: /usr/bin/test What distro are you using for your build machine and have you installed the suggested packages? See the quick start guide and links therein: https://docs.yoctoproject.org/brief-yoctoprojectqs/brief-yoctoprojectqs.html https://docs.yoctoproject.org/ref-manual/ref-system-requirements.html#supported-linux-distributions Also, if you could mention the layers and version of YP code that you are using that could be helpful in general although for this issue it shouldn't matter. ../Randy Thanks in advance -- # Randy MacLeod # Wind River Linux
|
|
Vijay Rakesh Munganda
Hi Randy,
|
|
#uboot Problem compiling u-boot with bitbake
#uboot
Andrew Ellis
Hi
I'm trying to compile u-boot for an iMX6 board (iMX6-Q7_Plus from MSC technologies), but the compile process fails with the following output: ERROR: Unable to start bitbake serverI have had errors like this before, and have been to resolve by installing the missing tools indicated. The problem that I've got here is that I'm not sure what "test" is referring to. using, "sudo apt-get install test", doesn't work. Can someone please give me a hint as to what the problem is here. Thanks in advance Andrew
|
|
On 2020-12-03 2:02 a.m., vijayrakeshmunganda@... wrote:
Hi All,Hi VR, What version/release of yocto (oe-core, bitbake, ...) are you using? What image are you building and what did you add to your local.conf ? What is your target system and who provided the BSP? If it's an open source bsp layer or you can reproduce the issue using a layer such as meta-intel or meta-raspberrypi then someone might be able to help. Otherwise you'll have to contact the BSP vendor. If you can reproduce the issue with poky, and no one on the list helps out, then you could open a defect in the YP Bugzilla. https://wiki.yoctoproject.org/wiki/Bug_reporting_and_Information_levels Good luck, ../Randy Thanks & Regards, -- # Randy MacLeod # Wind River Linux
|
|
Re: perl5 do_install() fails (libperl.so: No such file or directory)
#dunfell
Steve Sakoman
On Fri, Dec 4, 2020 at 3:08 AM <frank.wolff@...> wrote:
Just tried this on Ubuntu 18.04: fresh clone of dunfell branch, source oe-init-build-env, then bitbake perl The build was completed successfully, so I am confused too! I do regular autobuilder runs on debian workers and haven't seen this issue there either. Sorry I can't be of more help :-( Steve Regards,
|
|
Monsees, Steven C (US)
Thank you, I was able to test build with patch and it does indeed fix my build.
toggle quoted messageShow quoted text
Steve
-----Original Message-----
From: Nicolas Jeker [mailto:n.jeker@...] Sent: Friday, December 04, 2020 7:33 AM To: Monsees, Steven C (US) <steven.monsees@...>; yocto@... Subject: Re: [yocto] #yocto #kernel #zeus *** WARNING *** EXTERNAL EMAIL -- This message originates from outside our organization. On Fri, 2020-12-04 at 12:17 +0000, Monsees, Steven C (US) via lists.yoctoproject.org wrote: The log indicates that it is missing a dependency which ships "rpc/rpc.h". Some googling turned up this discussion on the openembedded-core mailing list: https://lists.openembedded.org/g/openembedded-core/topic/72355602#111216 There is a final patch in the last mail of the topic, but it seems that this config option is anyway only required for Linux < 2.6.23. If I modify my_cfg.cfg and remove the above parameter it compiles
|
|
perl5 do_install() fails (libperl.so: No such file or directory)
#dunfell
Frank
Hi,
I've got a weird problem when trying to build perl5 (from perl_5.30.1.bb, "dunfell" branch): the do_install() fails : rm: cannot remove '/home/frwol/Sources/yocto/build/tmp/work/core2-64-poky-linux/perl/5.30.1-r0/image//usr/lib/perl5/5.30.1/*/CORE/libperl.so': No such file or directory' The thing is, there IS a 'libperl.so', which is a symlink, in a "x86_64-linux" subfolder :
And if I try to manually delete it using the same command it works :
So... I'm kind of confused to tell the truth. My guess is it's related to my setup (or PEBCAK) or else everybody would have encountered this.
I've made absolutely no modification whatsoever. I've just cloned the "dunfell" branch from poky and launched a "bitbake perl". Thanks in advance for your help. Regards, Frank.
|
|
Re: Yocto Application Development
#yocto
Vijay Rakesh Munganda
Hi Maciej Pijanowski, Best regards,
|
|