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

Issue 152513007: Build Skia for a bare-bones embedded Linux system. (Closed)

Created:
6 years, 10 months ago by hal.canary
Modified:
6 years, 9 months ago
Reviewers:
scroggo, borenet, djsollen
CC:
skia-review_googlegroups.com, kevin.petit
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Build Skia for a bare-bones embedded Linux system. Motivation: I have downloaded a barebones Linux system built for 64-bit ARM from linaro.org and a ARMv8 Foundation Model from arm.com to run it on. This will let us build and test Skia on ARM64 before we aquire hardware to allow that. This CL introduces the changes to the build files necessary to build Skia on a barebones embedded Linux system. I tested it with the aarch64 GCC compiler provided by linaro.org. Changes: Add a "barelinux" target_os for the DEPS file. Add an optional git download of zlib. Changes to gyp files: these changes abstract out libpng, libz, and giflib so that images.gyp doesn't know whether they are static or dynamically linked. I also add the variables skia_giflib_static, skia_libpng_static, skia_zlib_static, and skia_freetype_static, all of which default to false but when set to true will override the behavior of the giflib, libpng, zlib, and freetype build targets to require them to build statically. Also, the skia_no_fontconfig variable turns off use of the fontconfig service. Scripts in platform_tools/barelinux/bin: arm64_download - this script downloads the Linaro's ARMv8 Aarch64 toolchain and minimal embedded Linux system as well as ARM's foundation model. The required files are mirrored on Google Cloud. The script then starts a emulated Arm64 Linux system in the background. After the boot is complete, you can SSH into the system at port 8022 via user@localhost. The SSH key will be downloaded into the working directery as well. download_deps - Uses gclient to download Skia's dependencies for a bare Linux system (the normal dependecies plus giflib, libpng, and zlib.) barelinux_make - this script builds a version of skia that does not depend on external libraries, perfect for putting in an embedded system running Linux. Assumes you have run download_deps first. To test: To build a barelinux target, use the barelinux_make script. To build for a armv8 system: skia_arch_type=arm arm_neon=0 armv7=1 armv8=1 arm_thumb=0 skia_arch_width=64 and set the CC and CXX variables to point at the cross-compiler downloaded by arm64_download. Committed: http://code.google.com/p/skia/source/detail?r=13570

Patch Set 1 #

Total comments: 34

Patch Set 2 : changes #

Total comments: 6

Patch Set 3 : nits #

Patch Set 4 : android fix #

Patch Set 5 : makescript #

Patch Set 6 : gyp fixes for windows #

Patch Set 7 : comment #

Total comments: 13

Patch Set 8 : changes due to comments #

Total comments: 7

Patch Set 9 : fixes #

Total comments: 4

Patch Set 10 : again #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+697 lines, -121 lines) Patch
M DEPS View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M gyp/common_variables.gypi View 1 2 3 4 5 6 7 8 2 chunks +40 lines, -0 lines 1 comment Download
M gyp/freetype.gyp View 1 2 3 4 5 6 7 8 9 2 chunks +62 lines, -45 lines 0 comments Download
A gyp/giflib.gyp View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
M gyp/images.gyp View 1 2 3 4 5 3 chunks +8 lines, -21 lines 0 comments Download
M gyp/libjpeg.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
A gyp/libpng.gyp View 1 2 3 1 chunk +88 lines, -0 lines 0 comments Download
M gyp/lua.gyp View 1 2 3 4 5 6 7 1 chunk +10 lines, -1 line 0 comments Download
M gyp/most.gyp View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M gyp/pdf.gyp View 1 chunk +1 line, -1 line 0 comments Download
M gyp/pdfviewer_lib.gyp View 1 chunk +1 line, -1 line 0 comments Download
M gyp/ports.gyp View 1 chunk +23 lines, -10 lines 0 comments Download
A gyp/skflate.gyp View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
D gyp/zlib.gyp View 1 2 1 chunk +70 lines, -40 lines 0 comments Download
A platform_tools/barelinux/bin/arm64_download View 1 2 3 4 5 6 1 chunk +167 lines, -0 lines 0 comments Download
A platform_tools/barelinux/bin/barelinux_make View 1 2 3 4 5 6 7 8 9 1 chunk +96 lines, -0 lines 1 comment Download
A platform_tools/barelinux/bin/download_deps View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
hal.canary
Please take a look.
6 years, 10 months ago (2014-02-06 15:57:31 UTC) #1
scroggo
https://codereview.chromium.org/152513007/diff/1/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/1/gyp/common_variables.gypi#newcode97 gyp/common_variables.gypi:97: # and third_party/externals/freetype. Requires gclient sync to What does ...
6 years, 10 months ago (2014-02-06 16:22:12 UTC) #2
djsollen
https://codereview.chromium.org/152513007/diff/1/gyp/freetype.gyp File gyp/freetype.gyp (right): https://codereview.chromium.org/152513007/diff/1/gyp/freetype.gyp#newcode64 gyp/freetype.gyp:64: 'libpng.gyp:libpng', I don't think you need this if your ...
6 years, 10 months ago (2014-02-06 16:24:33 UTC) #3
hal.canary
https://codereview.chromium.org/152513007/diff/1/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/1/gyp/common_variables.gypi#newcode97 gyp/common_variables.gypi:97: # and third_party/externals/freetype. Requires gclient sync to On 2014/02/06 ...
6 years, 10 months ago (2014-02-06 18:01:56 UTC) #4
scroggo
From my perspective this lgtm (with small nits). https://codereview.chromium.org/152513007/diff/1/gyp/giflib.gyp File gyp/giflib.gyp (right): https://codereview.chromium.org/152513007/diff/1/gyp/giflib.gyp#newcode45 gyp/giflib.gyp:45: }, ...
6 years, 10 months ago (2014-02-06 18:14:50 UTC) #5
djsollen
https://codereview.chromium.org/152513007/diff/120001/DEPS File DEPS (right): https://codereview.chromium.org/152513007/diff/120001/DEPS#newcode45 DEPS:45: "third_party/externals/zlib" : "https://github.com/madler/zlib.git@5089329", # zlib.git@v1.2.8 is there a googlesource.com ...
6 years, 10 months ago (2014-02-06 18:22:40 UTC) #6
hal.canary
On 2014/02/06 18:14:50, scroggo wrote: > On 2014/02/06 18:01:57, Hal Canary wrote: > > On ...
6 years, 10 months ago (2014-02-06 21:01:48 UTC) #7
hal.canary
https://codereview.chromium.org/152513007/diff/120001/DEPS File DEPS (right): https://codereview.chromium.org/152513007/diff/120001/DEPS#newcode45 DEPS:45: "third_party/externals/zlib" : "https://github.com/madler/zlib.git@5089329", # zlib.git@v1.2.8 On 2014/02/06 18:22:41, djsollen ...
6 years, 10 months ago (2014-02-06 21:01:54 UTC) #8
hal.canary
The CQ bit was checked by halcanary@google.com
6 years, 10 months ago (2014-02-06 21:05:13 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/152513007/260001
6 years, 10 months ago (2014-02-06 21:05:19 UTC) #10
hal.canary
The CQ bit was unchecked by halcanary@google.com
6 years, 10 months ago (2014-02-06 21:55:41 UTC) #11
hal.canary
Leon, I made some minor changes to the gyp files to make sure it continues ...
6 years, 10 months ago (2014-02-18 20:58:01 UTC) #12
scroggo
https://codereview.chromium.org/152513007/diff/740001/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/740001/gyp/common_variables.gypi#newcode100 gyp/common_variables.gypi:100: 'skia_freetype_static%': 'skia_os in ["android", "nacl"]', It seems like these ...
6 years, 10 months ago (2014-02-18 21:46:23 UTC) #13
borenet
Scripts look okay, but I'm not a shell scripting expert. https://codereview.chromium.org/152513007/diff/740001/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/740001/gyp/common_variables.gypi#newcode100 ...
6 years, 10 months ago (2014-02-18 22:15:35 UTC) #14
hal.canary
https://codereview.chromium.org/152513007/diff/740001/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/740001/gyp/common_variables.gypi#newcode100 gyp/common_variables.gypi:100: 'skia_freetype_static%': 'skia_os in ["android", "nacl"]', On 2014/02/18 21:46:24, scroggo ...
6 years, 10 months ago (2014-02-19 15:21:03 UTC) #15
djsollen
https://codereview.chromium.org/152513007/diff/780002/platform_tools/barelinux/bin/arm64_download File platform_tools/barelinux/bin/arm64_download (right): https://codereview.chromium.org/152513007/diff/780002/platform_tools/barelinux/bin/arm64_download#newcode61 platform_tools/barelinux/bin/arm64_download:61: try gsutil_check_get "gs://${location}/${toolchain}.tar.xz" \ you can do this without ...
6 years, 10 months ago (2014-02-19 15:40:00 UTC) #16
hal.canary
https://codereview.chromium.org/152513007/diff/780002/platform_tools/barelinux/bin/arm64_download File platform_tools/barelinux/bin/arm64_download (right): https://codereview.chromium.org/152513007/diff/780002/platform_tools/barelinux/bin/arm64_download#newcode61 platform_tools/barelinux/bin/arm64_download:61: try gsutil_check_get "gs://${location}/${toolchain}.tar.xz" \ On 2014/02/19 15:40:00, djsollen wrote: ...
6 years, 10 months ago (2014-02-19 15:43:55 UTC) #17
scroggo
https://codereview.chromium.org/152513007/diff/780002/gyp/freetype.gyp File gyp/freetype.gyp (right): https://codereview.chromium.org/152513007/diff/780002/gyp/freetype.gyp#newcode19 gyp/freetype.gyp:19: 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400', If I understand Eric's comment in https://codereview.chromium.org/152513007/diff/740001/gyp/freetype.gyp#newcode8, these ...
6 years, 10 months ago (2014-02-19 18:33:57 UTC) #18
borenet
https://codereview.chromium.org/152513007/diff/780002/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/780002/gyp/common_variables.gypi#newcode100 gyp/common_variables.gypi:100: 'skia_freetype_static%': 'skia_os in ["android", "nacl"]', Not sure if it's ...
6 years, 10 months ago (2014-02-21 15:24:34 UTC) #19
hal.canary
https://codereview.chromium.org/152513007/diff/780002/gyp/common_variables.gypi File gyp/common_variables.gypi (right): https://codereview.chromium.org/152513007/diff/780002/gyp/common_variables.gypi#newcode100 gyp/common_variables.gypi:100: 'skia_freetype_static%': 'skia_os in ["android", "nacl"]', On 2014/02/21 15:24:34, borenet ...
6 years, 10 months ago (2014-02-24 17:42:35 UTC) #20
scroggo
https://codereview.chromium.org/152513007/diff/1000001/gyp/freetype.gyp File gyp/freetype.gyp (right): https://codereview.chromium.org/152513007/diff/1000001/gyp/freetype.gyp#newcode18 gyp/freetype.gyp:18: # Both Android and NaCl provide at least FreeType ...
6 years, 10 months ago (2014-02-24 17:51:39 UTC) #21
hal.canary
https://codereview.chromium.org/152513007/diff/1000001/gyp/freetype.gyp File gyp/freetype.gyp (right): https://codereview.chromium.org/152513007/diff/1000001/gyp/freetype.gyp#newcode18 gyp/freetype.gyp:18: # Both Android and NaCl provide at least FreeType ...
6 years, 10 months ago (2014-02-24 18:57:50 UTC) #22
scroggo
On 2014/02/24 18:57:50, Hal Canary wrote: > https://codereview.chromium.org/152513007/diff/1000001/gyp/freetype.gyp > File gyp/freetype.gyp (right): > > https://codereview.chromium.org/152513007/diff/1000001/gyp/freetype.gyp#newcode18 ...
6 years, 10 months ago (2014-02-24 19:19:47 UTC) #23
hal.canary
The CQ bit was checked by halcanary@google.com
6 years, 10 months ago (2014-02-24 19:26:47 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/152513007/1100002
6 years, 10 months ago (2014-02-24 19:26:57 UTC) #25
hal.canary
On 2014/02/24 19:19:47, scroggo wrote: > The gyp changes lgtm. I can't really speak to ...
6 years, 10 months ago (2014-02-24 19:27:22 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/152513007/1100002
6 years, 10 months ago (2014-02-24 20:21:52 UTC) #27
commit-bot: I haz the power
Change committed as 13570
6 years, 10 months ago (2014-02-24 20:22:43 UTC) #28
borenet
6 years, 10 months ago (2014-02-24 20:46:57 UTC) #29
Message was sent while issue was closed.
LGTM as well.  Also not a shell script expert.

https://codereview.chromium.org/152513007/diff/1100002/gyp/common_variables.gypi
File gyp/common_variables.gypi (right):

https://codereview.chromium.org/152513007/diff/1100002/gyp/common_variables.g...
gyp/common_variables.gypi:121: #     don't do that; instead compile and
staticlly link the version of
Nit: spelling

https://codereview.chromium.org/152513007/diff/1100002/platform_tools/barelin...
File platform_tools/barelinux/bin/barelinux_make (right):

https://codereview.chromium.org/152513007/diff/1100002/platform_tools/barelin...
platform_tools/barelinux/bin/barelinux_make:62: return $ret
Why not exit here, since you do " || exit" everywhere this is used?

Powered by Google App Engine
This is Rietveld 408576698