Last active
December 1, 2022 09:20
-
-
Save yzgyyang/c9f599169dc741de2550772bb8c21a1b to your computer and use it in GitHub Desktop.
Build Chromium OS from Ubuntu curl -fsSL URL_HERE | sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -xe | |
sudo apt-get install git-core gitk git-gui subversion curl lvm2 thin-provisioning-tools python-pkg-resources python-virtualenv python-oauth2client | |
# install depot tools | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
PATH=$PATH:/path/to/depot_tools | |
# Making sudo a little more permissive | |
cd /tmp | |
cat > ./sudo_editor <<EOF | |
#!/bin/sh | |
echo Defaults \!tty_tickets > \$1 # Entering your password in one shell affects all shells | |
echo Defaults timestamp_timeout=180 >> \$1 # Time between re-requesting your password, in minutes | |
EOF | |
chmod +x ./sudo_editor | |
sudo EDITOR=./sudo_editor visudo -f /etc/sudoers.d/relax_requirements | |
# Get source | |
mkdir ~/chromium_os_source | |
SOURCE_REPO=~/chromium_os_source | |
cd ${SOURCE_REPO} | |
repo init -u https://chromium.googlesource.com/chromiumos/manifest.git | |
# Optional: Make any changes to .repo/local_manifests/local_manifest.xml before syncing | |
repo sync | |
# Build for amd64 | |
export BOARD=amd64-generic | |
cros_sdk -- ./build_packages --board=${BOARD} | |
# Build an image | |
cros_sdk -- ./build_image --board=${BOARD} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment