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

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

Merged
merged 2 commits into from
Dec 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions rules/igb.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion rules/linux-kernel.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# redis package
# linux kernel package

KVERSION = 3.16.0-4-amd64

Expand Down
2 changes: 1 addition & 1 deletion rules/sonic-aboot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion rules/sonic-generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 23 additions & 0 deletions src/igb/Makefile
Original file line number Diff line number Diff line change
@@ -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
Copy link
Collaborator

@qiluo-msft qiluo-msft Dec 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.16.0-4-amd64 [](start = 21, length = 14)

Use $KVERSION? #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUILD_KERNEL is used by igb Makefile, will not change.

make
popd

popd
mv ./igb-$(IGB_DRIVER_VERSION)/src/$* $(DEST)/
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 548db654a498a017ce121292f12820176544e6ed Mon Sep 17 00:00:00 2001
From: Guohan Lu <[email protected]>
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