By following this link:
https://www.yoctoproject.org/docs/3.0.2/brief-yoctoprojectqs/brief-yoctoprojectqs.html
I can build an yocto image and able to boot and login.
The problem is I want to add meta-oe recepie.
Here are my steps:
~/poky$git clone https://github.com/openembedded/meta-openembedded.git
~/poky$source oe-init-build-env
~/poky/build$bitbake-layers add-layer ../meta-openembedded/meta-oe
cd ..
~/poky/source oe-init-build-env
~/poky/build$bitbake core-image-minimal
When the output image comes out, boot, login, there is no any meta-oe package added into image, ex: no fio, no stresstestapp...etc.
Here is the output:
Loaded 2348 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "genericx86-64"
DISTRO = "poky"
DISTRO_VERSION = "3.0+snapshot-20200309"
TUNE_FEATURES = "m64 core2"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "master:92e172b5b4de8927d36409386dfce0fc2718f5d1"
meta-intel = "master:bba67420e6ae08e12d486247542a33de25d9ccff"
meta-oe
meta-webserver = "master:90683147fa6840b16816a75154dba89725ddb0a3"
meta-oe is a layer not a recipe. Layers are just logical separators, they have no influence on what is built.
Packages are the products of recipes and they are added to the image with
IMAGE_INSTALL_append = " {some recipe name}"
Related
I am trying to run a particular task in audit package.
I have attached .bb file for your reference
BB_VERSION:1.22.0
BUILD_SYS:x86_64-linux
NATIVELSBSTRING:Ubuntu-14.04
TARGET_SYS:arm-poky-linux-gnueabi
MACHINE:iwg22m
DISTRO:poky
DISTRO_VERSION:1.6.1
TUNE_FEATURES:armv7a vfp neon callconvention-hard cortexa7
TARGET_FPU:vfp-neon
Log for the same
$ bitbake -c install_append audit
Loading cache: 100% |####################################################################################################################| ETA: 00:00:00
Loaded 1863 entries from dependency cache.
WARNING: No recipes available for:
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwebkit_git.bbappend
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwayland_git.bbappend
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtbase_git.bbappend
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.22.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "iwg22m"
DISTRO = "poky"
DISTRO_VERSION = "1.6.1"
TUNE_FEATURES = "armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU = "vfp-neon"
meta
meta-yocto
meta-yocto-bsp = "tmp:c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
meta-renesas
meta-rzg1 = "tmp:19bf1ed97d04009722bb88a780268822ee60ff83"
meta-oe
meta-multimedia = "tmp:dca466c074c9a35bc0133e7e0d65cca0731e2acf"
meta-linaro-toolchain = "tmp:8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"
NOTE: Preparing runqueue
ERROR: Task do_install_append does not exist for target audit. Close matches:
do_install
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
audit_2.8.4.bb
SUMMARY = "User space tools for kernel auditing"
DESCRIPTION = "The audit package contains the user space utilities for \
storing and searching the audit records generated by the audit subsystem \
in the Linux kernel."
HOMEPAGE = "http://people.redhat.com/sgrubb/audit/"
SECTION = "base"
LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "http://people.redhat.com/sgrubb/${BPN}/${BPN}-${PV}.tar.gz \
file://audit-python-configure.patch \
file://audit-python.patch \
file://fix-swig-host-contamination.patch \
file://auditd \
file://auditd.service \
file://audit-volatile.conf \
"
SRC_URI[md5sum] = "871fbc03039a5101b5191c5dcc6e8ac2"
SRC_URI[sha256sum] = "61d8dc61e882fdbb75153a1316817a8f8c8fca25de588256edd81fbb03e7994b"
inherit autotools pythonnative update-rc.d systemd
UPDATERCPN = "auditd"
INITSCRIPT_NAME = "auditd"
INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE_${PN} = "auditd.service"
DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30)"
EXTRA_OECONF += "--without-prelude \
--with-libwrap \
--enable-gssapi-krb5=no \
--with-libcap-ng=yes \
--with-python=yes \
--libdir=${base_libdir} \
--sbindir=${base_sbindir} \
--without-python3 \
--disable-zos-remote \
"
EXTRA_OECONF_append_arm = " --with-arm=yes"
EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \
PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \
pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
STDINC='${STAGING_INCDIR}' \
"
SUMMARY_audispd-plugins = "Plugins for the audit event dispatcher"
DESCRIPTION_audispd-plugins = "The audispd-plugins package provides plugins for the real-time \
interface to the audit system, audispd. These plugins can do things \
like relay events to remote machines or analyze events for suspicious \
behavior."
PACKAGES =+ "audispd-plugins"
PACKAGES += "auditd ${PN}-python"
FILES_${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*"
FILES_auditd += "${bindir}/* ${base_sbindir}/* ${sysconfdir}/*"
FILES_audispd-plugins += "${sysconfdir}/audisp/audisp-remote.conf \
${sysconfdir}/audisp/plugins.d/au-remote.conf \
${sbindir}/audisp-remote ${localstatedir}/spool/audit \
"
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la ${base_libdir}/pkgconfig/*"
CONFFILES_auditd += "${sysconfdir}/audit/audit.rules"
RDEPENDS_auditd += "bash"
do_install_append() {
rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a
rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la
# reuse auditd config
[ ! -e ${D}/etc/default ] && mkdir ${D}/etc/default
mv ${D}/etc/sysconfig/auditd ${D}/etc/default
rmdir ${D}/etc/sysconfig/
# replace init.d
install -D -m 0755 ${S}/../auditd ${D}/etc/init.d/auditd
rm -rf ${D}/etc/rc.d
if ${#bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d/
install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
fi
# install systemd unit files
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system
# audit-2.5 doesn't install any rules by default, so we do that here
mkdir -p ${D}/etc/audit ${D}/etc/audit/rules.d
cp ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules
chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d
chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules
# Based on the audit.spec "Copy default rules into place on new installation"
cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules
}
As suggested i ran "bitbake -c install | cat -" audit and when i run "bitbake audit | cat -" the list of tasks are different.
bitbake audit | cat -
Loading cache...done.
Loaded 1863 entries from dependency cache.
WARNING: No recipes available for:
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwebkit_git.bbappend
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwayland_git.bbappend
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtbase_git.bbappend
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.22.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "iwg22m"
DISTRO = "poky"
DISTRO_VERSION = "1.6.1"
TUNE_FEATURES = "armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU = "vfp-neon"
meta
meta-yocto
meta-yocto-bsp = "tmp:c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
meta-renesas
meta-rzg1 = "tmp:19bf1ed97d04009722bb88a780268822ee60ff83"
meta-oe
meta-multimedia = "tmp:dca466c074c9a35bc0133e7e0d65cca0731e2acf"
meta-linaro-toolchain = "tmp:8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Running setscene task 156 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_populate_sysroot_setscene)
NOTE: Running setscene task 157 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_populate_lic_setscene)
NOTE: Running setscene task 158 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_package_write_ipk_setscene)
NOTE: recipe audit-2.8.4-r0: task do_populate_sysroot_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_populate_lic_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_package_write_ipk_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_populate_lic_setscene: Succeeded
NOTE: recipe audit-2.8.4-r0: task do_populate_sysroot_setscene: Succeeded
NOTE: recipe audit-2.8.4-r0: task do_package_write_ipk_setscene: Succeeded
NOTE: Running setscene task 159 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_packagedata_setscene)
NOTE: recipe audit-2.8.4-r0: task do_packagedata_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_packagedata_setscene: Succeeded
NOTE: Executing RunQueue Tasks
bitbake -c install | cat -
Loading cache...done.
Loaded 1863 entries from dependency cache.
WARNING: No recipes available for:
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwebkit_git.bbappend
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwayland_git.bbappend
/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtbase_git.bbappend
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.22.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "iwg22m"
DISTRO = "poky"
DISTRO_VERSION = "1.6.1"
TUNE_FEATURES = "armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU = "vfp-neon"
meta
meta-yocto
meta-yocto-bsp = "tmp:c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
meta-renesas
meta-rzg1 = "tmp:19bf1ed97d04009722bb88a780268822ee60ff83"
meta-oe
meta-multimedia = "tmp:dca466c074c9a35bc0133e7e0d65cca0731e2acf"
meta-linaro-toolchain = "tmp:8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 404 of 415 (ID: 3, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_fetch)
NOTE: recipe audit-2.8.4-r0: task do_fetch: Started
NOTE: recipe audit-2.8.4-r0: task do_fetch: Succeeded
NOTE: Running task 411 of 415 (ID: 0, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_unpack)
NOTE: recipe audit-2.8.4-r0: task do_unpack: Started
NOTE: recipe audit-2.8.4-r0: task do_unpack: Succeeded
NOTE: Running task 412 of 415 (ID: 1, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_patch)
NOTE: recipe audit-2.8.4-r0: task do_patch: Started
NOTE: recipe audit-2.8.4-r0: task do_patch: Succeeded
NOTE: Running task 413 of 415 (ID: 4, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_configure)
NOTE: recipe audit-2.8.4-r0: task do_configure: Started
NOTE: recipe audit-2.8.4-r0: task do_configure: Succeeded
NOTE: Running task 414 of 415 (ID: 5, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_compile)
NOTE: recipe audit-2.8.4-r0: task do_compile: Started
NOTE: recipe audit-2.8.4-r0: task do_compile: Succeeded
NOTE: Running task 415 of 415 (ID: 2, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_install)
NOTE: recipe audit-2.8.4-r0: task do_install: Started
NOTE: recipe audit-2.8.4-r0: task do_install: Succeeded
NOTE: Tasks Summary: Attempted 415 tasks of which 409 didn't need to be rerun and all succeeded.
Summary: There was 1 WARNING message shown.
The list of tasks are completely different
Bitbake creates the methods executed dynamically and runs them so your _append is literally appended to the end of the do_install task. Then the task is executed.
Maybe it would help to view the debug output with bitbake -e audit just search for your do_install_append code at the end of the do_install task for the recipe audit.
If that output is too large maybe try piping bitbake into cat to see each task execute, something like bitbake audit | cat -
After the variable values, all functions appear in the output. For shell functions, variables referenced within the function body are expanded. If a function has been modified using overrides or using override-style operators like _append and _prepend, then the final assembled function body appears in the output.
https://www.yoctoproject.org/docs/2.2.1/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values
I'm trying to change the password for Intel-Edison board, using the Yocto project.
I have made a recipe for this.
#
# 'abc-' password
#
DESCRIPTION = "ROOT PASSWORD"
SECTION = "abc"
LICENSE = "MIT"
LIC_FILES_CHKSUM =
"file://${COMMON_LICENSE_DIR}/MIT;md5=xyz"
PR = "r0"
SRC_URI = "file://test.txt"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
inherit extrausers
EXTRA_USERS_PARAMS = "usermod -P hello root;"
do_install() {
install -d ${D}${sysconfdir}
install -m 0755 ${WORKDIR}/test.txt ${D}${sysconfdir}
}
To check if it works I added a file in my /etc/ location.
Everything is working perfectly , but my password remains 'root' . It should be 'hello'.
What I am doing wrong? Can someone tell me what should I do more?
Thank you.
I am very new to yocto and am trying to learn how to use it. I followed the steps in the mega-manual section section 5.1.9. I ran
yocto-layer create mylayer
and edited my bblayers.conf file to have this:
BBLAYERS = ?" \
/usr/local/src/yocto/meta \
/usr/local/src/yocto/meta-poky \
/usr/local/src/yocto/meta-yocto-bsp \
/usr/local/src/yocto/meta-mylayer \
"
I ran source oe-init-build-env and then bitbake core-image-sato. When the build finished, I ran runqemu qemu86 nographics and after logging in, ran find / -name helloworld since mylayer defines a recipe for building helloworld. However, the file was not found.
Shouldn't this program (helloworld) be included in the image created? What step(s) am I missing here?
meta-mylayer/conf/layer.conf:
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "mylayer"
BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
BBFILE_PRIORITY_mylayer = "6"
meta-mylayer/recipies-example/example/example_0.1.bb
#
# This file was derived from the 'Hello World!' example recipe in the
# Yocto Project Development Manual.
#
SUMMARY = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://helloworld.c"
S = "${WORKDIR}"
do_compile() {
${CC} ${LDFLAGS} helloworld.c -o helloworld
}
do_install() {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}
meta-mylayer/recipes-example/example/example-0.1/helloworld.c:
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello World!\n");
return 0;
}
Adding a new layer doesn't add every recipe in the layer to every image, it just makes those recipes available to build.
Add the packages that you want in the image using IMAGE_INSTALL in the image recipe.
This is covered in the documentation at http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky-extend-customimage.
DESCRIPTION = "Copies hello-binaries to the image"
LICENSE = "CLOSED"
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://hello "
S = "${WORKDIR}"
do_install() {
install -d ${D}${bindir}
install -m 0777 hello ${D}${bindir}
}
#FILES_${PN} += "${bindir}"
INSANE_SKIP_${PN} = "ldflags"
INSANE_SKIP_${PN}-dev = "ldflags"
In the above recipe i commented the line FILES_ then also the hello binary is adding to the image how is it possible? I have no idea how the recipe is copying binaries to image.*
FILES_${PN} has a default value that includes among other things "${bindir}/*". So appending to the value in the recipe isn't needed.
You can see the default value in meta/conf/bitbake.conf and check what the value ends up as with bitbake -e <hellorecipe> | grep ^FILES_
StarCluster seems to use IPython 0.13.1 by default. Is there a way to upgrade this to IPython 2.3.1? Can it be done via the config file? Or manually after the cluster is started?
Here is my config, with only minor security changes:
[global]
DEFAULT_TEMPLATE=iptemplate
REFRESH_INTERVAL=5
[aws info]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
aws_region_name = us-west-2
aws_region_host = ec2.us-west-2.amazonaws.com
[keypair starcluster]
key_location = starcluster.pem
[plugin ipcluster]
SETUP_CLASS = starcluster.plugins.ipcluster.IPCluster
ENABLE_NOTEBOOK = True
NOTEBOOK_PASSWD = XXXX
[plugin ipclusterstop]
SETUP_CLASS = starcluster.plugins.ipcluster.IPClusterStop
[plugin ipclusterrestart]
SETUP_CLASS = starcluster.plugins.ipcluster.IPClusterRestartEngines
[plugin pypackages]
setup_class = starcluster.plugins.pypkginstaller.PyPkgInstaller
packages = scikit-learn, psutil, pandas
# Base configuration for IPython.parallel cluster
[cluster iptemplate]
KEYNAME = starcluster
CLUSTER_SIZE = 1
CLUSTER_USER = ipuser
CLUSTER_SHELL = bash
#REGION = us-east-1
NODE_IMAGE_ID = ami-706afe40 # REGION and NODE_IMAGE_ID go in pair
NODE_INSTANCE_TYPE = c1.xlarge # 8 CPUs
DISABLE_QUEUE = True # We don't need SGE, faster cluster startup
PLUGINS = pypackages, ipcluster
You can do it by updating setup.py. Add "ipython==2.3.1" to install_requires and rerun the setup command. It will update ipython to the version specified.