blob: 4a4fc4c00a0a7c60bf38c2b5a027311c9978b137 [file] [log] [blame]
Anton Staaf48376092010-08-13 11:55:41 -07001 This directory contains board and variant overlays. When a board is
2configured using "setup_board --board <board>" the following overlays are added
3to the make.conf PORTDIR_OVERLAY if they exist:
robotboy7b65e212010-02-16 20:07:22 -08004
Anton Staaf48376092010-08-13 11:55:41 -07005 src/overlays/overlay-<board>
6 src/private-overlays/overlay-<board>-private
7
8 When a board is configured using "setup_board --board <board> --variant
9<variant>" or "setup_board --board <board>_<variant>" the following overlays
10are added if they exist:
11
12 src/overlays/overlay-<board>
13 src/overlays/overlay-variant-<board>-<variant>
14 src/private-overlays/overlay-<board>-private
15 src/private-overlays/overlay-variant-<board>-<variant>-private
16
17 If --variant is supplied to setup_board or the <board>_<variant> version
18of --board is supplied to setup_board then the primary variant overlay must
19exist.
20
Josh Triplett678381f2012-08-22 11:43:53 -070021 A private board overlay can augment an existing non-private board overlay,
22or can serve as the primary board overlay for a board with no non-private board
23overlay.
24
25 All board overlays (including variants) should contain a make.conf. If
26this file exists it will be sourced in the order that the overlays and variants
27are listed above.
28
29 All board overlays should contain a toolchain.conf, specifying the
30toolchains required to build that board. Variants can inherit toolchain.conf
31from their primary board overlay.
Anton Staaf48376092010-08-13 11:55:41 -070032
33 The board and variant names can not have underscores or spaces in them.
34
35
Josh Triplett7f88f182012-08-20 12:30:00 -070036PROFILES
37--------
38 All overlays must contain a profiles directory with a repo_name file
39therein. The repo_name file provides a unique name Portage uses to identify
40each overlay or variant.
Anton Staaf48376092010-08-13 11:55:41 -070041
Josh Triplett7f88f182012-08-20 12:30:00 -070042 Overlays and variants can also contain named profiles as subdirectories of
43the profiles directory. If the board overlay contains a "base" profile,
44Portage will use that by default for the board; otherwise, Portage will use a
45profile from chromiumos-overlay.
Anton Staaf48376092010-08-13 11:55:41 -070046
Josh Triplett7f88f182012-08-20 12:30:00 -070047 Within a profile, a board overlay will most commonly want to specify
48package-specific USE flags via package.use, mask or unmask package versions via
49package.mask and package.unmask, or mask or unmask keywords via
50package.keywords. See "man portage" in the chroot for full details on those
51and other files that can appear in a profile.
52
53 Profiles in a board overlay must have a file "parent", containing the full
54path of one of the profiles from chromiumos-overlay, as seen from the build
55chroot; /usr/local/portage/chromiumos/profiles in the chroot maps to
56src/third_party/chromiumos-overlay/profiles in the source tree. The parent
57must point to an architecture-appropriate profile, typically
58/usr/local/portage/chromiumos/profiles/default/linux/$arch/$version/chromeos.
59Profiles can use another profile from the same board as their parent, as long
60as the chain of parent profiles eventually leads to an architecture-appropriate
61profile from chromiumos-overlay.
62
Josh Triplett4d55aca2012-08-22 11:12:27 -070063 Adding a base profile to a board overlay that did not previously have a
64profile will require re-running setup_board with --force.
65
Josh Triplett7f88f182012-08-20 12:30:00 -070066
67LAYOUT.CONF
68-----------
69 Overlays should contain a metadata directory with a layout.conf file
70therein. The layout.conf file specifies the "masters" list. This is a list of
71repository names, taken from the repo_name files in the overlays. This list
72disambiguates the selection of ebuilds. When two overlays supply the same
Josh Triplettbda64882012-08-22 14:53:15 -070073ebuild the overlay whose repo_name is listed later in the masters list will be
Josh Triplett7f88f182012-08-20 12:30:00 -070074used. The masters list also effects the way that portage searches for
Anton Staaf48376092010-08-13 11:55:41 -070075eclasses. By having the repo_name "chromiumos" as the last entry in the
76masters list portage will correctly find the chromiumos specific eclasses.
77
78
Josh Triplett678381f2012-08-22 11:43:53 -070079BOARD-SPECIFIC PACKAGES
80-----------------------
81 A board overlay will typically want to provide additional packages to
82install. ChromiumOS builds install the chromeos/chromeos package by default,
83whose RDEPEND brings in all the packages installed by default.
84chromeos/chromeos RDEPENDs on the virtual package virtual/chromeos-bsp, which
85exists for board overlays to override. chromiumos-overlay provides a default
86version of virtual/chromeos-bsp which RDEPENDs on the empty package
87chromeos-base/chromeos-bsp-null. Board overlays should provide a
88virtual/chromeos-bsp package that RDEPENDs on
89chromeos-base/chromeos-bsp-boardname, and a
90chromeos-base/chromeos-bsp-boardname package that RDEPENDs on any desired
91board-specific packages.
Dave Parkerfb38b012010-12-01 11:56:55 -080092
Josh Triplett678381f2012-08-22 11:43:53 -070093 A board overlay can also provide additional packages to install in dev
94builds only, via similar packages virtual/chromeos-bsp-dev and
95chromeos-base/chromeos-bsp-dev-boardname. ChromiumOS dev builds install
96chromeos-base/chromeos-dev by default, which RDEPENDs on
97virtual/chromeos-bsp-dev.
Josh Triplette49d36e2012-08-22 11:46:57 -070098
99 Note that a board overlay cannot specify package-specific USE flags by
100using an RDEPEND with a use flag, such as section/package[useflag]; instead,
101add "section/package useflag" to package.use in a profile.
Josh Triplette7e8c7d2012-10-05 16:40:16 -0700102
103
104PRIVATE HOST OVERLAYS
105---------------------
106
107 The host (non-cross-compiling) build environment will use the following
108overlay if it exists:
109
110 src/private-overlays/chromeos-overlay
111
112 This overlay contains private packages needed on the host system to compile
113target packages used in a private overlay. Packages only needed on the target
114system should appear in a private board overlay. The packages in a private
115host overlay should typically all appear in the dependency chain of
116chromeos-base/hard-host-depends so that the build process will install them on
117the host system at the appropriate time. chromeos-base/hard-host-depends
118depends on the virtual package virtual/hard-host-depends-bsp to allow a private
119host overlay to extend the host dependencies; a private host overlay can
120provide a version 2 ebuild for virtual/hard-host-depends-bsp, and list any
121additional host dependencies in the RDEPEND of that package.
122
123 Like a board overlay, a private host overlay must include a layout.conf
124with "masters" set, so that the packages within that host overlay can reference
125eclasses from the parent overlays chromiumos-overlay or portage-stable.