How do customers add a binary file to init.d for fsl-image-kernelitb for the ls1043 and how does a customer modify the init.d recipe for fsl-image-kernelitb to execute the binary at boot time? The fsl-image-kenrelitb uses the fsl-core-image rootfs by default. Need to add a binary to sbin and/or preferably etc to execute at boot time as a quick hack to check boot performance and modify run levels for the binary.
When I modify poky/meta/recipes-core/initscripts/initscripts_1.0.bb and add a binary, the binary gets added to aarch64-fsl-linux/image/etc/eos. It never gets copied to the rootfs for the fsl-image-kernelitb bitbake. What is the equivalent recipe for the ls1043. Please answer with more than one or two sentences to avoid wasting time. Clear explanation and no links to yocto documentation please.
I modified the initscripts_1.0.bb recipe in poky/meta/recipes-core/initscripts provided below and then placed the binary "eos" under initscripts-1.0/eos. I then did the fsl-image-kernelitb bitbake. The bitbake does a bake of aarch64-fsl-linux and eos the binary is moved to packages-split/initscripts/etc/init.d/eos and images/etc/init.d/eos as shown. But it does not get packaged in rootfs under ls1043ardb-fsl-linux or under core or anywhere else.
First, it’s unclear how to add a binary to the correct recipes for rootfs /etc/init.d for the fsl-image-kernelitb bitbake that uses core as the default. Second, it is unclear what to modify to get eos to execute at boot time for fsl-image-kernelitb if the image only appears under aarch64-fsl-linux. Any assistance will help. I provide the modified initscripts_1.0.bb recipe below and the directories where the eos binary is copied.
The bitbake command I used: bitbake fsl-image-kernelitb
Placed the binary in this directory and modified the initscripts_1.0.bb recipe as shown below:
./poky/meta/recipes-core/initscripts/initscripts-1.0/eos
Then on doing the bitbake, the eos binary was copied to these locations:
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/rcS.d/S96eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/init.d/.debug/eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/init.d/eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/image/etc/rcS.d/S96eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/image/etc/init.d/eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/package/etc/rcS.d/S96eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/package/etc/init.d/.debug/eos
./build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/package/etc/init.d/eos
The initscripts_1.0.bb file:
Located here: Linux-LS1043A-SDK-V0.5-20151223-yocto/poky/meta/recipes-core/initscripts/initscripts_1.0.bb
SUMMARY = "SysVinit scripts"
DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system. These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup. In addition, the scripts are also used during system shutdown to reverse the actions performed at startup."
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r155"
INHIBIT_DEFAULT_DEPS= "1"
SRC_URI = "file://functions\
file://halt \
file://umountfs \
file://devpts.sh \
...
"
.
.
.
do_install () {
#
# Create directories and install device independent scripts
#
......
install -m 0755 ${WORKDIR}/eos ${D}${sysconfdir}/init.d
#
# Create runlevel links
#
# Run eos and change start sequence as needed | |
update-rc.d -r ${D} eos start 96 S . |
... Rest is original .bb file.
}
When doing a bitbake of the fsl-image-core, I receive the following errors:
setup-poky -m ls1043ardb
/home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release was created before.
Back to build project /home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release.
Modify files under /home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release/conf/ to update.
tlsmith@Latitude-E7440:~/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release$ bitbake fsl-image-core
Loading cache: 100% |###########################################| ETA: 00:00:00
Loaded 2028 entries from dependency cache.
Parsing recipes: 100% |#########################################| Time: 00:00:00
Parsing of 1573 .bb files complete (1572 cached, 1 parsed). 2028 targets, 126 skipped, 2 masked, 0 errors.
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 = "aarch64-fsl-linux"
MACHINE = "ls1043ardb"
DISTRO = "fsl-networking"
DISTRO_VERSION = "1.6.1"
TUNE_FEATURES = "aarch64"
meta
meta-yocto
meta-yocto-bsp = "(detachedfrom65a7a85):error:"
meta-fsl-arm = "(detachedfrom05f1748):error:"
meta-fsl-networking = "(detachedfromae11e55):error:"
meta-fsl-testing = "(detachedfromfff2c5f):fff2c5fab98f29034d718c210a493fffb33ef142"
meta-fsl-toolchain
meta-virtualization = "<unknown>:<unknown>"
meta-oe
meta-networking
meta-perl
meta-webserver
toolchain-layer = "(detachedfrom4203436):error:"
meta-linaro-toolchain = "(detachedfrom6452ef4):error:"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: QA Issue: non debug package contains .debug directory: initscripts path /work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/init.d/.debug/eos
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/temp/log.do_package.3238
ERROR: Task 964 (/home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/poky/meta/recipes-core/initscripts/initscripts_1.0.bb, do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1397 tasks of which 1393 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed:
/home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/poky/meta/recipes-core/initscripts/initscripts_1.0.bb, do_package
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
tlsmith@Latitude-E7440:~/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release$ bitbake fsl-image-core
Loading cache: 100% |###########################################| ETA: 00:00:00
Loaded 2028 entries from dependency cache.
Parsing recipes: 100% |#########################################| Time: 00:00:00
Parsing of 1573 .bb files complete (1572 cached, 1 parsed). 2028 targets, 126 skipped, 2 masked, 0 errors.
The log.do_package.3238 contains the following:
DEBUG: Executing python function sstate_task_prefunc
DEBUG: Python function sstate_task_prefunc finished
DEBUG: Executing python function do_package
DEBUG: Executing python function package_get_auto_pr
DEBUG: Python function package_get_auto_pr finished
DEBUG: Executing python function perform_packagecopy
NOTE: initscripts: Rename /etc/init.d/functions -> /etc/init.d/functions.initscripts
DEBUG: Python function perform_packagecopy finished
DEBUG: Executing python function split_and_strip_files
DEBUG: runstrip: 'aarch64-fsl-linux-strip' --remove-section=.comment --remove-section=.note '/home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/package/etc/init.d/eos'
DEBUG: Python function split_and_strip_files finished
DEBUG: Executing python function fixup_perms
DEBUG: Python function fixup_perms finished
DEBUG: Executing python function populate_packages_updatealternatives
NOTE: adding update-alternatives calls to postinst/postrm for initscripts-functions
NOTE: update-alternatives --install /etc/init.d/functions functions /etc/init.d/functions.initscripts 90
NOTE: update-alternatives --remove functions /etc/init.d/functions.initscripts
DEBUG: Python function populate_packages_updatealternatives finished
DEBUG: Executing python function package_do_split_locales
DEBUG: No locale files in this package
DEBUG: Python function package_do_split_locales finished
DEBUG: Executing python function populate_packages
DEBUG: Python function populate_packages finished
DEBUG: Executing python function do_package_qa
NOTE: DO PACKAGE QA
NOTE: Checking Package: initscripts-functions
NOTE: Checking Package: initscripts-dbg
NOTE: Checking Package: initscripts-staticdev
NOTE: Checking Package: initscripts-dev
NOTE: Checking Package: initscripts-doc
NOTE: Checking Package: initscripts-locale
NOTE: Checking Package: initscripts
NOTE: aarch64-fsl-linux-objdump -p /home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/init.d/eos
NOTE: aarch64-fsl-linux-objdump -p /home/tlsmith/Linux-LS1043A-SDK-V0.5-20151223-yocto/build_ls1043ardb_release/tmp/work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/init.d/.debug/eos
ERROR: QA Issue: non debug package contains .debug directory: initscripts path /work/aarch64-fsl-linux/initscripts/1.0-r155/packages-split/initscripts/etc/init.d/.debug/eos
ERROR: QA run found fatal errors. Please consider fixing them.
DEBUG: Python function do_package_qa finished
DEBUG: Python function do_package finished
ERROR: Function failed: do_package_qa
ls tmp/work/ls1043ardb-fsl-linux/fsl-image-core/1.0-r0/rootfs/etc/init.d/eos
ls: cannot access eos: No such file or directory
Original Attachment has been moved to: initscripts_1.0.bb.zip
解決済! 解決策の投稿を見る。
Following these steps the binary file can be found in the new rootfs and in the .itb. If the file can’t be found in new itb.
1) Add the binary to initscripts-1.0/
~/Linux-LS1043A-SDK-V0.5-20151223-yocto/poky/meta/recipes-core/initscripts/initscripts-1.0/
2) Modify the initscripts_1.0.bb as follows:
diff new.bb tmp/org.bb
7,8d6
< # add binary files and skep .debug issue
< INSANE_SKIP_${PN} += "debug-files"
37d34
< file://eos \
103d99
< install -m 0755 ${WORKDIR}/eos ${D}${sysconfdir}/init.d
140,143c136
< update-rc.d -r ${D} dmesg.sh start 41 S .
<
< # Run eos and change start sequence as needed
< update-rc.d -r ${D} eos start 50 S .
---
> update-rc.d -r ${D} dmesg.sh start 38 S .
3) Bitbake
build_ls1043ardb_release/tmp/work/ls1043ardb-fsl-linux/fsl-image-core/1.0-r0/
./rootfs/etc/rcS.d/S50eos
./rootfs/etc/init.d/.debug/eos
./rootfs/etc/init.d/eos
If using a script under initscripts-1.0/ instead of a binary, there is no need to use:
INSANE_SKIP_${PN} += "debug-files"
INSANE_SKIP definition in http://www.yoctoproject.org/docs/2.0.1/ref-manual/ref-manual.html#var-INSANE_SKIP
Following these steps the binary file can be found in the new rootfs and in the .itb. If the file can’t be found in new itb.
1) Add the binary to initscripts-1.0/
~/Linux-LS1043A-SDK-V0.5-20151223-yocto/poky/meta/recipes-core/initscripts/initscripts-1.0/
2) Modify the initscripts_1.0.bb as follows:
diff new.bb tmp/org.bb
7,8d6
< # add binary files and skep .debug issue
< INSANE_SKIP_${PN} += "debug-files"
37d34
< file://eos \
103d99
< install -m 0755 ${WORKDIR}/eos ${D}${sysconfdir}/init.d
140,143c136
< update-rc.d -r ${D} dmesg.sh start 41 S .
<
< # Run eos and change start sequence as needed
< update-rc.d -r ${D} eos start 50 S .
---
> update-rc.d -r ${D} dmesg.sh start 38 S .
3) Bitbake
build_ls1043ardb_release/tmp/work/ls1043ardb-fsl-linux/fsl-image-core/1.0-r0/
./rootfs/etc/rcS.d/S50eos
./rootfs/etc/init.d/.debug/eos
./rootfs/etc/init.d/eos
If using a script under initscripts-1.0/ instead of a binary, there is no need to use:
INSANE_SKIP_${PN} += "debug-files"
INSANE_SKIP definition in http://www.yoctoproject.org/docs/2.0.1/ref-manual/ref-manual.html#var-INSANE_SKIP