Re: Yocto SDK: how to deploy application with step "make install" to target?
Philip Balister
On 12/01/2017 10:15 AM, Jerry Lian wrote:
Thanks Eric for your explanation!I've used sshfs to mount the target on the machine with the sdk and then something like: make install DESTDIR=~/mydevice From: https://wiki.gnuradio.org/index.php/Cross_compile_an_OOT_and_install_on_target Philip
|
|
include and a library dependency in a recipe which uses a Makefile
Rail Shafigulin <rail@...>
Somewhat new to Yocto.
I have a relatively simple Makefile which builds a library. The file is shown below: LIB=PyAnokiWave It is shown below # Add any other object files to this list below LIB_OBJS = libPyAnokiWave.o LIB_HEADERS=libPyAnokiWave.h CFLAGS+=-I/usr/include/python2.7 LDFLAGS+=-lpython2.7 -lAnokiWave all: build .PHONY: build build: $(LIB).a $(LIB).so $(LIB).a:$(LIB_OBJS) $(AR) rcs $@ $(LIB_OBJS) $(LIB).so:$(LIB_OBJS) $(CC) $(LDFLAGS) -shared -g -o $@ $(LIB_OBJS) %.o: %.c $(CC) -c $(CFLAGS) -o $@ $< I need to use this Makefile in a recipe which but I'm struggling to figure out how to make it point to correct include folder as well as a library folder. Here is what I need to change: 1. CFLAGS+=-I/usr/include/python2.7 Clearly it is not pointing to the right location. How do I make it point to the include directory of my build (at least I think it should point to this location) 2. LDFLAGS+=-lpython2.7 -lAnokiWave I do have a meta-python layer and it builds python2.7 library. I also have a custom layer which builds a libAnokiWave.so. How do I make compiler/linker point to the right folders so that these libraries would be used? I do understand that it has something to do with the EXTRA_OEMAKE variable, but I wasn't able to find a good example that would show me how to use it. At the moment my do_compile task looks like the following: do_compile () { oe_runmake } I would greatly appreciate any help with this. -- Rail Shafigulin Software Engineer Esencia Technologies -- *ESENCIA TECHNOLOGIES, INC.*3945 Freedom Circle, Suite #360, Santa Clara CA 95054 ________________________________________________________ Phone: +1 408 736 8284 Fax: +1 408 519 3475 http://www.esenciatech.com | http://www.lnttechservices.com
|
|
Re: dev package non-sym link
Rail Shafigulin <rail@...>
On Fri, Dec 1, 2017 at 12:12 AM, Alexander Kanavin
<alexander.kanavin@...> wrote: On 11/30/2017 11:46 PM, Rail Shafigulin wrote:Thanks for the reply. It worked. I will definitely will look into meson and cmake at a later time. -- Rail Shafigulin Software Engineer Esencia Technologies -- *ESENCIA TECHNOLOGIES, INC.*3945 Freedom Circle, Suite #360, Santa Clara CA 95054 ________________________________________________________ Phone: +1 408 736 8284 Fax: +1 408 519 3475 http://www.esenciatech.com | http://www.lnttechservices.com
|
|
Re: [meta-raspberrypi][PATCH] rpi-config: Setup lcd_rotate for Raspberry Pi display
Andrei Gherzan
On Thu, Nov 30, 2017 at 5:43 PM, Paul Barker <pbarker@...> wrote:
I like this. -- Andrei Gherzan-- Andrei GherzanOn Thu, Nov 30, 2017 at 5:43 PM, Paul Barker <pbarker@...> wrote:
|
|
Re: how to know Poky kernel version before running it
Vincent Prince
Something like following command will give you every variables for kernel recipe: bitbake -e virtual/kernel | egrep '^[A-Z][A-Z_]*' You will find prefered version and source url variables. 2017-12-01 18:11 GMT+01:00 Steve Pavao <stevep@...>:
Is there a definitive way to know at/after build time what kernel version is being built via a particular bitbake of Poky?
|
|
how to know Poky kernel version before running it
Steve Pavao
Is there a definitive way to know at/after build time what kernel version is being built via a particular bitbake of Poky?
I don’t have the board on hand to boot the result of my work right now; it is a scout build for a board I’m getting soon. I’m trying to figure it out by browsing the console-latest.log and looking for the highest kernel version I can observe from the recipes used. Is there a better way to find this out at build time? Knowing the kernel version would help me decide what version of a patch to apply to go along with it. Steve Pavao Korg R&D
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Jerry Lian <jerry.lian@...>
OK, that is what confused me: I DID try "make modules_install" on host! So according to what you said, the right procedure is: * do "make install" on host, then copy to target: * don't do "make modules_install" on host, but make a package first, then copy to target and install. * right? * then how to make a package? * how do I know which are "relevant other files"? sorry for my newbie questions, thanks!
On Fri, Dec 1, 2017 at 11:30 AM, Eric Schwarz <eas@...> wrote: Am 01.12.2017 16:58, schrieb Jerry Lian:
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Eric Schwarz
Am 01.12.2017 16:58, schrieb Jerry Lian:
Thanks Eric again.Yes. * I check that "make install" copy files to one folder, so that is easy for deployment!You are doing the 'make modules_install' on the target or where else? You need to build the modules within the Yocto environment and may create a package e.g. *.deb you may install later on the target or copy the modules by hand including relevant other files needed. Obviously the system tries to recompile the kernel modules. That's what 'make modules_install' does. ----------------------------------------------------------------------------------------------------
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Jerry Lian <jerry.lian@...>
Thanks Eric again. * So you mean "copy -Rfa" can match folder-by-folder, so long as the folder-tree are the same? (if yes, that is super great!!!) * I check that "make install" copy files to one folder, so that is easy for deployment! Another question: * My application actually has another step: "make modules_install" (surely step "make modules" also) * But I got error (see below): what could be wrong with "SSL error"? isn't build already passed successfully? ------------------------------ jerry@yct:~/ecat-33b922$ make modules_install make -C "/usr/src/linux-headers-4.10.0-28-generic" M="/home/jerry/ecat-33b922" \ INSTALL_MOD_DIR="ethercat" modules_install make[1]: Entering directory '/usr/src/linux-headers-4.10.0-28-generic' mkdir: cannot create directory ‘/lib/modules/4.10.0-28-generic/ethercat’: Permission denied Makefile:1536: recipe for target '_emodinst_' failed make[1]: *** [_emodinst_] Error 1 make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-28-generic' Makefile:934: recipe for target 'modules_install' failed make: *** [modules_install] Error 2 jerry@yct:~/ecat-33b922$ sudo make modules_install make -C "/usr/src/linux-headers-4.10.0-28-generic" M="/home/jerry/ecat-33b922" \ INSTALL_MOD_DIR="ethercat" modules_install make[1]: Entering directory '/usr/src/linux-headers-4.10.0-28-generic' INSTALL /home/jerry/ecat-33b922/devices/ec_generic.ko At main.c:158: - SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178 sign-file: certs/signing_key.pem: No such file or directory INSTALL /home/jerry/ecat-33b922/examples/mini/ec_mini.ko At main.c:158: - SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178 sign-file: certs/signing_key.pem: No such file or directory INSTALL /home/jerry/ecat-33b922/master/ec_master.ko At main.c:158: - SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178 sign-file: certs/signing_key.pem: No such file or directory DEPMOD 4.10.0-28-generic make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-28-generic' jerry@yct:~/ecat-33b922$ ------------------------------ Thanks!
On Fri, Dec 1, 2017 at 10:37 AM, Eric Schwarz <eas@...> wrote: Am 01.12.2017 16:15, schrieb Jerry Lian:
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Eric Schwarz
Am 01.12.2017 16:15, schrieb Jerry Lian:
Thanks Eric for your explanation!Acutally that's how we are doing it ... Now I have follow-up question:Install the cross-compiled stuff on your local disc e.g. into a "transfer" directory. Then copy it to the target. On the target 'cp -Rfa <transfer-dir>/* /' should do it if the basic directory structure fits to your rootFS. --- copy (via scp) -----then how do I know: what files to go which folder?There is IMHO no standardized variable available. Just look into the configure script how the variable is named and if it is actually available at all. Thanks!... you may supply a custom install prefix directory to configure. * How to do "make install"? (I want to install it on target, but how?)Cheers
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Jerry Lian <jerry.lian@...>
Thanks Eric for your explanation! * (I know I can build the app within yocto build, but sometimes I prefer the SDK method outside yocto build.) * So just copy manually? I thought there are some tricks that I don't know. Now I have follow-up question: * It seems that "make install" will copy different files to different folders * Can I do like these:? --- make --- copy (via scp) --- make install * Or it needs to be: --- make --- make install --- copy (via scp) -----then how do I know: what files to go which folder? --- can you explain: "... you may supply a custom install prefix directory to configure." --- how? Thanks!
On Fri, Dec 1, 2017 at 9:34 AM, Eric Schwarz <eas@...> wrote: Am 01.12.2017 15:16, schrieb Eric Schwarz:
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Eric Schwarz
Am 01.12.2017 15:16, schrieb Eric Schwarz:
Hi Jerry,... you may supply a custom install prefix directory to configure. * How to do "make install"? (I want to install it on target, but how?)Cheers
|
|
Re: Yocto SDK: how to deploy application with step "make install" to target?
Eric Schwarz
Hi Jerry,
Am 01.12.2017 15:07, schrieb Jerry Lian: I am new to embedded linux, and some concepts confuse me:You may build your app within yocto build process so your application is contained in your rootFS directly. * Now if I boot the board with yocto image without SDK, how can I deploy the application?If you build it w/ the SDK outside of the yocto build process just install it to a local directory and copy all the stuff w/ e.g. scp onto your boards rootFS. * How to do "make install"? (I want to install it on target, but how?)Cheers Eric
|
|
Yocto SDK: how to deploy application with step "make install" to target?
Jerry Lian <jerry.lian@...>
I am new to embedded linux, and some concepts confuse me: * I have downloaded an Autotools-based application to run on my board. * If I boot the board with original image/original SDK, I normally build/install it with steps: ----- ./bootstrap ----- ./configure ----- make ----- make install * Now if I boot the board with yocto image without SDK, how can I deploy the application? ---- (surely I do "bitbake -c populate_sdk some-image", and source the environment!) ----- ./bootstrap (Yocto SDK on host) ----- ./configure (Yocto SDK on host) ----- make (Yocto SDK on host) ----- make install (???) * How to do "make install"? (I want to install it on target, but how?) Thanks!
|
|
Re: dev package non-sym link
Alexander Kanavin <alexander.kanavin@...>
On 11/30/2017 11:46 PM, Rail Shafigulin wrote:
do_install () {You need to call 'ln -sr', then you'll get relative symlinks. Better yet, add some build system support to the project (meson, cmake), then it'll take care of these things for you. Alex
|
|
Re: dev package non-sym link
Rail Shafigulin <rail@...>
Check whether the situation is the same in .../image/usr/lib. If so, thenThanks for the reply. I changed do_install of my recipe do_install () { install -d ${D}${libdir}/ install -m 0755 ${S}/libAnokiWave.so.1.0.1 ${D}${libdir} } Now the error is gone and there are no warnings but if I check /tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/anokiwavelib/1.0+gitAUTOINC+16df62468c-r0/package/usr/lib/ all I see is libAnokiWave.so.1.0.1 If I change my install task to do_install () { install -d ${D}${libdir}/ install -m 0755 ${S}/libAnokiWave.so.1.0.1 ${D}${libdir} ln -s ${D}${libdir}/libAnokiWave.so.1.0.1 ${D}${libdir}/libAnokiwave.so.1 ln -s ${D}${libdir}/libAnokiWave.so.1 ${D}${libdir}/libAnokiwave.so } I get the following warnings WARNING: anokiwavelib-1.0+gitAUTOINC+16df62468c-r0 do_package_qa: QA Issue: Symlink /usr/lib/libAnokiwave.so.1 in anokiwavelib points to TMPDIR [symlink-to-sysroot] WARNING: anokiwavelib-1.0+gitAUTOINC+16df62468c-r0 do_package_qa: QA Issue: Symlink /usr/lib/libAnokiwave.so in anokiwavelib-dev points to TMPDIR [symlink-to-sysroot] I'm not sure how to fix these issues. The links, libAnokiWave.so.1 and libAnokiWave.so, must exist but right now they don't point to the right location or doen't exist at all. Would appreciate any help with this. Rail Shafigulin Software Engineer Esencia Technologies -- *ESENCIA TECHNOLOGIES, INC.*3945 Freedom Circle, Suite #360, Santa Clara CA 95054 ________________________________________________________ Phone: +1 408 736 8284 Fax: +1 408 519 3475 http://www.esenciatech.com | http://www.lnttechservices.com
|
|
Kernel Crash when moving from Pyro to Rocko (or master): change in kernel compile process or flags?
Michael
Hi,
I am experiencing a Kernel crash when moving my system from Yocto 2.3 (Pyro) to Rocko or Master. Target system is an ARMv7 (NXP Layerscape LS1021a, built on Cortex-A7). This is what I did: 1) switched poky version 2) re-built same image in a new, blank directory Results: Root-FS works fine, the kernel crashes with an undefined instruction oops. Just exchanging the kernel zImage with the one compiled with Pyro (same recipe), my system works fine again. What I tried so far: 1) checked and compared the kernel configs generated: 100% identical 2) switched gcc back to the version used in Pyro (6.3) instead of 7.2: kernel still crashes, same oops, no changes. So it's not related to GCC 7.2 3) checked on different boards: same issue for the same board type, but the switch to rocko worked fine for a system based on Cortex-A9. I am using separate tmp directories and am not sharing sstate. I always started builds in blank build directories. The error is reproducible (100%) It was also present with all of the various snapshots of the master branch I tried What I suspect: there are some changes in the ways that gcc is called from pyro to rocko. Maybe one of the switches, or features, etc Before deep-diving into the trial and error phase of reproducing the CFLAGS, etc: Is anyone experiencing the same issues? * What exactly has changed in the way the kernel build is called (methods, compile/link flags, etc) between pyro and rocko? * * Is there a way to (easily) disable some of the features to test which one causes the issue? * * Any suspicions about what could cause this? * Pls. find a log of the crash below, and an excerpt of my kernel recipe and machine configuration. Thanks in advance for your help, Best regards, Michael ------------- VFS: Mounted root (ext4 filesystem) on device 179:1. devtmpfs: mounted Freeing unused kernel memory: 2048K Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2 Modules linked in: CPU: 1 PID: 1 Comm: init Not tainted 4.14.2-avnet-nxp #2 Hardware name: Freescale LS1021A task: bf0a0000 task.stack: bf09a000 PC is at ret_fast_syscall+0x2/0x52 LR is at SyS_brk+0x109/0x128 pc : [<80205fc2>] lr : [<802c513d>] psr: 60000013 sp : bf09bfa8 ip : 70c5387d fp : 00001000 r10: 00000000 r9 : bf09a000 r8 : 802061a4 r7 : 0000002d r6 : 76f71bac r5 : 00010034 r4 : 00000009 r3 : 000273c8 r2 : ffff0001 r1 : 00000000 r0 : 00028000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 70c5387d Table: be7d1000 DAC: fffbfff3 Process init (pid: 1, stack limit = 0xbf09a210) Stack: (0xbf09bfa8 to 0xbf09c000) bfa0: 00000009 00010034 00000000 7ee86fea 00000000 00000001 bfc0: 00000009 00010034 76f71bac 0000002d 00000000 00000001 00000001 00001000 bfe0: 7ee86f14 7ee86e4c 76f87a58 76f88e88 60000010 00000000 00000000 00000000 Code: 20012000 0000bd08 00000000 b6720000 (2008f8d9) ---[ end trace 7bab6dceda641aab ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b CPU0: stopping CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.14.2-avnet-nxp #2 Hardware name: Freescale LS1021A [<8020bbe9>] (unwind_backtrace) from [<80208e77>] (show_stack+0xb/0xc) [<80208e77>] (show_stack) from [<8066af19>] (dump_stack+0x69/0x78) [<8066af19>] (dump_stack) from [<8020b1d5>] (handle_IPI+0x261/0x274) [<8020b1d5>] (handle_IPI) from [<802012b1>] (gic_handle_irq+0x61/0x64) [<802012b1>] (gic_handle_irq) from [<8067d953>] (__irq_svc+0x53/0x7c) Exception stack(0x80e01f38 to 0x80e01f80) 1f20: 00000000 000027d0 1f40: 3eb79000 80212641 ffffe000 80e03cd0 80e03c74 80e7f3ab 8096e480 80e03c40 1f60: 80e8ce00 80c42a30 01400000 80e01f88 80206a3d 80206a3e 40000033 ffffffff [<8067d953>] (__irq_svc) from [<80206a3e>] (arch_cpu_idle+0x22/0x24) [<80206a3e>] (arch_cpu_idle) from [<802405bf>] (do_idle+0x9f/0xe4) [<802405bf>] (do_idle) from [<802407bb>] (cpu_startup_entry+0x13/0x14) [<802407bb>] (cpu_startup_entry) from [<80c00a05>] (start_kernel+0x305/0x310) ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ----------------------- Excerpt from linux_xxx.bb: ---- DEPENDS_kernel-base += "kernel-devicetree" LINUX_VERSION = "4.14-stable" S = "${WORKDIR}/git" PR = "r1" SRCREV = "8292fd8d726105abc01dae26d0a2cddcf53d4e0f" PV = "4.14.2" SRC_URI = " \ git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;branch=master;protocol=git;nobranch=1 \ " SRC_URI_append_ls1021a = " file://defconfig " SRC_URI_append_ls1021a = " file://pcie.cfg file://caam.cfg file://usb.cfg file://bt.cfg " ---- Excerpt from machine.conf --- SOC_FAMILY = "ls1021a" TARGET_ARCH = "arm" DEFAULTTUNE = "cortexa7hf-neon-vfpv4" IMAGE_INSTALL_append = " kernel-modules kernel-devicetree kernel-image" KERNEL_IMAGETYPE = "zImage" KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" EXTRA_IMAGEDEPENDS += "virtual/bootloader" ----
|
|
Re: Security upgrade stategy
Andre McCurdy <armccurdy@...>
On Wed, Nov 29, 2017 at 11:24 AM, Khem Raj <raj.khem@...> wrote:
On Wed, Nov 29, 2017 at 11:06 AM, Brian Smucker <bds@...> wrote:To avoid and doubt, danny has definitely stopped receiving any security fixes!Hello,We usually backport the needed fixes back into release branches. , it might be
|
|
Re: dev package non-sym link
Alexander Kanavin <alexander.kanavin@...>
On 11/30/2017 08:10 PM, Rail Shafigulin wrote:
Somewhat new to Yocto. Trying to build a library. It compiled but I'mCheck whether the situation is the same in .../image/usr/lib. If so, then the upstream is installing .so files incorrectly and you need to figure out what it does and how to fix it so that it symlinks .so instead of copying or hardlinking it. Alex
|
|
dev package non-sym link
Rail Shafigulin <rail@...>
Somewhat new to Yocto. Trying to build a library. It compiled but I'm
having issues during the package task. The error output is ERROR: anokiwavelib-1.0+gitAUTOINC+16df62468c-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: anokiwavelib-dev path '/work/cortexa9hf-neon-xilinx-linux-gnueabi/anokiwavelib/1.0+gitAUTOINC+16df62468c-r0/packages-split/anokiwavelib-dev/usr/lib/libAnokiWave.so' [dev-elf] ERROR: anokiwavelib-1.0+gitAUTOINC+16df62468c-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. ERROR: anokiwavelib-1.0+gitAUTOINC+16df62468c-r0 do_package_qa: Function failed: do_package_qa ERROR: Logfile of failure stored in: /home/someuser/projects/petalinux-build-system/petalinux-build-env/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/anokiwavelib/1.0+gitAUTOINC+16df62468c-r0/temp/log.do_package_qa.5765 ERROR: Task (/home/someuser/projects/petalinux-build-system/sources/core/../meta-customlayer/recipes-anokiwave/lib/anokiwavelib_git.bb:do_package_qa) failed with exit code '1' I do understand the issue. It doesn't create links for libAnokiWave.so and libAnokiWave.so.1. I do see the following in /home/someuser/projects/petalinux-build-system/petalinux-build-env/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/anokiwavelib/1.0+gitAUTOINC+16df62468c-r0/package/usr/lib drwxr-xr-x 3 someuser someuser 4096 Nov 29 14:10 ./ drwxr-xr-x 4 someuser someuser 4096 Nov 29 14:10 ../ drwxr-xr-x 2 someuser someuser 4096 Nov 29 14:10 .debug/ -rw-r--r-- 2 someuser someuser 45084 Nov 29 14:10 libAnokiWave.so -rw-r--r-- 2 someuser someuser 45088 Nov 29 14:10 libAnokiWave.so.1 -rwxr-xr-x 2 someuser someuser 45092 Nov 29 14:10 libAnokiWave.so.1.0.1* and .debug contains drwxr-xr-x 2 someuser someuser 4096 Nov 29 14:10 ./ drwxr-xr-x 3 someuser someuser 4096 Nov 29 14:10 ../ -rwxr-xr-x 2 someuser someuser 81500 Nov 29 14:10 libAnokiWave.so* -rwxr-xr-x 2 someuser someuser 81500 Nov 29 14:10 libAnokiWave.so.1* -rwxr-xr-x 2 someuser someuser 81500 Nov 29 14:10 libAnokiWave.so.1.0.1* Which is incorrect, libAnokiWave.so and libAnokiWave.so.1 are not links. I'm not really sure how to fix this. Would appreciate any help with it. -- Rail Shafigulin Software Engineer Esencia Technologies -- *ESENCIA TECHNOLOGIES, INC.*3945 Freedom Circle, Suite #360, Santa Clara CA 95054 ________________________________________________________ Phone: +1 408 736 8284 Fax: +1 408 519 3475 http://www.esenciatech.com | http://www.lnttechservices.com
|
|