Openembedded Core Discussions
 help / color / mirror / Atom feed
* repo and bitbake
@ 2021-05-01 16:44 Mike
  2021-05-01 18:10 ` [OE-core] " Jean-Marie Lemetayer
  0 siblings, 1 reply; 2+ messages in thread
From: Mike @ 2021-05-01 16:44 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1788 bytes --]

Hi!

I am a beginner to bitbake and openembedded, so please bear with me.

In short, I have a custom system where I want to fetch all source code from a Gerrit server using the (Google) repo tool.
So, after repo init and sync, all source code is populated in my workspace (thus, bitbake doesn't have to fetch or patch the sources).
The SW modules themselves use regular CMake, make, or autotools for building.
The workspace looks like:
(workdir)/subsystem_A/SW_module_1
(workdir)/subsystem_A/SW_module_2
(workdir)/subsystem_B/...
(workdir)/product_X/meta-...     (this is were all bitbake files are stored in order to build product X)
(workdir)/product_Y/meta-...     (this is were all bitbake files are stored in order to build product Y; common configs/recipes will be a common product layer)
In product_X folder, I also plan to have a script that sets up the build env (similar to oe-init-build-env), creating folder:
(workdir/build/
and populate it with bblayers.conf and local.conf. bblayers.conf will add the layers at (workdir)/product_X/meta-...
From here, the building of the SW modules as well as the final image takes place using bitbake.
The end result of the build is a ext4 file system image, which is flashed onto target device.

First basic question:
How do I properly set SRC_URI in the recipes to point to the SW_modules above, with no fetching/patching. Can I avoid that bitbake
copy the source files to the build/tmp folder?
I don't want to list the source files in the recipe really, I just want to refer to folder (workdir)/subsystem_A/SW_module_1
as the CMakeLists.txt (for CMake) tells which files to build etc. Thus, "file:://" doesn't sound a good idea.
I want to use inherit cmake and DEPENDS for managing deps.

Thanks!
Mike

[-- Attachment #2: Type: text/html, Size: 1943 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [OE-core] repo and bitbake
  2021-05-01 16:44 repo and bitbake Mike
@ 2021-05-01 18:10 ` Jean-Marie Lemetayer
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Marie Lemetayer @ 2021-05-01 18:10 UTC (permalink / raw)
  To: Mike; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2939 bytes --]

Hi Mike,

I have started a project to use yocto in a repo environment. This is called
openbar (https://github.com/openbar) but it is still a draft.

There is a wrapper makefile (the wizard) which starts bitbake in a docker
environment and allows you to use .config files to specify a build with
additional actions (use "make help" for the complete usage) .

It also exports the REPODIR variable (the root of the repo tree) to bitbake
using the BB_ENV_EXTRAWHITE variable (
https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#var-bb-BB_ENV_EXTRAWHITE
).

Finally I wanted to have the same use case as you, I was thinking of using
the externalsrc class (
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/externalsrc.bbclass)
the same way devtool do. I think mixing this class with something
equivalent to the REPODIR variable should work.

Let me know if you have succeeded.

Best regards,
Jean-Marie




On Sat, May 1, 2021 at 9:45 AM Mike <rabarberpie@gmail.com> wrote:

> Hi!
>
> I am a beginner to bitbake and openembedded, so please bear with me.
>
> In short, I have a custom system where I want to fetch all source code
> from a Gerrit server using the (Google) repo tool.
> So, after repo init and sync, all source code is populated in my workspace
> (thus, bitbake doesn't have to fetch or patch the sources).
> The SW modules themselves use regular CMake, make, or autotools for
> building.
> The workspace looks like:
> (workdir)/subsystem_A/SW_module_1
> (workdir)/subsystem_A/SW_module_2
> (workdir)/subsystem_B/...
> (workdir)/product_X/meta-...     (this is were all bitbake files are
> stored in order to build product X)
> (workdir)/product_Y/meta-...     (this is were all bitbake files are
> stored in order to build product Y; common configs/recipes will be a common
> product layer)
> In product_X folder, I also plan to have a script that sets up the build
> env (similar to oe-init-build-env), creating folder:
> (workdir/build/
> and populate it with bblayers.conf and local.conf. bblayers.conf will add
> the layers at (workdir)/product_X/meta-...
> From here, the building of the SW modules as well as the final image takes
> place using bitbake.
> The end result of the build is a ext4 file system image, which is flashed
> onto target device.
>
> First basic question:
> How do I properly set SRC_URI in the recipes to point to the SW_modules
> above, with no fetching/patching. Can I avoid that bitbake
> copy the source files to the build/tmp folder?
> I don't want to list the source files in the recipe really, I just want to
> refer to folder (workdir)/subsystem_A/SW_module_1
> as the CMakeLists.txt (for CMake) tells which files to build etc. Thus,
> "file:://" doesn't sound a good idea.
> I want to use inherit cmake and DEPENDS for managing deps.
>
> Thanks!
> Mike
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 3690 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-01 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-01 16:44 repo and bitbake Mike
2021-05-01 18:10 ` [OE-core] " Jean-Marie Lemetayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox