Skip to content

Commit

Permalink
Upgrade linux-image version (sonic-net#1294)
Browse files Browse the repository at this point in the history
* Upgrade linux-image version
* Add missing dependency of igb
* Fix mft build rule
* Add missing dependency of ixgbe
* [Broadcom]: Update OpenNSL modules to be compatible with kernel 3.16.0-5 (#3)
* [Nephos] Update SDK version to support new kernel module 3.16.0-5 (#4)
* [mellanox]: Update URL for SDK (#5)
  • Loading branch information
qiluo-msft authored Jan 31, 2018
1 parent a4a91cb commit 358949b
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 25 deletions.
6 changes: 3 additions & 3 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ echo '[INFO] Install SONiC linux kernel image'
## Note: duplicate apt-get command to ensure every line return zero
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/initramfs-tools_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-4-amd64_*.deb || \
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-5-amd64_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

## Update initramfs for booting with squashfs+aufs
Expand Down Expand Up @@ -145,10 +145,10 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
sudo chroot $FILESYSTEM_ROOT update-initramfs -u

## Install latest intel igb driver
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko

## Install latest intel ixgbe driver
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko

## Install docker
echo '[INFO] Install docker'
Expand Down
4 changes: 2 additions & 2 deletions files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

set -x

kernel=boot/vmlinuz-3.16.0-4-amd64
initrd=boot/initrd.img-3.16.0-4-amd64
kernel=boot/vmlinuz-3.16.0-5-amd64
initrd=boot/initrd.img-3.16.0-5-amd64
kernel_params=kernel-params

aboot_machine="arista_unknown"
Expand Down
4 changes: 2 additions & 2 deletions files/build_templates/swss.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
Description=switch state service
Requires=database.service
{% if sonic_asic_platform == 'broadcom' %}
Requires=opennsl-modules-3.16.0-4-amd64.service
Requires=opennsl-modules-3.16.0-5-amd64.service
{% elif sonic_asic_platform == 'nephos' %}
Requires=nps-modules-3.16.0-4-amd64.service
{% endif %}
After=database.service
After=interfaces-config.service
{% if sonic_asic_platform == 'broadcom' %}
After=opennsl-modules-3.16.0-4-amd64.service
After=opennsl-modules-3.16.0-5-amd64.service
{% elif sonic_asic_platform == 'nephos' %}
After=nps-modules-3.16.0-4-amd64.service
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions installer/x86_64/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,11 @@ menuentry '$demo_grub_entry' {
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
linux /$image_dir/boot/vmlinuz-3.16.0-4-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \
linux /$image_dir/boot/vmlinuz-3.16.0-5-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \
loop=$image_dir/$FILESYSTEM_SQUASHFS loopfstype=squashfs \
apparmor=1 security=apparmor varlog_size=$VAR_LOG_SIZE usbcore.autosuspend=-1 $ONIE_PLATFORM_EXTRA_CMDLINE_LINUX
echo 'Loading $demo_volume_label $demo_type initial ramdisk ...'
initrd /$image_dir/boot/initrd.img-3.16.0-4-amd64
initrd /$image_dir/boot/initrd.img-3.16.0-5-amd64
}
EOF
Expand Down
4 changes: 2 additions & 2 deletions platform/broadcom/sdk.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BRCM_OPENNSL_KERNEL = opennsl-modules-3.16.0-4-amd64_3.2.3.7-1_amd64.deb
$(BRCM_OPENNSL_KERNEL)_URL = "https://sonicstorage.blob.core.windows.net/packages/opennsl-modules-3.16.0-4-amd64_3.2.3.7-1_amd64.deb?sv=2015-04-05&sr=b&sig=BJEFXfq2mgvSTIYZF8qF1Jj2ePkJaxBmA0HqhhAFPmQ%3D&se=2031-08-11T03%3A27%3A43Z&sp=r"
BRCM_OPENNSL_KERNEL = opennsl-modules-3.16.0-5-amd64_3.2.3.7-1_amd64.deb
$(BRCM_OPENNSL_KERNEL)_URL = "https://sonicstorage.blob.core.windows.net/packages/opennsl-modules-3.16.0-5-amd64_3.2.3.7-1_amd64.deb?sv=2015-04-05&sr=b&sig=R%2BQp4mHlNi489Q6HP7vFUdBDmDazbiL02hQFdxYkCI0%3D&se=2031-09-27T20%3A17%3A41Z&sp=r"

SONIC_ONLINE_DEBS += $(BRCM_OPENNSL_KERNEL)
2 changes: 1 addition & 1 deletion platform/mellanox/mft.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ $(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft
$(MFT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
SONIC_MAKE_DEBS += $(MFT)

KERNEL_MFT = kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb
KERNEL_MFT = kernel-mft-dkms_4.5.0-$(KVERSION)_all.deb
$(eval $(call add_derived_package,$(MFT),$(KERNEL_MFT)))
5 changes: 2 additions & 3 deletions platform/mellanox/mft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ SHELL = /bin/bash

MFT_NAME = mft-4.5.0-31-x86_64-deb
MFT_TGZ = $(MFT_NAME).tgz
KERNELVER = 3.16.0-4-amd64
SRC_DEB = kernel-mft-dkms_4.5.0-31_all.deb

MAIN_TARGET = mft-4.5.0-31.amd64.deb
DERIVED_TARGETS = kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb
DERIVED_TARGETS = kernel-mft-dkms_4.5.0-$(KVERSION)_all.deb

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf $(MFT_NAME)
Expand All @@ -22,7 +21,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
fi
done

tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.5.0 -a all -d ubuntu -k $(KERNELVER) --media tar | grep "Disk image location" | cut -d':' -f2`
tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.5.0 -a all -d ubuntu -k $(KVERSION) --media tar | grep "Disk image location" | cut -d':' -f2`
popd

# fix timestamp because we do not actually build tools, only kernel
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/sdk.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/564703412781016766b248b98266bd6f2c161431/sdk
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/645052b0a285b190082beb858ba43a8b33bb667a/sdk
MLNX_SDK_VERSION = 4.2.6011
MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2_MLNX) $(SX_ACL_RM) $(SX_COMPLIB) \
$(SX_EXAMPLES) $(SX_GEN_UTILS) $(SX_SCEW) $(SX_SDN_HAL) \
Expand Down
4 changes: 2 additions & 2 deletions platform/nephos/sdk.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEPHOS_NPS_KERNEL = nps-modules-3.16.0-4-amd64_2.0.3a63-20180110_amd64.deb
$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-4-amd64_2.0.3a63-20180110_amd64.deb"
NEPHOS_NPS_KERNEL = nps-modules-3.16.0-5-amd64_2.0.3_amd64.deb
$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-5-amd64_2.0.3_amd64.deb"

SONIC_ONLINE_DEBS += $(NEPHOS_NPS_KERNEL)
8 changes: 4 additions & 4 deletions rules/linux-kernel.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# linux kernel package

KVERSION_SHORT = 3.16.0-4
KVERSION = $(KVERSION_SHORT)-amd64
KERNEL_VERSION = 3.16.43
KERNEL_SUBVERSION = 2+deb8u5
KVERSION_SHORT = 3.16.0-5
KVERSION ?= $(KVERSION_SHORT)-amd64
KERNEL_VERSION = 3.16.51
KERNEL_SUBVERSION = 3+deb8u1

export KVERSION_SHORT KVERSION KERNEL_VERSION KERNEL_SUBVERSION

Expand Down
2 changes: 1 addition & 1 deletion src/igb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :

# Build the package
pushd src
export BUILD_KERNEL=3.16.0-4-amd64
export BUILD_KERNEL=$(KVERSION)
make
popd

Expand Down
2 changes: 1 addition & 1 deletion src/ixgbe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :

# Build the package
pushd src
export BUILD_KERNEL=3.16.0-4-amd64
export BUILD_KERNEL=$(KVERSION)
make
popd

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-linux-kernel

0 comments on commit 358949b

Please sign in to comment.