Skip to content

Instantly share code, notes, and snippets.

@DrewBarfieldProductions
Last active October 9, 2023 20:26
Show Gist options
  • Save DrewBarfieldProductions/33b0ae2b78cdcceac09d3d44c2673c12 to your computer and use it in GitHub Desktop.
Save DrewBarfieldProductions/33b0ae2b78cdcceac09d3d44c2673c12 to your computer and use it in GitHub Desktop.
BASH script to build and boot Google Fuchsia
#!/bin/sh
clear
# Preparing the build environment
# https://github.com/fuchsia-mirror/manifest#prerequisites
# https://github.com/fuchsia-mirror/magenta/blob/master/docs/getting_started.md#preparing-the-build-environment
sudo apt-get install golang git-all curl texinfo libglib2.0-dev autoconf libtool libsdl-dev build-essential
# Creating a new checkout (https://github.com/fuchsia-mirror/manifest#creating-a-new-checkout)
curl -s https://raw.githubusercontent.com/vanadium/go.jiri/master/scripts/bootstrap_jiri | bash -s fuchsia
cd fuchsia
export PATH=`pwd`/.jiri_root/scripts:$PATH
jiri import fuchsia https://fuchsia.googlesource.com/manifest
jiri update
# Building Fuchsia (https://github.com/fuchsia-mirror/manifest#building-fuchsia)
./packages/gn/gen.py
./buildtools/ninja -C out/debug-x86-64
# Build Magenta (https://github.com/fuchsia-mirror/magenta/blob/master/docs/getting_started.md#build-magenta)
cd magenta
make -j32 magenta-pc-x86-64
# Boot Fuchsia (https://github.com/fuchsia-mirror/manifest#building-fuchsia)
# Updated 21 August 2016 to run with a graphical framebuffer
./scripts/run-magenta-x86-64 -g -x ../out/debug-x86-64/user.bootfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment