DIY Google Chrome OS in Ubuntu 9.10 (Attachment download)

Source: Internet
Author: User
Tags vmware fusion
Document directory
  • 1.1 hardware environment
  • 1.2 Operating System
  • 1.3 compiling environment
  • 1.4 install Google depot tools
  • 2.1 Download the source code of the browser
  • 2.2 download the source code of the Operating System
  • 3.1 compile a browser
  • 3.2 configure the environment
  • 3.3 compile the Operating System
  • 3.4 compile a VMware Image
Google's talents released Google Chrome OS's open-source project chromium OS last week, because from a personal perspective, I have been supporting Cloud Technologies and Web applications ), and try its best to make some contributions to its promotion. Therefore, Google will certainly try to release a cloud computing-based operating system. Of course, if you are not interested in the technology, but just want to try what the next-generation operating system looks like 10 years later, you can jump to the end of this article and read the running-related content.

1. Prepare 1.1 hardware environment

I personally think this doesn't matter. Both 32-bit and 64-bit can be used, and both PC and Mac can be used. I used the 64-bit MacBook Pro of July to compile it successfully.
1.2 Operating System

In theory, non-Ubuntu Linux systems can also be compiled successfully. However, we all know that Google uses Ubuntu as the internal Linux system. Therefore, I chose the latest Ubuntu 9.10 As the compiling environment. (Because I used to use fedora all the time. This Ubuntu installation finds Ubuntu to be a "Dummies". It seems that Linux desktop applications are becoming more and more common .) Google officially claimed that Ubuntu 8.04 + versions can be compiled successfully, but many people complained about problems in earlier versions on the CROs-dev mailing list. A Singaporean cool also compiled with fedora 11.
In addition, Because ubuntu is different from fedora, the root password is not set during installation, but sudo is used. Therefore, use the following command to set the root password, which will be used later.
$ Sudo-I
The system will ask you to enter the password of the current user
$ Sudo passwd Root
Enter the new root password.
1.3 compiling environment

The following are copies from the Official Google page, which contain necessary libraries and some optional (optional) Libraries. I installed them in one breath to avoid further troubles.
* Subversion
* Git-core
* Python >=2.4
* Perl> = 5.x
* Gcc/g ++> = 4.2
* G ++-multilib >=4.2
* Bison >=2.3
* Flex> = 2.5.34
* Gperf> = 3.0.4
* PKG-config >=0.20
* Libnss3-dev> = 3.12
* Libasound2-dev
* Libgconf2-dev
* Libglib2.0-Dev
* Libgtk2.0-Dev
* Libnspr4-0d> = 4.7.1 + 1.9-0ubuntu0. 8.04.5
* Libnspr4-dev> = 4.7.1 + 1.9-0ubuntu0. 8.04.5
* Msttcorefonts (Microsoft fonts)
* FreeType-Dev
* Libcairo2-dev
* Libdbus-1-dev
* Wdiff
* Lighttpd
* Php5-cgi
* Sun-java6-fonts
Google provides Ubuntu users with a script named Ghost.
1.4 install Google depot tools

In your favorite folder checkout a copy of Google depot tools repository.
$ SVN Co http://src.chromium.org/svn/trunk/tools/depot_tools
Then, set the folder in path.
Path = "/path/to/depot_tools: $ path"

2. Download source code 2.1 Download the source code of the browser

This step is optional because Google has provided the compiled Linux version of the Chrome browser binary file. Go to this address and load the latest http://build.chromium.org/buildbot/archives/chromium-chromiumos-r *****. zip down for backup.
If you like to try it yourself, use the following method. Create a new folder, CD to this folder,
$ Gclient config http://src.chromium.org/svn/trunk/src
What we need to do is compile a Chrome browser for Chrome OS, so we don't need to load the source code related to Windows and Mac. We only need to load Linux, so here we use,
$ Gclient sync -- deps = "UNIX, chromeos" -- force
Instead of gclient sync.
2.2 download the source code of the Operating System

Independent of the source code folder of the browser, create a new folder and CD it to this folder.
$ Gclient config http://src.chromium.org/git/chromiumos.git
$ Gclient sync

3. Compile 3.1 to compile the browser

If you skip Step 2.1, you do not need to do this step. Oh, by the way, the official website provides a method to directly compile the browser script during the compilation process of the operating system. I chose to compile the browser separately, make sure it works properly.
We only get the browser. To compile the operating system, we do not need to generate many third items of many test cases and third parties, directly go to the src directory of the browser source code and directly
$ Make Chrome
Just wait.
3.2 configure the environment

Create a local repository
$ CD/path/to/chromiumos/src/scripts
$./Make_local_repo.sh

Because the chroot environment is required for Chrome OS compilation, we need to create a chroot environment before official compilation so that we can enter the environment later.
$Make_chroot.sh
3.3 compile the Operating System

First, pack the browser with a zip package, or download the zip package named chrome-chromeos.zip, and copy it to the/path/to/chromiumos/src/build/x86/local_assets directory.
Return to the/path/to/chromiumos/src/scripts directory and enter
$./Enter_chroot.sh
Enter the chroot environment.
Start compilation, input
$./Build_all.sh
Compile the platform package and kernel, and then enter
$./Build_image.sh
Compile the image file of Chrome OS ).

Figure 1. Compile 3.4 of the browser in Ubuntu to compile the VMware Image

The compiled Google Chrome OS can now be used in three ways. The first one is to use a little less hardware that is currently supported (I heard that the notepad can be sold very cheaply on the Black Friday of the day after tomorrow ); the second type is burned to the USB flash drive. This is more convenient. Most machines now support USB boot. The only restriction is that you need a 4 GB hard disk, considering that I do not have a 4 gb usb flash drive or a 4 gb usb flash drive, I have to ask a buddy to take a look after Thanksgiving. The third is to compile a VMware image. CD to the src/scripts directory of the operating system source code, enter
$./Image_to_vmware.sh
The generated VMware hard disk image file can be used. Of course, the subsequent content does not belong to the scope of this article. Below are some of the tasks I run in VMWare Fusion.

4. Run Figure 2. Welcome to the page

Figure 3. Google Homepage

Figure 4. Application List

Figure 5. Test the support for HTML 5. The shadow effect and corner side of the image are rendered well.

Figure 6. Controversial Google Books in China

Figure 7. Haha, crash! Googler has a lot to do!

Figure 8. configuration page

Figure 9. command line interface (Terminal)

Figure 10. Author of this Article

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.