Skip to content

Instantly share code, notes, and snippets.

@trapier
Created August 17, 2015 21:27
Show Gist options
  • Save trapier/e17bfe99757bd54c8982 to your computer and use it in GitHub Desktop.
Save trapier/e17bfe99757bd54c8982 to your computer and use it in GitHub Desktop.
bash script to build CumulusLinux 1.5.2 kernel
#!/bin/bash
# prepare extraction directory, get and extract debian sources
mkdir cumulus
cd cumulus
wget http://oss.cumulusnetworks.com/CumulusLinux-1.5.2.tar.gz
tar xvf CumulusLinux-1.5.2.tar.gz
# examine installation instructions
cat patches/README
# install required dev tools from cumulus repo
apt-get install dpkg-dev gcc
# allow access to debian repositories
cat << EOF >> /etc/apt/sources.list
## upstream start
deb http://ftp.us.debian.org/debian/ wheezy main non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main non-free
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
## upstream end
EOF
# install dev tools from debian and debian kernel source
apt-get update
apt-get install quilt
apt-get source linux=3.2.46-1+deb7u1
# remove access to debian repositories
sed -i '/upstream start/,/ustream end/d' /etc/apt/sources.list
# apply cumulus patches
cd linux-3.2.46/
../scripts/apply-patch-series ../patches/kernel/series .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment