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

bnx2 firmware not included #108

Closed
BeardedTek opened this issue Jun 29, 2022 · 14 comments · Fixed by #119
Closed

bnx2 firmware not included #108

BeardedTek opened this issue Jun 29, 2022 · 14 comments · Fixed by #119

Comments

@BeardedTek
Copy link

When installing from Rockstor-Leap15.3-generic.x86_64-4.1.0-0.install.iso on a Dell PowerEdge T410 with Broadcom 5716 dual nic.

It appears the firmware is not included and can be obtained via the package kernel-firmware-bnx2-20220607-35.1.noarch.rpm from openSUSE 15.3 Without this installed, the system will not communicate with the network.

In order to get this to work:

  • downloaded kernel-firmware-bnx2-20220607-35.1.noarch.rpm from openSUSE's Leap 15.3 sources.
  • Attempted to install this package with both zypper in ./kernel-firmware-bnx2-20220607-35.1.noarch.rpm and rpm -i kernel-firmware-bnx2-20220607-35.1.noarch.rpm both of which failed.
  • Extracted the rpm from another machine using Ark
  • Copied these files to a USB stick
  • copied the extracted firmware directory's contents to both /lib/firmware and /usr/lib/firmware.
  • At this point everything came alive.

I'd recommend including common NIC firmware in the install image for future releases to ease this pain.

In the past I've always used roll your own or rpm install on Leap. The installer works like a charm otherwise! Thanks!

@phillxnet
Copy link
Member

phillxnet commented Jun 29, 2022

@BeardedTek Thanks for the info on this one. Are you aware of the license on this firmware? I.e. if it is permissible for us to redistribute then I don't see why we can't just add it to our list of pre-installed rpms used during the installer build.

For an alternative approach in the future you could, if we haven't included this rpm by then, just add this rpm to the list of those defined in the installer build file rockstor.kiwi in this repo and rebuild the installer as per the README.md using that definition rather than the repo's default. It should work if placed in the

section.

The noarch element of that package would suggest no architecture limitation which is good. As otherwise its addition could break a non x86_64 installer build, i.e. such as our ARM64EFI or RaspberryPi4 profiles. So yes it will likely fit nicely in the image section which pertains to all profiles. Unless otherwise specifically limited such as is the case with:

        <package name="gfxboot-branding-upstream" arch="x86_64"/> <!-- grub bg -->

As an aside, if we can't legally re-distribute then we could always add the package but remarked out, to ease the path for those wishing to build their own custom installers with this firmware pre-installed.

Thanks again for the feedback. With the above info we should be able to judge if this can be a part of the default installer package set.

Also, do you fancy testing the addition of this package, as suggested above, and doing a custom installer build to see if you then have expected function out-of-the-box with the resulting installer. That would really help with us adding this package with some confidence: remarked out or otherwise.

I'd recommend including common NIC firmware in the install image for future releases to ease this pain.

Agreed, but in the early days when we added all available firmware the image bloated massively. I'm keen to very much keep the installer to a workable minimum if possible. Plus I believe the kernel firmware has recently been split into many smaller packages so identifying those most relevant and common would be good. And as you say NIC rather than say TV cards firmware or the like would be more fitting in our case. And we do already single out such things as:

        <package name="adaptec-firmware"/>  <!--Razor AIC94xx Series SAS-->

Cheers.

@BeardedTek
Copy link
Author

I just double checked and the driver is GPL.

From https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/broadcom/bnx2.c

/* bnx2.c: QLogic bnx2 network driver.
*

  • Copyright (c) 2004-2014 Broadcom Corporation
  • Copyright (c) 2014-2015 QLogic Corporation
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation.
  • Written by: Michael Chan ([email protected])
    */

@phillxnet
Copy link
Member

I just double checked and the driver is GPL.

@BeardedTek Nice find.

However it is not the driver we are concerned with here but it's associated firmware. Or rather the firmware associated with the card that presumably the kernel driver relies upon.

There should be licence info attached to the firmware package you mentioned having to install.

@BeardedTek
Copy link
Author

From https://opensuse.pkgs.org/15.3/opensuse-oss-x86_64/kernel-firmware-bnx2-20210208-2.4.noarch.rpm.html

License: SUSE-Firmware AND GPL-2.0-only AND GPL-2.0-or-later AND MIT

@phillxnet
Copy link
Member

@BeardedTek
Re:

License: SUSE-Firmware AND GPL-2.0-only AND GPL-2.0-or-later AND MIT

Sorted.

Thanks for looking that up. Do you fancy testing this package's addition to our installer config and doing a test build/install of the resulting installer to confirm you then have function out-of-the-box? If so do feel free to submit a pull request of the same as we then have attribution for this addition. Should just be a single line addition on first glance.

Thanks again for chipping in on this. We depend on folks doing the same to nudge our install along; bit by bit.

By the way, whenever you do a fresh installer build, all pending-at-the-time updates will be backed into the resulting installer. So that's another bonus for doing your own installer builds.

@BeardedTek
Copy link
Author

BeardedTek commented Jun 30, 2022

From https://opensuse.pkgs.org/15.3/opensuse-oss-x86_64/kernel-firmware-bnx2-20210208-2.4.noarch.rpm.html

License: SUSE-Firmware AND GPL-2.0-only AND GPL-2.0-or-later AND MIT

Normally I'd jump all over it, however, this is a very busy week. Alaska in the summertime is when 80% of the work needs to be done. In about 8 days or so I should have the time. As long as the firmware ends up in /lib/firmware or /usr/lib/firmware it will work. Each time I copied those files the instant it hit either of those directories it immediately brought my network to life!

I honestly wish I knew more python 2.x and Django. I'm a 3.6+/flask guy myself - see fEVR I'd jump in and pitch in more. I'm a huge advocate of ROCKstor, championing it where I can. Recommending it throughout the community.

@phillxnet
Copy link
Member

Confirming package name, without version, for inclusion in image:

installer:~ # zypper se -s kernel-firmware-bnx2
Loading repository data...
Reading installed packages...

S | Name                 | Type    | Version                | Arch   | Repository
--+----------------------+---------+------------------------+--------+-------------------------------------------------------------
  | kernel-firmware-bnx2 | package | 20210208-150300.4.10.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
  | kernel-firmware-bnx2 | package | 20210208-150300.4.7.1  | noarch | Update repository with updates from SUSE Linux Enterprise 15
  | kernel-firmware-bnx2 | package | 20210208-2.4           | noarch | Leap_15_3

So kernel-firmware-bnx2 it is then.

@phillxnet
Copy link
Member

Size cost = 10 MiB

installer:~ # zypper in --no-recommends kernel-firmware-bnx2
...

The following NEW package is going to be installed:
  kernel-firmware-bnx2

1 new package to install.
Overall download size: 10.2 MiB. Already cached: 0 B. After the operation, additional 10.2 MiB will be used.

@phillxnet
Copy link
Member

As long as the firmware ends up in /lib/firmware or /usr/lib/firmware it will work.

After installing kernel-firmware-bnx2 we do in-deed have the following:

installer:~ # ls -la /lib/firmware/
total 1012
drwxr-xr-x 1 root root    324 Jul 22 17:10 .
drwxr-xr-x 1 root root     78 Jul 22 15:45 ..
-rw-r--r-- 1 root root  22622 Mar  5  2021 aic94xx-seq.fw
drwxr-xr-x 1 root root   1252 Jul 22 17:10 bnx2
drwxr-xr-x 1 root root   2246 Jul 22 17:10 bnx2x
-rw-r--r-- 1 root root 152412 May 16 16:45 bnx2x-e1-4.8.53.0.fw.xz
-rw-r--r-- 1 root root 149604 May 16 16:45 bnx2x-e1-5.2.13.0.fw.xz
-rw-r--r-- 1 root root 149332 May 16 16:45 bnx2x-e1-5.2.7.0.fw.xz
-rw-r--r-- 1 root root 174716 May 16 16:45 bnx2x-e1h-4.8.53.0.fw.xz
-rw-r--r-- 1 root root 187312 May 16 16:45 bnx2x-e1h-5.2.13.0.fw.xz
-rw-r--r-- 1 root root 187392 May 16 16:45 bnx2x-e1h-5.2.7.0.fw.xz

@BeardedTek
Copy link
Author

This is why I love this community! Thanks for putting this in! I have several Dell servers with this card and this makes a world of difference for installation!

@phillxnet
Copy link
Member

@BeardedTek Hello again, we arn't quite there just yet. I was just confirming the package name to use on a recent new build of the installer. But I should be popping the required line in shortly. Once I'm done and dusted on some other outstanding installer issues.

Would be great if you could confirm the 'fix' once the new config is in place however? I'll update here once that is the case.

@BeardedTek
Copy link
Author

Roger that. I have a spare server with matching config that I could spin up to confirm.

phillxnet added a commit to phillxnet/rockstor-installer that referenced this issue Jul 30, 2022
Enable bnx2 network adapter via kernel firmware
package inclusion.
phillxnet added a commit that referenced this issue Jul 30, 2022
@phillxnet
Copy link
Member

@BeardedTek OK, so I've now merged the propose change. So any subsequent builds of the installer will have this firmware pre-installed.

I've not rebuild our own downloadable installers just yet as we are dealing with some other changes that are required, i.e. see #118 and #120 but given them, a test build I did locally worked as intended regarding having the firmware pre-installed as detailed earlier in this issue.

I can update here again once we have our new installers release and uploaded if you fancy? Or if you get around to doing a build yourself and testing the result then do let us know here. Pretty sure we are good on this one now however given your prior explanations regarding files expected where etc.

Thanks again for raising and helping with this issue, much appreciated.

@BeardedTek
Copy link
Author

Most certainly! I have a few projects going at the moment. Next week I may fire up my test server if I get things accomplished.

Thank you again for the awesomeness that is ROCKstor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants