Building only the app and not the Linux core
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi all,
I would like to build my yocto project, but only my applications. I mean, I would like to separate my Linux build and the application build. I want to just have my meta-layer which contains my application being build by calling the bitbake command.
Can anyone give me a pointer? Using the multiconfig is the way to do it?
Best
Em
P.S. If I want to be more specific, I just want to use Yocto as a cross-compilation tool for baremetal applications.
Quoted 8 lines · On Tue, 12 Nov 2019, at 15:33, [email protected] wrote:
Hi all,
I would like to build my yocto project, but only my applications. I mean, I would like to separate my Linux build and the application build. I want to just have my meta-layer which contains my application being build by calling the bitbake command.
Can anyone give me a pointer? Using the multiconfig is the way to do it?
Quoted 5 lines
Best
Em
P.S. If I want to be more specific, I just want to use Yocto as a cross-compilation tool for baremetal applications.
You could start by looking at how meta-freertos (https://github.com/aehs29/meta-freertos) achieves this. It has support for running the resulting bare-metal app under qemu which you might not need, but the rest of freertos-image.bbclass is probably a good reference.
Signature · 1 line
Paul Barker
Hi Paul,
thanks for your help. I did it based on the FreeRTOS. Here is how the result looks like:
Under "yocto/build-mb/tmp/work" I have the follwoings:
core2-64-poky-linux
x86_64-linux
and in "core2-64-poky-linux" which I don't where it gets its name, I have my binary:core2-64-poky-linux/microblaze-demo/1.0-r0/test.elf
My question now is, how can I avoid hassle of building the x86_64-linux? I just need my test.elf file. BestEm
On Tuesday, November 12, 2019, 4:46:51 PM GMT+1, Paul Barker <[email protected]> wrote:
Quoted 8 lines · On Tue, 12 Nov 2019, at 15:33, [email protected] wrote:
Hi all,
I would like to build my yocto project, but only my applications. I mean, I would like to separate my Linux build and the application build. I want to just have my meta-layer which contains my application being build by calling the bitbake command.
Can anyone give me a pointer? Using the multiconfig is the way to do it?
Quoted 5 lines
Best
Em
P.S. If I want to be more specific, I just want to use Yocto as a cross-compilation tool for baremetal applications.
You could start by looking at how meta-freertos (https://github.com/aehs29/meta-freertos) achieves this. It has support for running the resulting bare-metal app under qemu which you might not need, but the rest of freertos-image.bbclass is probably a good reference.
Signature · 1 line
Paul Barker
Quoted 1 line · On 12/11/2019 16:17, [email protected] wrote:
My question now is, how can I avoid hassle of building the x86_64-linux? I just need my test.elf file.
Have a look in that folder to see what it is building. That directory is for native tools, like GCC.
Ross
Hi Ross,
so you mean there is no way not to build them? I don't need any native tool.I define my cross-compilation toolchain in my layer. I asked you in twitter, you said "Use multiconfig to split the Linux and rtos entirely". I could not figure it, so I decided not to bother you in twitter and ask it here :) Em
On Tuesday, November 12, 2019, 5:24:10 PM GMT+1, Ross Burton <[email protected]> wrote:
Quoted 2 lines · On 12/11/2019 16:17, [email protected] wrote:
My question now is, how can I avoid hassle of building the x86_64-linux? I just need my test.elf file.
Have a look in that folder to see what it is building. That directory is for native tools, like GCC.
Ross
Quoted 3 lines · On 12/11/2019 16:52, [email protected] wrote:
so you mean there is no way not to build them? I don't need any native tool.
I define my cross-compilation toolchain in my layer.
I asked you in twitter, you said "Use multiconfig to split the Linux and rtos entirely". I could not figure it, so I decided not to bother you in twitter and ask it here :)
Have a look and you'll see what it is building. If you can remove those dependencies from your build then it won't build them...
I suspect you can't. Your cross compiler will be built in the x86-64_linux folder for a start.
Ross
Quoted 10 lines · On 12/11/2019 15:33, [email protected] wrote:
Hi all,
I would like to build my yocto project, but only my applications. I mean, I would like to separate my Linux build and the application build. I want to just have my meta-layer which contains my application being build by calling the bitbake command.
Can anyone give me a pointer? Using the multiconfig is the way to do it?Best
Em
P.S. If I want to be more specific, I just want to use Yocto as a cross-compilation tool for baremetal applications.
Baremetal != "just my app and not Linux".
If you want to build a bare metal application then setup the distribution as such: meta-freertos is one example using FreeRTOS, and we have newlib or baremetal options for the toolchain. Using Linux and glibc is just the default and not hardcoded.
Ross