Do_Install Error While Running Custom Bitbake in Poky Build

do_install error while running custom bitbake in poky build

The basic differences are the below.

S = "${WORKDIR}/helloworld/"
EXTRA_OEMAKE = 'all -C ${S}'

"EXTRA_OEMAKE" is the key macro which I didn't used before.

I have changed the bitbake file helloworld.bb file like below.

DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

S = "${WORKDIR}/helloworld/"
EXTRA_OEMAKE = 'all -C ${S}'

SRC_URI = "file://helloworld.tar"

inherit autotools gettext

do_install error for custom bitbake recipe

Ok I found the answer to my problem I only needed to change one line in my bitbake recipe instead of this

MY_FILES = "/usr/share/cFile/testworld.tar.gz"

I need to use this

SRC_URI = "file:///usr/share/cFile/testworld.tar.gz"

Yocto build fail with exit code '134'

As @hellow pointed a workaround is part of the bug report.

Adding the folllowing line to local.conf fixed this.

PSEUDO_IGNORE_PATHS_append = ",/run/"

About your first question what is 134 error.
Bitbake is actually runs other programs in order to compile, install, patch and so forth its recipes. One of this programs is pseudo which is a fakeroot like program the first call to pseudo exits with code 134 which means it was aborted with with the SIGABRT signal because pseudo could not setup its environment.

Cannot add C file to Yocto Layer using bitbake

There is multiple issues on your recipe:

  • Your do_compile command does not indicate where to find your .c file
  • You should use ${CC} instead of $(CC)
  • lpthread does not end with and s
do_compile() {
${CC} ${S}/threading.c -o ${S}/threads -lpthread
}
  • Your do_install does not provide the correct path to your binary:
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/threads ${D}${bindir}
}
  • At the end you should populate the packages:
FILES_${PN} = "${bindir}"

Edit about threads unbuildable:

threads is unbuildable because the recipe does not mention that the package is threads.

Here you have some options:

  • Rename your recipe to threads_0.1.bb (I recommend you to use a less generic name)
  • use the PACKAGES variable in your recipe. You will need to modify the FILES_* variable too. (a bit complicated if you are new to Yocto)
  • Use the current recipe name, and change the IMAGE_INSTALL += "threads" to IMAGE_INSTALL += "example"

bitbake not calling my do_install

You didn't add your new recipe to your image recipe.

IMAGE_INSTALL_append = " init-wifi " 

EDIT

I used to do the same and it works well.
Differences I can see is:

SRC_URI += "file://wifi_start.sh"

should be

SRC_URI = "file://wifi_start.sh"

Beacuse you are creating SRC_URI, not adding to an existing one.

I used to add md5 checksum for each file I use.

You should add

FILES_${PN} += "${sysconfdir}/profile.d"
FILES_${PN} += "${sysconfdir}/rcS.d"
FILES_${PN} += "${sysconfdir}/rc1.d"
FILES_${PN} += "${sysconfdir}/rc2.d"
FILES_${PN} += "${sysconfdir}/rc3.d"
FILES_${PN} += "${sysconfdir}/rc4.d"
FILES_${PN} += "${sysconfdir}/rc5.d"

From the Yocto man

FILES

The list of directories or files that are placed in packages.

To use the FILES variable, provide a package name override that identifies the resulting package. Then, provide a space-separated list of files or paths that identify the files you want included as part of the resulting package. Here is an example:

FILES_${PN} += "${bindir}/mydir1/ ${bindir}/mydir2/myfile"

Build errors with custom recipe

Error occurred because you have CC = gcc in makefile which points to compiler in host. This overrides CROSS_COMPILER set by yocto. so the binary you built hello_shell is for host (ELF 64-bit LSB executable, x86-64), which throws error while using aarch64-poky-linux-objcopy

Try removing CC = gcc from makefile

Yocto: cp can't stat file: no such file or directory

There are two problems in your do_install section,

  1. ${S} points to source directory, but SRC_URI copies your content in ${WORKDIR}. So you should be using ${WORKSIR} in your install section
  2. You are trying to copy ${S}/dir1/ inside ${D}/root/dir1, this means your final structure is /root/dir1/dir1/. You may not want this.

So the modified version would look like,

do_install() {
install -d ${D}/root/dir1
install -d ${D}/root/dir2
cp -r --no-dereference --preserve=mode,links -v ${WORKDIR}/dir1/* ${D}/root/dir1/
cp -r --no-dereference --preserve=mode,links -v ${WORKDIR}/dir2/* ${D}/root/dir2/
}


Related Topics



Leave a reply



Submit