Skip to content

Instantly share code, notes, and snippets.

@higebu
Created December 10, 2014 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save higebu/409c00db4aa1256e405b to your computer and use it in GitHub Desktop.
Save higebu/409c00db4aa1256e405b to your computer and use it in GitHub Desktop.
VyOS build script for develop branch
#!/bin/bash
branch=helium-docker
upstream_branch=helium
flavor=amd64-vyos
apt-get install -y cowbuilder
mkdir -p /root/vyos
cowbuilder \
--create --distribution squeeze \
--basepath /var/cache/pbuilder/base-vyos-squeeze-amd64.cow
cat <<EOF | cowbuilder \
--login \
--bindmount /root/vyos \
--save-after-exec \
--basepath /var/cache/pbuilder/base-vyos-squeeze-amd64.cow
mkdir -p /root/.ssh
cd /root/vyos/
wget --no-check-certificate https://raw.githubusercontent.com/vyos/build-iso/helium/tools/setup-vyos-build-env
chmod 755 setup-vyos-build-env
./setup-vyos-build-env
apt-get install -y git cpio automake python fakeroot debhelper devscripts kernel-package bc
git clone https://github.com/higebu/build-iso
cd build-iso
git checkout $branch
export PATH=/sbin:/usr/sbin:$PATH
autoreconf -i
./configure \
--with-kernel-flavor=$flavor \
--with-vyatta-build-branch=$upstream_branch \
--with-debian-bootstrap-mirror=http://dev.packages.vyos.net/ \
--with-debian-mirror=http://dev.packages.vyos.net/ \
--with-vyos-mirror=http://dev.packages.vyos.net/
rm -f livecd/config.vyatta/chroot_sources/vyatta.chroot.gpg
wget -qO livecd/config.vyatta/chroot_sources/vyatta.chroot.gpg http://dev.packages.vyos.net/vyos-root-gpg
git submodule update --init pkgs/linux-image
cd pkgs/linux-image/
git checkout $branch
debian/bin/build-flavour.sh $flavor
cd ../../
make linux-image
make iso
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment