I am not able to build tipc module when executed Makefile using make command in the path /tipc-1.7.7-bundle/net/tipc. The errors comes as target not found. I extracted the tipc 1.7 package in root directory. My operating system is CentOs 6.3. The Makefile contents are
#
# Makefile for the Linux TIPC layer
#
obj-$(CONFIG_TIPC) := tipc.o
tipc-y += tipc_addr.o tipc_bcast.o tipc_bearer.o tipc_cfgsrv.o \
tipc_core.o tipc_handler.o tipc_link.o tipc_discover.o tipc_msg.o \
tipc_name_distr.o tipc_topsrv.o tipc_name_table.o tipc_net.o \
tipc_netlink.o tipc_node.o tipc_port.o tipc_ref.o \
tipc_socket.o tipc_user_reg.o tipc_dbg.o tipc_eth_media.o
# End of file
Please help, i am newbie to linux.
Related
I built a yocto distro (rocko) for my BBB using kernel linux-ti-staging-4.14 with a custom device tree. Since I need to port an old project from Debian to Yocto, I also needed to enable the UIO features in the kernel, which works fine too.
Now I need to also create an additonal device-tree-overlay for the UIO PRUSS. I use a dts file from here and extended the kernel recipe via bbappend:
inherit kernel-devicetree
FILESEXTRAPATHS_prepend := "${THISDIR}/files/dts:${THISDIR}/files/beaglebone:"
# Make custom kernel with PRU enabled
SRC_URI += " \
file://bbb-pru-minimal.dts;subdir=git/arch/${ARCH}/boot/dts \
file://AM335X-PRU-UIO-00A0-overlay.dts;subdir=git/arch/${ARCH}/boot/dts/overlays \
file://0001-add-UIO-dtbo.patch \
file://defconfig \
"
KERNEL_DEVICETREE = " \
AM335X-PRU-UIO-00A0.dtbo \
bbb-pru-minimal.dtb \
"
The above listed patch file contains:
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7949c213a434..fe2513074893 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
## -610,6 +610,7 ## dtb-$(CONFIG_SOC_TI81XX) += \
dm8168-evm.dtb \
dra62x-j5eco-evm.dtb
dtb-$(CONFIG_SOC_AM33XX) += \
+ AM335X-PRU-UIO-00A0.dtbo \
am335x-baltos-ir2110.dtb \
am335x-baltos-ir3220.dtb \
am335x-baltos-ir5221.dtb \
However, the kernel build fails as it seems there is no rule for .dtbo targets:
| CC scripts/mod/empty.o
| CC scripts/mod/devicetable-offsets.s
| MKELF scripts/mod/elfconfig.h
| HOSTCC scripts/mod/modpost.o
| HOSTCC scripts/mod/sumversion.o
| CHK scripts/mod/devicetable-offsets.h
| HOSTCC scripts/mod/file2alias.o
| HOSTLD scripts/mod/modpost
| NOTE: make -j 24 HOSTCC=gcc -isystem[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/include -O2 -pipe -L[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/lib -L[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/lib -Wl,-rpath-link,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/lib -Wl,-rpath-link,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/lib -Wl,-rpath,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/lib -Wl,-rpath,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=[TOPDIR]/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E AM335X-PRU-UIO-00A0.dtbo
| CHK scripts/mod/devicetable-offsets.h
| make[3]: *** No rule to make target 'arch/arm/boot/dts/AM335X-PRU-UIO-00A0.dtbo'. Stop.
| arch/arm/Makefile:345: recipe for target 'AM335X-PRU-UIO-00A0.dtbo' failed
| make[2]: *** [AM335X-PRU-UIO-00A0.dtbo] Error 2
| Makefile:146: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
Please note, I replaced the absolute paths in the error message with [TOPDIR] due to privacy reasons.
Since I am fairly new to overlay creation I don't really know what I am missing or how to fix it. Any hints?
Thank you in advance!
Update: Added patch file to description above.
Here is what I found after analyzing Toradex's git projects that can inspire you for a solution:
They have a custom class that handles their device tree files and device tree overlays, here.
The class inherits devicetree that is an official poky class here.
The devicetree class tests if a device tree is an overlay or normal and then it compiles all of them.
So, you can basically use devicetree class in a custom recipe to compile device tree overlays and deploy them manually into your rootfs.
Toradex also has a simple recipe like that here. They have a git project that holds all of their device tree overlays.
That being said, I think Toradex doesn't use the custom recipe, rather they use the custom toradex-devicetree class which inherits from devicetree, compiles all device tree overlays from their device tree overlays git project and then deploy them all into the rootfs.
In that custom class, they append to do_deploy of devicetree class to install the .dtbo files and add them to overlays.txt file under the boot partition.
So finally, you can create a bbappend file for you kernel recipe if you don't have one, and try to follow these steps:
Inherit from devicetree
Add your dts files that are overlays to SRC_URI via local files or URL
Add the path for your overlays to DT_FILES_PATH of the devicetree class
In the kernel recipe, append to do_deploy to add them to rootfs.
Now, here is my advice to achieve this step by step:
Create a custom recipe that uses devicetree class with dts overlay example file
Check if it compiles it correctly
If you understand that, you can then apply the 4 steps above.
Thanks to the hints from #BelHadjSalem I was able to manage the dtbo build.
The class file devicetree.bbclass was introduced in Yocto with release "thud", therefore I updated my whole workspace to the latest Yocto release (dunfell). Afterwards I created a new recipe just to build my dtbo overlay:
inherit devicetree
FILESEXTRAPATHS_prepend := "${THISDIR}/files/dts:"
SRC_URI = " \
file://AM335X-PRU-UIO-00A0.dts;subdir=git/overlays \
"
S = "${WORKDIR}/git/overlays"
COMPATIBLE_MACHINE = ".*(ti33x|beaglebone).*"
The recipe is pretty simple and works in my project as required.
However, one important note: Inheriting the devicetree.bbclass in any kernel recipe or kernel bbappend file, will NOT work! Not sure what exactly happens, but the inheritance of devicetree.bbclass will invalidate the kernel recipe configuration and fail with ERROR: Nothing PROVIDES 'virtual/kernel'
I want to build a Linux System with Yocto for the Raspberry Pi with enabled IMA & TPM2.0 support. Therefore I want to compile the kernel with IMA/EVM and TPM Configs and Recipes.
The IMA support should be enabled through the layer meta-secure-core/meta-integrity and adding DISTRO_FEATURE "ima", aswell as IMAGE_INSTALL_append "packagegroup-ima" for the tools. The TPM2 support should be enabled through the meta-security/meta-tpm layer and by adding MACHINE_FEATURES "tpm2" and installing "packagegroup-security-tpm2" via IMAGE_INSTALL_append.
Furthermore, if I understand it correctly, I need systemd as the init_manager.
Yocto Version (Thud/2.6.3). I tried Warrior but ran into build errors. This creates a 4.14.X Linux Kernel.
bblayers.conf:
BBLAYERS ?= " \
/<working-dir>/poky/meta \
/<working-dir>/poky/meta-poky \
/<working-dir>/poky/meta-yocto-bsp \
/<working-dir>/meta-openembedded/meta-oe \
/<working-dir>/meta-openembedded/meta-python \
/<working-dir>/meta-openembedded/meta-networking \
/<working-dir>/meta-openembedded/meta-perl \
/<working-dir>/meta-security \
/<working-dir>/meta-security/meta-tpm \
/<working-dir>/meta-secure-core/meta-integrity \
/<working-dir>/meta-raspberrypi \
"
local.conf:
MACHINE = "raspberrypi3"
...
DISTRO_FEATURES_append += "systemd ima"
VIRTUAL-RUNTIME_init_manager = "systemd"
MACHINE_FEATURES += "tpm2"
IMAGE_INSTALL_append += "packagegroup-security-tpm2 packagegroup-ima"
ENABLE_SPI_BUS = "1"
RPI_EXTRA_CONFIG = "\n \
dtoverlay=tpm-slb9670 \n"
Builds:
/<working-dir>/build/$ bitbake core-image-minimal
I expected the following entries in /proc/config.gz
For TPM:
CONFIG_HW_RANDOM_TPM=y
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
CONFIG_TCG_CRB=y
CONFIG_SECURITYFS=y
For IMA:
CONFIG_IMA=y
# CONFIG_IMA_KEXEC is not set
# CONFIG_IMA_LSM_RULES is not set
CONFIG_IMA_WRITE_POLICY=y
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_MEASURE_PCR_IDX=10
# CONFIG_IMA_TEMPLATE is not set
# CONFIG_IMA_NG_TEMPLATE=y is not set
CONFIG_IMA_SIG_TEMPLATE=y
CONFIG_IMA_DEFAULT_TEMPLATE="ima-sig"
# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set
CONFIG_IMA_DEFAULT_HASH_SHA256=y
# CONFIG_IMA_DEFAULT_HASH_SHA512 is not set
# CONFIG_IMA_DEFAULT_HASH_WP512 is not set
CONFIG_IMA_DEFAULT_HASH="sha256"
CONFIG_IMA_APPRAISE=y
CONFIG_IMA_LOAD_X509=y
CONFIG_IMA_APPRAISE_BOOTPARAM=y
CONFIG_IMA_TRUSTED_KEYRING=y
CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY=y
CONFIG_IMA_BLACKLIST_KEYRING=y
CONFIG_IMA_X509_PATH="/etc/keys/x509_ima.der"
# CONFIG_IMA_APPRAISE_SIGNED_INIT is not set
However, searching on the built Linux on the Raspberry Pi for those settings none were enabled.
# modprobe configs
# cat /proc/config.gz | gunzip > running.conf
# cat running.conf | grep IMA
When I previously built for qemu, I didnt have those issues and I was able to confirm that my settings were enabled in the kernel. Only the tools like evmctl were installed.
Also, my settings for /boot/config.txt of the Raspi didnt seem to have an effect. In fact, there was no /boot/config.txt for me to open at all.
Ultimately, the TPM2 abrmd didnt start during boot (error msg) and I obviously couldnt access the TPM at /dev/tpm* via SPI.
What did I do wrong? I'm new to Yocto and System Building/Linux Kernel in general.
Incase it's related to the Kernel Version, I tried to build for 4.19 but got build errors. I also messed around with the meta-rpi layer from jumpnowtek but it didnt fix my problem. There is also a meta-intel-iot-security/meta-integrity layer but its not maintained.
you missed to modify the DTS.
I create a guide and a github project to insert TPM on Raspberry. Please see the following:
https://github.com/simonetolotti/meta-raspberrypi-web/tree/tpm
I was able to recompile Tensorflow from the Amazon's modified sources (provided in new their new deep learning AMI).
I am now trying to compile tf serving with that Tensorflow "fork" but I am getting that error:
ERROR: /root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/contrib/nccl/BUILD:68:1: undeclared inclusion(s) in rule '#org_tensorflow//tensorflow/contrib/nccl:nccl_kernels':
this rule is missing dependency declarations for the following files included by 'external/org_tensorflow/tensorflow/contrib/nccl/kernels/nccl_rewrite.cc':
'/root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/core/common_runtime/optimization_registry.h'
'/root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/core/common_runtime/device_set.h'
'/root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/core/common_runtime/device.h'
'/root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/core/graph/types.h'
'/root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/core/graph/costmodel.h'
'/root/.cache/bazel/_bazel_root/98acb40d8921d865487eab808ed364b2/external/org_tensorflow/tensorflow/core/graph/node_builder.h'
INFO: Elapsed time: 20.377s, Critical Path: 19.47s
FAILED: Build did NOT complete successfully
Some more info: I'm using the master branch of Tensorflow serving (commit 7a349752c2cbbe741edb91c6c6be1c571e91a5fb) and Bazel release 0.7.0.
I also made a small change to tools/bazel.rc to resolve another compilation error:
# git diff tools/bazel.rc
diff --git a/tools/bazel.rc b/tools/bazel.rc
index 9397f97..28476f3 100644
--- a/tools/bazel.rc
+++ b/tools/bazel.rc
## -1,4 +1,4 ##
-build:cuda --crosstool_top=#org_tensorflow//third_party/gpus/crosstool
+build:cuda --crosstool_top=#local_config_cuda//crosstool:toolchain
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true
build --force_python=py2
Any idea what is missing?
i usually disable NCCL since it never seems to build properly:
https://github.com/PipelineAI/pipeline/blob/6261c4f31105e40ab8b24ccc7834f9181f4e5aaf/package/tensorflow/16d39e9-d690fdd/Dockerfile.full-gpu#L160
RUN \
cd $TENSORFLOW_SERVING_HOME \
# Remove NCCL since it isn't building properly
&& sed -i.bak '/nccl/d' tensorflow/tensorflow/contrib/BUILD \
&& bazel build -c opt --config=cuda \
--verbose_failures \
--spawn_strategy=standalone --genrule_strategy=standalone \
--copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.1 --copt=-msse4.2 \
--crosstool_top=#local_config_cuda//crosstool:toolchain \
tensorflow_serving/... \
&& chmod a+x bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server \
&& cp bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server /usr/local/bin/ \
&& bazel clean --expunge
I am using Raspberry Pi 3 model B. I am facing build issue while building bitbake pulseaudio. Please find my configuration details:
Yocto : Jethro branch
pulseaudio.inc RDEPENDS_pulseaudio-server +=
"alsa-plugins-pulseaudio-conf"
we are using alsa-plugins_1.0.29.bb
bitbake pulseaudio
ERROR: Nothing RPROVIDES 'alsa-plugins-pulseaudio-conf' (but /home/guest/openembedded-core/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'alsa-plugins-pulseaudio-conf' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['alsa-plugins-pulseaudio-conf']
ERROR: Required build target 'pulseaudio' has no buildable providers.
Missing or unbuildable dependency chain was: ['pulseaudio', 'alsa-plugins-pulseaudio-conf']
Based on the recipe the package alsa-plugins-pulseaudio-conf is generated if "pulseaudio" is in the alsa-plugins PACKAGECONFIG. By default that happens if your DISTRO_FEATURES includes "pulseaudio".
So check your DISTRO_FEATURES, ensure "pulseaudio" is in there (and make sure you don't modify the alsa-plugins PACKAGECONFIG in a bad way).
To see what your DISTRO_FEATURES contains:
bitbake -e pulseaudio |grep "^DISTRO_FEATURES="
To add pulseaudio if it's not there right now (you can do this in local or distro config):
DISTRO_FEATURES_append = " pulseaudio "
The whitespace preceding the feature name is required.
To check what PACKAGECONFIG is getting used for alsa-plugins (this should contain "pulseaudio"):
bitbake -e alsa-plugins|grep "^PACKAGECONFIG="
I'm trying to set up Boost.Build for my own project, which references libboost_filesystem.
When I run
bjam release avg_asp
I get the following output:
andreas#rodin:~/src/libdoas/src/tools$ bjam release avg_asp -n
/home/andreas/lib/build/boost_1_42_0/Jamroot:637: in modules.load
rule targets.create-metatarget unknown in module Jamfile</home /andreas/lib/build/boost_1_42_0>.
/usr/share/boost-build/build/project.jam:312: in load-jamfile
/usr/share/boost-build/build/project.jam:68: in project.load
/usr/share/boost-build/build/project.jam:718: in project.use
/usr/share/boost-build/build/project.jam:94: in project.load-used-projects
/usr/share/boost-build/build-system.jam:105: in load-config
/usr/share/boost-build/build-system.jam:154: in load
/usr/share/boost-build/kernel/modules.jam:261: in import
/usr/share/boost-build/kernel/bootstrap.jam:132: in boost-build
/usr/share/boost-build/boost-build.jam:1: in module scope
I'd really appreciate some help getting this fixed...
~/user-config.jam
# -----------------
# System libraries
# -----------------
project site-config ;
lib netcdf : : <name>netcdf ;
# ------------------------
# Include Boost libraries
# ------------------------
use-project /boost : /home/andreas/lib/build/boost_1_42_0 ;
~/src/libdoas/Jamroot
project
: requirements <include>/home/andreas/include/boost-1_42
: requirements <include>include
;
~/src/libdoas/src/lib/Jamfile
lib libdoas : [ glob *.cpp ] /site-config//netcdf ;
~/src/libdoas/src/tools/Jamfile
exe avg_asp : avg_asp.cpp /boost/filesystem//boost_filesystem ;
exe b3dcols_to_pgl : b3dcols_to_pgl.cpp ;
In the directory /home/andreas/lib/build/boost_1_42_0, I already did the following::
./bootstrap.sh --prefix=/home/andreas
bjam
Any ideas?
All right, I got the answer from the boost-build mailing list. The problem is that I was using the boost-build / bjam from the Ubuntu repos, which is too old to build Boost 1.42. I uninstalled the Ubuntu version, and everything works fine now :)