Last active
February 19, 2016 17:40
-
-
Save pichuang/5b28cc4be468c4889dfe to your computer and use it in GitHub Desktop.
ONIE Builder
This file contains 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/bash | |
set -x | |
# | |
# WIP | |
# TODO: | |
# Ready to change to ansible2.0 => https://github.com/pichuang/openswitch-ansible | |
# Refs: | |
# https://github.com/opencomputeproject/onie/wiki/Building-ONIE | |
# | |
ONIE_VERSION="2015.11" | |
# Find in onie/machine | |
VENDOR="accton" | |
MODULE="as5712_54x" | |
# | |
# Create onie-builder | |
# | |
mkdir onie-builder && cd ./onie-builder | |
# | |
# Download onie project | |
# | |
git clone https://github.com/opencomputeproject/onie | |
cd onie | |
git checkout $ONIE_VERSION | |
# | |
# Prepare apt pakcage | |
# | |
sudo aptitude update | |
sudo aptitude install -y stgit autoconf texinfo libtool perf realpath bison flex libncurses5-dev build-essential | |
# | |
# Prepare a new build machine | |
# | |
cd ./build-config | |
#TODO Remove libtool-bin | |
#TODO Add auto-agree install package | |
make debian-prepare-build-host | |
# | |
# Compile ONIE Installer | |
# | |
make -j4 MACHINEROOT=../machine/$VENDOR MACHINE=$VENDOR\_$MODULE all | |
# Example: make -j4 MACHINEROOT=../machine/accton MACHINE=accton_as5712_54x all | |
echo | |
echo "Find your images or recovery images in onie/build/images" | |
echo | |
echo "Finished ONIE Installation" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment