Giter Site home page Giter Site logo

lionelliu / chromiumrpi Goto Github PK

View Code? Open in Web Editor NEW
0.0 6.0 0.0 334 KB

The most recent working Chromium OS overlays for the Raspberry Pi 2 (ChromiumRPI project)

Home Page: https://reddit.com/r/ChromiumRPI/

License: BSD 3-Clause "New" or "Revised" License

Shell 79.12% Groff 2.38% Python 13.92% Perl 4.58%

chromiumrpi's Introduction

Chromium OS for Raspberry Pi 2

Initial notes:

  • Don't expect to build this and have it work perfectly on a Raspberry Pi, it's a work-in-progress
  • This guide will be much easier to follow if you've built Chromium OS before for another platform. If you've having trouble following it, try following the developer guide (linked before) to build an x86-generic image first, and then come back.
  • If you want to help out, find us in #ChromiumRPI on Freenode IRC, submit a pull request or message us on reddit.com/r/ChromiumRPI

Prerequisites:

To get started, make sure you have the following:

  • a 64-bit build machine, running Ubuntu version 15.04 or 14.04 (better running headless. Other versions/distros might work)
  • an account with sudo access
  • at least 6GB of RAM (linking Chromium uses about 4GB of your RAM at the same time, so this is another reason not to run any UI or X server in the background if you want to avoid extremely slow builds)
  • a fast Internet connection - you'll need to download several gigabytes of source code, if your connection is slow, that won't be fun, especially if you need to re-sync the repo
  • sufficient amount of free disk space: 60GB should be the absolute minimum and even with that you could run into problems, 100GB of free space or more is recommended

To give you an idea of how long it takes to complete a build:

  • ~10 to 12 hours on a dual core, 4 thread Core i5 Haswell (2014) CPU based machine with SSD and 8GB of RAM
  • ~24 hours on lower end (though not Atom based) laptops with a dual core CPU and 6GB of RAM
  • a build server (read: non-laptop) with several cores based on current CPU design and at least 16GB RAM is rumored to be able to complete a build within ~2 hours

Get the code:

First, you'll need to download the Chromium OS source code. To learn do so, and also how to setup your environment, check out this link: http://www.chromium.org/chromium-os/developer-guide

Please be aware that you are syncing the bleeding edge source code which can be considered "alpha" when using the instructions given within the developer guide. If you want to be sure to avoid any potential issues during your build process, you will need to check out one of the stable branches. The following example shows how to check out a stable branch - in this case R49, which was the current stable branch at the time of writing:

repo init -u https://chromium.googlesource.com/chromiumos/manifest.git -b release-R49-7834.B
repo sync

You can open the URL https://chromium.googlesource.com/chromiumos/manifest.git/+refs in any browser and check the branches which start with "release-R". Finding out what the current stable ChromeOS release is, shouldn't be difficult (for example, you could just google it, or check the version information on your Chromebook running on the stable channel, if you own one) - once you have found out what the current ChromeOS stable version is, just use the corresponding "release-" branch from that list in order to be sure you're checking out the latest stable code.

Once you've downloaded the code and you've reached the "4.3 Select a board" step, continue below.

Add the overlay:

The raspberrypi overlay is already part of ChromiumOS, although it does not build X or Chromium.

To build for the RaspberryPi2B, you'll need to use the raspberrypi2 overlay provided by this repo. Until this is merged upstream into the Chromium OS project, you'll have to copy it manually across.

Find the folder named "overlays" in the "src" folder of the code you checked out. You'll see a number of folders with names starting "overlay-". Place the overlay-raspberrypi2 folder in this folder alongside the other overlays.

Board setup:

You only need to run this once (unless you nuke the chroot):

./setup_board --board=raspberrypi2

If you want to re-create the board root, run:

./setup_board --board=raspberrypi2 --force

You'll probably want to set the "backdoor" password for a development image to let yourself into a shell when the UI isn't working, to do that, use the following command:

./set_shared_user_password.sh

Once prompted, enter a password, then press enter. As above, you only need to do this once.

Patching:

Add "raspberrypi2" to ~/chromiumos/src/third_party/chromiumos-overlay/eclass/cros-board.eclass

Building an image:

Before we can build an image, we need to build all the required packages. Enter the following command to build those (and pray everything compiles):

./build_packages --board=raspberrypi2 --withdev --nowithdebug --nowithtest --nowithautotest

Go get a nice cup of tea, and maybe read a book.

Once all the packages have been successfully built, we can build a USB image by running the following command:

./build_image dev --board=raspberrypi2 --noenable_rootfs_verification

Rebuilding:

According to our experience, building the whole system again after a failed build attempt leads to all kinds of issues, even if the chroot is re-created. Therefore I actually recommend to resync the repo and create the chroot again in case you are about to build the system again: ensure that you first delete the chroot cleanly via cros_sdk --delete within the ~/chromiumos directory. After that you can delete the chromiumos directory via rm -rf.

chromiumos # cros_sdk --delete
chromiumos # cd ..
~ # rm -rf chromiumos

chromiumrpi's People

Watchers

James Cloos avatar Horus avatar  avatar  avatar 谢飞 avatar enola avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.