I need to compile some of program in Yocto and this program compile by build script.
Build script doing make(using MakeFile).
As we know, if we don't using bitbake, Yocto need SDK tools. But I can't using SDK tools. So I have to build by recipe.
It is too complicate to using cmake or oe_runmake(for me).
You have to use oe_runmake as it will handle cross-compilation and other stuff for you. You can use devtool to help you create recipe. If makefile is done correctly, recipe is straightforward.
Related
Is it not possible to run the makefile in the src directory https://github.com/atpaajan/fds2fem/tree/master/src after installing the TDM-GCC compiler on Windows?
Could you please give your thoughts?
I tried to run makefile to compile the code for using fds2fem tool.
In one of our projects we have used Gstreamer good plugins. I see that each element has a Makefile for building.
Now I wanted to upgrade rtpmanager code (https://github.com/GStreamer/gst-plugins-good/tree/master/gst/rtpmanager) inside Gstreamer. But, I see that there are no Makfiles anymore but 'meson.build' file.
Currently our project build does not support meson. So, is there a way to convert the latest rtpmanager code involving meson.build to traditional Makefile kind of build so that I can integrate its latest changes into my project.
Meson does not and never will generate makefiles.
Qemu meson PoC is using a tool to convert ninja files to Makefile:
https://github.com/bonzini/qemu/blob/meson-poc/scripts/ninjatool.py
How can I build a Linux kernel in Travis CI. I have added script: make menuconfig to my Travis config and it doesn't work and says
No output has been received in the last 10 minutes
How can I fix this?
Link to GitHub repo : https://github.com/ProjectPolyester/tegra_kernel and submit fixes in PRs if possible
Travis monitors your build process and if there is no output for about 10 minutes, it assumes that your process is stuck somewhere for unknown reasons, and then kills it.
Solution in your case :
You need to provide with the actual build command.
make menuconfig
actually just allows you to configure the kernel. It doesn't really starts the kernel build process. So there is no output of this command.
Also, the kernel should already be configured or you can download the appropriate .config file if its available some where online. And then there will be no need to execute:
make menuconfig
The build command
It can be simply
make
or something like
make -j3 modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOCALVERSION=-$SOURCE_VERSION
The second one is actually to perform cross compilation.
You also need to set all the prerequisites like downloading the header file etc
You may want to take a look at this script , it crosscompiles the modules only, not the entire kernel.
If you want to use the old config for a new kernel, you can use make olddefconfig. Here is my example how to compile and boot a new kernel in travis: https://github.com/avagin/criu/blob/linux-next/scripts/travis/kexec.sh#L54
I know that this is an old thread but I was recently able to get Travis CI working on building a Linux kernel
https://github.com/GlassROM-devices/android_kernel_oneplus_msm8994/commit/6ed484812bbd4a25c3b22e730b7489eaaf668da1
GCC fix is for toolchains compiled on Debian unstable, arch, gentoo, etc. These toolchains will fail to compile on Ubuntu so you'll have to use the GCC fix for these toolchains
And you really want to upgrade GCC before you even try building a kernel. Travis CI has a very old GCC that will fail if you try to compile the kernel
In my commit I'm building it with GCC 8 linaro built by myself
Is there any way to cross compile gcc and gdb using the bitbake command in YOCTO project?
If I get you correctly you want to add gcc and gdb to the image.
The easiest and cleanest solution I know is to enable them via EXTRA_IMAGE_FEATURES.
Typically, you configure this variable in your local.conf file, which is found in the Build Directory. Although you can use this variable from within a recipe, best practices dictate that you do not. [1]
EXTRA_IMAGE_FEATURES = "tools-sdk tools-debug"
[1] http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-EXTRA_IMAGE_FEATURES
To create the image-based SDK, For example, run this:
$ bitbake core-image-full-cmdline -c populate_sdk
With that, the SDK is created based on the core-image-full-cmdline image.
After it is done, the binary script can be found at /build/tmp/deploy/sdk/poky-eglibc-x86_64-core-image-full-cmdline-armv5te-toolchain-1.6.sh
To create generic SDK, use meta-toolchain
$ bitbake meta-toolchain
Find how to set up Qt here
I have a Cmake project where I use static libraries from another project (which uses its own unique build system).
I have a bash script set up which compiles the libraries.
The problem arises when a new user checkouts both project. The new user cannot do cmake until the libaries are properly compiled in the other project, and the cmake command find_libarary cant find them.
I made the bash script part of cmake by using the command add_custom_target. But the issue is that it only execute if you do a "make".
Is there a way I can make CMake execute a command while its generating a build system. Or a better way would be to have it ignore the find command until the actual make?
Thanks
Why not LINK_DIRECTORIES(xxx) to the library folder and don't use find_library at all.
Sure, execute_process() function.