install latest intel igb driver 5.3.5.4 in the base image (#167)

This commit is contained in:
lguohan 2016-12-28 19:05:09 -08:00 committed by GitHub
parent 7b4d715dcc
commit 26930e5e17
7 changed files with 74 additions and 3 deletions

View File

@ -129,6 +129,9 @@ sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/ho
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
## Install docker
echo '[INFO] Install docker'
## Install apparmor utils since they're missing and apparmor is enabled in the kernel

8
rules/igb.mk Normal file
View File

@ -0,0 +1,8 @@
# initramfs-tools package
IGB_DRIVER_VERSION = 5.3.5.4
export IGB_DRIVER_VERSION
IGB_DRIVER = igb.ko
$(IGB_DRIVER)_SRC_PATH = $(SRC_PATH)/igb
SONIC_MAKE_DEBS += $(IGB_DRIVER)

View File

@ -1,4 +1,4 @@
# redis package
# linux kernel package
KVERSION = 3.16.0-4-amd64

View File

@ -2,5 +2,5 @@
SONIC_ABOOT = sonic-aboot.bin
$(SONIC_ABOOT)_MACHINE = aboot
$(SONIC_ABOOT)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS)
$(SONIC_ABOOT)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS) $(IGB_DRIVER)
SONIC_INSTALLERS += $(SONIC_ABOOT)

View File

@ -2,5 +2,5 @@
SONIC_GENERIC = sonic-generic.bin
$(SONIC_GENERIC)_MACHINE = generic
$(SONIC_GENERIC)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS)
$(SONIC_GENERIC)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS) $(IGB_DRIVER)
SONIC_INSTALLERS += $(SONIC_GENERIC)

23
src/igb/Makefile Normal file
View File

@ -0,0 +1,23 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = igb.ko
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf ./igb-$(IGB_DRIVER_VERSION)
wget -O igb-$(IGB_DRIVER_VERSION).tar.gz "https://downloadmirror.intel.com/13663/eng/igb-$(IGB_DRIVER_VERSION).tar.gz"
tar xzf igb-$(IGB_DRIVER_VERSION).tar.gz
# Patch
pushd ./igb-$(IGB_DRIVER_VERSION)
patch -p1 < ../patch/0001-add-support-for-BCM54616-phy-for-intel-igb-driver.patch
# Build the package
pushd src
export BUILD_KERNEL=3.16.0-4-amd64
make
popd
popd
mv ./igb-$(IGB_DRIVER_VERSION)/src/$* $(DEST)/

View File

@ -0,0 +1,37 @@
From 548db654a498a017ce121292f12820176544e6ed Mon Sep 17 00:00:00 2001
From: Guohan Lu <gulv@microsoft.com>
Date: Tue, 27 Dec 2016 23:21:22 +0000
Subject: [PATCH] add support for BCM54616 phy for intel igb driver
---
src/e1000_82575.c | 1 +
src/e1000_defines.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/e1000_82575.c b/src/e1000_82575.c
index b4b973e..248c670 100644
--- a/src/e1000_82575.c
+++ b/src/e1000_82575.c
@@ -223,6 +223,7 @@ static s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
case M88E1112_E_PHY_ID:
case M88E1340M_E_PHY_ID:
case M88E1111_I_PHY_ID:
+ case BCM54616_E_PHY_ID:
phy->type = e1000_phy_m88;
phy->ops.check_polarity = e1000_check_polarity_m88;
phy->ops.get_info = e1000_get_phy_info_m88;
diff --git a/src/e1000_defines.h b/src/e1000_defines.h
index 6de3988..d5da148 100644
--- a/src/e1000_defines.h
+++ b/src/e1000_defines.h
@@ -1185,6 +1185,7 @@
#define I210_I_PHY_ID 0x01410C00
#define IGP04E1000_E_PHY_ID 0x02A80391
#define M88_VENDOR 0x0141
+#define BCM54616_E_PHY_ID 0x03625D10
/* M88E1000 Specific Registers */
#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Reg */
--
1.9.1