MIPS64EL: Add support for build libchromiumcontent. #364
Conversation
@ClarkWang-2013 I noticed that you have already upstreamed some of the patches, are you going to upstream the rest of the patches? |
@zcbenz |
From 12c1704063ff6f2b1e599b58a7937f8c20a59264 Mon Sep 17 00:00:00 2001 | ||
From: Wang Qing <wangqing-hf@loongson.cn> | ||
Date: Thu, 14 Sep 2017 19:07:25 +0800 | ||
Subject: [PATCH] Fix build_ffmpeg.py and automatic gernerate ffmpeg mips64el |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the 002-Fix-build_ffmpeg.py-and-automatic-gernerate-ffmpeg-m.patch
, it seems that most changes are actually automatically generated? I think we should auto-generate the files in the update
script, otherwise this patch would be impossible to maintain when we do Chrome upgrades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
script/update
Outdated
if target_arch == 'mips64el': | ||
args += ' google_api_key="AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ"' | ||
args += ' google_default_client_id="595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com"' | ||
args += ' google_default_client_secret="5ntt6GbbkjnTVXx-MSxbmx5e"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Google API keys are not needed in libchromiumcontent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
For example And do you mind writing down the upstream Chromium commits of the patches? It would make our work much easier when doing Chrome upgrades. For example:
|
@zcbenz Thanks. |
@ClarkWang-2013 just curious, what kind of devices use Loongson (MIPS64EL) processors? Laptops? Phones? Servers? Something else? |
@zeke laptops、desktop and servers |
@ClarkWang-2013 is it very popular in China? |
@ClarkWang-2013 Are you compiling libchromiumcontent on a loongson platform? If so is it possible to cross compile for loongson on a x64 host machine? |
@zcbenz |
@ClarkWang-2013 I don't think Chromium team actually tests mips build, they just let patches in and let contributors maintain the code path. In Electron and libchromiumcontent the binaries are built on our CI machines and we provide prebuilt binaries to end users, but our Linux CI machines are all x64 and we do cross-compilation for arm/arm64/x86 builds. If we have to compile libchromiumcontent on a loongson platform then it would be a blocker for us, because we would have to host a powerful loongson server ourselves, which is not likely to be an option for us. So it would be great if you can get cross-compilation work with x64 host. |
How do you cross-compilation for arm/arm64/x86 builds? |
Just run |
@zcbenz cross compiling have done. cross compiler you can download from: setup as follows: |
This basically looks good to me, I'm now doing some modifications to make our CI generate binaries for mips64el, and I'll do some force pushes to your forked repo. |
I have moved mips64el related patches to the |
@jkleinsc I have added a new CI job for mips64el here. @alexeykuzmin We are getting a new set of patches in this PR, fortunately most of them have already been upstreamed. |
@zcbenz Can we postpone a merge of this PR until the Chromium 61 upgrade is merged? |
@alexeykuzmin I have separated the patches of mips64el from the others, so it won't affect the normal upgrade of Chrome 61. You can simply remove the mips64el CI jobs in the |
66be635
to
c2e03be
Compare
I'm facing a problem that gcc uses too much RAM that running 8 jobs at the same time would use up all RAM and end up with OOM error, while limiting to 4 jobs would take too much time that circle ci would terminate with timeout error. |
@zcbenz you can try with setup swap |
This patch is specialed for mips64.
The cross-compilation way now does not run runhooks-mips64el, so we need to ensure the ffmpeg config is generated.
Since we can already build mips64el, I'm merging this PR. I have disabled the CI job for mips64 and separated the mips64el patches from the others, so it won't affect the build of other targets. Once we have solved the issue of Circle CI, I'll create a new pull request to re-enable CI for mips64el. |
@ClarkWang-2013 I have some problems with the sysroot image, Some libraries lack corresponding symbol links, for example
The sysroot image also lacks some necessary dependencies of Electron:
And we also need following development headers to exist in the sysroot image:
Can you update the sysroot image and upload it somewhere? |
@zcbenz ok |
@zcbenz update the sysroot image complete。 |
@ClarkWang-2013 Can you take a look at electron/electron#11208? |
I recently completed the libchromiumcontent build on Loongson(MIPS64EL) platform.
Build libchromiumcontent follow the steps below:
$ ./script/bootstrap
$ ./script/update -t mips64el
$ ./script/build -t mips64el
$ ./script/create-dist -t mips64el
And generate files as follows:
libchromiumcontent-static.zip libchromiumcontent.zip dist/main/