Date   

[meta-zephyr][PATCH] README.txt: update doc

Naveen Saini
 

Add python dependencies.

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
README.txt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/README.txt b/README.txt
index 208843b..be1ea39 100644
--- a/README.txt
+++ b/README.txt
@@ -8,11 +8,17 @@ https://wiki.yoctoproject.org/wiki/TipsAndTricks/BuildingZephyrImages
Prerequisites:
==============

-Yocto distro (master)"
+This layer depends on:
+ Yocto distro (master)
+ git://git.yoctoproject.org/poky
+ Python layer (meta-openembedded/meta-python)
+ git://git.openembedded.org/meta-openembedded

Modify local conf by adding:
DISTRO="zephyr"

+Add "meta-openembedded/meta-oe" to BBLAYERS
+Add "meta-openembedded/meta-python" to BBLAYERS
Add "meta-zephyr" to BBLAYERS

Building and Running Zephyr Samples
--
2.27.0


[meta-zephyr][PATCH] zephyr-kernel: Add python dependencies

Naveen Saini
 

From: Jon Mason <jdmason@kudzu.us>

Zephyr refuses to compile due to missing python dependencies.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index d7147d5..2090092 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -2,6 +2,7 @@

ZEPHYR_INHERIT_CLASSES += "zephyr cmake"
inherit ${ZEPHYR_INHERIT_CLASSES}
+inherit python3native

# There shouldn't be a manifest for zephyr kernels since there is no root
# filesystem.
@@ -20,6 +21,7 @@ export ZEPHYR_BASE="${S}"
# We always need a toolchain to cross-compile.
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc ${TOOLCHAIN_TARGET_TASK} gperf-native"
+DEPENDS += " python3-pyelftools-native python3-pyyaml-native python3-pykwalify-native"
CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"

DEPENDS_append_qemuall = " qemu-native qemu-helper-native"
--
2.27.0


Re: Yocto recipe for Tailscale #yocto #golang

Mike Thompson
 

I seemed to have resolved all my issues getting a Yocto Bitbake recipe for the Tailscale client and CLI utility.

For future reference and in case it helps others, below is my Bitbake recipe:

------------------------------------------------

# tailscale_1.0.5.bb

SUMMARY = "Tailscale client and daemon for Linux"

HOMEPAGE = "github.com/tailscale/tailscale"

SECTION = "net"

 

LICENSE = "CLOSED"

LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5"

 

SRC_URI = "git://github.com/tailscale/tailscale.git;nobranch=1;tag=v${PV}"

 

inherit go-mod systemd

 

GO_IMPORT = "tailscale.com"

GO_WORKDIR = "${GO_IMPORT}"

GO_INSTALL = "${GO_IMPORT}/cmd/tailscale ${GO_IMPORT}/cmd/tailscaled"

 

FILES_${PN} += "${systemd_unitdir}/*"

 

do_install() {

    install -d ${D}/${bindir}

    install -d ${D}/${sbindir}

    install ${B}/bin/tailscale ${D}/${bindir}/tailscale

    install ${B}/bin/tailscaled ${D}/${sbindir}/tailscaled

 

    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then

        install -d ${D}${sysconfdir}/default/

        install -m 0644 ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.defaults ${D}${sysconfdir}/default/tailscaled

 

        install -d ${D}${systemd_unitdir}/system

        install -m 0644 ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.service ${D}${systemd_unitdir}/system/tailscaled.service

 

        install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/

        ln -s ${systemd_unitdir}/system/tailscaled.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/tailscaled.service

    fi

}

 

SYSTEMD_PACKAGES = "${PN}"

SYSTEMD_SERVICE_${PN} = "tailscaled.service"

SYSTEMD_AUTO_ENABLE = "enable"

------------------------------------------------

 
When installed on my target system, systemd reports the following for the tailscaled daemon:
------------------------------------------------
[[0;1;32m●[[0m tailscaled.service - Tailscale node agent
     Loaded: loaded (/lib/systemd/system/tailscaled.service; enabled; vendor preset: enabled)
     Active: [[0;1;32mactive (running)[[0m since Sat 2020-09-19 20:46:02 UTC; 4min 44s ago
       Docs: https://tailscale.com/kb/
   Main PID: 252 (tailscaled)
      Tasks: 13 (limit: 19081)
     Memory: 56.5M
     CGroup: /system.slice/tailscaled.service
             └─252 /usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tai
lscaled.sock --port 41641
 
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: cancelMapSafely: synced=false
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: cancelMapSafely: wrote to channel
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: mapRoutine: new map needed while idle.
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: mapRoutine: state:url-visit-required
Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M LinkChange(isExpensive=false); needsRebind=false
Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M magicsock: starting endpoint update (link-change-minor)
Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M LinkChange(isExpensive=false); needsRebind=false
Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M magicsock: starting endpoint update (link-change-minor)
Sep 19 20:48:03 amber tailscaled[252]: 7.5M/39.1M LinkChange(isExpensive=false); needsRebind=false
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M magicsock: starting endpoint update (link-change-minor)

------------------------------------------------

 
And ifconfig reports the following:
------------------------------------------------

# ifconfig

tailscale0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  

          inet6 addr: fe80::7f12:8835:cc06:b3e7/64 Scope:Link

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:500 

          RX bytes:0 (0.0 B)  TX bytes:825 (825.0 B)

------------------------------------------------

Thank you to Khem for the tip on looking into "inherit go-mod" and patience while I sorted through this.
 
Mike Thompson
 


Re: #yocto systemd not able to start sshd after a reboot #yocto

Zoran
 

Interesting... Here is what I have on Fedora32:

[root@fedora32-ssd system]# pwd
/lib/systemd/system
[root@fedora32-ssd system]# cat /lib/systemd/system/sshd.service
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.target
Wants=sshd-keygen.target

[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/sshd-permitrootlogin
EnvironmentFile=-/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS $PERMITROOTLOGIN
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

Seems that some leftovers from System V still reside in YOCTO... Correct???

Best Regards,
Zoran
_______


On Sat, Sep 19, 2020 at 3:37 PM <srijan.nandi@...> wrote:
Hello All,

I finally got it to work!!!

There was a sshd.socket file in /lib/systemd/system which had the following line in it.

Conflicts=sshd.service

I remove it and added the following two lines:

After=network.target
Before=sshd.service

And that did the trick. Now sshd service starts on every boot.

Thanks,
-=Srijan Nandi



Re: [meta-mingw][PATCH] ninja: configure for mingw platform

Joshua Watt
 



On Fri, Sep 18, 2020, 7:30 AM Samuli Piippo <samuli.piippo@...> wrote:
Signed-off-by: Samuli Piippo <samuli.piippo@...>

Thanks! Can you add this to core-image-mingw-sdktest to test it doesn't regress? Bonus points for writing a runtime test for it if there isn't one already

---
 recipes-devtools/ninja/ninja_%.bbappend | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 recipes-devtools/ninja/ninja_%.bbappend

diff --git a/recipes-devtools/ninja/ninja_%.bbappend b/recipes-devtools/ninja/ninja_%.bbappend
new file mode 100644
index 0000000..e7ddb4d
--- /dev/null
+++ b/recipes-devtools/ninja/ninja_%.bbappend
@@ -0,0 +1,8 @@
+do_compile_mingw32() {
+        python3 ./configure.py --platform mingw
+        ninja
+}
+
+do_install_mingw32() {
+        install -D -m 0755  ${S}/ninja.exe ${D}${bindir}/ninja.exe
+}
--
2.17.1


Re: #yocto systemd not able to start sshd after a reboot #yocto

srijan.nandi@...
 

Hello All,

I finally got it to work!!!

There was a sshd.socket file in /lib/systemd/system which had the following line in it.

Conflicts=sshd.service

I remove it and added the following two lines:

After=network.target
Before=sshd.service

And that did the trick. Now sshd service starts on every boot.

Thanks,
-=Srijan Nandi


Re: Yocto recipe for Tailscale #yocto #golang

Mike Thompson
 

Inheriting from go-mod didn't make any difference that I could tell.

 

This is what I have so far for the Tailscale recipe.  I'm resolving dependencies with individual Bitbake files that pull in each dependency as I find them.

 

---------------------------------------------

# tailscale_1.0.5.bb

SUMMARY = "Tailscale client and daemon for Linux"

HOMEPAGE = "github.com/tailscale/tailscale"

 

LICENSE = "CLOSED"

LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5"

 

SRC_URI = "git://github.com/tailscale/tailscale.git;nobranch=1;tag=v${PV}"

 

DEPENDS += "github.com-apenwarr-fixconsole \

            github.com-coreos-go-iptable \

            github.com-godbus-dbus \

            github.com-golang-groupcache \

            github.com-jsimonetti-rtnetlink \

            github.com-klauspost-compress \

            github.com-mdlayher-netlink \

            github.com-pborman-getopt \

            github.com-peterbourgon-ff \

            github.com-tailscale-wireguard-go \

            github.com-tcnksm-go-httpstat \

            github.com-toqueteos-webbrowser \

            golang.org-x \

            go4.org-mem \

            inet.af-netaddr \

            rsc.io-goversion \

           "

 

inherit go

inherit go-mod

GO_IMPORT = "tailscale.com"

GO_INSTALL = "${GO_IMPORT}/cmd/tailscale"

 

RDEPENDS_${PN}-dev += "bash"

---------------------------------------------

Unfortunately, the golang.org-x.bb recipe is turning into an endless source of dependencies during do_compile stage.  I feel I must be on the wrong track.
 
Is there a way to package up the following so that just what is needed by Tailscale is included, but dependencies not needed by Tailscale are ignored?
 
---------------------------------------------
# golang.org-x.bb
DESCRIPTION = "Go X libraries"
 
SRC_URI = "\
         git://github.com/golang/mod.git;protocol=https;name=mod;destsuffix=${PN}-${PV}/src/golang.org/x/mod \
         git://github.com/golang/net.git;protocol=https;name=net;destsuffix=${PN}-${PV}/src/golang.org/x/net \
         git://github.com/golang/sys.git;protocol=https;name=sys;destsuffix=${PN}-${PV}/src/golang.org/x/sys \
         git://github.com/golang/text.git;protocol=https;name=text;destsuffix=${PN}-${PV}/src/golang.org/x/text \
         git://github.com/golang/time.git;protocol=https;name=time;destsuffix=${PN}-${PV}/src/golang.org/x/time \
         git://github.com/golang/sync.git;protocol=https;name=sync;destsuffix=${PN}-${PV}/src/golang.org/x/sync \
         git://github.com/golang/tools.git;protocol=https;name=tools;destsuffix=${PN}-${PV}/src/golang.org/x/tools \
         git://github.com/golang/build.git;protocol=https;name=build;destsuffix=${PN}-${PV}/src/golang.org/x/build \
         git://github.com/golang/oauth2.git;protocol=https;name=oauth2;destsuffix=${PN}-${PV}/src/golang.org/x/oauth2 \
         git://github.com/golang/crypto.git;protocol=https;name=crypto;destsuffix=${PN}-${PV}/src/golang.org/x/crypto \
         git://github.com/golang/xerrors.git;protocol=https;name=xerrors;destsuffix=${PN}-${PV}/src/golang.org/x/xerrors \
         "
SRCREV_FORMAT = "golang"
SRCREV_mod = "${AUTOREV}"
SRCREV_net = "${AUTOREV}"
SRCREV_sys = "${AUTOREV}"
SRCREV_text = "${AUTOREV}"
SRCREV_time = "${AUTOREV}"
SRCREV_sync = "${AUTOREV}"
SRCREV_tools = "${AUTOREV}"
SRCREV_build = "${AUTOREV}"
SRCREV_oauth2 = "${AUTOREV}"
SRCREV_crypto = "${AUTOREV}"
SRCREV_xerrors = "${AUTOREV}"
 
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
inherit go
GO_IMPORT = "golang.org/x"
---------------------------------------------
 
Thanks,
 
Mike Thompson


Re: Yocto recipe for Tailscale #yocto #golang

Khem Raj
 

On 9/18/20 4:46 PM, Mike Thompson via lists.yoctoproject.org wrote:
OK, I'm making some progress a Bitbake recipe for the Tailscale client built using Go from various samples I found in the OpenEmbedded layers.
However, I'm running into import issues during compilation and I'm hoping a person familiar with Go might be able to provide some hints. From what I can tell, Go packages to are allowed to declare that they must be imported using a specific name <https://golang.org/cmd/go/#hdr-Import_path_checking> and it seems that declaration is included in the Tailscale source code.
Is there a way to craft the Bitbake recipe to honor that requirement for the Tailscale Go source code?
Currently, my Bitbake recipe for Tailscale looks as shown below.
tailscale_1.0.5.bb
-----------------------------------------------------------------
SUMMARY = "Tailscale client and daemon for Linux"
HOMEPAGE = "github.com/tailscale/tailscale"
LICENSE = "DWTFYW"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5"
GO_IMPORT = "github.com/tailscale/tailscale"
SRC_URI = "git://${GO_IMPORT};nobranch=1;tag=v${PV}"
inherit go
GO_INSTALL = "${GO_IMPORT}/cmd/tailscale"
RDEPENDS_${PN}-dev += "bash"
-----------------------------------------------------------------
The Bitbake output with the import error is below:
-----------------------------------------------------------------
$ bitbake tailscale
...
NOTE: Executing Tasks
ERROR: tailscale-1.0.5-r0 do_compile: Execution of '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' failed with exit code 1:
can't load package: package github.com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale"
can't load package: package .: no Go files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/log.do_compile.10615
Log data follows:
| DEBUG: Executing shell function do_compile
| can't load package: package github.com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale"
| can't load package: package .: no Go files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' failed with exit code 1:
| can't load package: package github.com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale"
| can't load package: package .: no Go files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/mike/Development/markbot_linux/sources/meta-markbot/recipes-tailscale/tailscale/tailscale_1.0.5.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2253 tasks of which 2245 didn't need to be rerun and 1 failed.
-----------------------------------------------------------------
Thanks,
Mike Thompson

perhaps you need to inherit go-mod as well, if its using modules.


Re: #yocto systemd not able to start sshd after a reboot #yocto

Zoran
 

Hello Srijan,

Did you recap/look into this sshd.service file?
https://lists.yoctoproject.org/g/yocto/message/49993

Zoran
_______

On Fri, Sep 18, 2020 at 8:07 PM <srijan.nandi@gmail.com> wrote:

Hello Khem,

With the above sshd.service file the sshd daemon fails to start. It gives an error "(code=exited, status=203/EXEC)".

Cannot figure out as to why the systemd for sshd fails to work, while the other systemd files are working perfectly fine.

-=Srijan Nandi


Re: Yocto recipe for Tailscale #yocto #golang

Mike Thompson
 

OK, I'm making some progress a Bitbake recipe for the Tailscale client built using Go from various samples I found in the OpenEmbedded layers.
 
However, I'm running into import issues during compilation and I'm hoping a person familiar with Go might be able to provide some hints. From what I can tell, Go packages to are allowed to declare that they must be imported using a specific name and it seems that declaration is included in the Tailscale source code.
 
Is there a way to craft the Bitbake recipe to honor that requirement for the Tailscale Go source code?
 
Currently, my Bitbake recipe for Tailscale looks as shown below.  
 
tailscale_1.0.5.bb
-----------------------------------------------------------------
SUMMARY = "Tailscale client and daemon for Linux"
HOMEPAGE = "github.com/tailscale/tailscale"
LICENSE = "DWTFYW"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5"
 
GO_IMPORT = "github.com/tailscale/tailscale"
SRC_URI = "git://${GO_IMPORT};nobranch=1;tag=v${PV}"
 
inherit go
 
GO_INSTALL = "${GO_IMPORT}/cmd/tailscale"
 
RDEPENDS_${PN}-dev += "bash"
-----------------------------------------------------------------
 
The Bitbake output with the import error is below:
 
-----------------------------------------------------------------
$ bitbake tailscale
...
NOTE: Executing Tasks
ERROR: tailscale-1.0.5-r0 do_compile: Execution of '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' failed with exit code 1:
can't load package: package github.com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale"
can't load package: package .: no Go files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
WARNING: exit code 1 from a shell command.
 
ERROR: Logfile of failure stored in: /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/log.do_compile.10615
Log data follows:
| DEBUG: Executing shell function do_compile
| can't load package: package github.com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale"
| can't load package: package .: no Go files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' failed with exit code 1:
| can't load package: package github.com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale"
| can't load package: package .: no Go files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/mike/Development/markbot_linux/sources/meta-markbot/recipes-tailscale/tailscale/tailscale_1.0.5.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2253 tasks of which 2245 didn't need to be rerun and 1 failed.
-----------------------------------------------------------------
 
Thanks,
 
Mike Thompson
 


Re: #yocto systemd not able to start sshd after a reboot #yocto

srijan.nandi@...
 

Hello Khem,

With the above sshd.service file the sshd daemon fails to start. It gives an error "(code=exited, status=203/EXEC)".

Cannot figure out as to why the systemd for sshd fails to work, while the other systemd files are working perfectly fine.

-=Srijan Nandi


Re: [meta-zephyr][PATCH] zephyr-kernel: add Zephyr RTOS version 2.3.0 support

Khem Raj
 

On 9/17/20 9:43 PM, yock.gen.mah@intel.com wrote:
From: yockgenm <yock.gen.mah@intel.com>
Signed-off-by: yockgenm <yock.gen.mah@intel.com>
---
classes/zephyr-kernel-src.bbclass | 12 ++++----
.../{qemu_4.2.%.bbappend => qemu_5.1.%.bbappend} | 0
.../zephyr-kernel/zephyr-kernel-common.inc | 1 +
.../zephyr-kernel/zephyr-kernel-src_2.2.bb | 33 ----------------------
.../zephyr-kernel/zephyr-kernel-src_2.3.bb | 24 ++++++++++++++++
.../zephyr-kernel/zephyr-kernel-test.inc | 7 ++---
6 files changed, 35 insertions(+), 42 deletions(-)
rename recipes-devtools/qemu/{qemu_4.2.%.bbappend => qemu_5.1.%.bbappend} (100%)
delete mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.2.bb
create mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.3.bb
diff --git a/classes/zephyr-kernel-src.bbclass b/classes/zephyr-kernel-src.bbclass
index 653cb9b..d202293 100644
--- a/classes/zephyr-kernel-src.bbclass
+++ b/classes/zephyr-kernel-src.bbclass
@@ -1,13 +1,15 @@
#Set relevant variables based on Zephyr kernel version
-PREFERRED_VERSION_zephyr-kernel ??= "2.2.0"
+PREFERRED_VERSION_zephyr-kernel ??= "2.3.0"
-SRCREV = "d39cb42d0920d5658fad358ad5b91de75d747a20"
+SRCREV = "b8c78e254ff875680e99c9f131fbe285c4575927"
+SRCREV_cmsis = "542b2296e6d515b265e25c6b7208e8fea3014f90"
Perhaps you also should be defining

SRECREV_FORMAT = "default_cmsis"

as well now that you have multiple SRC_URIs

-SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.2-branch \
+SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.3-branch \
+ git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;destsuffix=git/modules/cmsis;name=cmsis \
file://0001-cmake-add-yocto-toolchain.patch \
"
-PV = "2.2.0"
+PV = "2.3.0"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
@@ -15,7 +17,7 @@ ZEPHYR_TEST_SRCDIR = "tests/legacy/kernel/"
python () {
src_pn = d.getVar('PREFERRED_VERSION_zephyr-kernel', True)
- if src_pn == '2.2.0':
+ if src_pn == '2.3.0':
return
else:
bb.error("Unsupported Zephyr kernel version requested")
diff --git a/recipes-devtools/qemu/qemu_4.2.%.bbappend b/recipes-devtools/qemu/qemu_5.1.%.bbappend
similarity index 100%
rename from recipes-devtools/qemu/qemu_4.2.%.bbappend
rename to recipes-devtools/qemu/qemu_5.1.%.bbappend
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index d7147d5..aaf71a8 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -14,6 +14,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"
export ZEPHYR_BASE="${S}"
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.2.bb b/recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.2.bb
deleted file mode 100644
index a3e1c28..0000000
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.2.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
-
-# tag v2.2
-SRCREV="d39cb42d0920d5658fad358ad5b91de75d747a20"
-SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.2-branch \
- file://0001-cmake-add-yocto-toolchain.patch \
- "
-inherit cmake
-PV = "2.2.0"
-S = "${WORKDIR}/git"
-
-IMAGE_NO_MANIFEST = "1"
-INHIBIT_DEFAULT_DEPS = "1"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_compile () {
-}
-
-do_install () {
- kerneldir=${D}/usr/src/zephyr
- install -d $kerneldir
- cp -r ${S}/* $kerneldir
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} = "/usr/src/zephyr"
-
-SYSROOT_DIRS += "/usr/src/zephyr"
-
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.3.bb b/recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.3.bb
new file mode 100644
index 0000000..8e8b5b8
--- /dev/null
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-src_2.3.bb
@@ -0,0 +1,24 @@
+
+inherit zephyr-kernel-src
+inherit cmake
+
+S = "${WORKDIR}/git"
+
+IMAGE_NO_MANIFEST = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+
+do_install () {
+ kerneldir=${D}/usr/src/zephyr
+ install -d $kerneldir
+ cp -r ${S}/* $kerneldir
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "/usr/src/zephyr"
+
+SYSROOT_DIRS += "/usr/src/zephyr"
+
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
index 65da7e8..7ab9bd4 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
@@ -1,4 +1,4 @@
-ZEPHYRTESTS_remove = "fifo fp_sharing lifo mbox mem_heap mem_pool \
+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"
@@ -22,13 +22,12 @@ ZEPHYRTESTS_remove = "gen_isr_table spinlock smp mp"
# List of all available kernel tests
ZEPHYRTESTS = " \
common \
- context \
- critical \
+ context \
device \
early_sleep \
fatal \
fifo \
- fp_sharing \
+ fpu_sharing \
gen_isr_table \
interrupt \
lifo \


Re: #yocto systemd not able to start sshd after a reboot #yocto

Khem Raj
 

does something like this work?

[Unit]
Description=OpenSSH Daemon
Wants=sshdgenkeys.service
After=sshdgenkeys.service
After=network.target

[Service]
ExecStart=/usr/bin/sshd -D
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target

On Fri, Sep 18, 2020 at 8:29 AM <srijan.nandi@gmail.com> wrote:

I am facing a peculiar problem with openssh. I have built openssh_8.0p1on zeus.

The sshd.service file is as follows:
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=sshdgenkeys.service
Wants=sshdgenkeys.service

[Service]
Type=simple
PIDFile=/var/run/sshd.pid
EnvironmentFile=-/etc/default/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill $MAINPID
PermissionsStartOnly=true
KillMode=process
Restart=on-failure
StandardError=syslog

[Install]
WantedBy=multi-user.target

It starts without issues, if i do a systemctl start sshd.service. If I do a test of the config file it does not come up with any errors:

genericx86-64:~$ sudo /usr/sbin/sshd -t
genericx86-64:~$

Problem:
If I reboot the server, sshd does not start. There is no error on syslog. I have enabled debug logging, still no logs in syslog.

# Logging
SyslogFacility DAEMON
LogLevel DEBUG3

Even systemctl is-enabled sshd shows as enabled.

After a reboot, if I do a systemctl status sshd it shows:
Loaded: loaded (/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: inactive (dead)

If I manually run systemctl start sshd.service, everything works perfectly well without issues. sshd start on 0.0.0.0:2224 and I am able to ssh in as well.

It's just that systemctl is not able to start sshd after a reboot and there is no error that i can find or debug. Absolutely run out of ideas to resolve this. Any help will be greatly appreciated.

Thanks and Regards,
-=Srijan Nandi



#yocto systemd not able to start sshd after a reboot #yocto

srijan.nandi@...
 

I am facing a peculiar problem with openssh. I have built openssh_8.0p1on zeus. 

The sshd.service file is as follows:
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=sshdgenkeys.service
Wants=sshdgenkeys.service
 
[Service]
Type=simple
PIDFile=/var/run/sshd.pid
EnvironmentFile=-/etc/default/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill $MAINPID
PermissionsStartOnly=true
KillMode=process
Restart=on-failure
StandardError=syslog
 
[Install]
WantedBy=multi-user.target

It starts without issues, if i do a systemctl start sshd.service. If I do a test of the config file it does not come up with any errors:

genericx86-64:~$ sudo /usr/sbin/sshd -t
genericx86-64:~$ 

Problem:
If I reboot the server, sshd does not start. There is no error on syslog. I have enabled debug logging, still no logs in syslog.

# Logging
SyslogFacility DAEMON
LogLevel DEBUG3

Even systemctl is-enabled sshd shows as enabled.

After a reboot, if I do a systemctl status sshd it shows:
Loaded: loaded  (/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: inactive (dead)

If I manually run systemctl start sshd.service, everything works perfectly well without issues. sshd start on 0.0.0.0:2224 and I am able to ssh in as well.

It's just that systemctl is not able to start sshd after a reboot and there is no error that i can find or debug. Absolutely run out of ideas to resolve this. Any help will be greatly appreciated.

Thanks and Regards,
-=Srijan Nandi


wic direct->vhd

Mauro Ziliani
 

Hi all.

I'm working with dunfell.

With wic to create .direct image.

Which tool I have to use to convert .direct file to .vhd file?


I try to look .vhd and .direct file with 'file' tool, but it seems .direct and .vhd has the same header.


Best regards,

   Mauro


[meta-mingw][PATCH] ninja: configure for mingw platform

Samuli Piippo
 

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
recipes-devtools/ninja/ninja_%.bbappend | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 recipes-devtools/ninja/ninja_%.bbappend

diff --git a/recipes-devtools/ninja/ninja_%.bbappend b/recipes-devtools/ninja/ninja_%.bbappend
new file mode 100644
index 0000000..e7ddb4d
--- /dev/null
+++ b/recipes-devtools/ninja/ninja_%.bbappend
@@ -0,0 +1,8 @@
+do_compile_mingw32() {
+ python3 ./configure.py --platform mingw
+ ninja
+}
+
+do_install_mingw32() {
+ install -D -m 0755 ${S}/ninja.exe ${D}${bindir}/ninja.exe
+}
--
2.17.1


[meta-mingw][PATCH] cmake: remove dependency to bash-completion

Samuli Piippo
 

bash-completion pulls in ncurses which does not build for mingw.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
recipes-devtools/cmake/cmake_%.bbappend | 1 +
1 file changed, 1 insertion(+)

diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend
index 42d36ac..b2e8a19 100644
--- a/recipes-devtools/cmake/cmake_%.bbappend
+++ b/recipes-devtools/cmake/cmake_%.bbappend
@@ -1 +1,2 @@
DEPENDS_remove_mingw32 = "ncurses"
+RDEPENDS_${PN}-bash-completion_remove_mingw32 = "bash-completion"
--
2.17.1


[meta-mingw][PATCH] Override SDK_VENDOR

Samuli Piippo
 

Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
expect to find when using mingw32-w64. This enables features that are
not functional in the classic mingw32, but have been implemented in the
mingw32-w64.

Disable 32bit libs from the runtime component when compiling for 64bit,
which were enabled as a side effect of the GCC config change.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
conf/machine-sdk/include/mingw32-common.inc | 3 +++
.../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb | 2 ++
2 files changed, 5 insertions(+)

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index 9011ded..bc6c91e 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -1,4 +1,7 @@
SDK_OS = "mingw32"
+SDK_VENDOR_mingw32 = "-w64"
+SDK_VENDOR_sdkmingw32 = "-w64"
+
NATIVESDKLIBC = "libc-mingw"

PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
index cf39c6a..9f79ffe 100644
--- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
@@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"

TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"

+EXTRA_OECONF_x86-64 = "--disable-lib32"
+
do_configure() {
oe_runconf
}
--
2.17.1


[meta-security][zeus][PATCH 1/1] clamav: add INSTALL_CLAMAV_CVD flag to do_install

Charlie Davies
 

Recipe provides INSTALL_CLAMAV_CVD flag to bypass clamav
cvd db creation. During do_install this flag should be
used to conditionally skip install of cvd db if needed.

Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
---
recipes-security/clamav/clamav_0.99.4.bb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/recipes-security/clamav/clamav_0.99.4.bb b/recipes-security/=
clamav/clamav_0.99.4.bb
index a340b48..1ee3f58 100644
--- a/recipes-security/clamav/clamav_0.99.4.bb
+++ b/recipes-security/clamav/clamav_0.99.4.bb
@@ -102,7 +102,10 @@ do_install_append_class-target () {
install -m 0644 ${WORKDIR}/volatiles.03_clamav ${D}${sysconfdir}/de=
fault/volatiles/volatiles.03_clamav
sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/libclam=
av.pc
rm ${D}/${libdir}/libclamav.so
- install -m 666 ${S}/clamav_db/* ${D}/${localstatedir}/lib/clamav/.
+ if [ "${INSTALL_CLAMAV_CVD}" =3D "1" ]; then
+ bbnote "CLAMAV installing cvd"
+ install -m 666 ${S}/clamav_db/* ${D}/${localstatedir}/lib/clamav=
/.
+ fi
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d=
)};then
install -D -m 0644 ${WORKDIR}/clamav.service ${D}${systemd_unitd=
ir}/system/clamav.service
install -d ${D}${sysconfdir}/tmpfiles.d
--=20
2.28.0


[meta-security][zeus][PATCH 0/1] Clamav db creation skip bug

Charlie Davies
 

Hi Armin,

With the dunfell patch accepted I removed my local fix which has
now shown that the same issue exists on the zeus branch (I run
my builds against zeus and dunfell).

This patch fixes the bug.

Cheers,

Charlie

Charlie Davies (1):
clamav: add INSTALL_CLAMAV_CVD flag to do_install

recipes-security/clamav/clamav_0.99.4.bb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

--=20
2.28.0

1841 - 1860 of 52565