How to cross-compile Chromium for ARM
来源:互联网 发布:网络建设与管理论文 编辑:程序博客网 时间:2024/05/18 00:39
How to cross-compile Chromium for ARM
本文转载自:chrome - How do I cross-compile Chromium for ARM
先做个记号,尚未试验。
Steps
mkdir -pv ~/chromium
cd ~/chromium
git config --global user.name "Joel Maranhao"
git config --global user.email "youremail@example.com"
git config --global core.autocrlf false
git config --global core.filemode false
git config --global color.ui true
git clone https://chromium.googlesource.com/chromium/tools/depot_tools
export PATH=$PATH:~/chromium/depot_tools
See Update Notes 1mkdir -v ~/chromium/buildhost
See Update Note 2cd ../buildhost
See Update Note 2fetch --nohooks chromium
cd src && ./build/install-build-deps.sh
See Note 3sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install g++-4.8-multilib-arm-linux-gnueabihf
./build/install-build-deps.sh --arm
See Note 3gclient sync
GYP_CROSSCOMPILE=1
See Note 4
GYP_DEFINES=target_arch=arm arm_float_abi=hard component=shared_library linux_use_gold_flags=1gclient runhooks
ninja -C out/Debug chrome
Notice Steps 17 - 19. Step 18 replaces the Export Statements from Recipe 2 in the file chromium.gyp_env (This effectively switches the build Compiler to clang
). Step 19 imports the chromium.gyp_env settings, and will run the proper buildscripts in the proper order.
Warning: Testing Steps
I’ll test these steps on my XUbuntu VM and report back/update etc.
Update Notes
1. Making the change permanent to the PATH variable is advisable if you are gong to do this more than once. Find the following:
# set PATH so it includes user's private bin if it existsif [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH"fi
in $HOME.profile. Add PATH=$PATH:~/chromium/depot_tools
, so that the final if looks like:
# set PATH so it includes user's private bin if it existsif [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" PATH=$PATH:~/chromium/depot_toolsfi
If Needed, create a $HOME/bin directory (It did not exist on my VM), then logout and back in again.
2. From Studying your Post, while downloading the Gigs and Gigs of data from the repository, I see that you ran the fetch script and downloaded the Source Code into the depot_tools directory. This is a common mistake and is easily remedied by creating a separate directory, as I’ve done. This keeps the tools needed to manage and manipulate the build files separate from the items you are building. This also ensures that the items you are building aren’t polluted by the tools used to build them.
3. The first pass of build-deps.sh downloads all the build tools regardless of cross-compiling or not. Step 14 and 15 are needed in case the script complains about Held Packages. The 2nd Pass(Step 16), sets up the cross compile. I’ll update this note as the build progresses.
4. For some reason the OP and I both had trouble with the gyp_env file. Because of this, I have updated Step 18 to include the needed exports. If interested in using the gyp_env file, see the Gyp User Documentation, Configuring the Builds, and Common Gyp Build Parameters
- How to cross-compile Chromium for ARM
- How to cross-compile OpenSSL for ARM
- How To Cross Compile Python 2.5.2 For ARM -- by Border
- How to cross compile the PPP to arm-xscale
- How to Cross Compile the Bash shell for Android 1.5
- Cross Compile Python 2.5.2 For ARM
- cross compile toolchain for arm/android
- cross compile qt5everywhere for arm CortexA8
- How to Cross Compile the Busybox
- How to Cross Compile the Bash shell for Android 1.5 (为Android平台编译Bash shell)
- QtCreator on Windows to Cross Compile for Linux ARM with CodeSourcery Toolchain
- linux arm cross-compile
- FFTW ARM cross compile
- How to cross compile and use hcidump-1.42
- How to Cross Compile the wireless_tools(iwconfig iwlist)
- how to cross compile valgrind on android platform
- chromium compile for android
- How To Compile OpenSSL for the iPhone
- SpringMVC的工作原理
- 关于java下载excel,pdf等demo
- android逆向基础的几个步骤
- ITRS_modeling_lithography
- MySQL运维(2) 外网访问MySQL
- How to cross-compile Chromium for ARM
- 【题】【平衡树】ZJOI2006 书架
- 常规jdbc连接数据库详解
- 关于指针的几点说明
- 格式转化字符及其含义
- 各种类型的数据库的连接方法
- 有关函数定义的说明
- 算法训练 区间k大数查询
- 【记忆化搜索】How many (fucking) ways?