Skip to content

Commit 26930e5

Browse files
authored
install latest intel igb driver 5.3.5.4 in the base image (#167)
1 parent 7b4d715 commit 26930e5

7 files changed

+74
-3
lines changed

build_debian.sh

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/ho
129129
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
130130
sudo chroot $FILESYSTEM_ROOT update-initramfs -u
131131

132+
## Install latest intel igb driver
133+
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
134+
132135
## Install docker
133136
echo '[INFO] Install docker'
134137
## Install apparmor utils since they're missing and apparmor is enabled in the kernel

rules/igb.mk

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# initramfs-tools package
2+
3+
IGB_DRIVER_VERSION = 5.3.5.4
4+
export IGB_DRIVER_VERSION
5+
6+
IGB_DRIVER = igb.ko
7+
$(IGB_DRIVER)_SRC_PATH = $(SRC_PATH)/igb
8+
SONIC_MAKE_DEBS += $(IGB_DRIVER)

rules/linux-kernel.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# redis package
1+
# linux kernel package
22

33
KVERSION = 3.16.0-4-amd64
44

rules/sonic-aboot.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
SONIC_ABOOT = sonic-aboot.bin
44
$(SONIC_ABOOT)_MACHINE = aboot
5-
$(SONIC_ABOOT)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS)
5+
$(SONIC_ABOOT)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS) $(IGB_DRIVER)
66
SONIC_INSTALLERS += $(SONIC_ABOOT)

rules/sonic-generic.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
SONIC_GENERIC = sonic-generic.bin
44
$(SONIC_GENERIC)_MACHINE = generic
5-
$(SONIC_GENERIC)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS)
5+
$(SONIC_GENERIC)_DEPENDS += $(LINUX_KERNEL) $(INITRAMFS_TOOLS) $(IGB_DRIVER)
66
SONIC_INSTALLERS += $(SONIC_GENERIC)

src/igb/Makefile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.ONESHELL:
2+
SHELL = /bin/bash
3+
.SHELLFLAGS += -e
4+
5+
MAIN_TARGET = igb.ko
6+
7+
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
8+
rm -rf ./igb-$(IGB_DRIVER_VERSION)
9+
wget -O igb-$(IGB_DRIVER_VERSION).tar.gz "https://downloadmirror.intel.com/13663/eng/igb-$(IGB_DRIVER_VERSION).tar.gz"
10+
tar xzf igb-$(IGB_DRIVER_VERSION).tar.gz
11+
12+
# Patch
13+
pushd ./igb-$(IGB_DRIVER_VERSION)
14+
patch -p1 < ../patch/0001-add-support-for-BCM54616-phy-for-intel-igb-driver.patch
15+
16+
# Build the package
17+
pushd src
18+
export BUILD_KERNEL=3.16.0-4-amd64
19+
make
20+
popd
21+
22+
popd
23+
mv ./igb-$(IGB_DRIVER_VERSION)/src/$* $(DEST)/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 548db654a498a017ce121292f12820176544e6ed Mon Sep 17 00:00:00 2001
2+
From: Guohan Lu <[email protected]>
3+
Date: Tue, 27 Dec 2016 23:21:22 +0000
4+
Subject: [PATCH] add support for BCM54616 phy for intel igb driver
5+
6+
---
7+
src/e1000_82575.c | 1 +
8+
src/e1000_defines.h | 1 +
9+
2 files changed, 2 insertions(+)
10+
11+
diff --git a/src/e1000_82575.c b/src/e1000_82575.c
12+
index b4b973e..248c670 100644
13+
--- a/src/e1000_82575.c
14+
+++ b/src/e1000_82575.c
15+
@@ -223,6 +223,7 @@ static s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
16+
case M88E1112_E_PHY_ID:
17+
case M88E1340M_E_PHY_ID:
18+
case M88E1111_I_PHY_ID:
19+
+ case BCM54616_E_PHY_ID:
20+
phy->type = e1000_phy_m88;
21+
phy->ops.check_polarity = e1000_check_polarity_m88;
22+
phy->ops.get_info = e1000_get_phy_info_m88;
23+
diff --git a/src/e1000_defines.h b/src/e1000_defines.h
24+
index 6de3988..d5da148 100644
25+
--- a/src/e1000_defines.h
26+
+++ b/src/e1000_defines.h
27+
@@ -1185,6 +1185,7 @@
28+
#define I210_I_PHY_ID 0x01410C00
29+
#define IGP04E1000_E_PHY_ID 0x02A80391
30+
#define M88_VENDOR 0x0141
31+
+#define BCM54616_E_PHY_ID 0x03625D10
32+
33+
/* M88E1000 Specific Registers */
34+
#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Reg */
35+
--
36+
1.9.1
37+

0 commit comments

Comments
 (0)