How to Build a Cumulus Linux Kernel Source Tree

Follow

Issue

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?

Resolution

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. 

  1. Prepare the extraction directory, then get and extract the Debian sources. 
    CL_VERSION=1.5.2
    mkdir cumulus
    cd cumulus
    wget http://oss.cumulusnetworks.com/CumulusLinux-$CL_VERSION.tar.gz
    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 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
  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

Comments

Powered by Zendesk