Please add support for Intel E800 network cards

Dear community

I have just realised that my Intel E810-CAM2 network card is not supported :frowning:
Dear developers, I would really appreciate, if packages for Intel E800 based cards will be added to OpenWRT.
This users is also waiting for these drivers: Driver for Intel Ethernet E800 Series (ice)

Thank you in advance for your support!

The quickest approach would be if you'd provide a patch adding the necessary (tested) packaging changes against the current master branch. I wouldn't expect many others to be in a similar situation or to be able to test it.

Unfortunately I cannot code (learning curve would be too high for that) a patch. Would appreciate any other direction.

The driver is there in the mainline kernel since v4.17, it just needs to be packaged up to become installable on OpenWrt. These are 'just' packaging changes (Makefile syntax), not driver development, a learning curve for sure, but a reasonable target.

Thank you! Checking now...

See e.g. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=cba6832622cc952f5e1e91e6a2a406122c744dc5 for a similar example, it'll be slightly more complex (firmware and multiple config symbols needed) in your case, but not much more.

thank you!

Dear @slh
I have one question: where can get details on possible variables for DEPENDS and KCONFIG lines?
For the moment I have used the following configuration in package/kernel/linux/modules/netdevices.mk
, but I also saw a different one for the ice driver. Would appreciate your hint here...

define KernelPackage/ice
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Intel(R) Ethernet Controller E810 Series support
  DEPENDS:=@PCI_SUPPORT +kmod-ptp
  KCONFIG:=CONFIG_ICE
  FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ice/ice.ko
  AUTOLOAD:=$(call AutoProbe,ice)
endef

define KernelPackage/ice/description
  Kernel modules for Intel(R) Ethernet Controller E810 Series
endef

$(eval $(call KernelPackage,ice))

you can do a modprobe --show-depends ice on a regular Linux.

Dear all, CRAZY STUFF IS GOING ON... I was able to compile openWRT with ice driver for my Intel E800 network card and install the Intel firmware (see HowTo further down).

Thanks a lot to @slh for encouraging and @frollic for the hint!!! Very much appreciated.

Could you please give me the hint/solution direction on the following two points:

  1. Is there a way to compile my own openWRT, but still use most recent releases of openWRT packages from LUCI interface downloading them from the main branch? At at the moment I got stuck with extentions: each time I have to compile them separately on my local VirtualBox and install them per opkg command, because downloaded versions were not accepted due to the kernel signature.

  2. Shall I commit only the changes in package/kernel/linux/modules/netdevices.mk to contribute to the openWRT community? Have no idea how to commit the Intel firmware (see section 2 below in HowTo).

Thank you very much for your support!

  1. in short, no. (Basically) every build will have its unique kernel ABI (you're adding a kernel package, so the ABI will inevitably change/ be different than official OpenWrt without your changes), so any package that (indirectly) depends on kernel modules (and many do) will bail out. There is one simple solution to this, build all you want to have directly into your firmware image (CONFIG_XXX=y) - if you need something beyond that, build a fresh image and sysupgrade.
  2. One PR (pull request), two commits (intel/ice/ddp/ice.pkg needs to go into package/firmware/linux-firmware/intel.mk)

To install packages and firmware for Intel E800 network cards install Debian on VirtualBox and compile your own openWRT with ice driver (step 1).
Install your openWRT you have build on VirtualBox onto PC via dd command and upload the Intel firmware to your PC installation (step 2).

1. Instructions on how to build openWRT image

Steps I have taken:

sudo apt update
sudo apt dist-upgrade

Prerequisites for buildroot

sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev rsync gawk gcc-multilib flex git-core gettext libssl-dev gawk gcc-multilib flex git-core gettext libssl-dev

Prerequisite for master on Ubuntu as master needs python3 libs

sudo apt-get install python3-distutils

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git pull
./scripts/feeds update -a
./scripts/feeds install -a

Add the following driver configuration into package/kernel/linux/modules/netdevices.mk

define KernelPackage/ice
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Intel(R) Ethernet Controller E810 Series support
  DEPENDS:=@PCI_SUPPORT +kmod-ptp
  KCONFIG:=CONFIG_ICE
  FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ice/ice.ko
  AUTOLOAD:=$(call AutoProbe,ice)
endef

define KernelPackage/ice/description
  Kernel modules for Intel(R) Ethernet Controller E810 Series
endef

$(eval $(call KernelPackage,ice))

make menuconfig

# in make menuconfig adjust Target System (X86)
# Subtarget (x86_64)

# Target Images -> remove squashfs, Build GRUB images

# In Kernel modules-> Network Devices -> choose network drivers atlantic, ice, igc. Remove other drivers.
# in Wireless Devices choose mt7921e (if you want WiFi support)
# in Luci -> Collections -> luci, luci-light, luci-nginx, luci-ssl-nginx, luci-ssl-openssl
# in Luci -> Modules -> luci-mod-dashboard
# in Luci -> Applications -> luci-app-statistics, luci-app-wol, luci-app-ntpc, luci-app-ddns, luci-app-openvpn, luci-app-upnp, luci-app-watchcat, luci-app-qos OR luci-app-sqm
# in Luci -> Libraties -> luci-lib-httpclient

# In Network -> VPN -> openvpn-openssl
# In Network -> SSH -> openssh-server
# In Network -> Network -> nfs-kernel-server, nfs-kernel-server-utils
# In Kernel modules-> Network Devices -> kmod-macvlan

make defconfig

make -j6 V=s | tee OpenWRTBuild.log

2. LOAD INTEL FIRMWARE
I did not use linux-firmware, since I didn't figure out yet how to do it: I therefore followed Intel instructions.
Download latest firmware version from here: https://www.intel.com/content/www/us/en/download/19660/intel-ethernet-800-series-dynamic-device-personalization-ddp-for-telecommunication-comms-package.html?

Extract two ice*.pkg files and place them into the directory /lib/firmware/updates/intel/ice/ddp/
Rename the ice_comms-x.x.x.x.pkg file as ice-xxxxxxxxxxxxxxxx.pkg, where 'xxxxxxxxxxxxxxxx' is the unique 64-bit PCI Express device serial number in
hex. You can find the serial number with the following command:
# lspci -vv -s af:00.0 | grep -i Serial | awk '{print $7}' | sed s/-//g

Delete the ice.pkg softlink and recreate it with
ln -sf /lib/firmware/updates/intel/ice/ddp/ice-xxxxxxxxxxxxxxxx.pkg ice.pkg (with xxxxxxxxxxxxxxxx being your serial number)

Unload ice driver with
rmmod ice
and load again with (or simply reboot)
modprobe ice

The interface should be up and running at this point :slight_smile:

Please note:
Once the driver loads the package, the user can unbind the ice driver from a desired
port on the device so that DPDK can utilize the port.
The following example unbinds Port 0 and Port 1 of device on Bus 6, Device 0. Then,
the port is bound to either igb_uio or vfio-pci.

# ifdown <interface>
# dpdk-devbind -u 06:00.0
# dpdk-devbind -u 06:00.1
# dpdk-devbind -b igb_uio 06:00.0 06:00.1

# Target Images -> remove squashfs, Build GRUB images

Please pay attention here. Further below you are able to configure the image sizes. If you add further packages you have also to enlarge the size of the second partionion.

update - I was able to use a similar process but I simply copied the two ice* firmware files into /lib/firmware/intel/ice/ddp/

Note: LLDP is blocked by the DCB firmware agent, and even if ethtool --show-priv-flags eth1 shows the LLDP agent as disabled it is NOT actually disabled unless DCB support is active to begin with. Seems that DCB support is required for the flags to actually affect the firmware agent settings.

This works in package/kernel/linux/modules/netdevices.mk. make throws some questions for the other network modules that can work with DCB, I just accepted defaults when prompted:

define KernelPackage/ice
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Intel(R) Ethernet Controller E810 Series support
  DEPENDS:=@PCI_SUPPORT +kmod-ptp
  KCONFIG:=CONFIG_ICE \
    CONFIG_DCB=y
  FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ice/ice.ko
  AUTOLOAD:=$(call AutoProbe,ice)
endef

define KernelPackage/ice/description
  Kernel modules for Intel(R) Ethernet Controller E810 Series
endef

$(eval $(call KernelPackage,ice))

then of course append CONFIG_PACKAGE_kmod-ice=m to your .config and build

Can we please add the kmod-ice package to official repos?