Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Side by Side Diff: docs/ozone_overview.md

Issue 2480293011: Ozone: Improve sandboxing documentation (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Ozone Overview 1 # Ozone Overview
2 2
3 Ozone is a platform abstraction layer beneath the Aura window system that is 3 Ozone is a platform abstraction layer beneath the Aura window system that is
4 used for low level input and graphics. Once complete, the abstraction will 4 used for low level input and graphics. Once complete, the abstraction will
5 support underlying systems ranging from embedded SoC targets to new 5 support underlying systems ranging from embedded SoC targets to new
6 X11-alternative window systems on Linux such as Wayland or Mir to bring up Aura 6 X11-alternative window systems on Linux such as Wayland or Mir to bring up Aura
7 Chromium by providing an implementation of the platform interface. 7 Chromium by providing an implementation of the platform interface.
8 8
9 ## Guiding Principles 9 ## Guiding Principles
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 To build `chrome`, do this from the `src` directory: 123 To build `chrome`, do this from the `src` directory:
124 124
125 ``` shell 125 ``` shell
126 gn args out/OzoneChromeOS --args="use_ozone=true target_os=\"chromeos\"" 126 gn args out/OzoneChromeOS --args="use_ozone=true target_os=\"chromeos\""
127 ninja -C out/OzoneChromeOS chrome 127 ninja -C out/OzoneChromeOS chrome
128 ``` 128 ```
129 129
130 Then to run for example the X11 platform: 130 Then to run for example the X11 platform:
131 131
132 ``` shell 132 ``` shell
133 ./out/OzoneChromeOS/chrome --ozone-platform=x11 --disable-setuid-sandbox 133 ./out/OzoneChromeOS/chrome --ozone-platform=x11
134 ``` 134 ```
135 135
136 ### Embedded 136 ### Embedded
137 137
138 The following targets are currently working for embedded builds: 138 The following targets are currently working for embedded builds:
139 139
140 * `content_shell` 140 * `content_shell`
141 * various unit tests 141 * various unit tests
142 142
143 The following targets are currently NOT supported: 143 The following targets are currently NOT supported:
144 144
145 * `ash_shell_with_content` 145 * `ash_shell_with_content`
146 * `chrome` 146 * `chrome`
147 147
148 To build `content_shell`, do this from the `src` directory: 148 To build `content_shell`, do this from the `src` directory:
149 149
150 ``` shell 150 ``` shell
151 gn args out/OzoneEmbedded --args="use_ozone=true toolkit_views=false" 151 gn args out/OzoneEmbedded --args="use_ozone=true toolkit_views=false"
152 ninja -C out/OzoneEmbedded content_shell 152 ninja -C out/OzoneEmbedded content_shell
153 ``` 153 ```
154 154
155 Then to run for example the headless platform: 155 Then to run for example the headless platform:
156 156
157 ``` shell 157 ``` shell
158 ./out/OzoneEmbedded/content_shell --disable-setuid-sandbox \ 158 ./out/OzoneEmbedded/content_shell --ozone-platform=headless \
159 --ozone-platform=headless \
160 --ozone-dump-file=/tmp/ 159 --ozone-dump-file=/tmp/
161 ``` 160 ```
162 161
163 ### Linux Desktop - ([waterfall](https://build.chromium.org/p/chromium.fyi/build ers/Ozone%20Linux/)) 162 ### Linux Desktop - ([waterfall](https://build.chromium.org/p/chromium.fyi/build ers/Ozone%20Linux/))
164 Support for Linux Desktop is currently [in-progress](http://crbug.com/295089). 163 Support for Linux Desktop is currently [in-progress](http://crbug.com/295089).
165 164
166 The following targets are currently working: 165 The following targets are currently working:
167 166
168 * various unit tests 167 * various unit tests
169 * `chrome` 168 * `chrome`
170 169
171 To build `chrome`, do this from the `src` directory: 170 To build `chrome`, do this from the `src` directory:
172 171
173 ``` shell 172 ``` shell
174 gn args out/OzoneLinuxDesktop --args="use_ozone=true enable_package_mash_service s=true" 173 gn args out/OzoneLinuxDesktop --args="use_ozone=true enable_package_mash_service s=true"
175 ninja -C out/OzoneLinuxDesktop chrome 174 ninja -C out/OzoneLinuxDesktop chrome
176 ``` 175 ```
177 Then to run for example the X11 platform: 176 Then to run for example the X11 platform:
178 177
179 ``` shell 178 ``` shell
180 ./out/OzoneLinuxDesktop/chrome --ozone-platform=x11 \ 179 ./out/OzoneLinuxDesktop/chrome --ozone-platform=x11 \
181 --disable-setuid-sandbox \
182 --mash 180 --mash
183 ``` 181 ```
184 182
185 Note: You may need to apply [this patch](https://codereview.chromium.org/2485673 002/) to avoid missing ash resources during chrome execution. 183 Note: You may need to apply [this patch](https://codereview.chromium.org/2485673 002/) to avoid missing ash resources during chrome execution.
186 184
187 ### GN Configuration notes 185 ### GN Configuration notes
188 186
189 You can turn properly implemented ozone platforms on and off by setting the 187 You can turn properly implemented ozone platforms on and off by setting the
190 corresponding flags in your GN configuration. For example 188 corresponding flags in your GN configuration. For example
191 `ozone_platform_headless=false ozone_platform_gbm=false` will turn off the 189 `ozone_platform_headless=false ozone_platform_gbm=false` will turn off the
192 headless and DRM/GBM platforms. 190 headless and DRM/GBM platforms.
193 This will result in a smaller binary and faster builds. To turn ALL platforms 191 This will result in a smaller binary and faster builds. To turn ALL platforms
194 off by default, set `ozone_auto_platforms=false`. 192 off by default, set `ozone_auto_platforms=false`.
195 193
196 You can also specify a default platform to run by setting the `ozone_platform` 194 You can also specify a default platform to run by setting the `ozone_platform`
197 build parameter. For example `ozone_platform="x11"` will make X11 the 195 build parameter. For example `ozone_platform="x11"` will make X11 the
198 default platform when `--ozone-platform` is not passed to the program. 196 default platform when `--ozone-platform` is not passed to the program.
199 If `ozone_auto_platforms` is true then `ozone_platform` is set to `headless` 197 If `ozone_auto_platforms` is true then `ozone_platform` is set to `headless`
200 by default. 198 by default.
201 199
202 ## Running with Ozone 200 ## Running with Ozone
203 201
204 Specify the platform you want to use at runtime using the `--ozone-platform` 202 Specify the platform you want to use at runtime using the `--ozone-platform`
205 flag. Disabling the setuid sandbox may be required during development. 203 flag. For example, to run `content_shell` with the GBM platform:
206
207 For example, to run content_shell with the GBM platform:
208 204
209 ``` shell 205 ``` shell
210 content_shell --disable-setuid-sandbox --ozone-platform=gbm 206 content_shell --ozone-platform=gbm
211 ``` 207 ```
212 208
213 Caveats: 209 Caveats:
214 210
215 * `content_shell` always runs at 800x600 resolution. 211 * `content_shell` always runs at 800x600 resolution.
216 * For the GBM platform, you may need to terminate your X server (or any other 212 * For the GBM platform, you may need to terminate your X server (or any other
217 display server) prior to testing. 213 display server) prior to testing.
214 * During development, you may need to configure
215 [sandboxing](linux_sandboxing.md) or to disable it.
tonikitoo 2016/11/09 15:02:34 "you may need to configure or disable [sandboxing]
fwang 2016/11/09 15:09:38 I'd prefer to not discuss sandboxing at all on thi
218 216
219 ## Ozone Platforms 217 ## Ozone Platforms
220 218
221 ### Headless 219 ### Headless
222 220
223 This platform 221 This platform
224 draws graphical output to a PNG image (no GPU support; software rendering only) 222 draws graphical output to a PNG image (no GPU support; software rendering only)
225 and will not output to the screen. You can set 223 and will not output to the screen. You can set
226 the path of the directory where to output the images 224 the path of the directory where to output the images
227 by specifying `--ozone-dump-file=/path/to/output-directory` on the 225 by specifying `--ozone-dump-file=/path/to/output-directory` on the
228 command line: 226 command line:
229 227
230 ``` shell 228 ``` shell
231 content_shell --disable-setuid-sandbox \ 229 content_shell --ozone-platform=headless \
232 --ozone-platform=headless \
233 --ozone-dump-file=/tmp/ 230 --ozone-dump-file=/tmp/
234 ``` 231 ```
235 232
236 ### DRM/GBM 233 ### DRM/GBM
237 234
238 This is Linux direct rending with acceleration via mesa GBM & linux DRM/KMS 235 This is Linux direct rending with acceleration via mesa GBM & linux DRM/KMS
239 (EGL/GLES2 accelerated rendering & modesetting in GPU process) and is in 236 (EGL/GLES2 accelerated rendering & modesetting in GPU process) and is in
240 production use on [ChromeOS](http://www.chromium.org/chromium-os). 237 production use on [ChromeOS](http://www.chromium.org/chromium-os).
241 238
242 Note that all ChromeOS builds of Chrome will compile and attempt to use this. 239 Note that all ChromeOS builds of Chrome will compile and attempt to use this.
(...skipping 20 matching lines...) Expand all
263 260
264 Below are some quick build & run instructions. It is assumed that you are 261 Below are some quick build & run instructions. It is assumed that you are
265 launching `chrome` from a Wayland environment such as `weston`. Apply 262 launching `chrome` from a Wayland environment such as `weston`. Apply
266 [this patch](https://codereview.chromium.org/2485673002/) and execute the 263 [this patch](https://codereview.chromium.org/2485673002/) and execute the
267 following commands: 264 following commands:
268 265
269 ``` shell 266 ``` shell
270 gn args out/OzoneWayland --args="use_ozone=true enable_package_mash_services=tru e" 267 gn args out/OzoneWayland --args="use_ozone=true enable_package_mash_services=tru e"
271 ninja -C out/OzoneWayland chrome 268 ninja -C out/OzoneWayland chrome
272 ./out/OzoneWayland/chrome --ozone-platform=wayland \ 269 ./out/OzoneWayland/chrome --ozone-platform=wayland \
273 --mash \ 270 --mash
274 --disable-setuid-sandbox
275 ``` 271 ```
276 272
277 ### Caca 273 ### Caca
278 274
279 This platform 275 This platform
280 draws graphical output to text using 276 draws graphical output to text using
281 [libcaca](http://caca.zoy.org/wiki/libcaca) 277 [libcaca](http://caca.zoy.org/wiki/libcaca)
282 (no GPU support; software 278 (no GPU support; software
283 rendering only). In case you ever wanted to test embedded content shell on 279 rendering only). In case you ever wanted to test embedded content shell on
284 tty. 280 tty.
285 It has been 281 It has been
286 [removed from the tree](https://codereview.chromium.org/2445323002/) and is no 282 [removed from the tree](https://codereview.chromium.org/2445323002/) and is no
287 longer maintained but you can 283 longer maintained but you can
288 [build it as an out-of-tree port](https://github.com/fred-wang/ozone-caca). 284 [build it as an out-of-tree port](https://github.com/fred-wang/ozone-caca).
289 285
290 Alternatively, you can try the latest revision known to work. First, install 286 Alternatively, you can try the latest revision known to work. First, install
291 libcaca shared library and development files. Next, move to the git revision 287 libcaca shared library and development files. Next, move to the git revision
292 `0e64be9cf335ee3bea7c989702c5a9a0934af037` 288 `0e64be9cf335ee3bea7c989702c5a9a0934af037`
293 (you will probably need to synchronize the build dependencies with 289 (you will probably need to synchronize the build dependencies with
294 `gclient sync --with_branch_heads`). Finally, build and run the caca platform 290 `gclient sync --with_branch_heads`). Finally, build and run the caca platform
295 with the following commands: 291 with the following commands:
296 292
297 ``` shell 293 ``` shell
298 gn args out/OzoneCaca \ 294 gn args out/OzoneCaca \
299 --args="use_ozone=true ozone_platform_caca=true use_sysroot=false ozone_ auto_platforms=false toolkit_views=false" 295 --args="use_ozone=true ozone_platform_caca=true use_sysroot=false ozone_ auto_platforms=false toolkit_views=false"
300 ninja -C out/OzoneCaca content_shell 296 ninja -C out/OzoneCaca content_shell
301 ./out/OzoneCaca/content_shell --disable-setuid-sandbox 297 ./out/OzoneCaca/content_shell
302 ``` 298 ```
303 299
304 Note: traditional TTYs are not the ideal browsing experience.<br/> 300 Note: traditional TTYs are not the ideal browsing experience.<br/>
305 ![Picture of a workstation using Ozone/caca to display the Google home page in a text terminal](./images/ozone_caca.jpg) 301 ![Picture of a workstation using Ozone/caca to display the Google home page in a text terminal](./images/ozone_caca.jpg)
306 302
307 ## Communication 303 ## Communication
308 304
309 There is a public mailing list: 305 There is a public mailing list:
310 [ozone-dev@chromium.org](https://groups.google.com/a/chromium.org/forum/#!forum/ ozone-dev) 306 [ozone-dev@chromium.org](https://groups.google.com/a/chromium.org/forum/#!forum/ ozone-dev)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698