question about customize rootfs by using mergefiles

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

question about customize rootfs by using mergefiles

2,119 Views
misakamikoto
Contributor III

Hi All:

    follow the step by what user guide metioned,just add my own file in meta-fsl-arm/recipes-extended/merge-files/merge-files/merge/usr/bin/* then make image.and I found my file in /home/root/usr/bin.How can change it to /usr/bin not /home/root/usr/bin.I notice merge-files_1.0.bb do it like this:

find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -not -name README

    -exec cp -fr '{}' ${D}/${MERGED_DST}/ \;

So should I change MERGED_DST value or you all have some more effictive solution?

0 Kudos
4 Replies

1,250 Views
Pavel
NXP Employee
NXP Employee

Your message contains the following:

Check the architecture and endiannes of the binary
0028: if not ((machine == elf.machine()) or \
0029: ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32"))):

Check the architecture and endiannes of the binary.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,250 Views
Pavel
NXP Employee
NXP Employee

Do you use the similar command sequence?

1.            How do I view the content of rootfs?

The expanded list of rootfs content is contained in the <IMAGE_ROOTFS>.

Note: Use bitbake -e <rootfs-name> | grep ^IMAGE_ROOTFS= to get the value of <IMAGE_ROOTFS>.

2.            How do I display the packages included in the current rootfs image?

There are two methods:

a.            $ bitbake -e <image-target> | grep IMAGE_INSTALL

b.            $ bitbake -g <image-target>

3.            How do I add a pre-built binary into the rootfs?

Do the following:

a.            $ cd <yocto_install_path>/meta-fsl-networking/recipes-extended/merge-files

b.            Copy the files into files/merge, e.g. put bash into files/merge/usr; bash will be included in usr/ of the new rootfs.

c.            Edit rootfs recipe (e.g. fsl-image-flash.bb) to add merge-files in IMAGE_INSTALL variable.

d.            Build new rootfs image: $ bitbake <rootfs-target> (e.g. fsl-image-flash)

4.            Can you give an example of using dtc to reverse to a dts from a dtb?

Do the following:

a.            $ export PATH=<path-of-dtc>:$PATH

b.            $ dtc -I dtb -O dts -o name-of-dts name-of-dtb


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,250 Views
rammurmu
Contributor III

3.            How do I add a pre-built binary into the rootfs?

Do the following:

a.            $ cd <yocto_install_path>/meta-fsl-ppc/recipes-extended/merge-files

b.            Copy the files into files/merge, e.g. put bash into files/merge/usr; bash will be included in usr/ of the new rootfs.

c.            Edit rootfs recipe (e.g. fsl-image-minimal.bb) to add merge-files in IMAGE_INSTALL variable.

d.            Build new rootfs image: $ bitbake fsl-image-minimal

In the above step 3->b , when I added a .ko(kernel loadable module) file or a folder containing files is added into <yocto_install_path>/meta-fsl-ppc/recipes-extended/merge-files/merge-files/merge, and subsequent running of 'bitbake fsl-image-minimal' , I get the following error -

However, when a simple txt file(temp.txt) is added to <yocto_install_path>/meta-fsl-ppc/recipes-extended/merge-files/merge-files/merge, 'bitbake fsl-image-minimal' run successfully.

-----------------------------------------------------------------------------------------------------

ERROR: Error executing a python function in /home/ram/POTP/SDK-V1.8/QorIQ-SDK-V1.8-20150619-yocto/meta-fsl-ppc/recipes-extended/merge-files/merge-files_1.0.bb:

The stack trace of python calls that resulted in this exception/failure was:
File: 'do_package_qa', lineno: 88, function: <module>
0084: bb.fatal("QA run found fatal errors. Please consider fixing them.")
0085: bb.note("DONE with PACKAGE QA")
0086:
0087:
*** 0088:do_package_qa(d)
0089:
File: 'do_package_qa', lineno: 71, function: do_package_qa
0067: package_qa_handle_error("pkgname",
0068: "%s doesn't match the [a-z0-9.+-]+ regex\n" % package, d)
0069:
0070: path = "%s/%s" % (pkgdest, package)
*** 0071: if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
0072: walk_sane = False
0073: if not package_qa_check_rdepends(package, pkgdest, skip, d):
0074: rdepends_sane = False
0075: if not package_qa_check_deps(package, pkgdest, skip, d):
File: 'insane.bbclass', lineno: 19, function: package_qa_walk
0015: elf = None
0016: for func in warnfuncs:
0017: func(path, package, d, elf, warnings)
0018: for func in errorfuncs:
*** 0019: func(path, package, d, elf, errors)
0020:
0021: for w in warnings:
0022: bb.warn("QA Issue: %s" % w)
0023: package_qa_write_error(w, d)
File: 'insane.bbclass', lineno: 25, function: package_qa_check_arch
0021: return
0022:
0023: #if this will throw an exception, then fix the dict above
0024: (machine, osabi, abiversion, littleendian, bits) \
*** 0025: = package_qa_get_machine_dict()[target_os][target_arch]
0026:
0027: # Check the architecture and endiannes of the binary
0028: if not ((machine == elf.machine()) or \
0029: ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32"))):
Exception: KeyError: 'allarch'

ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/ram/POTP/SDK-V1.8/QorIQ-SDK-V1.8-20150619-yocto/build_p1022ds_release/tmp/work/all-fsl-linux/merge-files/1.0-r0/temp/log.do_package.6442
ERROR: Task 334 (/home/ram/POTP/SDK-V1.8/QorIQ-SDK-V1.8-20150619-yocto/meta-fsl-ppc/recipes-extended/merge-files/merge-files_1.0.bb, do_package) failed with exit code '1'

----------------------------------------------------------------------------------------

Any suggestions will be appreciated.

Regards

Ram

0 Kudos

1,250 Views
misakamikoto
Contributor III

anyone who knows please give me some suggestion,thanks!

0 Kudos