Cumulus Linux does not currently ship with kernel source, which I need for development purposes. How can I build a kernel source tree that contains Cumulus Linux patches?
Tarballs of Cumulus Linux kernel patches are hosted on oss.cumulusnetworks.com. The following example recipe builds a kernel source tree for Cumulus Linux 1.5.2 using oss.cumulusnetworks.com. This recipe was developed on a switch running Cumulus Linux 1.5.2, but it should be adaptable to any Debian Wheezy based installation.
The recipe is also available in the attached cumulus_kernel_source.sh file in case you want to script the process.
- Prepare the extraction directory, then get and extract the Debian sources.
tar xvf CumulusLinux-$CL_VERSION.tar.gz
- Examine the installation instructions.
- Install the required developer tools from the Cumulus repository.
apt-get install dpkg-dev gcc
- Allow access to the 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
- Install the developer tools from the Debian and Debian kernel source.
apt-get install quilt
apt-get source linux=3.2.46-1+deb7u1
- Remove access to the Debian repositories.
sed -i '/upstream start/,/ustream end/d' /etc/apt/sources.list
- Apply Cumulus Linux patches.
../scripts/apply-patch-series ../patches/kernel/series .