Re: How can I create a truly minimal distribution that runs entirely from RAM?
Zoran
BBB example:
https://www.yoctoproject.org/pipermail/yocto/2018-July/041696.html The line: DISTRO_FEATURES_append = " ram" Should be: DISTRO_FEATURES_append = " nfs" BSP Traces for BBB (YOCTO Warrior): https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/bbb-warrior/target-bbb-platform-traces.txt And the ash script in the U-Boot supporting above written: https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/custom/u-boot.ash#L3 Line 3 to 10. Please, pay attention to line 1 as well! Zee _______ On Thu, Mar 11, 2021 at 12:32 AM p32 via lists.yoctoproject.org <p32=tuta.io@...> wrote:
|
|
[meta-security][PATCH] samhain: fix compile for powerpc
kai
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; | | ^ Fix it by not use local static variable. Signed-off-by: Kai Kang <kai.kang@...> --- ...-initializer-element-is-not-constant.patch | 32 +++++++++++++++++++ recipes-ids/samhain/samhain.inc | 1 + 2 files changed, 33 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..846e132 --- /dev/null +++ b/recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch @@ -0,0 +1,32 @@ +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 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/sh_dbIO.c b/src/sh_dbIO.c +index b547ac5..7516463 100644 +--- a/src/sh_dbIO.c ++++ b/src/sh_dbIO.c +@@ -226,11 +226,11 @@ static unsigned short * swap_short (unsigned short * iptr) + else + { + /* alignment problem */ +- static unsigned short ooop = *iptr; ++ unsigned short ooop = *iptr; + unsigned short hi = (ooop & 0xff00); + unsigned short lo = (ooop & 0xff); + ooop = (lo << 8) | (hi >> 8); +- return &ooop; ++ *iptr = ooop; + } + return iptr; + #else 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" -- 2.17.1
|
|
Re: Assign IP address at boot time
On 3/10/21 1:32 PM, jchludzinski wrote:
Preferred method for local configuration is using /etc/systemd/network. However, the probable reason why it did not work is that the file should be eth0.network. The name of the file(s) do not matter that much. The extension does though. -- Rudolf J Streif CEO/CTO ibeeto +1.855.442.3386 x700
|
|
How can I create a truly minimal distribution that runs entirely from RAM?
p32@...
Hello everyone,
I am currently using this Yocto-based build setup provided by NXP to create a custom Linux distribution for one of the i.MX boards. My custom image is based on the core-image-minimal recipe and works fine, i.e., runs on the platform as expected. However, I have to following two issues: Although core-image-minimal is documented as "A small image just capable of allowing a device to boot", I can tell from the running system that it contains a huge number of components that I think are not be strictly necessary to boot the device. For instance, the boot log contains entries about an FPGA manager framework, Bluetooth, Ethernet, KVM, USB, and a lot of i.MX-specific modules such as for DMA or power management. For evaluation purposes, I want to get rid of all of these and end up with a truly minimal Linux system that is able to boot, schedule its tasks, and to communicate via UART. How can I achieve this without losing the i.MX support, i.e., the generation of a bootloader and suitable device tree files? Furthermore, I would like the minimal system to run entirely from RAM. More specifically: After being started from the SD card, U-Boot should start the Linux distribution via initramfs. I am able to generate some kind of initramfs binary using the following changes: # local.conf
INITRAMFS_IMAGE = "recipe-name"
INITRAMFS_IMAGE_BUNDLE = "1"
# recipe-name.bb
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
PACKAGE_INSTALL = "${IMAGE_INSTALL}"
However, this does not affect the generated U-Boot, which means that U-Boot still tries to boot from an SD card partition. What is the "right way" to make use of the Image-initramfs-board.bin or the image-board.cpio.gz files that Yocto creates in this case? Any help yould be greatly appreciated. Kind regards!
|
|
Re: Assign IP address at boot time
jchludzinski
Create the file /etc/systemd/network/eth0.conf: That didn't work BUT editing /lib/systemd/network/80-wired.network [Match] Name=en* eth* KernelCommandLine=!nfsroot [Match] Name=eth0 [Network] Address=192.168.0.101/24 #Gateway=<ip> #DNS=<ip> [Network] DHCP=no [DHCP] #RouteMetric=10 #ClientIdentifier=mac... did work, after: root@arria10:~# systemctl restart systemd-networkd
|
|
Integrating npm into install?
Paul Wicks
I've got a python app that uses some javascript assets that are normally built via webpack. In a normal build, the process is as follows: * run "npm install" to get all the javascript dependencies * run "npm build", a custom task in my package.json file that invokes webpack to build the assets and place them where the python install can find them. * run "python setup.py install" to build and install the python part of the app What's the best/most correct way to integrate this into a yocto recipe? My current approach is to have the main recipe "inherit setuptools3" and then add the following: " do_run_npm_install() { bbplain "Running npm install, this may take a few minutes..." npm install npm run build } addtask run_npm_install before do_compile " However, this fails with an "npm: not found" error. -Paul Wicks
|
|
Re: Assign IP address at boot time
Create the file /etc/systemd/network/eth0.conf:
toggle quoted messageShow quoted text
[Match] Name=eth0 [Network] Address=<ip> Gateway=<ip> DNS=<ip> Restart systemd-networkd # systemctl restart systemd-networkd or reboot. :rjs
On 3/10/21 11:31 AM, jchludzinski wrote:
What is your startup manager? systemd or SysVInit?systemd --
Rudolf J Streif CEO/CTO ibeeto +1.855.442.3386 x700
|
|
Re: Assign IP address at boot time
jchludzinski
What is your startup manager? systemd or SysVInit?systemd
|
|
[meta-security][PATCH] fscryptctl: Fix installation path
Łukasz Płachno
- 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} += "\ -- 2.17.1
|
|
Demo of abi checker hook with hashequiv
Michael Ho <Michael.Ho@...>
Hi all,
I wanted to share with the mailing list a small proof of concept / demo I created that shows how the hashequiv checksum hook can be overridden with a custom hook to avoid rebuilds where the file checksums are not exactly reproducible or change in a compatible manner. In the case of this demo it shows how an abi checker like libabigail can be used to avoid recompiling downstream applications when a recipe deploying a shared library introduces changes that still maintain the ABI (while still catching cases where the ABI breaks). Would be good to get any comments people have about this and also the general feasibility of using abi checkers in a Yocto build.
See: https://github.com/bmwcarit/meta-abicompat and https://github.com/bmwcarit/meta-abicompat-poky
I found though to make this demo that I had to modify poky to split the do_package task into two parts in order to be able to re-package without inducing a recompilation. Would be also interesting to get some comments about what people think about this.
Kind regards, Michael Ho
-- BMW Car IT GmbH Mobil: +49-152-54980-471
|
|
Re: Assign IP address at boot time
On 3/9/21 11:34 PM, jchludzinski wrote:
What is your startup manager? systemd or SysVInit?To start, do you have the driver required for your network interface?Yes, the network/Ethernet device is recognized by Linux and the appropriate driver is loaded. If I use: -- Rudolf J Streif CEO/CTO ibeeto +1.855.442.3386 x700
|
|
Re: [meta-security][dunfell][PATCH 0/9] Some IMA/EVM fixes to dunfell branch
On 3/10/21 2:31 AM, Ming Liu wrote:
Hi, akuster808:that are being built current. I can on build on branch at a time and it takes time to do each. Things are looking good so I suspect they changes will land in the next day or so. -armin
|
|
Re: how often would one use "VAR_someoverride_append = ..."?
Quentin Schulz
Hi Robert,
On Wed, Mar 10, 2021 at 06:16:44AM -0500, Robert P. J. Day wrote: On Tue, 9 Mar 2021, Quentin Schulz wrote:https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux/linux-yocto_5.10.bb#n12Hi Robert,can you point at an actual example of that? i took a look and all for example. This is an example of a "valid" use case (not that there are invalid ones) for VAR_foo. Would probably a better example: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux/linux-yocto_5.10.bb#n50 So, you might decide that a machine is so much different than others that KERNEL_FEATURES should be overridden for said machine. Then in a bbappend, one might want to add another feature for this machine, they'll therefore need to use KERNEL_FEATURES_foo_append. I do not have examples at hand of VAR_foo_append except the ones Leon sent in another mail. Which should show how rare it is :) Cheers, Quentin
|
|
Re: how often would one use "VAR_someoverride_append = ..."?
Robert P. J. Day
On Tue, 9 Mar 2021, Quentin Schulz wrote:
Hi Robert,can you point at an actual example of that? i took a look and all the yocto kernel recipes i see use the first form. am i just looking in the wrong place? rday
|
|
Re: [meta-selinux][dunfell][gatesgarth][master][PATCH] libselinux-python: Fix build error due to missing target config
Anatol Belski
Hi, On 3/10/2021 6:30 AM, Yi Zhao wrote:
either way, a backport to dunfell and gatesgarth would be great to have then. Thanks! Anatol
//Yi
|
|
konrad has officially blessed his new meta-rubygems layer
Robert P. J. Day
inspired by my earlier plaintive mewling of "gosh, i wish YP had
better ruby support," konrad weihmann put in a ridiculous amount of work and came up with: https://github.com/priv-kweihmann/meta-rubygems while i am listed as a contributor, konrad has done 98% of the work, and i really plan on diving back into that soon, but that layer is effectively all his, and he invited me to let people know about it, if anyone else wanted to play along. rday
|
|
Re: [meta-security][dunfell][PATCH 0/9] Some IMA/EVM fixes to dunfell branch
Ming Liu <liu.ming50@...>
Hi, akuster808: I saw this patch set has been merged to gatesgarth, may I ask, any plan for dunfell? I am asking because dunfell is a LTS branch and many users are building their products based on it. Thanks! the best, thank you
series in build testing
|
|
Re: Assign IP address at boot time
Zoran
Hello,
toggle quoted messageShow quoted text
Maybe you can stop in the U-Boot monitor, and check your environment? => => print serverip => print ipaddr => print gatewayip => print gw_ip And see what and how your bootcmd and similar env variables look like? And if you do not have defined above, to add them (according to ash script) and try booting again? Zee _______ On Tue, Mar 9, 2021 at 10:28 PM jchludzinski via lists.yoctoproject.org <jchludzinski=vivaldi.net@...> wrote:
|
|
what version of YP will next wind river (LTS20) be based on?
Robert P. J. Day
i suspect i know the answer, just want to confirm ... friend tells
me yesterday he's working with LTS20, i said, "uh, that's not even out yet," he assures he his company has an early release, but he couldn't tell me what version of YP it corresponded to. based on regularity of releases on both sides, i would *guess* it's equivalent to gatesgarth, is that a good guess? rday
|
|
Re: Assign IP address at boot time
jchludzinski
To start, do you have the driver required for your network interface?Yes, the network/Ethernet device is recognized by Linux and the appropriate driver is loaded. If I use: $ ip add add 192.168.9.101/24 dev eth0 I’m up and running. But I want the IP assignment to happen during boot time.
|
|