Giter Club home page Giter Club logo

fuchsia's Introduction

Fuchsia

Pink + Purple == Fuchsia (a new Operating System)

Welcome to Fuchsia! This is a top-level entry point for the project. From here we try to link to everything you need to get started, use, and develop for Fuchsia.

Getting the source

The Fuchsia project is in many Git repositories and we use the jiri tool to make it easier to work with these repositories. jiri uses manifest files to know what repositories to pull. Visit the 'manifest' project to find out how to check out the source.

Building Fuchsia

Before building Fuchsia, you should follow Magenta's instructions from "Preparing the build environment" up through "Configure PATH". It isn't necessary to check out the Magenta and QEMU sources, they are included in the Fuchsia manifest. Note, building QEMU isn't strictly required if you're only developing on actual hardware, but it is a good tool to have at the ready.

Build a sysroot

First, you need to build the kernel and the sysroot:

./scripts/build-sysroot.sh

Build Fuchsia

Finally, you can build Fuchsia using these commands:

./packages/gn/gen.py
./buildtools/ninja -C out/debug-x86-64

[Googlers only] If you have goma installed, use these alternative commands for faster builds:

./packages/gn/gen.py --goma
./buildtools/ninja -j1000 -C out/debug-x86-64

The gen.py script takes an optional parameter '--target_cpu' to set the target architecture. If not supplied, it defaults to x86-64.

./packages/gn/gen.py --target_cpu=aarch64
./buildtools/ninja -C out/debug-aarch64

You can configure the set of modules that gen.py uses with the --modules argument. After running gen.py once, you can do incremental builds using ninja.

Running Fuchsia

These commands will create an out/debug-{arch}/user.bootfs file. To run the system with this filesystem attached in QEMU, pass the user.bootfs path as the value of the '-x' parameter in Magenta's start command script, for example:

cd magenta
./scripts/run-magenta-x86-64 -x ../out/debug-x86-64/user.bootfs -m 2048
./scripts/run-magenta-arm64 -x ../out/debug-aarch64/user.bootfs -m 2048

If you want a graphical console, add the -g flag. The -m flag sets QEMU's memory size in MB. Adding -N will enable network, but you will need to configure a virtual interface and this is only available under x86_64.

Then, when Fuchsia has booted and started an MXCONSOLE, you can run programs!

For example, to receive deep wisdom, run:

fortune

For applications in /boot/apps you can run 'mojo:<APP_NAME>', for some cool shapes try:

mojo:shapes

You can use the Alt key with function keys to switch MXCONSOLE instances, Alt+F2 to access the second one, for example.

Additional helpful documents

If you're contributing changes, visit the 'manifest' repository documentation for more information about submitting changes.

fuchsia's People

Contributors

cyngus84 avatar petrhosek avatar

Watchers

guangming avatar  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.