[Raspberry] Compiling and installing chromium

Source: Internet
Author: User

Want to try the use of selenium on the arm board is not possible, found that Firefox does not work, the Internet has provided chrome installation hand Shun, but there is no arm version of the corresponding chromedriver, can only be engaged.

The method described here is to compile directly on the Raspberry Pi, compile time in about 36 hours, compile 24 hours, last link time 12 hours

Pre-Preparation:

1. Mobile hard disk free space above 10G, swap and code, and compile directories need to be placed on the above

2. Closing the swap on the sdcard on the Swap,sdcard is slow, resulting in emmc hung

3. Create swap (above 4G) on the mobile hard drive and start

4. Install the packaged software Debhelper

5. Download the code and Debian package configuration file

Path:

Http://security.debian.org/debian-security/pool/updates/main/c/chromium-browser/chromium-browser_ 52.0.2743.116.orig.tar.xzhttp://security.debian.org/debian-security/pool/updates/main/c/chromium-browser/ Chromium-browser_52.0.2743.116-1~deb8u1.debian.tar.xz

To modify the compiled code:

1. Unzip on the removable hard drive

tar XF chromium-browser_52. 0.2743. orig.tar. XZtar XF chromium-browser_52. 0.2743. 1~deb8u1.debian. Tar . XZ mv Debian chromium-52.0. 2743.116/

2. Modifying compilation rules

2.1 Modifying files Debian/rules, adding defines

symbol_level=0

2.2 Modify Debian/control, Architecture all, except package:chromium-dbg, we do not need to chromium debug information

2.3 Modify Debian/scripts/chromium, delete the following content

Osse2="\The hardware on this system lacks support forThe SSE2 instruction set. The upstream chromium project no longer supports this configuration. for Moreinformation, please read and possibly provide input to theirbug tracking system at http://crbug.com/348761. "# Check Whether this system supports SSE2ifTest-z"$ (grep sse2/proc/cpuinfo)"; ThenXmessage"$nosse 2"Exit1fi

Because our copy of the Debian configuration file is for the x86 platform, ARM platform does not have SSE, this does not need

3. Compiling Debian Pakcage

Dpkg-buildpackage

The first compilation will appear dependence problem, follow the prompts to install the missing package, and then continue this command

If there is a simple problem adjustment in the middle, please use

Fakeroot debian/rules Binary

4. After 36 hours, we will be able to see in the Superior directory of the Packge we need, dpkg-i installation will be able to use the

In general, Chromium's compilation system and cross-platform do a great job, there is no need to modify the chromium code to compile the situation.

Tips.

Can add Component=shared_library to defines inside, static link will become dynamic link, the advantage is can save a lot of link time, the disadvantage is corresponding you need to modify the Chromium.install file, the shared The compenent of the library form is added, and several gyp files need to be modified, and these compnent do not add the corresponding link flag

[Raspberry] Compiling and installing chromium

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.