Date   

[meta-security][PATCH 2/2] swtpm: update to 0.5.2

Armin Kuster
 

Add python package

Signed-off-by: Armin Kuster <akuster808@...>
---
.../swtpm/{swtpm_0.2.0.bb => swtpm_0.5.2.bb} | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
rename meta-tpm/recipes-tpm/swtpm/{swtpm_0.2.0.bb => swtpm_0.5.2.bb} (78%)

diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.2.0.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb
similarity index 78%
rename from meta-tpm/recipes-tpm/swtpm/swtpm_0.2.0.bb
rename to meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb
index 35c77c8..b7ff2ad 100644
--- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.2.0.bb
+++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb
@@ -3,22 +3,21 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
SECTION = "apps"

-DEPENDS = "libtasn1 expect socat glib-2.0 net-tools-native libtpm libtpm-native"
+DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm libtpm-native"

# configure checks for the tools already during compilation and
# then swtpm_setup needs them at runtime
DEPENDS += "tpm-tools-native expect-native socat-native"

-SRCREV = "39673a0139b0ee14a0109aba50a0635592c672c4"
-SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-${PV} \
- file://fix_fcntl_h.patch \
+SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464"
+SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \
file://ioctl_h.patch \
"
PE = "1"

S = "${WORKDIR}/git"

-inherit autotools pkgconfig
+inherit autotools pkgconfig python3-dir
PARALLEL_MAKE = ""

TSS_USER="tss"
@@ -35,18 +34,20 @@ PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"

EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"

-export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}"
-
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system ${TSS_USER}"
USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \
--no-create-home --shell /bin/false ${BPN}"

+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${nonarch_libdir}/${PYTHON_PN}/dist-packages/* "
+
PACKAGE_BEFORE_PN = "${PN}-cuse"
FILES_${PN}-cuse = "${bindir}/swtpm_cuse"

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

-RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools"
+RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools python3 python3-cryptography python3-twisted"

BBCLASSEXTEND = "native nativesdk"
--
2.25.1


[meta-security][PATCH 1/2] tpm2-tss-engine: update 1.1.0

Armin Kuster
 

LIC_FILES_CHKSUM hash changed between branches.

Signed-off-by: Armin Kuster <akuster808@...>
---
.../{tpm2-tss-engine_1.0.1.bb => tpm2-tss-engine_1.1.0.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta-tpm/recipes-tpm2/tpm2-tss-engine/{tpm2-tss-engine_1.0.1.bb => tpm2-tss-engine_1.1.0.bb} (88%)

diff --git a/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.0.1.bb b/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.1.0.bb
similarity index 88%
rename from meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.0.1.bb
rename to meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.1.0.bb
index ebd6d53..5395695 100644
--- a/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.0.1.bb
+++ b/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.1.0.bb
@@ -2,14 +2,14 @@ SUMMARY = "The tpm2-tss-engine project implements a cryptographic engine for Ope
DESCRIPTION = "The tpm2-tss-engine project implements a cryptographic engine for OpenSSL for Trusted Platform Module (TPM 2.0) using the tpm2-tss software stack that follows the Trusted Computing Groups (TCG) TPM Software Stack (TSS 2.0). It uses the Enhanced System API (ESAPI) interface of the TSS 2.0 for downwards communication. It supports RSA decryption and signatures as well as ECDSA signatures."

LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3fb0047fd29391478a71e8e6101c76eb"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7b3ab643b9ce041de515d1ed092a36d4"

SECTION = "security/tpm"

DEPENDS = "autoconf-archive-native bash-completion libtss2 libgcrypt openssl"

-SRCREV = "24f1383cc6befde44d6f01a51ea653304d844ffd"
-SRC_URI = "git://github.com/tpm2-software/tpm2-tss-engine.git;branch=v1.0.x"
+SRCREV = "6f387a4efe2049f1b4833e8f621c77231bc1eef4"
+SRC_URI = "git://github.com/tpm2-software/tpm2-tss-engine.git;branch=v1.1.x"

inherit autotools-brokensep pkgconfig systemd

--
2.25.1


Re: does current bitbaking of core-image-minimal still need docbook stuff?

Robert P. J. Day
 

On Fri, 19 Mar 2021, Mike Looijmans wrote:


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@...
W: www.topic.nl

Please consider the environment before printing this e-mail
On 19-03-2021 11:45, Robert P. J. Day via lists.yoctoproject.org wrote:
On Fri, 19 Mar 2021, Nicolas Dechesne wrote:

On Fri, Mar 19, 2021 at 10:47 AM Robert P. J. Day <rpjday@...>
wrote:

testing building qemuarm64 core-image-minimal from scratch, and
noticed it fetching for docbook-xml and docbook-xsl stuff ... is there
something that still needs docbook support? i'm about to take a quick
look to see what's demanding that, does anyone know?
It's not related to yp-docs at least. most likely some recipes that
use docbook for their docs/man pages, no?
most likely, but as i'm explicitly not installing any documentation,
i'm now poking around to see what insists on building that for no
apparent reason.
My favorite method for that is to just remove the recipe that provides it and
then see where it breaks...
it appears (after a *very* cursory investigation) that
shared-mime-info-native is included, which drags in xmlto-native,
which then drags in docbook stuff. i'll confirm that later.

rday


Re: does current bitbaking of core-image-minimal still need docbook stuff?

Mike Looijmans
 

Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@...
W: www.topic.nl

Please consider the environment before printing this e-mail
On 19-03-2021 11:45, Robert P. J. Day via lists.yoctoproject.org wrote:
On Fri, 19 Mar 2021, Nicolas Dechesne wrote:

On Fri, Mar 19, 2021 at 10:47 AM Robert P. J. Day <rpjday@...> wrote:

testing building qemuarm64 core-image-minimal from scratch, and
noticed it fetching for docbook-xml and docbook-xsl stuff ... is there
something that still needs docbook support? i'm about to take a quick
look to see what's demanding that, does anyone know?
It's not related to yp-docs at least. most likely some recipes that
use docbook for their docs/man pages, no?
most likely, but as i'm explicitly not installing any documentation,
i'm now poking around to see what insists on building that for no
apparent reason.
My favorite method for that is to just remove the recipe that provides it and then see where it breaks...


Re: does current bitbaking of core-image-minimal still need docbook stuff?

Robert P. J. Day
 

On Fri, 19 Mar 2021, Nicolas Dechesne wrote:

On Fri, Mar 19, 2021 at 10:47 AM Robert P. J. Day <rpjday@...> wrote:


testing building qemuarm64 core-image-minimal from scratch, and
noticed it fetching for docbook-xml and docbook-xsl stuff ... is there
something that still needs docbook support? i'm about to take a quick
look to see what's demanding that, does anyone know?
It's not related to yp-docs at least. most likely some recipes that
use docbook for their docs/man pages, no?
most likely, but as i'm explicitly not installing any documentation,
i'm now poking around to see what insists on building that for no
apparent reason.

rday


Re: does current bitbaking of core-image-minimal still need docbook stuff?

Nicolas Dechesne
 

On Fri, Mar 19, 2021 at 10:47 AM Robert P. J. Day <rpjday@...> wrote:


testing building qemuarm64 core-image-minimal from scratch, and
noticed it fetching for docbook-xml and docbook-xsl stuff ... is there
something that still needs docbook support? i'm about to take a quick
look to see what's demanding that, does anyone know?
It's not related to yp-docs at least. most likely some recipes that
use docbook for their docs/man pages, no?


rday



is there a recent explanation of tricks you can play with MACHINEOVERRIDES?

Robert P. J. Day
 

years ago, i asked about how to support a small set of
closely-related targets using MACHINEOVERRIDES to define how to apply
patches in a (somewhat) hierarchical fashion:

https://www.yoctoproject.org/pipermail/yocto/2016-March/028922.html

is there any current BSP that does something like that? and is this
sort of thing worth expanding on and adding to one of the manuals?

rday

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================


does current bitbaking of core-image-minimal still need docbook stuff?

Robert P. J. Day
 

testing building qemuarm64 core-image-minimal from scratch, and
noticed it fetching for docbook-xml and docbook-xsl stuff ... is there
something that still needs docbook support? i'm about to take a quick
look to see what's demanding that, does anyone know?

rday


Avahi in yocto #yocto

lavkhush2208@...
 

Hello Guys
i have installed avahi-0.8 version using gatesgarth version, its compiled successfully but i am facing an issue with TriggeredBy: [[0;1;32m●[[0m avahi-daemon.socket, when i restart my service.

[[0;1;32m●[[0m avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
     Active: [[0;1;32mactive (running)[[0m since Wed 2021-03-17 09:39:36 UTC; 3min 16s ago
TriggeredBy: [[0;1;32m●[[0m avahi-daemon.socket
   Main PID: 15022 (avahi-daemon)
     Status: "avahi-daemon 0.8 starting up."
      Tasks: 2 (limit: 9561)
     Memory: 928.0K
     CGroup: /system.slice/avahi-daemon.service
             ├─15022 avahi-daemon: running [robot.local]
             └─15023 avahi-daemon: chroot helper

Mar 17 09:39:36 robot systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Mar 17 09:39:36 robot avahi-daemon[15022]: Process 14994 died: No such process; trying to remove PID
file. (/run/avahi-daemon//pid)
Mar 17 09:39:36 robot systemd[1]: Started Avahi mDNS/DNS-SD Stack.


if something is missing, please update me sothat i can modify.

T&R
lavkhush


Re: spidev.c ?

Zoran
 

Hello John,

It seems that your target is configured correctly. Since you have all
the components you should and must have as SPI framework.

Namely I was looking for /sys/bus (since you must have an SPI bus
driver), and then /sys/class (since as my best understanding is that
SPI is a master/slave device), you must have class/). Others are
assumed, you added debug directories.

When I separately build spidev.c as an .ko and try
loading it, I get: "Device or resource busy"
This is understandable, since you already have included spidev.ko as
menuconfig value Y, so it is already present in the kernel, but as a
built-in part of the kernel (my best guess).

root@arria10:~# lsmod
Module Size Used by
spi_altera 16384 0
spidev 20480 0
I see that you did change the menuconfig, and made spidev to be M.

What I also see is that there are no dependencies between spidev and
spi_altera. This is what you really wanted?

But there are NO udev files for the SPI devices
defined in the DTSI file.
Could you, please, better explain this sentence? In more details (as
much as you can)?

Thank you,
Zee
_______


On Thu, Mar 18, 2021 at 10:07 PM jchludzinski <jchludzinski@...> wrote:

root@arria10:~# find /sys/ -name 'spi*'

/sys/kernel/debug/clk/spi_m_clk
/sys/kernel/debug/tracing/events/spi
/sys/kernel/debug/tracing/events/spi/spi_controller_idle
/sys/kernel/debug/tracing/events/spi/spi_controller_busy
/sys/kernel/debug/tracing/events/spi/spi_message_submit
/sys/kernel/debug/tracing/events/spi/spi_message_start
/sys/kernel/debug/tracing/events/spi/spi_message_done
/sys/kernel/debug/tracing/events/spi/spi_transfer_start
/sys/kernel/debug/tracing/events/spi/spi_transfer_stop
/sys/kernel/debug/regmap/spi0.0
/sys/devices/platform/soc/ffda5000.spi/spi_master
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_async
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync_immediate
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_async
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync_immediate
/sys/class/spidev
/sys/class/spi_master
/sys/class/spi_master/spi0
/sys/firmware/devicetree/base/__symbols__/spi2
/sys/firmware/devicetree/base/__symbols__/spi0
/sys/firmware/devicetree/base/__symbols__/spin_ctrl_1
/sys/firmware/devicetree/base/__symbols__/spi_m_clk
/sys/firmware/devicetree/base/__symbols__/spi1
/sys/firmware/devicetree/base/__symbols__/spin_ctrl_2
/sys/firmware/devicetree/base/soc/spi@ff809000
/sys/firmware/devicetree/base/soc/spi@ffda5000
/sys/firmware/devicetree/base/soc/spi@ffda5000/resource-manager@0/spi-max-frequency
/sys/firmware/devicetree/base/soc/clkmgr@ffd04000/clocks/spi_m_clk
/sys/firmware/devicetree/base/soc/spi@ffda4000
/sys/firmware/devicetree/base/spi@0xc00c0800
/sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0
/sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0/spi-max-frequency
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-controller
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-rph
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller-names
/sys/firmware/devicetree/base/testcase-data-2/substation@100/motor-1/spin
/sys/bus/platform/drivers/spi_altera
/sys/bus/spi
/sys/bus/spi/devices/spi0.0
/sys/bus/spi/drivers/spi-nor
/sys/bus/spi/drivers/altr_a10sr/spi0.0
/sys/bus/spi/drivers/spidev
/sys/module/spidev
/sys/module/spidev/drivers/spi:spidev
/sys/module/spi_altera




On 2021-03-18 03:44, Zoran wrote:

I am guessing here.... But what do you have while executing the
following command being in /sys
as root?

root@arm:/sys# find . -name spi*

Zee
_______

On Wed, Mar 17, 2021 at 5:41 PM jchludzinski via
lists.yoctoproject.org
<jchludzinski=vivaldi.net@...> wrote:


In the YOCTO/Linux source tree there's drivers/spi/ which has all the source for SPI drivers. There's only 1 file, spidev.c, which has:

static int __init spidev_init(void)
{
int status;

/* Claim our 256 reserved device numbers. Then register a class
* that will key udev/mdev to add/remove /dev nodes. Last, register
* the driver which manages those device numbers.
*/
BUILD_BUG_ON(N_SPI_MINORS > 256);
status = register_chrdev(SPIDEV_MAJOR, "spi", &spidev_fops);
if (status < 0)
return status;

spidev_class = class_create(THIS_MODULE, "spidev");
if (IS_ERR(spidev_class)) {
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
return PTR_ERR(spidev_class);
}

status = spi_register_driver(&spidev_spi_driver);
if (status < 0) {
class_destroy(spidev_class);
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
}
return status;
}
module_init(spidev_init);

... for creating device files in udev.

So when I use 'make nconfig' to specifiy that I want a loadable module for the ALTERA SPI driver, why don't I see a spidev.o file in drivers/spi/ ?

How does spi-altera.ko create device files without a call to register_chrdev(...).

How is it a loadable module without module_init(...)?

When I separately build spidev.c as an .ko and try loading it, I get: "Device or resourse busy"

---John





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52762): https://lists.yoctoproject.org/g/yocto/message/52762
Mute This Topic: https://lists.yoctoproject.org/mt/81407811/5071304
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[jchludzinski@...]


Re: spidev.c ?

jchludzinski
 

But there are NO udev files for the SPI devices defined in the DTSI file.
 
 
On 2021-03-18 17:12, jchludzinski via lists.yoctoproject.org wrote:

That's with:

root@arria10:~# lsmod
Module                  Size  Used by
spi_altera             16384  0
spidev                 20480  0

On 2021-03-18 17:07, jchludzinski via lists.yoctoproject.org wrote:

root@arria10:~# find /sys/ -name 'spi*'

/sys/kernel/debug/clk/spi_m_clk
/sys/kernel/debug/tracing/events/spi
/sys/kernel/debug/tracing/events/spi/spi_controller_idle
/sys/kernel/debug/tracing/events/spi/spi_controller_busy
/sys/kernel/debug/tracing/events/spi/spi_message_submit
/sys/kernel/debug/tracing/events/spi/spi_message_start
/sys/kernel/debug/tracing/events/spi/spi_message_done
/sys/kernel/debug/tracing/events/spi/spi_transfer_start
/sys/kernel/debug/tracing/events/spi/spi_transfer_stop
/sys/kernel/debug/regmap/spi0.0
/sys/devices/platform/soc/ffda5000.spi/spi_master
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0

/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_async/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync_immediate/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_async/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync_immediate
/sys/class/spidev
/sys/class/spi_master
/sys/class/spi_master/spi0
/sys/firmware/devicetree/base/__symbols__/spi2
/sys/firmware/devicetree/base/__symbols__/spi0
/sys/firmware/devicetree/base/__symbols__/spin_ctrl_1
/sys/firmware/devicetree/base/__symbols__/spi_m_clk
/sys/firmware/devicetree/base/__symbols__/spi1
/sys/firmware/devicetree/base/__symbols__/spin_ctrl_2
/sys/firmware/devicetree/base/soc/spi@ff809000
/sys/firmware/devicetree/base/soc/spi@ffda5000

/sys/firmware/devicetree/base/soc/spi@ffda5000/resource-manager@0/spi-max-frequency
/sys/firmware/devicetree/base/soc/clkmgr@ffd04000/clocks/spi_m_clk
/sys/firmware/devicetree/base/soc/spi@ffda4000
/sys/firmware/devicetree/base/spi@0xc00c0800
/sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0

/sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0/spi-max-frequency/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-controller/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-rph/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller-names/sys/firmware/devicetree/base/testcase-data-2/substation@100/motor-1/spin
/sys/bus/platform/drivers/spi_altera
/sys/bus/spi
/sys/bus/spi/devices/spi0.0
/sys/bus/spi/drivers/spi-nor
/sys/bus/spi/drivers/altr_a10sr/spi0.0
/sys/bus/spi/drivers/spidev
/sys/module/spidev
/sys/module/spidev/drivers/spi:spidev
/sys/module/spi_altera

On 2021-03-18 03:44, Zoran wrote:

I am guessing here.... But what do you have while executing the
following command being in /sys
as root?

root@arm:/sys# find . -name spi*

Zee
_______

On Wed, Mar 17, 2021 at 5:41 PM jchludzinski via
lists.yoctoproject.org
<jchludzinski=vivaldi.net@...> wrote:

In the YOCTO/Linux source tree there's drivers/spi/ which has all
the source for SPI drivers. There's only 1 file, spidev.c, which
has:

static int __init spidev_init(void)
{
int status;

/* Claim our 256 reserved device numbers.  Then register a
class
* that will key udev/mdev to add/remove /dev nodes.
Last, register
* the driver which manages those device numbers.
*/
BUILD_BUG_ON(N_SPI_MINORS > 256);
status = register_chrdev(SPIDEV_MAJOR, "spi",
&spidev_fops);
if (status < 0)
return status;

spidev_class = class_create(THIS_MODULE, "spidev");
if (IS_ERR(spidev_class)) {
unregister_chrdev(SPIDEV_MAJOR,
spidev_spi_driver.driver.name);
return PTR_ERR(spidev_class);
}

status = spi_register_driver(&spidev_spi_driver);
if (status < 0) {
class_destroy(spidev_class);
unregister_chrdev(SPIDEV_MAJOR,
spidev_spi_driver.driver.name);
}
return status;
}
module_init(spidev_init);

... for creating device files in udev.

So when I use 'make nconfig' to specifiy that I want a loadable
module for the ALTERA SPI driver, why don't I see a spidev.o file
in drivers/spi/ ?

How does spi-altera.ko create device files without a call to
register_chrdev(...).

How is it a loadable module without module_init(...)?

When I separately build spidev.c as an .ko and try loading it, I
get: "Device or resourse busy"

---John

Links: You receive all messages sent to this group.
View/Reply Online (#52767):
https://lists.yoctoproject.org/g/yocto/message/52767
Mute This Topic: https://lists.yoctoproject.org/mt/81407811/5071304
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[jchludzinski@...]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52768): https://lists.yoctoproject.org/g/yocto/message/52768
Mute This Topic: https://lists.yoctoproject.org/mt/81407811/5071304
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[jchludzinski@...]


Re: spidev.c ?

jchludzinski
 

That's with:
root@arria10:~# lsmod
Module                  Size  Used by
spi_altera             16384  0
spidev                 20480  0


On 2021-03-18 17:07, jchludzinski via lists.yoctoproject.org wrote:

root@arria10:~# find /sys/ -name 'spi*'

/sys/kernel/debug/clk/spi_m_clk
/sys/kernel/debug/tracing/events/spi
/sys/kernel/debug/tracing/events/spi/spi_controller_idle
/sys/kernel/debug/tracing/events/spi/spi_controller_busy
/sys/kernel/debug/tracing/events/spi/spi_message_submit
/sys/kernel/debug/tracing/events/spi/spi_message_start
/sys/kernel/debug/tracing/events/spi/spi_message_done
/sys/kernel/debug/tracing/events/spi/spi_transfer_start
/sys/kernel/debug/tracing/events/spi/spi_transfer_stop
/sys/kernel/debug/regmap/spi0.0
/sys/devices/platform/soc/ffda5000.spi/spi_master
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_async
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync_immediate
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_async
/sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync_immediate
/sys/class/spidev
/sys/class/spi_master
/sys/class/spi_master/spi0
/sys/firmware/devicetree/base/__symbols__/spi2
/sys/firmware/devicetree/base/__symbols__/spi0
/sys/firmware/devicetree/base/__symbols__/spin_ctrl_1
/sys/firmware/devicetree/base/__symbols__/spi_m_clk
/sys/firmware/devicetree/base/__symbols__/spi1
/sys/firmware/devicetree/base/__symbols__/spin_ctrl_2
/sys/firmware/devicetree/base/soc/spi@ff809000
/sys/firmware/devicetree/base/soc/spi@ffda5000
/sys/firmware/devicetree/base/soc/spi@ffda5000/resource-manager@0/spi-max-frequency
/sys/firmware/devicetree/base/soc/clkmgr@ffd04000/clocks/spi_m_clk
/sys/firmware/devicetree/base/soc/spi@ffda4000
/sys/firmware/devicetree/base/spi@0xc00c0800
/sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0
/sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0/spi-max-frequency
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-controller
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-rph
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller
/sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller-names
/sys/firmware/devicetree/base/testcase-data-2/substation@100/motor-1/spin
/sys/bus/platform/drivers/spi_altera
/sys/bus/spi
/sys/bus/spi/devices/spi0.0
/sys/bus/spi/drivers/spi-nor
/sys/bus/spi/drivers/altr_a10sr/spi0.0
/sys/bus/spi/drivers/spidev
/sys/module/spidev
/sys/module/spidev/drivers/spi:spidev
/sys/module/spi_altera

On 2021-03-18 03:44, Zoran wrote:

I am guessing here.... But what do you have while executing the
following command being in /sys
as root?

root@arm:/sys# find . -name spi*

Zee
_______

On Wed, Mar 17, 2021 at 5:41 PM jchludzinski via
lists.yoctoproject.org
<jchludzinski=vivaldi.net@...> wrote:

In the YOCTO/Linux source tree there's drivers/spi/ which has all
the source for SPI drivers. There's only 1 file, spidev.c, which
has:

static int __init spidev_init(void)
{
int status;

/* Claim our 256 reserved device numbers.  Then register a
class
* that will key udev/mdev to add/remove /dev nodes.
Last, register
* the driver which manages those device numbers.
*/
BUILD_BUG_ON(N_SPI_MINORS > 256);
status = register_chrdev(SPIDEV_MAJOR, "spi",
&spidev_fops);
if (status < 0)
return status;

spidev_class = class_create(THIS_MODULE, "spidev");
if (IS_ERR(spidev_class)) {
unregister_chrdev(SPIDEV_MAJOR,
spidev_spi_driver.driver.name);
return PTR_ERR(spidev_class);
}

status = spi_register_driver(&spidev_spi_driver);
if (status < 0) {
class_destroy(spidev_class);
unregister_chrdev(SPIDEV_MAJOR,
spidev_spi_driver.driver.name);
}
return status;
}
module_init(spidev_init);

... for creating device files in udev.

So when I use 'make nconfig' to specifiy that I want a loadable
module for the ALTERA SPI driver, why don't I see a spidev.o file
in drivers/spi/ ?

How does spi-altera.ko create device files without a call to
register_chrdev(...).

How is it a loadable module without module_init(...)?

When I separately build spidev.c as an .ko and try loading it, I
get: "Device or resourse busy"

---John


Links: You receive all messages sent to this group.
View/Reply Online (#52767): https://lists.yoctoproject.org/g/yocto/message/52767
Mute This Topic: https://lists.yoctoproject.org/mt/81407811/5071304
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[jchludzinski@...]


Re: spidev.c ?

jchludzinski
 

root@arria10:~# find /sys/ -name 'spi*'
/sys/kernel/debug/clk/spi_m_clk /sys/kernel/debug/tracing/events/spi /sys/kernel/debug/tracing/events/spi/spi_controller_idle /sys/kernel/debug/tracing/events/spi/spi_controller_busy /sys/kernel/debug/tracing/events/spi/spi_message_submit /sys/kernel/debug/tracing/events/spi/spi_message_start /sys/kernel/debug/tracing/events/spi/spi_message_done /sys/kernel/debug/tracing/events/spi/spi_transfer_start /sys/kernel/debug/tracing/events/spi/spi_transfer_stop /sys/kernel/debug/regmap/spi0.0 /sys/devices/platform/soc/ffda5000.spi/spi_master /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0 /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0 /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_async /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/spi0.0/statistics/spi_sync_immediate /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_async /sys/devices/platform/soc/ffda5000.spi/spi_master/spi0/statistics/spi_sync_immediate /sys/class/spidev /sys/class/spi_master /sys/class/spi_master/spi0 /sys/firmware/devicetree/base/__symbols__/spi2 /sys/firmware/devicetree/base/__symbols__/spi0 /sys/firmware/devicetree/base/__symbols__/spin_ctrl_1 /sys/firmware/devicetree/base/__symbols__/spi_m_clk /sys/firmware/devicetree/base/__symbols__/spi1 /sys/firmware/devicetree/base/__symbols__/spin_ctrl_2 /sys/firmware/devicetree/base/soc/spi@ff809000 /sys/firmware/devicetree/base/soc/spi@ffda5000 /sys/firmware/devicetree/base/soc/spi@ffda5000/resource-manager@0/spi-max-frequency /sys/firmware/devicetree/base/soc/clkmgr@ffd04000/clocks/spi_m_clk /sys/firmware/devicetree/base/soc/spi@ffda4000 /sys/firmware/devicetree/base/spi@0xc00c0800 /sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0 /sys/firmware/devicetree/base/spi@0xc00c0800/spidev@0/spi-max-frequency /sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-controller /sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@200/spin-rph /sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller /sys/firmware/devicetree/base/testcase-data-2/fairway-1/ride@100/spin-controller-names /sys/firmware/devicetree/base/testcase-data-2/substation@100/motor-1/spin /sys/bus/platform/drivers/spi_altera /sys/bus/spi /sys/bus/spi/devices/spi0.0 /sys/bus/spi/drivers/spi-nor /sys/bus/spi/drivers/altr_a10sr/spi0.0 /sys/bus/spi/drivers/spidev /sys/module/spidev /sys/module/spidev/drivers/spi:spidev /sys/module/spi_altera



On 2021-03-18 03:44, Zoran wrote:

I am guessing here.... But what do you have while executing the
following command being in /sys
 as root?

root@arm:/sys# find . -name spi*

Zee
_______

On Wed, Mar 17, 2021 at 5:41 PM jchludzinski via
lists.yoctoproject.org
<jchludzinski=vivaldi.net@...> wrote:

In the YOCTO/Linux source tree there's drivers/spi/ which has all the source for SPI drivers. There's only 1 file, spidev.c, which has:

static int __init spidev_init(void)
{
        int status;

        /* Claim our 256 reserved device numbers.  Then register a class
         * that will key udev/mdev to add/remove /dev nodes.  Last, register
         * the driver which manages those device numbers.
         */
        BUILD_BUG_ON(N_SPI_MINORS > 256);
        status = register_chrdev(SPIDEV_MAJOR, "spi", &spidev_fops);
        if (status < 0)
                return status;

        spidev_class = class_create(THIS_MODULE, "spidev");
        if (IS_ERR(spidev_class)) {
                unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
                return PTR_ERR(spidev_class);
        }

        status = spi_register_driver(&spidev_spi_driver);
        if (status < 0) {
                class_destroy(spidev_class);
                unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
        }
        return status;
}
module_init(spidev_init);

... for creating device files in udev.

So when I use 'make nconfig' to specifiy that I want a loadable module for the ALTERA SPI driver, why don't I see a spidev.o file in drivers/spi/ ?

How does spi-altera.ko create device files without a call to register_chrdev(...).

How is it a loadable module without module_init(...)?

When I separately build spidev.c as an .ko and try loading it, I get: "Device or resourse busy"

---John





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52762): https://lists.yoctoproject.org/g/yocto/message/52762
Mute This Topic: https://lists.yoctoproject.org/mt/81407811/5071304
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[jchludzinski@...]


Re: [meta-security][PATCH] ima-evm-keys: add file-checksums to IMA_EVM_X509

Armin Kuster
 

merged,
thanks

On 3/12/21 1:53 AM, liu.ming50@... wrote:
From: Ming Liu <liu.ming50@...>

This ensures when a end user change the IMA_EVM_X509 key file,
ima-evm-keys recipe will be rebuilt.

Signed-off-by: Ming Liu <liu.ming50@...>
---
meta-integrity/recipes-security/ima-evm-keys/ima-evm-keys_1.0.bb | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta-integrity/recipes-security/ima-evm-keys/ima-evm-keys_1.0.bb b/meta-integrity/recipes-security/ima-evm-keys/ima-evm-keys_1.0.bb
index 62685bb..7708aef 100644
--- a/meta-integrity/recipes-security/ima-evm-keys/ima-evm-keys_1.0.bb
+++ b/meta-integrity/recipes-security/ima-evm-keys/ima-evm-keys_1.0.bb
@@ -14,3 +14,4 @@ do_install () {
lnr ${D}${sysconfdir}/keys/x509_evm.der ${D}${sysconfdir}/keys/x509_ima.der
fi
}
+do_install[file-checksums] += "${@'${IMA_EVM_X509}:%s' % os.path.exists('${IMA_EVM_X509}')}"


Re: [meta-security][PATCH v2] samhain: fix compile error on powerpc

Armin Kuster
 

merged
thanks

On 3/11/21 1:34 AM, kai wrote:
From: Kai Kang <kai.kang@...>

It fails to comile samhain for powerpc(qemuppc):

| x_sh_dbIO.c: In function 'swap_short':
| x_sh_dbIO.c:229:36: error: initializer element is not constant
| 229 | static unsigned short ooop = *iptr;
| | ^

Assign after initialization of the static variable to avoid the failure.

Signed-off-by: Kai Kang <kai.kang@...>
---
...-initializer-element-is-not-constant.patch | 28 +++++++++++++++++++
recipes-ids/samhain/samhain.inc | 1 +
2 files changed, 29 insertions(+)
create mode 100644 recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch

diff --git a/recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch b/recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch
new file mode 100644
index 0000000..72cb880
--- /dev/null
+++ b/recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch
@@ -0,0 +1,28 @@
+Fix error when compile for powerpc:
+
+| x_sh_dbIO.c: In function 'swap_short':
+| x_sh_dbIO.c:229:36: error: initializer element is not constant
+| 229 | static unsigned short ooop = *iptr;
+| | ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@...>
+---
+ src/sh_dbIO.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/sh_dbIO.c b/src/sh_dbIO.c
+index b547ac5..23a9621 100644
+--- a/src/sh_dbIO.c
++++ b/src/sh_dbIO.c
+@@ -226,7 +226,8 @@ static unsigned short * swap_short (unsigned short * iptr)
+ else
+ {
+ /* alignment problem */
+- static unsigned short ooop = *iptr;
++ static unsigned short ooop;
++ ooop = *iptr;
+ unsigned short hi = (ooop & 0xff00);
+ unsigned short lo = (ooop & 0xff);
+ ooop = (lo << 8) | (hi >> 8);
diff --git a/recipes-ids/samhain/samhain.inc b/recipes-ids/samhain/samhain.inc
index 6a2eb08..0148e46 100644
--- a/recipes-ids/samhain/samhain.inc
+++ b/recipes-ids/samhain/samhain.inc
@@ -18,6 +18,7 @@ SRC_URI = "https://la-samhna.de/archive/samhain_signed-${PV}.tar.gz \
file://samhain-avoid-searching-host-for-postgresql.patch \
file://samhain-add-LDFLAGS-variable-for-samhain_setpwd.patch \
file://fix-build-with-new-version-attr.patch \
+ file://samhain-fix-initializer-element-is-not-constant.patch \
"

SRC_URI[sha256sum] = "3e57574036d5055e9557ec5095818b419ea6c4365370fc2ccce1e9f87f9fad08"



Re: [meta-security][PATCH] fscryptctl: Fix installation path

Armin Kuster
 

merged.

thanks

On 3/10/21 8:52 AM, Łukasz Płachno via lists.yoctoproject.org wrote:
- Without the patch fscryptctl is installed in
/usr/bin/usr/local/bin instead of /usr/bin.
---
recipes-security/fscryptctl/fscryptctl_1.0.0.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-security/fscryptctl/fscryptctl_1.0.0.bb b/recipes-security/fscryptctl/fscryptctl_1.0.0.bb
index 440b4e3..df76a3d 100644
--- a/recipes-security/fscryptctl/fscryptctl_1.0.0.bb
+++ b/recipes-security/fscryptctl/fscryptctl_1.0.0.bb
@@ -15,7 +15,7 @@ SRC_URI = "git://github.com/google/fscryptctl.git"
S = "${WORKDIR}/git"

do_install() {
- oe_runmake DESTDIR=${D}${bindir} install
+ oe_runmake DESTDIR=${D} PREFIX=/usr install
}

RRECOMMENDS_${PN} += "\



Re: [meta-rockchip][PATCH] layer.conf: Add hardknott to compatible release branches

Trevor Woerner
 

Applied. Thank you! :-)


Re: spidev.c ?

Zoran
 

I am guessing here.... But what do you have while executing the
following command being in /sys
as root?

root@arm:/sys# find . -name spi*

Zee
_______

On Wed, Mar 17, 2021 at 5:41 PM jchludzinski via
lists.yoctoproject.org
<jchludzinski=vivaldi.net@...> wrote:


In the YOCTO/Linux source tree there's drivers/spi/ which has all the source for SPI drivers. There's only 1 file, spidev.c, which has:

static int __init spidev_init(void)
{
int status;

/* Claim our 256 reserved device numbers. Then register a class
* that will key udev/mdev to add/remove /dev nodes. Last, register
* the driver which manages those device numbers.
*/
BUILD_BUG_ON(N_SPI_MINORS > 256);
status = register_chrdev(SPIDEV_MAJOR, "spi", &spidev_fops);
if (status < 0)
return status;

spidev_class = class_create(THIS_MODULE, "spidev");
if (IS_ERR(spidev_class)) {
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
return PTR_ERR(spidev_class);
}

status = spi_register_driver(&spidev_spi_driver);
if (status < 0) {
class_destroy(spidev_class);
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
}
return status;
}
module_init(spidev_init);

... for creating device files in udev.

So when I use 'make nconfig' to specifiy that I want a loadable module for the ALTERA SPI driver, why don't I see a spidev.o file in drivers/spi/ ?

How does spi-altera.ko create device files without a call to register_chrdev(...).

How is it a loadable module without module_init(...)?

When I separately build spidev.c as an .ko and try loading it, I get: "Device or resourse busy"

---John



Re: Recipes and meta-data directory tree

keydi <krzysztof.dudziak@...>
 

OE allows you to build own distributions, so what you are looking at is two
different distributions based on different different releases but using same
build system ( OpenEmbedded ) over major releases the build system gets
changed too in terms of its metadata as well new features and some old cruft
removed like usual projects. so you have different releases, and different
machines and different distro all contributing to the differences.
Thanks for input from you.
Does this mean shown differences in directory tree is result, a mix of
these all listed parameters?
I am aware of these are two different distributions.
I am aware of these are based on different releases.
I am aware of these are two different machines.
I am aware of release to release to get several classes of modifications.
Actually asked question means how much show differences result from
usage of different YP releases.


Re: subtree …/tmp/deploy/… , files named Packages

keydi <krzysztof.dudziak@...>
 


what you are looking at is feeds area, where the format will vary
depending upon which online package management is in use. So you will
have to make that differentiation. Packages file is used when opkg is
used and not by rpm/dnf
for SCA perhaps you want to look at content of the packages. or maybe
use the manifests that yocto generates e.g. license manifest in images
have info on all packages that go into that image, it may not be
formatted as per your expectation
but its somewhere to start

Thanks for helpful input. This matches my own observation.
Tool-chain used in project requires additionally license.manifest file on its input.
For some reason it also takes a look into files named Packages.
Actually it can be clear why it does this: Packages file specifies among others each package source code address/path.

Despite the question files named Packages generated for .ipk YES, for .rpm NO,
is it legitimate to use these files in external tool-chain for software composition analysis?
I mean these files might be Yocto internal interface not intended for purpose pointed out here. May this be true?

5841 - 5860 of 58586