Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade SONiC to Debian Bullseye #8191

Merged
merged 39 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
695772c
Add infra to support building Bullseye base image with Buster containers
saiarcot895 Jun 30, 2021
2a7f52b
Update src/sonic-linux-kernel to point to the 5.10 kernel
saiarcot895 Jul 9, 2021
fc1589e
Update saibcm-modules to compile with 5.10 kernel
saiarcot895 Jul 9, 2021
908e2e9
Update initramfs-tools from 0.133 to 0.140
saiarcot895 Jul 12, 2021
5501827
Update the base Debian system installation script to get Bullseye
saiarcot895 Jul 15, 2021
11bdf78
openssh: Upgrade from 7.9 to 8.4, to match version in Bullseye
saiarcot895 Jul 23, 2021
52852f8
Python 2 removal/cleanup
saiarcot895 Jul 23, 2021
670f883
Update monit build for Bullseye
saiarcot895 Jul 23, 2021
20b0ecf
[slave.mk]: include dhcp-relay docker in buster build targets
lguohan Jul 25, 2021
d9ed115
Update snmpd to 5.9, as part of the Bullseye upgrade
saiarcot895 Jul 14, 2021
ff27afe
sonic-frr: Add patch to skip installing png files
saiarcot895 Jul 19, 2021
2929164
Update kdump-tools for bullseye
saiarcot895 Jul 26, 2021
5aac898
Add Bullseye slave docker files to list of common cache files
saiarcot895 Jul 30, 2021
6da50c1
Get packages for the base image from the main repos instead of our mi…
saiarcot895 Aug 3, 2021
1db72be
Upgrade to ntp 4.2.8p15 for Bullseye
saiarcot895 Aug 16, 2021
18266c3
Fix Python 3 syntax in SONiC container startup scripts
saiarcot895 Aug 27, 2021
e64f265
Make changes needed to build a basic Broadcom image
saiarcot895 Aug 27, 2021
568cbc8
Mark the PTF docker container as a Buster container
saiarcot895 Aug 30, 2021
76ae801
Update SAI modules for Nokia and Juniper for Bullseye and 5.10 kernel
saiarcot895 Sep 10, 2021
e9bbefb
Update SAI module for Celestica for Bullseye and 5.10 kernel
saiarcot895 Sep 14, 2021
a263b4d
Don't build and package the psample module
saiarcot895 Sep 20, 2021
3ad15c1
Update Accton platform module for Bullseye and 5.10 kernel
saiarcot895 Sep 28, 2021
4cf29bb
Add support for building Mellanox image
saiarcot895 Sep 28, 2021
a895e6c
For syncd, specify that they're Buster-based containers in the templa…
saiarcot895 Sep 28, 2021
bfa8ac9
Update saibcm-modules and saibcm-modules-dnx due to kernel changes
saiarcot895 Oct 28, 2021
95dc512
Ported iptables patch to 5.10 kernel (#4)
kirankella Oct 25, 2021
4652b88
Update Centec platform support for Bullseye and 5.10 kernel (#7)
LuiSzee Oct 25, 2021
65393e4
DellEMC bullseye merge (#2)
aravindmani-1 Oct 28, 2021
44507ff
Update Dell z9332f platform modules for Bullseye and 5.10 kernel. (#5)
jjangmua Oct 28, 2021
006706a
Update some more Dell platform modules for 5.10 and Bullseye changes
saiarcot895 Oct 28, 2021
4a7e765
Mellanox bullseye merge (#1)
alexrallen Oct 29, 2021
bd293b6
Add in fdisk and gpg into the Bullseye image
saiarcot895 Oct 29, 2021
19e3e29
Upgrade new DellEMC platforms to bullseye kernel (#10)
aravindmani-1 Nov 1, 2021
04dcd6f
Mellanox bullseye merge (#1)
alexrallen Nov 1, 2021
73b18a8
Update Barefoot platform module for Bullseye and 5.10 kernel (#8)
KostiantynYarovyiBf Oct 29, 2021
9d5d0f6
Build Arista platform module
saiarcot895 Nov 2, 2021
f12cd17
DellEMC: Remove repeated files
aravindmani-1 Nov 2, 2021
a517297
Update pointer (#12)
alexrallen Nov 5, 2021
42855e3
Fix Mellanox hw-mgmt package version
saiarcot895 Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NOJESSIE ?= 1
NOSTRETCH ?= 0
NOBUSTER ?= 0
NOBULLSEYE ?= 1
NOBULLSEYE ?= 0

ifeq ($(NOJESSIE),0)
BUILD_JESSIE=1
Expand Down Expand Up @@ -35,7 +35,7 @@ ifeq ($(NOSTRETCH), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch make -f Makefile.work stretch
endif
ifeq ($(NOBUSTER), 0)
BLDENV=buster make -f Makefile.work $@
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=buster make -f Makefile.work buster
endif
ifeq ($(NOBULLSEYE), 0)
BLDENV=bullseye make -f Makefile.work $@
Expand Down
3 changes: 2 additions & 1 deletion Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ SONIC_COMMON_DPKG_LIST := debian/control debian/changelog debian/rules \
debian/compat debian/install debian/copyright
SONIC_COMMON_BASE_FILES_LIST := sonic-slave-jessie/Dockerfile.j2 sonic-slave-jessie/Dockerfile.user.j2 \
sonic-slave-stretch/Dockerfile.j2 sonic-slave-stretch/Dockerfile.user.j2 \
sonic-slave-buster/Dockerfile.j2 sonic-slave-buster/Dockerfile.user.j2
sonic-slave-buster/Dockerfile.j2 sonic-slave-buster/Dockerfile.user.j2 \
sonic-slave-bullseye/Dockerfile.j2 sonic-slave-bullseye/Dockerfile.user.j2



Expand Down
26 changes: 12 additions & 14 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ set -x -e
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)

## docker engine version (with platform)
DOCKER_VERSION=5:18.09.8~3-0~debian-$IMAGE_DISTRO
LINUX_KERNEL_VERSION=4.19.0-12-2
DOCKER_VERSION=5:20.10.7~3-0~debian-$IMAGE_DISTRO
LINUX_KERNEL_VERSION=5.10.0-8-2

## Working directory to prepare the file system
FILESYSTEM_ROOT=./fsroot
Expand Down Expand Up @@ -269,6 +269,7 @@ fi
## Note: parted is needed for partprobe in install.sh
## Note: ca-certificates is needed for easy_install
## Note: don't install python-apt by pip, older than Debian repo one
## Note: fdisk and gpg are needed by fwutil
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
file \
ifmetric \
Expand All @@ -281,8 +282,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
dbus \
ntpstat \
openssh-server \
python \
python-apt \
python3-apt \
traceroute \
iputils-ping \
net-tools \
Expand Down Expand Up @@ -314,14 +314,16 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
ndisc6 \
makedumpfile \
conntrack \
python-pip \
python3 \
python3-distutils \
python3-pip \
python-is-python3 \
cron \
libprotobuf17 \
libprotobuf23 \
libgrpc++ \
haveged \
fdisk \
gpg \
jq

if [[ $CONFIGURED_ARCH == amd64 ]]; then
Expand Down Expand Up @@ -350,12 +352,11 @@ sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
sudo LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT update-locale "LANG=en_US.UTF-8"
sudo LANG=C chroot $FILESYSTEM_ROOT bash -c "find /usr/share/i18n/locales/ ! -name 'en_US' -type f -exec rm -f {} +"

# Install certain fundamental packages from $IMAGE_DISTRO-backports in order to get
# more up-to-date (but potentially less stable) versions
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t $IMAGE_DISTRO-backports install \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
picocom \
systemd \
systemd-sysv
systemd-sysv \
ntp

if [[ $CONFIGURED_ARCH == amd64 ]]; then
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \
Expand Down Expand Up @@ -425,13 +426,10 @@ done < files/image_config/sysctl/sysctl-net.conf
sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT

# Upgrade pip via PyPI and uninstall the Debian version
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install --upgrade 'pip<21'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install --upgrade pip
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python-pip python3-pip
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python3-pip

# For building Python packages
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'setuptools==40.8.0'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'wheel==0.35.1'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'setuptools==49.6.00'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'wheel==0.35.1'

Expand Down
65 changes: 32 additions & 33 deletions device/dell/x86_64-dellemc_z9332f_d1508-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,39 @@ class SfpUtil(SfpUtilBase):
PORTS_IN_BLOCK = 34

BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"

_port_to_i2c_mapping = {
1: 4,
2: 5,
3: 6,
4: 7,
5: 8,
6: 9,
7: 10,
8: 11,
9: 12,
10: 13,
11: 14,
12: 15,
13: 16,
14: 17,
15: 18,
16: 19,
17: 20,
18: 21,
19: 22,
20: 23,
21: 24,
22: 25,
23: 26,
24: 27,
25: 28,
26: 29,
27: 30,
28: 31,
29: 32,
30: 33,
31: 34,
32: 35,
1: 10,
2: 11,
3: 12,
4: 13,
5: 14,
6: 15,
7: 16,
8: 17,
9: 18,
10: 19,
11: 20,
12: 21,
13: 22,
14: 23,
15: 24,
16: 25,
17: 26,
18: 27,
19: 28,
20: 29,
21: 30,
22: 31,
23: 32,
24: 33,
25: 34,
26: 35,
27: 36,
28: 37,
29: 38,
30: 39,
31: 40,
32: 41,
33: 1,
34: 2,
}
Expand Down
22 changes: 12 additions & 10 deletions files/apt/sources.list.amd64
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
## Debian mirror on Microsoft Azure
## Ref: http://debian-archive.trafficmanager.net/

deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster main contrib non-free
deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster main contrib non-free
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ buster/updates main contrib non-free
deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ buster/updates main contrib non-free
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster-backports main contrib non-free
deb [arch=amd64] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
deb [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ buster_updates main contrib non-free
deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ buster_updates main contrib non-free
deb [arch=amd64] http://packages.trafficmanager.net/debian/debian buster-backports main contrib non-free
deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free
#deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free
#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye/updates main contrib non-free
#deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye/updates main contrib non-free
#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye-backports main contrib non-free
#deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free
#deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free
#deb [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ bullseye_updates main contrib non-free
#deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ bullseye_updates main contrib non-free
#deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye-backports main contrib non-free
20 changes: 10 additions & 10 deletions files/apt/sources.list.arm64
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Debian mirror for ARM
## Not the repo mirror site can change in future, and needs to be updated to be in sync

deb [arch=arm64] http://deb.debian.org/debian buster main contrib non-free
deb-src [arch=arm64] http://deb.debian.org/debian buster main contrib non-free
deb [arch=arm64] http://deb.debian.org/debian buster-updates main contrib non-free
deb-src [arch=arm64] http://deb.debian.org/debian buster-updates main contrib non-free
deb [arch=arm64] http://ftp.debian.org/debian buster-backports main
deb [arch=arm64] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
deb [arch=arm64] http://packages.trafficmanager.net/debian/debian buster-updates main contrib non-free
deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian buster-updates main contrib non-free
deb [arch=arm64] http://packages.trafficmanager.net/debian/debian buster-backports main
deb [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free
deb-src [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free
deb [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free
deb [arch=arm64] http://ftp.debian.org/debian bullseye-backports main
# deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free
# deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free
# deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free
# deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free
# deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-backports main
20 changes: 10 additions & 10 deletions files/apt/sources.list.armhf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Debian mirror for ARM
## Not the repo mirror site can change in future, and needs to be updated to be in sync

deb [arch=armhf] http://deb.debian.org/debian buster main contrib non-free
deb-src [arch=armhf] http://deb.debian.org/debian buster main contrib non-free
deb [arch=armhf] http://deb.debian.org/debian buster-updates main contrib non-free
deb-src [arch=armhf] http://deb.debian.org/debian buster-updates main contrib non-free
deb [arch=armhf] http://ftp.debian.org/debian buster-backports main
deb [arch=armhf] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
deb [arch=armhf] http://packages.trafficmanager.net/debian/debian buster-updates main contrib non-free
deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian buster-updates main contrib non-free
deb [arch=armhf] http://packages.trafficmanager.net/debian/debian buster-backports main
deb [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free
deb-src [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free
deb [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free
deb [arch=armhf] http://ftp.debian.org/debian bullseye-backports main
# deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free
# deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free
# deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free
# deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free
# deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-backports main
2 changes: 1 addition & 1 deletion files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function ebtables_config()

function getMountPoint()
{
echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print '' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source'])" 2>/dev/null
echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null
}

function getBootType()
Expand Down
Loading