How to update onl kernel and Debian x in edgecore switch

503 views
Skip to first unread message

saki nanaki

unread,
May 21, 2022, 9:24:36 PM5/21/22
to opennetworklinux
I am a newcomer about ONL, now there is

root@localhost:~# uname -a
Linux localhost 4.14.151-OpenNetworkLinux #1 SMP Tue May 11 15:27:12 UTC 2021 x86_64 GNU/Linux
root@localhost:~#  cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

I want to upgrade to a specific version of onl and debain, such as kernel-onl4.19 and debian10. I don't know how to do this. Thank you

Paul Menzel

unread,
May 23, 2022, 2:06:47 AM5/23/22
to Saki Nanaki, opennetw...@googlegroups.com
Dear Saki,


Am 22.05.22 um 03:24 schrieb saki nanaki:
ONL is currently dormant and lacks maintainers and contributor doing
required maintenance and development work. Therefore Debian 10 is not
supported. Regarding the Linux kernel, you’d need to adapt the port
yourself or contract somebody, or talk to Edgecore, and see if they are
willing to invest resources.


Kind regards,

Paul

saki nanaki

unread,
May 23, 2022, 10:14:15 PM5/23/22
to opennetworklinux
Hi Paul,

Thank you for your reply.

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?

saki nanaki

unread,
May 23, 2022, 10:15:03 PM5/23/22
to opennetworklinux
root@localhost:~# uname -a
Linux localhost 4.14.151-OpenNetworkLinux #1 SMP Sun May 22 18:30:02 UTC 2022 x86_64 GNU/Linux

D W

unread,
Jun 7, 2022, 4:07:37 PM6/7/22
to opennetworklinux
I changed the OS and kernel used for a Mellanox box. Maybe the info will be useful to you. 

I first made sure Mellanox supported the Linux kernel 4.19 (Mellanox has a github repository with kernel patches). Then I cloned ONL and started the Deb 10 container:

 $ 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:

  1. Kernel certificate in the buster container has expired. Apply workaround: edit make/kbuild.mk line 116, replace jessie -> buster
    (see https://github.com/opencomputeproject/OpenNetworkLinux/issues/858 )
  2. Manually installed apt-cacher-ng (downloaded buster version apt-cacher-ng_3.2.1-1_amd64.deb). Once you download it to the /tmp directory follow these steps:
    $ cd /tmp
    $ sudo dpkg -i apt-cacher-ng_3.2.1-1_amd64.deb
              When asked whether to allow http tunnel, answer 'yes'.
    To be able to use apt-cacher-ng without sudo, change the owner of the directory /run/apt-cacher-ng/ to the username you use in Linux or change the mode to allow others to write to it. In my case I ran:
    $ sudo chown devel:devel  /run/apt-cacher-ng/
    $ apt-cacher-ng

 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

 


Sadman Sakib

unread,
Jun 30, 2022, 2:33:50 AM6/30/22
to opennetworklinux
Hi, 

Could you tell me where you found onl-kernel-4.14-lts-x86-64-all_1.0.0_amd64.deb and onl-stretch-kernel-4.19-lts-x86-64-all_1.0.0_amd64.deb packages? Did you build these from Open Network Linux Github repository?

Thanks, 
Sadman

D W

unread,
Jul 11, 2022, 2:50:44 PM7/11/22
to opennetworklinux

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

Reply all
Reply to author
Forward
0 new messages