I was hoping somebody might be able to offer some perspective on the relationship between chromiumos and Chrome's build system. The boundary is pretty fuzzy for me, and I have not found any descriptive docs yet, so I am hoping somebody experienced might just be able to quickly guide me here.
I am fairly new to chromiumos, but I am pretty familiar with gentoo/portage, so I think I understand the whole package build and deploy mechanism I am seeing in build_packages and build_image. We are looking to understand chromiumos in the context of applying it to a new embedded system (no UI, no chrome), particularly looking at how to customize what goes into the image and how best to implement custom packages we will be developing.
My research suggests that gn (and gyp before it) is basically the chrome build system frontend, which produces ninja files, which is used to produce the final binary. Is this used for os-level packages and whatnot, or is it really just for chrome itself, plugins, etc...?
How does the gn build step interface with portage for a chromeos build? Is there just some ebuild somewhere which triggers gn and packages up the built products, or is it more tightly integrated somewhere? Is there some fast modify-build-test cycle involving both chrome and portage, or is portage bypassed for normal chrome development flows?
I am also trying to figure out where goma fits into the above. Is goma only useful for the chrome/ninja build part of things, or does it also integrate with general portage builds across all packages using make or whatever?
Is the rdep of virtual/chromeos-board-default-apps the right place to have our overlay declare what packages we want in our image beyond the platform?
A somewhat related question:
Is there anything which describes the structure of the root level ebuilds used to assemble the image, and ideally the rationale behind each step? I am finding it fairly hard to trace and reason about things just from digging through the ebuilds. Ideally this would be a document, but a tool to walk around the effective portage tree after all overlays might at least be an improvement over what I am doing.
Guidance on where the right places are to overlay in general I suppose.
Tracing things down the road to discover things like this tree:
- virtual/target-os ->
- virtual/target-chrome-os ->
- virtual/target-chromium-os
- virtual/chromeos-board-default-apps ->
- (board overlay)/virtual/chromeos-board-default-apps ->
- chromeos-base/chromeos-board-default-apps-(board)
add to this the extra dimensionality of overlays stacked up
- chromiumos:default/linux ->
- chromiumos:features/* ->
- chromeos ->
- baseboard-* ->
- chipset-* ->
- project-* ->
- private-project ->
- board ->
- private-board ->
- ... random stuff I have not discovered yet ...
it is a fairly time consuming process... and its hard to have any confidence that we found the right place for things in the end (I seem to discover some new virtual package every time I look through this thing).
Thanks
-Alan