Now, I have two kernels installed via dpkg-i:
dpkg -i onl-kernel-4.14-lts-x86-64-all_1.0.0_amd64.deb
dpkg -i onl-stretch-kernel-4.19-lts-x86-64-all_1.0.0_amd64.deb
and linked throug:
ln -s /usr/share/onl/packages/amd64/onl-kernel-4.14-lts-x86-64-all/mbuilds/ /lib/modules/4.14.151-OpenNetworkLinux/build
ln -s /usr/share/onl/packages/amd64/onl-kernel-4.19-lts-x86-64-all/mbuilds/ /lib/modules/4.19.81-OpenNetworkLinux/build
but they don't seem to be switched. How do I switch from 4.14 to 4.19?
$ git clone https://github.com/opencomputeproject/OpenNetworkLinux
$ cd OpenNetworkLinux
$ docker/tools/onlbuilder -10
$ source setup.env
To choose which kernel the switch will use, I edited the following yml files. You will have to find the ones for your switch:
~/OpenNetworkLinux/packages/platforms/mellanox/x86-64/msn2700/platform-config/r0/src/lib/x86-64-mlnx-msn2700-r0.yml
~/OpenNetworkLinux
/packages/platforms/mellanox/x86-64/msn4600c/platform-config/r0/src/lib/x86-64-mlnx-msn4600c-r0.yml
~/OpenNetworkLinux
/packages/platforms/mellanox/x86-64/msn4700/platform-config/r0/src/lib/x86-64-mlnx-msn4700-r0.yml
Changed:
kernel:
<<: *kernel-4-9
To:
kernel:
<<: *kernel-4-19
I found two issues with the build that required the
following two fixes:
Finally built onl. I read someplace that you can limit what is built by setting the PLATFORM_LIST env var. I may be mistaken but it does not hurt – I set it to the 3 switches I am building ONL for.
$ export
PLATFORM_LIST=x86-64-mlnx-msn2700-r0,x86-64-mlnx-msn4600c-r0,x86-64-mlnx-msn4700-r0
$ make amd64
After the build was done I installed it in one of the switches. So far so good.
root@localhost:/tmp# uname -a
Linux localhost 4.19.81-OpenNetworkLinux #1 SMP Tue Jun 7
14:27:23 UTC 2022 x86_64 GNU/Linux
root@localhost:/tmp# cat /etc/debian_version
10.12
After building ONL, onl-kernel-4.14-lts-x86-64-all_1.0.0_amd64.deb was located in $ONL/packages/base/amd64/kernels/kernel-4.14-lts-x86-64-all/ and onl-kernel-4.19-lts-x86-64-all_1.0.0_amd64.deb was located in $ONL/packages/base/amd64/kernels/kernel-4.19-lts-x86-64-all/
From REPO/buster/packages/binary-amd64/Packages:
Package: onl-kernel-4.14-lts-x86-64-all-modules
Version: 1.0.0
Architecture: amd64
Maintainer: sup...@bigswitch.com
Installed-Size: 465
Filename: ./onl-kernel-4.14-lts-x86-64-all-modules_1.0.0_amd64.deb
Size: 110954
MD5sum: 2a3d6207542985f57a6abb8e4ecc9404
SHA1: dc2afb919095541bad2dd34a65d8b309d6084de9
SHA256: 46671b17d5730fc49470be97e5be0e5398542cbb759c24c85a15193488363ed6
Section: default
Priority: extra
Homepage: http://opennetlinux.org
Description: Open Network Linux 4.14 LTS Kernel Modules for amd64 Platforms
Open Network Linux 4.14 LTS Kernel Modules for amd64 Platforms
License: unknown
Vendor: Open Network Linux
Package: onl-kernel-4.19-lts-x86-64-all
Version: 1.0.0
Architecture: amd64
Maintainer: sup...@bigswitch.com
Installed-Size: 227290
Filename: ./onl-kernel-4.19-lts-x86-64-all_1.0.0_amd64.deb
Size: 45976844
MD5sum: de58a374b3a947d9067cf21f11e520f4
SHA1: f13fbd45e11e1f69cfd2d65fcfb6ca16bf270190
SHA256: 10969dc52c29b0424443072ba0d28c57621f03c5f4f5c15d99cd2aac752bb280
Section: default
Priority: extra
Homepage: http://opennetlinux.org
Description: Open Network Linux 4.19 LTS Kernel for amd64 Platforms.
Open Network Linux 4.19 LTS Kernel for amd64 Platforms.
License: unknown
Vendor: Open Network Linux