Date   

Re: [meta-tpm][v2][PATCH] swtpm: fix build issues of missing expect

Kristian Klausen <kristian@...>
 

Den Fri, Oct 01, 2021 at 15:25:17 -0700 skrev Armin Kuster:
Signed-off-by: Armin Kuster <akuster808@...>

--
V2]
Only need expect-native
Clean up PACKAGECONFGI[gnutils] to conform to spec
---
meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
index 807c02b..0087367 100644
--- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
+++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
SECTION = "apps"

# coreutils-native and net-tools-native are reportedly only required for the tests
-DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm json-glib"
+DEPENDS = "libtasn1 coreutils-native expect-native socat glib-2.0 net-tools-native libtpm json-glib"

SRCREV = "98187d24fe14851653a7c46eb16e9c5f0b9beaa1"
SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.6 \
@@ -28,7 +28,7 @@ PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
# used by swtpm-create-tpmca (the last two is provided by gnutls)
# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
-PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls, expect bash tpm2-pkcs11-tools"
+PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls expect bash tpm2-pkcs11-tools"
Hi Armin

Support for RRECOMMENDS in the PACKAGECONFIG was added some years
ago[1][2]. Whatever they should be RRECOMMENDS or RDEPENDS I'm not sure
about (I don't think swtpm-create-tpmca is a hard requirement for most
people).

If you like I can squash the changes into my own patch and resend it.

[1] https://git.openembedded.org/openembedded-core/commit/?id=ec96c985ce1c888c3ce3c4d964d7a106c3c88a5c
[2] https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

Cheers,
Kristian

PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
--
2.25.1



[meta-tpm][v2][PATCH] swtpm: fix build issues of missing expect

Armin Kuster
 

Signed-off-by: Armin Kuster <akuster808@...>

--
V2]
Only need expect-native
Clean up PACKAGECONFGI[gnutils] to conform to spec
---
meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
index 807c02b..0087367 100644
--- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
+++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
SECTION = "apps"

# coreutils-native and net-tools-native are reportedly only required for the tests
-DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm json-glib"
+DEPENDS = "libtasn1 coreutils-native expect-native socat glib-2.0 net-tools-native libtpm json-glib"

SRCREV = "98187d24fe14851653a7c46eb16e9c5f0b9beaa1"
SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.6 \
@@ -28,7 +28,7 @@ PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
# used by swtpm-create-tpmca (the last two is provided by gnutls)
# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
-PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls, expect bash tpm2-pkcs11-tools"
+PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls expect bash tpm2-pkcs11-tools"
PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
--
2.25.1


Meta-raspberrypi - how to configure device tree for MCP251x

Chris Tapp
 

I am having trouble getting the Waveshare 2-CH CAN HAT working with an RPI4. Channel 0 does not come up, channel 1 does, but it will only send one message (eventually reporting "write: No buffer space available”) and not receive anything.

Looking at the mcp2515-can0-overlay.dts and mcp2515-can1-overlay.dts device tree files in /tmp/work-shared/raspberrypi4/kernel-source/arch/arm/boot/dts/overlays/, it looks as if the interrupts are not mapped as required for the board.

      DTS               HAT
CAN0  brcm,pins = <25>  PIN23
CAN1  brcm,pins = <25>  PIN25

This doesn’t look right, and seems consistent with the behaviour I am seeing.

I would also like to check the device chip select signals, but I can't see how (if) they are mapped in the dts files.

How can I override these settings when I build the image?

--

Chris Tapp
opensource@...
www.keylevel.com


[meta-rockchip][PATCH] rockchip.wks: use uuid for /boot during fstab-update

Markus Volk
 

Since the recent patch to switch to UUIDs [0aa5e600: "use uuid
instead of hard-coding root device"] wic fstab-update is not able
to get the correct value for the used device anymore and falls to
the default 'sda'. Thus wrong /dev/sda entries are generated in fstab.

For partitions that should be updated automatically this can be avoided
by either generate entries using uuid or label.

Signed-off-by: MarkusVolk <f_l_k@...>
---
wic/rockchip.wks | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wic/rockchip.wks b/wic/rockchip.wks
index 5ee276b..bd36ab0 100644
--- a/wic/rockchip.wks
+++ b/wic/rockchip.wks
@@ -20,7 +20,7 @@ part reserved1 --offset 4032 --fixed-size 64K
part reserved2 --offset 4096 --fixed-size 4096K
part loader2 --offset 8192 --fixed-size 4096K --source r=
awcopy --sourceparams=3D"=
file=3Du-boot.${UBOOT_SUFFIX}"
part atf --offset 12288 --fixed-size 4096K
-part /boot --offset 16384 --size 114688K --active --source b=
ootimg-partition --fstype=3Dvfat --label boot --sourceparams=3D=
"loader=3Du-boot"
+part /boot --offset 16384 --size 114688K --active --source b=
ootimg-partition --fstype=3Dvfat --label boot --sourceparams=3D=
"loader=3Du-boot" --use-uuid
part / --source r=
ootfs --fstype=3Dext4 --label root --use-uuid
=20
bootloader --ptable gpt --append=3D"console=3Dtty1 console=3D${RK_CONSOL=
E_DEVICE},${RK_CONSOLE_BAUD}n8 rw rootfstype=3Dext4 init=3D/sbin/init"
--=20
2.25.1


Re: Enabling Websockets in Mosquitto in yocto zeus #zeus

Poornesh G
 

Greetings !

I could able to add Mosquitto in Yocto Zeus , but as default websockets is disabled in Mosquitto . Can anyone help me how to enable websockets in Mosquitto in yocto zeus.

Thanks in Advance


How to add Firefox with Yocto build for RPI4.

@prashant2314
 

Dear Team,
I'm using poky-hardknotte for building the image for rpi4, here my need is to add one desktop and a Firefox browser with it,
I built xfce desktop and it's working fine, but when I'm adding Firefox browser with it's getting segmentation fault when executing it from terminal, and from desktop menu it's responding anything may be back end it's getting same segmentation fault,
please give me some hint so that I can conclude my task.

Thanks & Regards.


How to enable and disable device tree node at runtime from linux userspace #dunfell

james@...
 

Hai All,

I wanted to use a GPIO to put the SOM into sleep mode and again use it to wake it up from the sleep. 
I used the below node to configure the SOM to use the GPIO1 18 to wake up from sleep.
 
keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_userkeys> ;
 
wakeup {
gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WAKEUP>;
gpio-key,wakeup;
};
}

But again to put into sleep I am unable to read the GPIO state from linux userspace as it is used by driver. I am using libgpiod to read the gpio status for which I am getting device or resource busy error

# gpioget gpiochip0 18
gpioget: error reading GPIO values: Device or resource busy

How to disable the device tree node from linux user space so it is possible to read the GPIO staus. And onces the button is pressed enable the device tree node and enter the sleep mode so the driver will take care of waking of the SOM.
Or
Any other way to force read the status of GPIO status 

Regards,
James A


Re: Meta-respberrypi socketcan - how do I bring up the interfaces?

Chris Tapp
 

Hi Stephen,

I managed to miss some of the output to ip -s -d link show can0, which should have shown:

3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state STOPPED restart-ms 0 
  bitrate 1000000 sample-point 0.750 
  tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
  mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
  clock 8000000 
  re-started bus-errors arbit-lost error-warn error-pass bus-off
  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX: bytes  packets  errors  dropped missed  mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       

This shows “DOWN” as well as “STOPPED”, and is different because I have found that I can set the bitrate using:

ip link set can0 type can bitrate 1000000

Note that this does not include ‘up’ as that is what was causing the SSH session to stop responding.

However, any attempt to bring it up:

ifconfig can0 up

stops the SSH session again. If I set a second connection up first and run ‘ps’, I can see:

  480 root      2140 D    ifconfig can0 up
  481 root         0 DW   [irq/65-spi0.1]
  482 root         0 IW<  [mcp251x_wq]

So it’s stuck in an uninterruptible sleep (which explains the ssh session behaviour)!

The output of dmesg shows:

[  735.196538] INFO: task irq/65-spi0.1:481 blocked for more than 122 seconds.
[  735.196559]       Tainted: G         C        5.10.31-v7l #1
[  735.196578] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  735.196598] task:irq/65-spi0.1   state:D stack:    0 pid:  481 ppid:     2 flags:0x00000000
[  735.196634] Backtrace: 
[  735.196671] [<c0ca4808>] (__schedule) from [<c0ca523c>] (schedule+0x6c/0xe0)
[  735.196696]  r10:c2e286b8 r9:00000000 r8:c1952000 r7:00000002 r6:c1953e4c r5:c1952000
[  735.196717]  r4:c2e35d00
[  735.196742] [<c0ca51d0>] (schedule) from [<c0ca56ac>] (schedule_preempt_disabled+0x18/0x1c)
[  735.196763]  r5:c1952000 r4:c2e286b4
[  735.196789] [<c0ca5694>] (schedule_preempt_disabled) from [<c0ca6d9c>] (__mutex_lock.constprop.0+0x2e0/0x58c)
[  735.196816] [<c0ca6abc>] (__mutex_lock.constprop.0) from [<c0ca7164>] (__mutex_lock_slowpath+0x1c/0x20)
[  735.196840]  r10:ffffe000 r9:c2e28000 r8:c30491c0 r7:c2a3f400 r6:c30491e4 r5:c2e285c0
[  735.196861]  r4:c2e286b4
[  735.196885] [<c0ca7148>] (__mutex_lock_slowpath) from [<c0ca71c4>] (mutex_lock+0x5c/0x60)
[  735.196915] [<c0ca7168>] (mutex_lock) from [<bf05ab60>] (mcp251x_can_ist+0x54/0x434 [mcp251x])
[  735.196937]  r5:c2e285c0 r4:c30491c0
[  735.196969] [<bf05ab0c>] (mcp251x_can_ist [mcp251x]) from [<c02975c8>] (irq_thread_fn+0x2c/0x8c)
[  735.196994]  r10:ffffe000 r9:c029759c r8:c30491c0 r7:c270cb00 r6:c30491e4 r5:c270cb00
[  735.197014]  r4:c30491c0
[  735.197041] [<c029759c>] (irq_thread_fn) from [<c02978d4>] (irq_thread+0x1e0/0x2b4)
[  735.197064]  r7:c270cb00 r6:c30491e4 r5:c1952000 r4:00000000
[  735.197091] [<c02976f4>] (irq_thread) from [<c02486dc>] (kthread+0x168/0x16c)
[  735.197116]  r10:c1925c3c r9:c30491c0 r8:c02976f4 r7:c1952000 r6:00000000 r5:c18cfe00
[  735.197136]  r4:c316fd80
[  735.197161] [<c0248574>] (kthread) from [<c020010c>] (ret_from_fork+0x14/0x28)
[  735.197182] Exception stack(0xc1953fb0 to 0xc1953ff8)
[  735.197205] 3fa0:                                     00000000 00000000 00000000 00000000
[  735.197228] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  735.197251] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  735.197276]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0248574
[  735.197296]  r4:c18cfe00

I think this means the driver is stuck in a wait loop. No idea (yet) on how to work this one out ;-)

--

Chris Tapp

----
You can tell you're getting older when your car insurance gets real cheap!

On 30 Sep 2021, at 13:16, Stephen John Smoogen <smooge@...> wrote:

On Thu, 30 Sept 2021 at 05:21, Chris Tapp <opensource@...> wrote:

I am trying to get a Waveshare CAN interface[1] running on an RPi4 using meta-raspberrypi with hardknott.


I am looking at getting one of these so do not have final answers.
However looking at
http://www.port.de/cgi-bin/CAN/CanFaqErrors
https://stackoverflow.com/questions/64892746/socketcan-device-state-stopped
https://www.can-cia.org/can-knowledge/canopen/network-management/

The STOPPED state indicates that the device is detecting some sort of
error and can not continue. My guess is that the iproute2 command
tried to bring things up and found the bus in a non-workable state or
too many errors. For other buses this could be due to non-termination
(aka is the CAN bus connected to anything?) For some buses they have a
'self-termination' if the leads do not have the voltages/resistance on
the end. Others will fail (like removing the end terminator on a
thinwire ethernet network or not having a good loop on one of the
RS422? networks (memory is fuzzy if this is the one or it was a
different one))

Sorry I can't be of more help.

I have added ENABLE_SPI_BUS = “1” and ENABLE_DUAL_CAN = “1” to my local.conf and see the following at boot:

[    2.858284] CAN device driver interface
[    2.879431] mcp251x spi0.1 can0: MCP2515 successfully initialized.
[    2.891019] mcp251x spi0.0 can1: MCP2515 successfully initialized.
[  176.170231] can: controller area network core
[  176.178987] can: raw protocol

So, the interfaces are detected.

However, I cannot bring the interfaces up. I am expecting to use something like:

 ip link set can0 up type can bitrate 1000000
 ifconfig can0 up

But that results in :

 ip: either "dev" is duplicate, or "type" is garbage

This appears to be due to the ‘ip’ command not working with Busybox, so I tried adding iproute2 to the image, but the command then hangs the system.

I have tried skipping the ‘ip’ command, but ifconfig then reports:

 ifconfig: SIOCSIFFLAGS: Invalid argument

I can get some information for the interface:

 ip -s -d link show can0
   link/can  promiscuity 0 minmtu 0 maxmtu 0
   can state STOPPED restart-ms 0
         mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
         clock 8000000
         re-started bus-errors arbit-lost error-warn error-pass bus-off
         0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
   RX: bytes  packets  errors  dropped missed  mcast
   0          0        0       0       0       0
   TX: bytes  packets  errors  dropped carrier collsns
   0          0        0       0       0       0

What do I need to do to bring the interface up?

Chris



[1] https://www.waveshare.com/wiki/2-CH_CAN_HAT

--

Chris Tapp
opensource@...
www.keylevel.com






--
Stephen J Smoogen.
I've seen things you people wouldn't believe. Flame wars in
sci.astro.orion. I have seen SPAM filters overload because of Godwin's
Law. All those moments will be lost in time... like posts on a BBS...
time to shutdown -h now.





Minutes: Yocto Project Weekly Triage Meeting 9/30/2021

Trevor Gamblin
 

Wiki: https://wiki.yoctoproject.org/wiki/Bug_Triage

Attendees: Alex, Diane, Joshua, Michael, Oleksiy, Randy, Richard, Ross, Saul, Stephen, Steve, Tim, Trevor

ARs:

- Trevor to revisit Make parallelization as part of look at bugs 14564 and 14565 (originally encountered errors such as https://errors.yoctoproject.org/Errors/Details/593109/ while attempting to add load average checking to dunfell)

Notes:

- N/A

Medium+ 3.4 Unassigned Enhancements/Bugs: 69 (Last week 68)

Medium+ 3.5 Unassigned Enhancements/Bugs: 10 (No change)

Medium+ 3.99 Unassigned Enhancements/Bugs: 39 (No change)

AB-INT Bugs: 62 (Last week 54)


Re: [meta-security][PATCH] swtpm: update to 0.6.1

Armin Kuster
 

On 9/29/21 1:15 AM, Anton Antonov wrote:

This recipe fails because of the wrong format in
"PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls,
gnutls, expect bash tpm2-pkcs11-tools"
good catch. yeah, there should only be 4.

-armin

There should be only four parts in the line separated by commas as
defined here
https://www.yoctoproject.org/docs/2.4.2/ref-manual/ref-manual.html#var-PACKAGECONFIG
<https://www.yoctoproject.org/docs/2.4.2/ref-manual/ref-manual.html#var-PACKAGECONFIG>

 




Re: [meta-security][PATCH 2/2] swtpm: fix build issues of missing expect

Armin Kuster
 

On 9/28/21 11:44 PM, Kristian Klausen wrote:
Den Tue, Sep 28, 2021 at 16:39:09 -0700 skrev Armin Kuster:
Signed-off-by: Armin Kuster <akuster808@...>
---
meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
index 807c02b..d602ee0 100644
--- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
+++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
SECTION = "apps"

# coreutils-native and net-tools-native are reportedly only required for the tests
-DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm json-glib"
+DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm json-glib expect expect-native"
expect is there twice now (+ native). Would expect-native be enough or
do we also need expect?
expect-native only fixes the build issue.


SRCREV = "98187d24fe14851653a7c46eb16e9c5f0b9beaa1"
SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.6 \
@@ -28,7 +28,7 @@ PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
# used by swtpm-create-tpmca (the last two is provided by gnutls)
# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
-PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls, expect bash tpm2-pkcs11-tools"
+PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls, bash tpm2-pkcs11-tools"
expect is needed as a runtime dependency for swtpm-create-tpmca, but I
added it as a recommended dependency as I don't think all people are
interesting in swtpm-create-tpmca working out-of-the-box.
expect should still be here, no?

PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
--
2.25.1



Re: Both x86 and ARM binaries in building phase

Alexander Kanavin
 

The SDKs are designed around having a single toolchain and sysroot, so the answer is no. You need to make two SDKs from two build trees.

Alex


On Thu, 30 Sept 2021 at 14:59, <sepsukkadaa@...> wrote:
Hi,

I'm quite new with yocto project and i did not find the answer from manual. Currently I have project, where i can make SDK with ARM binaries and those works fine. Now i have faced the situation where i need also x86 binaries. Is it possible to make one SDK which includes both ARM and x86 binaries? And if so, is it possible to do like own .bb file to x86 so i could clarify what i need to take in to x86?

BR
Jyri See



Both x86 and ARM binaries in building phase

sepsukkadaa@...
 

Hi,

I'm quite new with yocto project and i did not find the answer from manual. Currently I have project, where i can make SDK with ARM binaries and those works fine. Now i have faced the situation where i need also x86 binaries. Is it possible to make one SDK which includes both ARM and x86 binaries? And if so, is it possible to do like own .bb file to x86 so i could clarify what i need to take in to x86?

BR
Jyri See


Re: Meta-respberrypi socketcan - how do I bring up the interfaces?

Stephen John Smoogen
 

On Thu, 30 Sept 2021 at 05:21, Chris Tapp <opensource@...> wrote:

I am trying to get a Waveshare CAN interface[1] running on an RPi4 using meta-raspberrypi with hardknott.
I am looking at getting one of these so do not have final answers.
However looking at
http://www.port.de/cgi-bin/CAN/CanFaqErrors
https://stackoverflow.com/questions/64892746/socketcan-device-state-stopped
https://www.can-cia.org/can-knowledge/canopen/network-management/

The STOPPED state indicates that the device is detecting some sort of
error and can not continue. My guess is that the iproute2 command
tried to bring things up and found the bus in a non-workable state or
too many errors. For other buses this could be due to non-termination
(aka is the CAN bus connected to anything?) For some buses they have a
'self-termination' if the leads do not have the voltages/resistance on
the end. Others will fail (like removing the end terminator on a
thinwire ethernet network or not having a good loop on one of the
RS422? networks (memory is fuzzy if this is the one or it was a
different one))

Sorry I can't be of more help.

I have added ENABLE_SPI_BUS = “1” and ENABLE_DUAL_CAN = “1” to my local.conf and see the following at boot:

[ 2.858284] CAN device driver interface
[ 2.879431] mcp251x spi0.1 can0: MCP2515 successfully initialized.
[ 2.891019] mcp251x spi0.0 can1: MCP2515 successfully initialized.
[ 176.170231] can: controller area network core
[ 176.178987] can: raw protocol

So, the interfaces are detected.

However, I cannot bring the interfaces up. I am expecting to use something like:

ip link set can0 up type can bitrate 1000000
ifconfig can0 up

But that results in :

ip: either "dev" is duplicate, or "type" is garbage

This appears to be due to the ‘ip’ command not working with Busybox, so I tried adding iproute2 to the image, but the command then hangs the system.

I have tried skipping the ‘ip’ command, but ifconfig then reports:

ifconfig: SIOCSIFFLAGS: Invalid argument

I can get some information for the interface:

ip -s -d link show can0
link/can promiscuity 0 minmtu 0 maxmtu 0
can state STOPPED restart-ms 0
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped missed mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

What do I need to do to bring the interface up?

Chris



[1] https://www.waveshare.com/wiki/2-CH_CAN_HAT

--

Chris Tapp
opensource@...
www.keylevel.com




--
Stephen J Smoogen.
I've seen things you people wouldn't believe. Flame wars in
sci.astro.orion. I have seen SPAM filters overload because of Godwin's
Law. All those moments will be lost in time... like posts on a BBS...
time to shutdown -h now.


kernel debugging in yocto image #linux #make #yocto #cmake #kernel

Amrun Nisha.R
 

Hi,

I have been working on the audio driver. I am trying to access codec driver (TLV320AIC3104) connected to iMX8M over I2C3 and SAI2 lines. While checking for modprobe and modinfo of i2c driver, I'm getting error "
modprobe: can't change directory to '/lib/modules': No such file or directory". Then I checked on the modules.builtin file, the i2cdev and its corresponding .ko files are present in that file. When I checked in the /lib/modules/{user_name}/kernel/drivers, I cant able to get the i2c driver related kernel files. But I can able to view the i2c device in the /sys/bus configuration. Any help or guidance to update the yocto image appropriately to get the i2c working is appreciated.


Thanks,
Amrun


Meta-respberrypi socketcan - how do I bring up the interfaces?

Chris Tapp
 

I am trying to get a Waveshare CAN interface[1] running on an RPi4 using meta-raspberrypi with hardknott.

I have added ENABLE_SPI_BUS = “1” and ENABLE_DUAL_CAN = “1” to my local.conf and see the following at boot:

[ 2.858284] CAN device driver interface
[ 2.879431] mcp251x spi0.1 can0: MCP2515 successfully initialized.
[ 2.891019] mcp251x spi0.0 can1: MCP2515 successfully initialized.
[ 176.170231] can: controller area network core
[ 176.178987] can: raw protocol

So, the interfaces are detected.

However, I cannot bring the interfaces up. I am expecting to use something like:

ip link set can0 up type can bitrate 1000000
ifconfig can0 up

But that results in :

ip: either "dev" is duplicate, or "type" is garbage

This appears to be due to the ‘ip’ command not working with Busybox, so I tried adding iproute2 to the image, but the command then hangs the system.

I have tried skipping the ‘ip’ command, but ifconfig then reports:

ifconfig: SIOCSIFFLAGS: Invalid argument

I can get some information for the interface:

ip -s -d link show can0
link/can promiscuity 0 minmtu 0 maxmtu 0
can state STOPPED restart-ms 0
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped missed mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

What do I need to do to bring the interface up?

Chris



[1] https://www.waveshare.com/wiki/2-CH_CAN_HAT

--

Chris Tapp
opensource@...
www.keylevel.com


[meta-gplv2]grub-0.97 configure failed in x86

zangrc
 

Hello!
When I compiled grub-0.97 of meta-gplv2 on X86, I failed in the do_configure phase. Can you help me solve this problem? Thank you.
Cheers,
Zang Ruochen

| checking whether i686-poky-linux-objcopy works for absolute addresses... configure: error: i686-poky-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -Wdate-time --sysroot=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot cannot link at address 2000
| ERROR: configure failed

tmp/work/core2-32-poky-linux/grub/0.97-r6/build/config.log:
configure:5466: i686-poky-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -Wdate-time --sysroot=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6=/usr/src/debug/grub/0.97-r6 -fdebug-prefix-map=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6=/usr/src/debug/grub/0.97-r6 -fdebug-prefix-map=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot= -fdebug-prefix-map=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot-native= -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 conftest.o -o conftest.exec
/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: warning: cannot find entry symbol _start; defaulting to 0000000000002000
/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: conftest.exec: error: PHDR segment not covered by LOAD segment
collect2: error: ld returned 1 exit status
configure:5469: $? = 1
configure:5472: error: i686-poky-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -Wdate-time --sysroot=/ubinux-dev/ubinux001/contribution/build_x86/tmp/work/core2-32-poky-linux/grub/0.97-r6/recipe-sysroot cannot link at address 2000


CFP is now open for the next Yocto Project Summit 2021.11

Nicolas Dechesne
 

Dear all,

The next Yocto Project (virtual) Summit will take place on Nov 30 -
Dec 2, 2021. While we are finalizing the registration tools, we've
already opened the CFP, and we are, as always, looking for great talks
and speakers ;)

For more information about the event please check [1]. When you are
ready to submit your presentation, go to [2].

Please as much as possible, do not reply-all since I've cross posted
on several lists! If you have any questions about this event please
send emails to conferences@....

cheers!

[1] https://yoctoproject.org/summit
[2] https://pretalx.com/yocto-project-summit-2021-11/cfp


#systemd #systemd

mrkozmic@...
 

Hi,
Is it possible to set systemd environment variables from a recipe to do the same as 'systemctl set-environment SOME_ENV_VAR'?


Re: googletest shared library

Lijun Chen
 

Thanks, this also works for target image.


For SDK image, turns out we have to change the line:

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

to

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


to include the header files.


Thanks,

Lijun


From: Federico Pellegrin <fede@...>
Sent: Thursday, September 23, 2021 10:10:55 PM
To: Lijun Chen
Cc: yocto@...
Subject: Re: [yocto] googletest shared library
 

Hi,
Regarding the INSANE_SKIP: as that files get packed in the "-dev" package, you should probably then accordingly have:

INSANE_SKIP_${PN}-dev += "dev-elf"

Cheers,
Federico

Il giorno gio 23 set 2021 alle ore 16:46 Lijun Chen <lijchen@...> ha scritto:

I tried INSANE_SKIP_${PN} += "dev-elf" and "dev-so", still got the QA error:

ERROR: googletest-1.10.0-r0 do_package_qa: QA Issue: -dev package googletest-dev contains non-symlink .so '/usr/lib/libgmock.so'
-dev package googletest-dev contains non-symlink .so '/usr/lib/libgtest_main.so'
-dev package googletest-dev contains non-symlink .so '/usr/lib/libgmock_main.so'
-dev package googletest-dev contains non-symlink .so '/usr/lib/libgtest.so' [dev-elf]
ERROR: googletest-1.10.0-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: Logfile of failure stored in: /home/lijchen/hdd/ivdp/yocto/imx8/imx-yocto-bsp-Hardknott/build-imx8qmmek/tmp/work/cortexa72-cortexa53-crypto-poky-linux/googletest/1.10.0-r0/temp/log.do_package_qa.24701
ERROR: Task (/home/lijchen/hdd/ivdp/yocto/imx8/imx-yocto-bsp-Hardknott/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_git.bb:do_package_qa) failed with exit code '1'

I also tried adding " -DCMAKE_INSTALL_PREFIX=/usr/local" to EXTRA_OEMAKE, and got the following error:

ERROR: googletest-1.10.0-r0 do_package: QA Issue: googletest: Files/directories were installed but not shipped in any package:
  /usr/local/include
  /usr/local/lib/libgmock.so
  /usr/local/lib/libgtest_main.so
  /usr/local/lib/libgmock_main.so
  /usr/local/lib/libgtest.so
  /usr/local/lib/cmake
  /usr/local/lib/pkgconfig
  /usr/local/lib/cmake/GTest
  /usr/local/lib/cmake/GTest/GTestTargets.cmake
  /usr/local/lib/cmake/GTest/GTestConfigVersion.cmake
  /usr/local/lib/cmake/GTest/GTestConfig.cmake
  /usr/local/lib/cmake/GTest/GTestTargets-noconfig.cmake
  /usr/local/lib/pkgconfig/gtest_main.pc
  /usr/local/lib/pkgconfig/gtest.pc
  /usr/local/lib/pkgconfig/gmock_main.pc
  /usr/local/lib/pkgconfig/gmock.pc
  /usr/local/include/gtest
  /usr/local/include/gmock
  /usr/local/include/gtest/gtest_prod.h
  /usr/local/include/gtest/gtest-test-part.h
  /usr/local/include/gtest/gtest_pred_impl.h
  /usr/local/include/gtest/gtest-matchers.h
  /usr/local/include/gtest/gtest-printers.h
  /usr/local/include/gtest/gtest.h
  /usr/local/include/gtest/gtest-param-test.h
  /usr/local/include/gtest/gtest-death-test.h
  /usr/local/include/gtest/gtest-typed-test.h
  /usr/local/include/gtest/gtest-message.h
  /usr/local/include/gtest/gtest-spi.h
  /usr/local/include/gtest/internal
  /usr/local/include/gtest/internal/gtest-death-test-internal.h
  /usr/local/include/gtest/internal/gtest-filepath.h
  /usr/local/include/gtest/internal/gtest-param-util.h
  /usr/local/include/gtest/internal/gtest-string.h
  /usr/local/include/gtest/internal/gtest-type-util.h
  /usr/local/include/gtest/internal/gtest-internal.h
  /usr/local/include/gtest/internal/gtest-type-util.h.pump
  /usr/local/include/gtest/internal/gtest-port-arch.h
  /usr/local/include/gtest/internal/gtest-port.h
  /usr/local/include/gtest/internal/custom
  /usr/local/include/gtest/internal/custom/gtest-printers.h
  /usr/local/include/gtest/internal/custom/gtest.h
  /usr/local/include/gtest/internal/custom/README.md
  /usr/local/include/gtest/internal/custom/gtest-port.h
  /usr/local/include/gmock/gmock-function-mocker.h
  /usr/local/include/gmock/gmock-generated-function-mockers.h
  /usr/local/include/gmock/gmock-generated-actions.h.pump
  /usr/local/include/gmock/gmock-matchers.h
  /usr/local/include/gmock/gmock-generated-matchers.h
  /usr/local/include/gmock/gmock-more-matchers.h
  /usr/local/include/gmock/gmock.h
  /usr/local/include/gmock/gmock-generated-actions.h
  /usr/local/include/gmock/gmock-nice-strict.h
  /usr/local/include/gmock/gmock-spec-builders.h
  /usr/local/include/gmock/gmock-more-actions.h
  /usr/local/include/gmock/gmock-generated-function-mockers.h.pump
  /usr/local/include/gmock/gmock-cardinalities.h
  /usr/local/include/gmock/gmock-actions.h
  /usr/local/include/gmock/gmock-generated-matchers.h.pump
  /usr/local/include/gmock/internal
  /usr/local/include/gmock/internal/gmock-port.h
  /usr/local/include/gmock/internal/gmock-pp.h
  /usr/local/include/gmock/internal/gmock-internal-utils.h
  /usr/local/include/gmock/internal/custom
  /usr/local/include/gmock/internal/custom/gmock-port.h
  /usr/local/include/gmock/internal/custom/gmock-generated-actions.h.pump
  /usr/local/include/gmock/internal/custom/gmock-matchers.h
  /usr/local/include/gmock/internal/custom/gmock-generated-actions.h
  /usr/local/include/gmock/internal/custom/README.md
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
googletest: 69 installed and not shipped files. [installed-vs-shipped]
ERROR: googletest-1.10.0-r0 do_package: Fatal QA errors found, failing task.



From: Federico Pellegrin <fede@...>
Sent: Thursday, September 23, 2021 10:27:39 AM
To: Lijun Chen
Cc: yocto@...
Subject: Re: [yocto] googletest shared library
 

Hi,
To skip the QA you can use:

INSANE_SKIP_${PN} += "dev-elf"

(or any QA part you'd like to skip, ie. dev-elf or dev-so ...)

Cheers,
Federico



Il giorno gio 23 set 2021 alle ore 15:33 Lijun Chen <lijchen@...> ha scritto:

Hi,


If I switch to the default setting of the googletest recipe, the header files are included in the SDK image. However, the libgtest libraries are static.

Looks FILES_SOLIBSDEV = "" disables googletest-dev to be included in the SDK.


Is there a way to change the library to dynamic and keep the header files? i.e. just add EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON " but skip the do_package_qa part to avoid the QA issue due to un-versioned library?


Thanks,

Lijun




From: yocto@... <yocto@...> on behalf of Lijun Chen <lijchen@...>
Sent: Wednesday, September 22, 2021 1:45 PM
To: Khem Raj; yocto@...
Subject: Re: [yocto] googletest shared library
 

Tried adding googletest to TOOLCHAIN_TARGET_TASK. The gtest .h files are still not showing up.

Thanks,


From: Khem Raj <raj.khem@...>
Sent: Wednesday, September 22, 2021 11:28:05 AM
To: Lijun Chen; yocto@...
Subject: Re: [yocto] googletest shared library
 
The .h files will be in dev pkg in this case googletest-dev
what happens if you add googletest to TOOLCHAIN_TARGET_TASK

On 9/22/21 6:18 AM, Lijun Chen wrote:
> Hi,
>
>
> Now I included googletest to the IMAGE_INSTALL in my image file, and
> built both board image and SDK image. I can see libgtest.so is available
> in both images. However, gtest/gtest.h is a not present in SDK. How do I
> add the header files to the SDK image? Looks the following lines affect
> that?
>
> SOLIBS = ".so"
> FILES_SOLIBSDEV = ""
>
> Thanks,
> Lijun
>
> ------------------------------------------------------------------------
> *From:* yocto@... <yocto@...> on
> behalf of Lijun Chen <lijchen@...>
> *Sent:* Tuesday, September 21, 2021 3:50 PM
> *To:* Konrad Weihmann; yocto@...
> *Subject:* Re: [yocto] googletest shared library
>
> Thanks Konrad. That worked.
>
> ------------------------------------------------------------------------
> *From:* Konrad Weihmann <kweihmann@...>
> *Sent:* Tuesday, September 21, 2021 10:26:19 AM
> *To:* Lijun Chen; yocto@...
> *Subject:* Re: [yocto] googletest shared library
>
> On 21.09.21 16:18, Lijun Chen wrote:
>> Hi,
>>
>> I would like to include libgtest.so into my Yocto image. I added
>> googletest to IMAGE_INSTALL and added the following line to
>> sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_git.bb:
>>
>> EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON "
>>
>>
>> The shared libraries were built successfully. However, there are errors
>> in do_package_qc as following:
>>
>>
>> ERROR: googletest-1.10.0-r0 do_package_qa: QA Issue: -dev package
>> googletest-dev contains non-symlink .so '/usr/lib/libgmock.so'
>> -dev package googletest-dev contains non-symlink .so
>> '/usr/lib/libgtest_main.so'
>> -dev package googletest-dev contains non-symlink .so
>> '/usr/lib/libgmock_main.so'
>> -dev package googletest-dev contains non-symlink .so
>> '/usr/lib/libgtest.so' [dev-elf]
>> ERROR: googletest-1.10.0-r0 do_package_qa: QA run found fatal errors.
>> Please consider fixing them.
>
> https://urldefense.com/v3/__http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-graphics/spir/spirv-tools_2021.2.bb*n34__;Iw!!COg3wY07Hnb7!4NI6d6tXUoxCQFleF-343dfbdFGnkZnqrYRVg3nYTCBoGJTY9-K0NANM4iMsNNleww$
> <https://urldefense.com/v3/__http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-graphics/spir/spirv-tools_2021.2.bb*n34__;Iw!!COg3wY07Hnb7!4NI6d6tXUoxCQFleF-343dfbdFGnkZnqrYRVg3nYTCBoGJTY9-K0NANM4iMsNNleww$>
>
> (and the next lines) might give you a hint what to do in this case.
> Although one could also consider that's something that needs to be fixed
> in the installation script of googletest, as versioned libraries are the
> expected default
>
>>
>>
>> Any idea to fix this?
>>
>>
>> Thanks,
>>
>> Lijun
>>
>>
>> ------------------------------------------------------------------------
>> This transmission (including any attachments) may contain confidential
>> information, privileged material (including material protected by the
>> solicitor-client or other applicable privileges), or constitute
>> non-public information. Any use of this information by anyone other than
>> the intended recipient is prohibited. If you have received this
>> transmission in error, please immediately reply to the sender and delete
>> this information from your system. Use, dissemination, distribution, or
>> reproduction of this transmission by unintended recipients is not
>> authorized and may be unlawful.
>>
>>
>>
>>
> ------------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute
> non-public information. Any use of this information by anyone other than
> the intended recipient is prohibited. If you have received this
> transmission in error, please immediately reply to the sender and delete
> this information from your system. Use, dissemination, distribution, or
> reproduction of this transmission by unintended recipients is not
> authorized and may be unlawful.
> ------------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute
> non-public information. Any use of this information by anyone other than
> the intended recipient is prohibited. If you have received this
> transmission in error, please immediately reply to the sender and delete
> this information from your system. Use, dissemination, distribution, or
> reproduction of this transmission by unintended recipients is not
> authorized and may be unlawful.
>
>
>
>

This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.




This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

2921 - 2940 of 57813