1*8975f5c5SAndroid Build Coastguard WorkerThis directory is used to store GN arg mapping for Chrome OS boards. The values 2*8975f5c5SAndroid Build Coastguard Workerof the args are determined by processing the [chromeos-chrome ebuild] for a 3*8975f5c5SAndroid Build Coastguard Workergiven board and a given ChromeOS version (stored in the [CHROMEOS_LKGM] file). 4*8975f5c5SAndroid Build Coastguard Worker 5*8975f5c5SAndroid Build Coastguard WorkerFiles in this directory are populated by running `gclient sync` with specific 6*8975f5c5SAndroid Build Coastguard Workerarguments set in the .gclient file. Specifically: 7*8975f5c5SAndroid Build Coastguard Worker* The file must have a top-level variable set: `target_os = ["chromeos"]` 8*8975f5c5SAndroid Build Coastguard Worker* The `"custom_vars"` parameter of the chromium/src.git solution must include 9*8975f5c5SAndroid Build Coastguard Worker the parameter: `"cros_boards": "{BOARD_NAMES}"` where `{BOARD_NAMES}` is a 10*8975f5c5SAndroid Build Coastguard Worker colon-separated list of boards you'd like to checkout. 11*8975f5c5SAndroid Build Coastguard Worker* If you'd like to a checkout a QEMU-bootable image for a given board, include 12*8975f5c5SAndroid Build Coastguard Worker it in the `cros_boards_with_qemu_images` var rather than the `cros_boards` 13*8975f5c5SAndroid Build Coastguard Worker var. 14*8975f5c5SAndroid Build Coastguard Worker 15*8975f5c5SAndroid Build Coastguard WorkerA typical .gclient file is a sibling of the src/ directory, and might look like 16*8975f5c5SAndroid Build Coastguard Workerthis: 17*8975f5c5SAndroid Build Coastguard Worker``` 18*8975f5c5SAndroid Build Coastguard Workersolutions = [ 19*8975f5c5SAndroid Build Coastguard Worker { 20*8975f5c5SAndroid Build Coastguard Worker "url": "https://chromium.googlesource.com/chromium/src.git", 21*8975f5c5SAndroid Build Coastguard Worker "managed": False, 22*8975f5c5SAndroid Build Coastguard Worker "name": "src", 23*8975f5c5SAndroid Build Coastguard Worker "custom_deps": {}, 24*8975f5c5SAndroid Build Coastguard Worker "custom_vars" : { 25*8975f5c5SAndroid Build Coastguard Worker "checkout_src_internal": True, 26*8975f5c5SAndroid Build Coastguard Worker "cros_boards": "eve:kevin", 27*8975f5c5SAndroid Build Coastguard Worker # If a QEMU-bootable image is desired for any board, move it from 28*8975f5c5SAndroid Build Coastguard Worker # the previous var to the following: 29*8975f5c5SAndroid Build Coastguard Worker "cros_boards_with_qemu_images": "amd64-generic", 30*8975f5c5SAndroid Build Coastguard Worker }, 31*8975f5c5SAndroid Build Coastguard Worker }, 32*8975f5c5SAndroid Build Coastguard Worker] 33*8975f5c5SAndroid Build Coastguard Workertarget_os = ["chromeos"] 34*8975f5c5SAndroid Build Coastguard Worker``` 35*8975f5c5SAndroid Build Coastguard Worker 36*8975f5c5SAndroid Build Coastguard WorkerTo use these files in a build, simply add the following line to your GN args: 37*8975f5c5SAndroid Build Coastguard Worker``` 38*8975f5c5SAndroid Build Coastguard Workerimport("//build/args/chromeos/${some_board}.gni") 39*8975f5c5SAndroid Build Coastguard Worker``` 40*8975f5c5SAndroid Build Coastguard Worker 41*8975f5c5SAndroid Build Coastguard WorkerThat will produce a Chrome OS build of Chrome very similar to what is shipped 42*8975f5c5SAndroid Build Coastguard Workerfor that device. You can also supply additional args or even overwrite ones 43*8975f5c5SAndroid Build Coastguard Workersupplied in the .gni file after the `import()` line. For example, the following 44*8975f5c5SAndroid Build Coastguard Workerargs will produce a debug build of Chrome for board=eve using rbe: 45*8975f5c5SAndroid Build Coastguard Worker``` 46*8975f5c5SAndroid Build Coastguard Workerimport("//build/args/chromeos/eve.gni") 47*8975f5c5SAndroid Build Coastguard Worker 48*8975f5c5SAndroid Build Coastguard Workeris_debug = true 49*8975f5c5SAndroid Build Coastguard Workeruse_remoteexec = true 50*8975f5c5SAndroid Build Coastguard Worker``` 51*8975f5c5SAndroid Build Coastguard Worker 52*8975f5c5SAndroid Build Coastguard WorkerTODO(bpastene): Make 'cros_boards' a first class citizen in gclient and replace 53*8975f5c5SAndroid Build Coastguard Workerit with 'target_boards' instead. 54*8975f5c5SAndroid Build Coastguard Worker 55*8975f5c5SAndroid Build Coastguard Worker[chromeos-chrome ebuild]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/HEAD/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild 56*8975f5c5SAndroid Build Coastguard Worker[CHROMEOS_LKGM]: https://chromium.googlesource.com/chromium/src/+/HEAD/chromeos/CHROMEOS_LKGM 57