Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
2
answers
1189
views
In Linux distribution the list of timezones is empty
In a **yocto-base Linux distribution** is available the program `timedatectl` and it is necessary to set the timezone. To do that exist the command: ``` timedatectl set-timezone ``` The execution of the command `timedatectl list-timezones` to get the list of all timezones available outputs a list em...
In a **yocto-base Linux distribution** is available the program
timedatectl
and it is necessary to set the timezone.
To do that exist the command:
timedatectl set-timezone
The execution of the command timedatectl list-timezones
to get the list of all timezones available outputs a list empty:
> timedatectl list-timezones
UTC
The distribution doesn't include any file /usr/share/zoneinfo
or /usr/zoneinfo
.
I think I miss installing something but I don't know what..
Thanks
User051209
(498 rep)
Oct 4, 2022, 03:02 PM
• Last activity: Jul 17, 2025, 07:02 AM
9
votes
2
answers
15829
views
Meaning of ?= and ??= in bitbake/yocto
What does the different assignment types mean in bitbake recipe scripts, such as: BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" MACHINE ??= "qemux86" What of above is analogous to Ruby's `bb_number_threads ||= 'something'`?
What does the different assignment types mean in bitbake recipe scripts, such as:
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
MACHINE ??= "qemux86"
What of above is analogous to Ruby's
bb_number_threads ||= 'something'
?
Frankie_Fomalhaut
(391 rep)
Jul 10, 2015, 08:53 AM
• Last activity: Feb 7, 2025, 10:52 AM
1
votes
0
answers
197
views
How do I use static UIDs and GIDs for services in my yocto build?
I have a piece of equipment running a yocto build. This build includes services like ssh-server, mysql, and ntp, with each run as their own users. mysql is UID 999, sshd is UID 998, etc. In my latest yocto build, a new user called messagebus was added with UID 999. So now mysql is 998, and sshd is 9...
I have a piece of equipment running a yocto build. This build includes services like ssh-server, mysql, and ntp, with each run as their own users. mysql is UID 999, sshd is UID 998, etc.
In my latest yocto build, a new user called messagebus was added with UID 999. So now mysql is 998, and sshd is 997. This will break my system if I upgrade to it, because there is a variable partition with things like database files, which mysql needs access to, and are owned by UID 999.
How can I tell yocto which UIDs and GIDs I want to use for those services?
I'm finding a lot of information on how to do it for new recipes that I create, but not how to do it for existing recipes. I tried turning on
= "useradd-staticids"
in my local.conf, but that didn't do anything. It seems those recipes don't have the needed passwd and group files because when I also turned on = "error"
, I was getting errors for those services. I tried to create a recipe for mariadb that just did :prepend := "${THISDIR}/files:"
and then I had files passwd and group that had :x:999:999::/var/mysql:/bin/false
and :x:999:
respectively. I compiled this, and it built, but the rootfs /etc/passwd
file still had 998 as the UID.
Any ideas? Ideally I'd like to manage all this with just one file, but I'll have separate bbappends for each recipe if I have to do it that way.
Dave
(45 rep)
Jan 16, 2025, 08:40 PM
1
votes
0
answers
192
views
How do I prevent two recipes from installing the same file in a bitbake?
I am trying to create an SDK using `bitbake -c populate_sdk fsl-image-gui`. I am doing this in a Docker Container built from Ubuntu 22.04. This is for Yocto Kirkstone. Two recipes in this bitbake are providing the same file. At the very end of the bake (at 99%, on the do_populate_sdk task), I get th...
I am trying to create an SDK using
bitbake -c populate_sdk fsl-image-gui
. I am doing this in a Docker Container built from Ubuntu 22.04. This is for Yocto Kirkstone. Two recipes in this bitbake are providing the same file. At the very end of the bake (at 99%, on the do_populate_sdk task), I get the error:
Error: Transaction test error:
file /lib/firmware/brcm/brcmfmac4373.bin from install of linux-firmware-bcm4373-1:20221214-r0.noarch conflicts with file from package lwb5plus-usb-sa-firmware-11.171.0.24-r0.noarch
These two recipes are provided by [Laird/Ezurio](https://github.com/LairdCP/meta-summit-radio/blob/lrd-11.171.0.x/meta-summit-radio/recipes-bsp/radio-firmware/radio-firmware-lwb.inc) and by [the Yocto project](https://git.yoctoproject.org/poky/tree/meta/recipes-kernel/linux-firmware/linux-firmware_20240220.bb?h=kirkstone) .
I have tried patching all mentions of bcm4373 out of the Yocto poky file, but I still get the error. What is the correct way to make sure that only one package installs this file? Is it PREFERRED_PROVIDER, ALTERNATIVES, or some secret third option?
I used a patch file to remove all mentions of bcm4373 from the Yocto-provided file. This is being applied using the patch
command during the Docker container build, not through a .bbappend file. I hoped this would cause it to not install the problem file, but it still gives the same error, likely because there is some dependency on it.
ramendola
(11 rep)
Sep 3, 2024, 04:02 PM
1
votes
0
answers
157
views
Yocto Linux /lib/modules/<version> directory differs per root filesystem build due to kgit-s2q
I am using Yocto Kirkstone to create a Linux image for a i.MX8 device. It successfully builds the Linux kernel version 5.15.71. I have also integrated RAUC (https://github.com/rauc/rauc) for firmware updates. This method creates an A/B partitioning scheme for firmware updates where the root file sys...
I am using Yocto Kirkstone to create a Linux image for a i.MX8 device. It successfully builds the Linux kernel version 5.15.71.
I have also integrated RAUC (https://github.com/rauc/rauc) for firmware updates. This method creates an A/B partitioning scheme for firmware updates where the root file system is updated on the device.
I have created a bbappend in my own custom layer and locked the SRCREV of the kernel.
SRCREV = "50ade09d822cbf0f49af4c2cac250edb4003c7ef"
The problem I am facing is that after a RAUC update of the root filesystem, the secondary partition is successfully updated and activated, however the /lib/modules/ directory has the incorrect version. This results in error messsages such as the following:
Aug 27 13:29:02 device python3: modprobe: FATAL: Module ip_tables not found in directory /lib/modules/5.15.71-1.0+ge1cb7633db6d
Aug 27 13:29:02 device python3: iptables v1.8.7 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Aug 27 13:29:02 device python3: Perhaps iptables or your kernel needs to be upgraded.
Aug 27 13:29:02 device python3: 2024-08-27 13:29:02,425:ERROR:Error: Failed to set firewall commands: None
The actual directory that does exist on disk is now:
/lib/modules/2018 5.15.71-1.0+g885f034ad83a
When I check the Yocto **tmp/work/*/linux-complab** build directory, I can see that the git repository is successfully checked out to my specified version. If I symlink this new directory to the expected directory version, the kernel successfully finds the modules it is looking for.
Why is the root filesystem image produced by Yocto containing this directory by a changing name? How can I lock it down to one dependable name?
UPDATE:
After digging more, I think the issue is that the script in the work directory "recipe-sysroot-native/usr/bin/kgit-s2q" is missing some information. This section adds the 'invalid_git config':
# Parse the author information
GIT_AUTHOR_NAME=$(sed -ne 's/Author: //p' "$tmp_info")
GIT_AUTHOR_EMAIL=$(sed -ne 's/Email: //p' "$tmp_info")
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
while test -z "$GIT_AUTHOR_EMAIL" && test -z "$GIT_AUTHOR_NAME" ; do
if [ -n "$quilt_author" ] ; then
GIT_AUTHOR_NAME="$quilt_author_name";
GIT_AUTHOR_EMAIL="$quilt_author_email";
else
if [ -z "$INTERACTIVE" ]; then
GIT_AUTHOR_NAME="invalid_git config"
GIT_AUTHOR_EMAIL=""
else
echo "No author found in $patch_name" >&2;
echo "---"
cat $tmp_msg
printf "Author: ";
read patch_author
echo "$patch_author"
patch_author_name=$(expr "z$patch_author" : 'z\(.*[^ ]\) *]*\)') &&
test '' != "$patch_author_name" &&
test '' != "$patch_author_email" &&
GIT_AUTHOR_NAME="$patch_author_name" &&
GIT_AUTHOR_EMAIL="$patch_author_email"
fi
fi
done
It looks like it sets the invalid git config if "INTERACTIVE" is null:
if [ -z "$INTERACTIVE" ]; then
GIT_AUTHOR_NAME="invalid_git config"
GIT_AUTHOR_EMAIL=""
This in turn causes the top of the git log to include this bogus commit that is different each time I use bitbake to clean and build the kernel:
commit 84e2651775ca2bdb4fdfbc081f314ec61451b3de (HEAD -> linux-compulab_v5.15.71)
Author: invalid_git config
Date: Tue Aug 27 22:55:34 2024 +0000
commit 50ade09d822cbf0f49af4c2cac250edb4003c7ef (origin/linux-compulab_v5.15.71, origin/HEAD)
Author: vraevsky
Date: Fri Feb 16 13:13:45 2024 +0200
Update README.md
The temp folder logs show this kgit-s2q script getting called only in these few locations:
>>/5.15.71-r0/temp$ grep -R "kgit-s2q" *
run.do_patch: kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/
run.do_patch.2351048: kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/
run.do_validate_branches: # We've checked out HEAD, make sure we cleanup kgit-s2q fence post check
run.do_validate_branches: kgit-s2q --clean
run.do_validate_branches.2350365: # We've checked out HEAD, make sure we cleanup kgit-s2q fence post check
run.do_validate_branches.2350365: kgit-s2q --clean
This causes the git checkout to match the built kernel modules:
linux-compulab/5.15.71-r0/image/lib/modules$ ls
5.15.71-1.0+g84e2651775ca
It looks like the kernel-yocto.bbclass file is what sets the extra args:
developer@machine:~/compulab-nxp-bsp/sources$ grep -R "kgit_extra_args" *
poky/meta/classes/kernel-yocto.bbclass: kgit_extra_args=""
poky/meta/classes/kernel-yocto.bbclass: kgit_extra_args="--commit-sha author"
poky/meta/classes/kernel-yocto.bbclass: kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/
How do I fix the kgit-s2q script so this bogus checkout is not created?
UPDATE:
I tried setting the following per the Yocto documentation to force a suffix for the uname command. However, this did not change the **/lib/modules/** value that Yocto creates on the root filesystem:
# Force the uname extension
LOCALVERSION = "+custom-${LINUX_VERSION_EXTENSION}"
LINUX_VERSION_EXTENSION = "1.0"
I created a really ugly workaround until this can be figured out. It checks that the **/lib/modules/** directory suffix matches the kernel's expected value on boot:
EXPECTED_MODULES_SUFFIX=$(uname -r | cut -d '-' -f 2)
EXPECTED_MODULES_NAME="5.15.71-$EXPECTED_MODULES_SUFFIX"
FOUND_MODULES_NAME=$(ls /lib/modules)
ls /lib/modules | grep $EXPECTED_MODULES_SUFFIX
retVal=$?
if [ $retVal -ne 0 ]; then
echo "Error: Did not find expected modules: $EXPECTED_MODULES_NAME ..."
mount -o remount,rw /
echo "Repairing correct module directory now ..."
mv $FOUND_MODULES_NAME $EXPECTED_MODULES_NAME
mount -o remount,ro /
else
echo "Successfully found expected modules: $EXPECTED_MODULES_NAME ..."
fi
PhilBot
(101 rep)
Aug 27, 2024, 01:46 PM
• Last activity: Aug 28, 2024, 01:40 PM
0
votes
0
answers
240
views
U-Boot not storing environment in the expected EXT4 partition
I am using Yocto Kirkstone to build a system for an i.MX8 board. I need to access the U-Boot environment variables from Linux userspace. For this, I need to use fw_printenv and fw_setenv from Linux userspace, and have U-Boot also be able to write into the designated EXT4 partition (in my case it sho...
I am using Yocto Kirkstone to build a system for an i.MX8 board. I need to access the U-Boot environment variables from Linux userspace. For this, I need to use fw_printenv and fw_setenv from Linux userspace, and have U-Boot also be able to write into the designated EXT4 partition (in my case it should be an EXT4 partition on MMC device 2 partition 2).
My problem is that U-Boot successfully persistently stores the environment - it just does not seem to store it in the expected location.
When I flash the eMMC for the i.MX8 and power the device on for the first time, I see the following:
U-Boot 2022.04-compulab+g7226f0644a (Aug 26 2024 - 01:02:28 +0000)
CPU: i.MX8MP rev1.1 at 1200 MHz
Reset cause: POR
Model: CompuLab IOT-GATE-IMX8PLUS
DRAM: 4 GiB
Core: 107 devices, 30 uclasses, devicetree: separate
WDT: Not starting watchdog@30280000
MMC: FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment
...
*** My Debug Print: Saving environment now: rootwait rw quiet console=ttymxc1,115200 cma=64M root=/dev/mapper/encrypted_fs_a usbcore.autosuspend=-1 audit=0 systemd.restore_state=0 rfkill.default_state=1 rauc.slot=rootfs_a ...
Saving Environment to MMC... Writing to MMC(2)... OK
bootargs=rootwait rw quiet console=ttymxc1,115200 cma=64M root=/dev/mapper/encrypted_fs_a usbcore.autosuspend=-1 audit=0 systemd.restore_state=0 rfkill.default_state=1 rauc.slot=rootfs_a
78297 bytes read in 1 ms (74.7 MiB/s)
117641056 bytes read in 424 ms (264.6 MiB/s)
If I interrupt U-Boot and set some new variables, they are persistent across power cycles.
Setting a new variable:
iot-gate-imx8plus *** My Debug Print U-Boot => setenv name tom
iot-gate-imx8plus *** My Debug PrintU-Boot => saveenv
Saving Environment to MMC... Writing to MMC(2)... OK
iot-gate-imx8plus *** My Debug Print U-Boot =>
Power cycle and query the new variable:
iot-gate-imx8plus *** My Debug Print U-Boot => reset
resetting ...
U-Boot SPL 2022.04-compulab+g7226f0644a (Aug 26 2024 - 01:02:28 +0000)
pca9450@25 [ldo4][u] = 1v8
DDRINFO: EEPROM VALID DATA [ [ cafecafe ] = 1061010 4
DDRINFO(D): Samsung 4096MB @ 3200 MHz
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDRINFO(M): mr5-8 [ 0x1061010 ]
DDRINFO(E): mr5-8 [ 0x1061010 ]
Normal Boot
WDT: Not starting watchdog@30280000
Boot Stage: Primary boot
image offset 0x0, pagesize 0x200, ivt offset 0x0
...
switch to partitions #0, OK
mmc2(part 0) is current device
flash target is MMC:2
Net: eth0: ethernet@30be0000, eth1: ethernet@30bf0000 [PRIME]
Fastboot: Normal
starting USB...
Bus usb@38100000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@38200000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@38100000 for devices... 1 USB Device(s) found
scanning bus usb@38200000 for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Normal Boot
Hit any key to stop autoboot: 0
iot-gate-imx8plus *** My Debug Print U-Boot =>
iot-gate-imx8plus *** My Debug Print U-Boot => printenv name
name=tom
iot-gate-imx8plus *** My Debug Print U-Boot =>
So clearly U-Boot is capable of storing my environment across reboots.
However, from Linux userspace, fw_printenv does not show the same environment, and does not include this new variable. Furthermore, if I try to overwrite the name with a new value in with fw_setenv, then U-Boot will not show the change reflected from it's perspective.
[device ~]$ fw_printenv name
name=
My fw_env.conf file looks like this:
[device ~]$ cat /etc/fw_env.config
/bootenv/u-boot-initial-env-sd 0x0000 0x4000
The 'bootenv' mount is on mmc dev 2 partition 2:
[device ~]$ mount | grep booten
/dev/mmcblk2p2 on /bootenv type ext4 (rw,relatime)
No errors are thrown from either U-Boot or Linux fw_setenv/fw_printenv when they read or modify the U-Boot environment, but changes in either are not considered from the other's perspective. Therefore they are somehow not considering the same storage location. So far I have been unable to determine where U-Boot is exactly storing it's environment persistently.
I have configured U-Boot to store the environment in the EXT4 partition primarily with the following configuration options:
CONFIG_ENV_IS_IN_EXT4=y
CONFIG_ENV_EXT4_INTERFACE="mmc"
CONFIG_ENV_EXT4_DEVICE_AND_PART="2:2"
CONFIG_ENV_EXT4_FILE="/u-boot-initial-env-sd"
CONFIG_SYS_REDUNDAND_ENVIRONMENT=n
CONFIG_USE_DEFAULT_ENV_FILE="/u-boot-initial-env-sd"
CONFIG_ENV_IS_NOWHERE=y"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_SYS_MMC_ENV_PART=2
Complete U-Boot environment related portion of ".config" file for compilation:
#
# Environment
#
CONFIG_ENV_SUPPORT=y
CONFIG_ENV_SOURCE_FILE=""
CONFIG_SAVEENV=y
# CONFIG_ENV_OVERWRITE is not set
CONFIG_ENV_IS_NOWHERE=y
# CONFIG_ENV_IS_IN_EEPROM is not set
# CONFIG_ENV_IS_IN_FAT is not set
CONFIG_ENV_IS_IN_EXT4=y
# CONFIG_ENV_IS_IN_FLASH is not set
CONFIG_ENV_IS_IN_MMC=y
# CONFIG_ENV_IS_IN_NAND is not set
# CONFIG_ENV_IS_IN_NVRAM is not set
# CONFIG_ENV_IS_IN_ONENAND is not set
# CONFIG_ENV_IS_IN_REMOTE is not set
# CONFIG_ENV_IS_IN_SATA is not set
# CONFIG_ENV_IS_IN_SPI_FLASH is not set
# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set
CONFIG_ENV_EXT4_INTERFACE="mmc"
CONFIG_ENV_EXT4_DEVICE_AND_PART="2:2"
CONFIG_ENV_EXT4_FILE="/u-boot-initial-env-sd"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_SYS_MMC_ENV_PART=2
# CONFIG_USE_DEFAULT_ENV_FILE is not set
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
# CONFIG_ENV_IMPORT_FDT is not set
# CONFIG_ENV_APPEND is not set
# CONFIG_ENV_WRITEABLE_LIST is not set
# CONFIG_ENV_ACCESS_IGNORE_FORCE is not set
# CONFIG_VERSION_VARIABLE is not set
CONFIG_NET=y
CONFIG_PROT_UDP=y
# CONFIG_BOOTP_SEND_HOSTNAME is not set
CONFIG_NET_RANDOM_ETHADDR=y
# CONFIG_NETCONSOLE is not set
# CONFIG_IP_DEFRAG is not set
CONFIG_TFTP_BLOCKSIZE=1468
CONFIG_TFTP_WINDOWSIZE=1
# CONFIG_TFTP_TSIZE is not set
# CONFIG_SERVERIP_FROM_PROXYDHCP is not set
CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100
# CONFIG_KEEP_SERVERADDR is not set
# CONFIG_UDP_CHECKSUM is not set
# CONFIG_BOOTP_SERVERIP is not set
How can I determine where U-Boot is storing the persistent environment and debug the disconnect between Linux userspace and U-Boot?
UPDATE:
I have a hunch that there is some misconfiguration in U-Boot since I am seeing the following:
Loading Environment from MMC... OK
When I would expect to see this for EXT4:
Loading Environment from EXT4... OK
The same for 'saveenv' from U-Boot. It refers to MMC and not EXT4:
iot-gate-imx8plus *** My Debug U-Boot => saveenv
Saving Environment to MMC... Writing to MMC(2)... OK
I would expect the following:
Saving Environment to EXT4...
PhilBot
(101 rep)
Aug 26, 2024, 02:45 AM
1
votes
2
answers
3709
views
Problems running bitbake on Kirkstone
So I was able to set up Poky Honister and get that working a while back but I'd like to move to Kirkstone for a variety of reasons. I keep getting the following errors and I have no idea whats going on I've spent the last 8 hours trying to get past these errors to no avail. Any ideas? I have read th...
So I was able to set up Poky Honister and get that working a while back but I'd like to move to Kirkstone for a variety of reasons.
I keep getting the following errors and I have no idea whats going on I've spent the last 8 hours trying to get past these errors to no avail.
Any ideas?
I have read the following url
https://low-level.wiki/yocto/kirkstone-upgrade.html
This problem doesn't seem to be on that site so I'm very confused.
I'm going to try and pull down the entire project again just in case I maybe pulled down an incorrect branch somewhere
WARNING: pseudo-native-1.9.0+gitAUTOINC+2b4b88eb51-r0 do_fetch: Failed to fetch URL git://git.yoctoproject.org/pseudo;branch=oe-core, attempting MIRRORS if available
WARNING: gnu-config-native-20211108+gitAUTOINC+191bcb948f-r0 do_fetch: Failed to fetch URL git://git.savannah.gnu.org/git/config.git;protocol=https;branch=master, attempting MIRRORS if available
WARNING: pkgconfig-native-0.29.2+gitAUTOINC+d97db4fae4-r0 do_fetch: Failed to fetch URL git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https, attempting MIRRORS if available
ERROR: binutils-cross-aarch64-2.38-r0 do_unpack: Bitbake Fetcher Error: FetchError('Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1871"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/justin/poky-kirkstone/scripts/cross-intercept:/home/justin/kirkstone-build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/justin/poky-kirkstone/scripts:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/crossscripts:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/usr/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/recipe-sysroot-native/bin:/home/justin/poky-kirkstone/bitbake/bin:/home/justin/kirkstone-build/build/tmp/hosttools"; export HOME="/home/justin"; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat remote set-url origin git://sourceware.org/git/binutils-gdb.git failed with exit code 1, output:\nTraceback (most recent call last):\n File "/home/justin/kirkstone-build/build/tmp/hosttools/git", line 26, in \n os.execv(real_git, sys.argv)\nTypeError: execv: path should be string, bytes or os.PathLike, not NoneType\n', None)
ERROR: Logfile of failure stored in: /home/justin/kirkstone-build/build/tmp/work/x86_64-linux/binutils-cross-aarch64/2.38-r0/temp/log.do_unpack.4409
ERROR: Task (/home/justin/poky-kirkstone/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_unpack) failed with exit code '1'
ERROR: gnu-config-native-20211108+gitAUTOINC+191bcb948f-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1871"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/justin/poky-kirkstone/scripts/native-intercept:/home/justin/kirkstone-build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/justin/poky-kirkstone/scripts:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/recipe-sysroot-native/usr/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/recipe-sysroot-native/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/recipe-sysroot-native/bin:/home/justin/poky-kirkstone/bitbake/bin:/home/justin/kirkstone-build/build/tmp/hosttools"; export HOME="/home/justin"; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat remote failed with exit code 1, output:
Traceback (most recent call last):
File "/home/justin/kirkstone-build/build/tmp/hosttools/git", line 26, in
os.execv(real_git, sys.argv)
TypeError: execv: path should be string, bytes or os.PathLike, not NoneType
ERROR: gnu-config-native-20211108+gitAUTOINC+191bcb948f-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://git.savannah.gnu.org/git/config.git;protocol=https;branch=master')
ERROR: Logfile of failure stored in: /home/justin/kirkstone-build/build/tmp/work/x86_64-linux/gnu-config-native/20211108+gitAUTOINC+191bcb948f-r0/temp/log.do_fetch.4406
ERROR: Task (virtual:native:/home/justin/poky-kirkstone/meta/recipes-devtools/gnu-config/gnu-config_git.bb:do_fetch) failed with exit code '1'
ERROR: pkgconfig-native-0.29.2+gitAUTOINC+d97db4fae4-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1871"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/justin/poky-kirkstone/scripts/native-intercept:/home/justin/kirkstone-build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/justin/poky-kirkstone/scripts:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/recipe-sysroot-native/usr/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/recipe-sysroot-native/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/recipe-sysroot-native/bin:/home/justin/poky-kirkstone/bitbake/bin:/home/justin/kirkstone-build/build/tmp/hosttools"; export HOME="/home/justin"; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat remote failed with exit code 1, output:
Traceback (most recent call last):
File "/home/justin/kirkstone-build/build/tmp/hosttools/git", line 26, in
os.execv(real_git, sys.argv)
TypeError: execv: path should be string, bytes or os.PathLike, not NoneType
ERROR: pkgconfig-native-0.29.2+gitAUTOINC+d97db4fae4-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https')
ERROR: Logfile of failure stored in: /home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+d97db4fae4-r0/temp/log.do_fetch.4407
ERROR: Task (virtual:native:/home/justin/poky-kirkstone/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_fetch) failed with exit code '1'
ERROR: pseudo-native-1.9.0+gitAUTOINC+2b4b88eb51-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1871"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/justin/poky-kirkstone/scripts/native-intercept:/home/justin/kirkstone-build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/justin/poky-kirkstone/scripts:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/recipe-sysroot-native/usr/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/recipe-sysroot-native/usr/bin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/recipe-sysroot-native/sbin:/home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/recipe-sysroot-native/bin:/home/justin/poky-kirkstone/bitbake/bin:/home/justin/kirkstone-build/build/tmp/hosttools"; export HOME="/home/justin"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror git://git.yoctoproject.org/pseudo /home/justin/kirkstone-build/build/downloads/git2/git.yoctoproject.org.pseudo --progress failed with exit code 1, no output
ERROR: pseudo-native-1.9.0+gitAUTOINC+2b4b88eb51-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://git.yoctoproject.org/pseudo;branch=oe-core')
ERROR: Logfile of failure stored in: /home/justin/kirkstone-build/build/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+2b4b88eb51-r0/temp/log.do_fetch.4408
ERROR: Task (virtual:native:/home/justin/poky-kirkstone/meta/recipes-devtools/pseudo/pseudo_git.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 74 tasks of which 70 didn't need to be rerun and 4 failed.
Summary: 4 tasks failed:
/home/justin/poky-kirkstone/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_unpack
virtual:native:/home/justin/poky-kirkstone/meta/recipes-devtools/gnu-config/gnu-config_git.bb:do_fetch
virtual:native:/home/justin/poky-kirkstone/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_fetch
virtual:native:/home/justin/poky-kirkstone/meta/recipes-devtools/pseudo/pseudo_git.bb:do_fetch
Summary: There were 55 WARNING messages.
Summary: There were 7 ERROR messages, returning a non-zero exit code.
HelloWorld
(51 rep)
Jun 21, 2022, 07:25 PM
• Last activity: Jul 14, 2024, 07:01 PM
1
votes
1
answers
249
views
How do I remove ntpd from the final image with my own recipe?
I want to get rid of all ntpd related stuff from my yocto linux image. Currently I include the [meta-openembedded][1] layer, which is responsible that the NTP service [ntpd][2] is installed on my final image. Since I don't need it and want to keep my image as small as possible, I would like to know...
I want to get rid of all ntpd related stuff from my yocto linux image.
Currently I include the meta-openembedded layer, which is responsible that the NTP service ntpd is installed on my final image.
Since I don't need it and want to keep my image as small as possible, I would like to know how I can remove it with my own recipe without messing around with the meta-openembedded layer.
I tried to create a recipe recipes-support/ntp/ntp_%.bbappend recipe in which I set the follwing:
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
CONFIG_NTPD = "n"
But this does not seem to work. So my question would be how I can deactivate a recipe with another recipe or exclude it from the final image.
I have also tried it from a
python() {}
or do_install:append()
block with d.setVar("CONFIG_NTPD", "n")
but also without success. This would even have the charming advantage that I could link the removal of the NTP packets to another variable.
schande
(115 rep)
Nov 9, 2023, 10:31 AM
• Last activity: Jul 12, 2024, 08:44 PM
1
votes
0
answers
3995
views
Compiling CFLAGS in a Yocto Recipe File
**Issue:** I have 2 macros I added in a c file and I have 2 machines. Using Yocto recipe I wish to build the code with specific macros for specific machines. Breaking down the issue in sub parts - **hello.c** ``` // Simple hello.c program #include void main(){ printf("Hello World!\n"); //Introducing...
**Issue:** I have 2 macros I added in a c file and I have 2 machines. Using Yocto recipe I wish to build the code with specific macros for specific machines.
Breaking down the issue in sub parts -
**hello.c**
// Simple hello.c program
#include
void main(){
printf("Hello World!\n");
//Introducing Macro 1 -- abc
#ifdef abc
printf("Day 1\n");
#endif
//Introducing Macro 2 -- xyz
#ifdef xyz
printf("Day 2\n");
#endif
}
**Expected & Observed Output:**
gcc hello.c -o hello
./hello
Hello World!
gcc hello.c -Dabc -o test1
./test1
Hello World!
Day 1
gcc hello.c -Dxyz -o test2
./test2
Hello World!
Day 2
**Makefile Contents:**
obj-m := hello.o
SRC := ${shell pwd}
CFLAGS += -Dabc
all:
${MAKE} -C M=${SRC} ${CFLAGS}
test_install:
${MAKE} -C M=${SRC} ${CFLAGS} test_install
clean:
rm -rf *.o
Have checked the above Makefile contents using cat -e -t Makefile
. It is properly terminated with $ at end of each line.
Since I am using MAKE, it does have the gcc compiler.
In the Makefile I have hardcoded CFLAGS="-Dabc" , intention being if the code is compiled accordingly then I can add ifeq condition to the Makefile handle the other CFLAGS="-Dxyz"
**Recipe File Contents:**
S = "${WORKDIR}/helloworld/hello"
COMPATIBLE_MACHINE = "oldmachine|newmachine"
EXTRA_OEMAKE_oldmachine += "CFLAGS=-Dabc"
EXTRA_OEMAKE_newmachine += "CFLAGS=-Dxyz"
do_compile(){
${EXTRA_OEMAKE}_${MACHINE}
}
The default function of do_compile is to run oe_runmake, I assumed that it will be picking up this CFLAGS which I am trying to pass.
I checked the contents of the log.do_compile under tmp/work/... folder and I do not see the CFLAGS being used.
The above recipe I also re-wrote as
do_compile_append_oldmachine(){
CFLAGS="-Dabc"
}
do_compile_append_newmachine(){
CFLAGS="-Dxyz" #Also tried passing EXTRA_OEMAKE_MACHINE as above
}
This method also, unable to find the CFLAGS part when I check the log.do_compile file under tmp/work/.. directory.
How do I make use the CFLAGS so that it compiles the code as per the specific architecture?
**Misc Details:**
Under the specific meta layer, I have the directory like this.
helloworld
- hello.c
- hello.o
- Makefile
Note: Due to less rep, could not add CFLAGS as a tag for this.
Nathan
(31 rep)
Mar 27, 2023, 03:28 AM
• Last activity: Jun 20, 2024, 06:28 AM
1
votes
0
answers
194
views
How can daemons source environment variables on a machine without persistent storage
I'm working on a Yocto Project build of an AARCH64 system, where I need the `monit` daemon (or at least a process started by monit) to access an environment variable I'm setting. It's my understanding that normally creating a script under `/etc/profile.d` would work, but since there's no persistent...
I'm working on a Yocto Project build of an AARCH64 system, where I need the
monit
daemon (or at least a process started by monit) to access an environment variable I'm setting.
It's my understanding that normally creating a script under /etc/profile.d
would work, but since there's no persistent storage on the machine, I'm pretty sure the monit
daemon is started before that script is created in profile.d
(I created it under a do_install()
function in a bitbake recipe).
I do have a workaround where I just export the environment variable in the scripts called by monit, but that feels like the incorrect way to do it.
Any thoughts?
Patrick M
(11 rep)
Sep 13, 2023, 06:51 PM
• Last activity: Sep 14, 2023, 08:37 PM
1
votes
1
answers
801
views
"-dev package mylib-dev contains non-symlink" error when building lib using Yocto bitbake
I am trying to build Linux distribution using Yocto project, the target board is STM32MP157A-DK1 board ,I am using distribution package and meta data delivered by STMicroelectronics for OpenSTLinux. I want to add c++ library based on cmake to my distribution. I crated the recipe using command devtoo...
I am trying to build Linux distribution using Yocto project, the target board is STM32MP157A-DK1 board ,I am using distribution package and meta data delivered by STMicroelectronics for OpenSTLinux.
I want to add c++ library based on cmake to my distribution.
I crated the recipe using command
devtool add --no-same-dir ../pass/to/mylib
Then build using
bitbake mylib
The build is done but I get this error by do_package_qa
"do_package_qa: QA Issue: -dev package mylib-dev contains non-symlink .so '/usr/lib/mylib.so' [dev-elf]"
what is the reason for such error and how to overcome it?
Hossam Alzomor
(11 rep)
Aug 9, 2023, 05:32 AM
• Last activity: Aug 10, 2023, 04:20 PM
0
votes
1
answers
1454
views
How do I edit '/etc/ld.so.conf' in a yocto recipe?
As suggested by [Zac Anger][1], i copy [this][2] question over here: I have a yocto recipe in which I copy/install some stuff to an image. After that, I want to add a line to the `/etc/ld.so.conf` file like this, so that the dynamic loader finds my library files: do_install(){ # install some stuff.....
As suggested by Zac Anger , i copy this question over here:
I have a yocto recipe in which I copy/install some stuff to an image. After that, I want to add a line to the
/etc/ld.so.conf
file like this, so that the dynamic loader finds my library files:
do_install(){
# install some stuff...
echo /opt/myStuff/lib >> /etc/ld.so.conf
ldconfig
}
During the build process I get the following error which aborts the build process:
...
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| /home/debian/Devel/myYocto/build/tmp/work/myTarget/myRecipe/1.0-r0/temp/run.do_install.3176: 203: cannot create /etc/ld.so.conf: Permission denied
| WARNING: exit code 2 from a shell command.
ERROR: Task (/home/debian/Devel/myYocto/poky/meta-myLayer/myRecipe/myRecipe.bb:do_install) failed with exit code '1'
Now to my question: How do I add a custom path to the dynamic loader by adding a line or editing the /etc/ld.so.conf
file in a yocto recipe?
schande
(115 rep)
May 24, 2023, 06:15 AM
• Last activity: May 24, 2023, 08:18 AM
0
votes
1
answers
543
views
Get bitbake to use a different locale
I'm running through the Yocto Quick Build tutorial, and I've got to the command ``` bash bitbake core-image-sato ``` This is producing the error > Your system need to support the en_US.UTF-8 locale. Can I change this so it uses the en_GB.UTF-8 locale? I don't want to end up with a build that uses a...
I'm running through the Yocto Quick Build tutorial, and I've got to the command
bash
bitbake core-image-sato
This is producing the error
> Your system need to support the en_US.UTF-8 locale.
Can I change this so it uses the en_GB.UTF-8 locale? I don't want to end up with a build that uses a US locale.
Matt Ellen
(123 rep)
Apr 25, 2023, 11:54 AM
• Last activity: Apr 25, 2023, 12:01 PM
1
votes
1
answers
330
views
Reusing source files between machines in bitbake
My goal is to share source files between some machines, but not all. In this example, `machine_a` and `machine_b` have source directories that are exact copies of each other an I'd like to combine them together somehow to reduce the duplication. recipe/ machine_a/ script_1.sh script_2.sh machine_b/...
My goal is to share source files between some machines, but not all. In this example,
machine_a
and machine_b
have source directories that are exact copies of each other an I'd like to combine them together somehow to reduce the duplication.
recipe/
machine_a/
script_1.sh
script_2.sh
machine_b/
script_1.sh
script_2.sh
machine_c/
script_3.sh
I've tried symbolically linking machine_b/
to machine_a/
as well as linking the individual source files (machine_b/script_1.sh
-> machine_a/script_1.sh
etc) but the problem is that since the build is done in a docker container and the do_fetch()
task doesn't perform a deep copy, the build can't access the original source file.
I can think of other ways like changing MACHINE_NAME
inside the recipe, but I don't think that'd work cleanly.
What's the best way to accomplish this?
andrey
(61 rep)
Nov 3, 2022, 05:25 PM
• Last activity: Nov 14, 2022, 03:32 PM
1
votes
0
answers
600
views
understanding datastore in bitbake
I am new to bitbake. I am going through [the user manual][1] for learning and I got a doubt in the section quoted below > ### [3.5.3. Passing Information Into the Build Task Environment][2] > > When running a task, BitBake tightly controls the execution > environment of the build tasks to make sure...
I am new to bitbake. I am going through the user manual for learning and I got a doubt in the section quoted below
> ### 3.5.3. Passing Information Into the Build Task Environment
>
> When running a task, BitBake tightly controls the execution
> environment of the build tasks to make sure unwanted contamination
> from the build machine cannot influence the build. Consequently, if
> you do want something to get passed into the build task environment,
> you must take these two steps:
>
> 1. Tell BitBake to load what you want from the environment into the datastore. You can do so through the
BB_ENV_EXTRAWHITE
variable. For
> example, assume you want to prevent the build system from accessing
> your $HOME/.ccache
directory. The following command tells BitBake to
> load CCACHE_DIR
from the environment into the datastore:
>
> export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
>
>
> 2. Tell BitBake to export what you have loaded into the datastore to the task environment of every running task. Loading something from
> the environment into the datastore (previous step) only makes it
> available in the datastore. To export it to the task environment of
> every running task, use a command similar to the following in your
> local configuration file local.conf or your distribution configuration
> file:
>
> export CCACHE_DIR
It says from external environment i have to load necessary values to datastore and from there export to task environment.
As per my understanding it is something like from my PC i have load in necessary data to a structure called datastore and that should be loaded in bitbake environment for it to get processed by bitbake.
But i am not able to get a clear overview.
Can you explain me (if possible with example) what are external environment variables, internal environment variable and datastore?
jeyshree
(11 rep)
May 24, 2022, 07:28 AM
• Last activity: May 24, 2022, 02:47 PM
0
votes
1
answers
1258
views
what happens when shell script is built in bitbake
I am just tying to understand the `bitbake` build system. I have a doubt regarding how shell functions/task gets executed. I am going through below documentation https://docs.yoctoproject.org/bitbake/ In a part of documentation it says shell scripts are executed by `/bin/sh`. In another part of docu...
I am just tying to understand the
bitbake
build system. I have a doubt regarding how shell functions/task gets executed. I am going through below documentation https://docs.yoctoproject.org/bitbake/
In a part of documentation it says shell scripts are executed by /bin/sh
. In another part of documentation it says "BitBake writes a shell script to ${T}/run.do_taskname.pid and then executes the script".
What is run.do_taskname.pid
? what exactly does it do? What exactly happens when bitbake
encounters a shell script?
jeyshree
(11 rep)
May 24, 2022, 09:05 AM
• Last activity: May 24, 2022, 09:32 AM
0
votes
1
answers
934
views
Bitbake Congatec Yocto - hangs in step: parsing recipes. git ls-remote http://<user>:<key>@host/project hangs
Everything worked before. But at one point everything got stuck at the step of parsing recipes. How can i fix it? ./clear_mntconti_cpp.sh source /opt/yocto/.yocto_build.rocko/poky/oe-init-build-env /opt/yocto/.yocto_build.rocko/build && \ bitbake -r /opt/yocto/.yocto_build.rocko/build/conf/bblayers_...
Everything worked before. But at one point everything got stuck at the step of parsing recipes. How can i fix it?
./clear_mntconti_cpp.sh
source /opt/yocto/.yocto_build.rocko/poky/oe-init-build-env /opt/yocto/.yocto_build.rocko/build && \
bitbake -r /opt/yocto/.yocto_build.rocko/build/conf/bblayers_before.conf -c cleansstate -f mntconti-tracker && \
bitbake -r /opt/yocto/.yocto_build.rocko/build/conf/bblayers_before.conf -c clean -f mntconti-tracker && \
bitbake -r /opt/yocto/.yocto_build.rocko/build/conf/bblayers_before.conf -c cleanall -f mntconti-tracker
### Shell environment set up for builds. ###
You can now run 'bitbake '
Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
meta-ide-support
You can also run generated qemu images with a command like 'runqemu qemux86'
Parsing recipes: 0% |# | ETA: 0:01:12
Update:
I find that this command
git ls-remote http://:@host/project
are hangs, and i have no idea why...
GendOS
(11 rep)
Feb 22, 2022, 09:36 AM
• Last activity: Feb 25, 2022, 08:40 AM
0
votes
1
answers
348
views
yocto: psplash custom executables do not get installed
Depending on the detected hardware I need to start one of two executables of `psplash` with different images, so in my `psplash_%.bbappend` I have SPLASH_IMAGES = "file://bootscreen1.png;outsuffix=type1 \ file://bootscreen2.png;outsuffix=type2" And if I `bitbake` it, I find a `psplash-type1` and `ps...
Depending on the detected hardware I need to start one of two executables of
psplash
with different images, so in my psplash_%.bbappend
I have
SPLASH_IMAGES = "file://bootscreen1.png;outsuffix=type1 \
file://bootscreen2.png;outsuffix=type2"
And if I bitbake
it, I find a psplash-type1
and psplash-type2
executable in the tmp/work/.../psplash/build
as well as in package
and packages-split
and even in image
, but it doesn't get included in the final rootfs (there I only find psplash-write
).
Do I really need to explicitly install the executables, while a psplash-default
along with the psplash
link is created automatically and the custom executables are also created magically?
Philippos
(13680 rep)
Sep 28, 2021, 05:25 AM
• Last activity: Sep 28, 2021, 07:44 AM
1
votes
2
answers
4570
views
Yocto - patch has not been applied
I am working with Linux built with Yocto. I need to add some changes to `/etc/ssh/sshd_config` file. I created the following patch file using `meld`: --- a/sshd_config +++ b/sshd_config @@ -116,3 +116,8 @@ # AllowTcpForwarding no # PermitTTY no # ForceCommand cvs server + +#SFTP server configuration...
I am working with Linux built with Yocto. I need to add some changes to
/etc/ssh/sshd_config
file. I created the following patch file using meld
:
--- a/sshd_config
+++ b/sshd_config
@@ -116,3 +116,8 @@
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
+
+#SFTP server configuration
+Match Group root
+ChrootDirectory /share
+ForceCommand internal-sftp
In meta-mylayer/recipes-connectivity/openssh
I created the openssh_8.2p1.bbappend
file with the following content:
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://configure_sftp_server.patch"
In the same directory I put my .patch file. The problem is that Yocto shows neither errors nor warnings during building the image but it doesn't apply my patch.
After creating the patch file I was changed first two lines because in meld version they contained absolute paths to compared files. I suppose that this may be the problem but I don't know what I should write.
Thank you in advance for any help.
tomi7654
(15 rep)
May 13, 2021, 10:37 AM
• Last activity: Sep 13, 2021, 01:39 PM
2
votes
0
answers
2438
views
How to start using google tests on a Yocto(Open Embedded) System
I'm doing a project for ARM64 devices and am using Linux Embedded as the OS. I am trying to using Google Tests but when running bitbake, it is failing. Heres the error: | CMake Error at /#####/tmp-glibc/work/#####-oe-linux/project_name/1.0-r0/recipe-sysroot-native/usr/share/cmake-3.16/Modules/Google...
I'm doing a project for ARM64 devices and am using Linux Embedded as the OS. I am trying to using Google Tests but when running bitbake, it is failing.
Heres the error:
| CMake Error at /#####/tmp-glibc/work/#####-oe-linux/project_name/1.0-r0/recipe-sysroot-native/usr/share/cmake-3.16/Modules/GoogleTestAddTests.cmake:40 (message):
| Error running test executable.
|
| Path: '/#####/tmp-glibc/work/#####-oe-linux/project_name/1.0-r0/build/projectName/hello_test'
| Result: 126
| Output:
|
|
|
|
| ninja: build stopped: subcommand failed.
| WARNING: /#####/tmp-glibc/work/#####-oe-linux/project_name/1.0-r0/temp/run.do_compile.19988:1 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/#####/tmp-glibc/work/#####-oe-linux/project_name/1.0-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
I've edited the cmake in my src folder and added these components wrt Gtests:
cmake_minimum_required(VERSION 3.5.0)
# set the project name and version
project(project_name)
#specify C++ standards
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
add_compile_options (-std=c++11 -Wall)
configure_file(common/inc/common.h.in common.h)
add_definitions(-DPACKAGE_ARCH=${PACKAGE_ARCH})
add_definitions(-DPACKAGE_DISTRO=${PACKAGE_DISTRO})
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
add_subdirectory (executable_name ${PROJECT_BINARY_DIR}/srclocation)
CMake for the file containing test case:
set(S_EXECUTABLE executableName)
#specify C++ standards
add_compile_options (-std=c++11 -Wall)
# add the executable
add_executable(${S_EXECUTABLE } src/abc.cpp)
target_include_directories(${S_EXECUTABLE}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc
PUBLIC ${PROJECT_BINARY_DIR})
install(
TARGETS ${S_EXECUTABLE}
RUNTIME DESTINATION ${FOOBAR_INSTALL_BINDIR}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
GROUP_EXECUTE GROUP_READ
)
enable_testing()
add_executable(
hello_test
src/hello_test.cpp
)
target_link_libraries(
hello_test
gtest_main
)
include(GoogleTest)
gtest_discover_tests(hello_test)
Md. Mohsin Hussain
(21 rep)
Jul 1, 2021, 08:05 AM
Showing page 1 of 20 total questions