How to Build a Cumulus Linux Kernel Source Tree



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 The following example recipe builds a kernel source tree for Cumulus Linux 1.5.2 using 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 file in case you want to script the process. 

  1. Prepare the extraction directory, then get and extract the Debian sources. 
    mkdir cumulus
    cd cumulus
    tar xvf CumulusLinux-$CL_VERSION.tar.gz
  2. Examine the installation instructions.
    cat patches/README
  3. Install the required developer tools from the Cumulus repository.
    apt-get install dpkg-dev gcc
  4. Allow access to the Debian repositories.
    cat << EOF >> /etc/apt/sources.list 
    ## upstream start
    deb wheezy main non-free
    deb-src wheezy main non-free
    deb wheezy/updates main
    deb-src wheezy/updates main
    ## upstream end
  5. Install the developer tools from the Debian and Debian kernel source.
    apt-get update
    apt-get install quilt
    apt-get source linux=3.2.46-1+deb7u1
  6. Remove access to the Debian repositories.
    sed -i '/upstream start/,/ustream end/d' /etc/apt/sources.list
  7. Apply Cumulus Linux patches.
    cd linux-3.2.46/
    ../scripts/apply-patch-series ../patches/kernel/series .
Have more questions? Submit a request


Powered by Zendesk