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