How to Build a Cumulus Linux Kernel Source Tree based on CumulusLinux-2.5.6 VX?


Hi,

According to "How to Build a Cumulus Linux Kernel Source Tree" doc, a problem arises in the last step:

cumulus@cumulus$ ../scripts/apply-patch-series ../patches/kernel/series .+ set -e
+ SERIES=../patches/kernel/series
+ SRC=.
+ '[' -z ../patches/kernel/series -o -z . -o '!' -f ../patches/kernel/series -o '!' -d . ']'
+ echo 'Usage: ../scripts/apply-patch-series /path/to/series /path/to/source [--stgit [--quilt]]'
Usage: ../scripts/apply-patch-series /path/to/series /path/to/source [--stgit [--quilt]]
+ exit 100

Thanks in advance!

LiHongguang

13 replies

Userlevel 5
So there are differences in the kernel from our core product to our VX product. They are not a 1 to 1 correlation. That said you should still be able to pull the OSS tree down. Let me get some clearification here and let you know as soon as I can.
That doc needs an update. Thanks for bringing this to our attention. Link to the doc for anyone following along:

https://support.cumulusnetworks.com/hc/en-us/articles/201787456-How-to-Build-a-Cumulus-Linux-Kernel-...

Kernel patches in the 2.5.6 tarball are located in the file 'kernel-3.6.71.patch' in the root of the tarball.

Looking into which wheezy source deb these CL 2.5.6 patches apply to (probably a 3.2.68 rather than the CL 1.5.2-era version kernel version 3.2.46 referenced in the doc). Feel free to post if you figure it out before me, and we'll get the doc updated with whatever we figure out.

trapier wrote:

That doc needs an update. Thanks for bringing this to our attention. Link to the doc for anyone...

Now let me describe my building process simply:

1, I downloaded the Cumulus VX 2.5.6, then ran it.
2, I pull the cumulus_kernel_source.sh, and rewrote it:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# prepare extraction directory, get and extract debian sources
mkdir cumulus
cd cumulus
wget http://oss.cumulusnetworks.com/CumulusLinux-2.5.6.tar.gz
tar xvf CumulusLinux-2.5.6.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.68-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.68/
../scripts/apply-patch-series ../patches/kernel/series .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3, Ran the shell script from the command line on my Cumulus VM 2.5.6:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cumulus@cumulus$ ./cumulus_kernel_source.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4, How can I rewrite the script above and then build the source tree successfully?

Thanks in advance!
Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? On the switch a uname -a yields this:

Linux cumulus 3.2.68-6 #3.2.71-1 SMP Mon Dec 7 18:10:09 PST 2015 ppc powerpc GNU/Linux

...and I can't tell from anything in the Cumulus 2.5.6 patch which version should be used in the "apt-get source linux=" step.

Also, is the 201787456-How-to-Build-a-Cumulus-Linux-Kernel-Source-Tree document still in the process of being updated?

Thanks!

Userlevel 2
Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Based on what I see here:
http://oss.cumulusnetworks.com/CumulusLinux-2.5.6/

and here:
http://oss.cumulusnetworks.com/CumulusLinux-2.5.6/kernel-3.2.71.patch

It looks like the kernel is 3.2.71.

Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Hi ,

Do you have a detailed document about building the latest version step by step?

I spent lots of time on building the Cumulus Linux 2.5.6 Kernel Source Tree and trying to applying quagga patch based on my debian 7(3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u3 x86_64 GNU/Linux) box, but I failed!

Have you ever built it successfully? If so, can you tell me how to do it in detail?

Thank you in advance for your help in this matter.
Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Hi Kevin,

Thanks for the response. The kernel patch from 2.5.6 applies cleanly to a kernel.org 3.2.71 but I noticed that the built kernel's version is still 3.2.71 even though on the switch itself I see /lib/modules/3.2.68-6 and uname -r -v yields "3.2.68-6 #3.2.71-1". I would think I should be able to drop a kernel built with the 2.5.6 patch right into a slot's kernel partition but kernel modules built with the 3.2.71+Cumulus-patched kernel won't load. Shouldn't the 2.5.6 kernel patch have adjusted things such that a built kernel identifies itself the same as the one presently running on the switch?

Thanks!

Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Hello?

Userlevel 5
Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

In your invocation you need to make sure you set the KERNELRELEASE flag. Try that and let us know if it fixes this.
Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

e.g.:

KERNELRELEASE="3.2.68-6" make ...

Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Thanks but that still produced a lib/modules/3.2.71 path during modules_install.
Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Alas! will no one provide one document to guide users through building the Cumulus Linux Kernel Source Tree based on CumulusLinux-2.5.6 VX steps?
Userlevel 5
Lance Visser wrote:

Hi,

Was it ever determined if the Cumulus patch should be applied to a 3.2.68 or 3.2.71 kernel? ...

Li Hongguang, At present time there is not a new version of this document. The steps in the current document along with conversation here should help get this accomplished. I will reach out to members of our technical team to see if there is anything more that can be added to assist you in getting this setup properly.

Reply