Perhaps it is sufficient to add the file /lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw to your miniroot.gz. Since you added the driver for the network card you know how to create a new miniroot.gz.
Hello list,
I’ve a query regarding PXE booting Knoppix 6.2 DVD. As per the forums and documentation, I could create initrd and vmlinuz by running terminal server. I can even boot from that vmlinuz and initrd image ( miniroot.gz ).
But I do see that PXE boot fails to the debug shell with a message saying “Probing Network devices handled by bnx2.ko”. it’s loading bnx2.ko because my on-boards LOMs are Broadcom 5709 based.
By going through the init script inside miniroot.gz, I could see that it’s trying to load bnx2.ko module from modules/net directory inside miniroot.gz and it fails. I edited the below part of script and recreated the miniroot.gz to know what exactly happens while loading bnx2.ko..
# Load nfs modules
NFSMODULES="$(cd /modules/net; echo af_packet.*o sunrpc.*o lockd.*o nfs_acl.*o nfs.*o)"
for i in $NFSMODULES; do
insmod /modules/net/"$i"
done
FOUND_NETWORK=""
message "Loading network device module(s)"
for i in $(cd /modules/net; echo *.*o); do
case "$NFSMODULES" in
*$i*) continue ;;
*)
case "$i" in
00*) ;;
*) message -n "${CRE} ${BLUE}Probing network device(s) handled by ${MAGENTA}$i${BLUE}.${NORMAL}"
FOUND_NETWORK="$i" ;;
esac
insmod /modules/net/"$i" >/dev/null 2>&1 ;; # Edited by KP, removed redirecting to /dev/null
esac
done
Now I can see that while loading bnx2.ko, it’s not able to load bnx2 firmware file. Here is the exact error message.
Bnx2: can’t load firmware file “bnx2/bnx2-mips-06-4.6.16.fw”
Bnx2: probe of 0000:05:00.0 failed with error -2
Bnx2: can’t load firmware file “bnx2/bnx2-mips-06-4.6.16.fw”
Bnx2: probe of 0000:05:00.0 failed with error -2
But e1000 driver is getting loaded successfully on another system which has Intel NIC and PXE boot is fine by mounting my NFS share where Knoppix is residing.
Have any one experienced on why bnx2 is failing for Knoppix 6.2 when it’s booted from PXE? Note that this is booting up fine from CDROM. Am I missing something here?
Thanks in advance !
Thanks,
Krishnaprasad
Perhaps it is sufficient to add the file /lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw to your miniroot.gz. Since you added the driver for the network card you know how to create a new miniroot.gz.
I had added the firmware files to the initrd. but it doesn't help. i've the files available under lib/firmware/bnx2 and under KNOPPIX and UNIONFS as well.
From the error message it looks like it's not able to load the firmware files??
Thanks much for your help !
- Krishnaprasad
You might want to check if you boot up from CDROM, the loading of bnx2 is done after '/sbin/init' or before '/sbin/init'.
I think you might want to read this :-
http://lwn.net/Articles/242046/
It seems 'early' firmware loading will require additional tweaking.
Cheers.
Hi Krishna,
I don't think so because when i boot Knoppix from a CDROM, then the same module gets loaded successfully. and i do see that only this firmware file is available in the entire CD w.r.t bnx2. So that means this firmware file must be loaded while bnx2 bootup. But unfortunately we could not check if the firmware is really loaded to the kernel or not. lsmod doesnt give this info and neither dmesg.
Also the error message says can't load the firmware file bnx2/bnx2-mips-06-4.6.16.fw”
Probably this means while module load ( bnx2.ko ), it's not able to see the firmware file available in initrd or it's not able to load this to kernel because of some other reasons.
Another doubt that i have is, in the case of CDROM bootup, init may be loading this firmware file after mounting the KNOPPIX image to a temporary location. i.e. it may not be getting loaded from initrd.
if that's the case, this can't be implemented in my case because my KNOPPIX image sits in an NFS share and i need network access to mount that NFS share to a temp location...
Thank you all for supporting me in this issue. Any ideas will be highly appreciated.
Thanks,
Krishnaprasad
Hello,
as you know the modules ( network ) are getting loaded from initrd and the firmware load happens when bnx2.ko is getting loaded. The module gets loaded to the kernel but the network devices will be failed as the firmware is not loaded.
From the init code, it's seen that it tries to load bnx2.ko but there the failure happens.
# Load nfs modules
NFSMODULES="$(cd /modules/net; echo af_packet.*o sunrpc.*o lockd.*o nfs_acl.*o nfs.*o)"
for i in $NFSMODULES; do
insmod /modules/net/"$i"
done
FOUND_NETWORK=""
message "Loading network device module(s)"
for i in $(cd /modules/net; echo *.*o); do
case "$NFSMODULES" in
*$i*) continue ;;
*)
case "$i" in
00*) ;;
*) message -n "${CRE} ${BLUE}Probing network device(s) handled by ${MAGENTA}$i${BLUE}.${NORMAL}"
FOUND_NETWORK="$i" ;;
esac
insmod /modules/net/"$i" >/dev/null 2>&1 ;;
esac
done
# Enable kernel messages again
echo "6" > /proc/sys/kernel/printk
ifconfig lo 127.0.0.1 up
[ -n "FOUND_NETWORK" ] || debugshell
But if i have an Intel card and if e1000.ko is the driver, this gets initalized properly. The issue is only with bnx2.ko and the firmware files.
Unfortunately all of my systems have Onboard Broadcom NICs.
Thanks,
Krishnaprasad
I have asked you to read the document, you have probably not read it thoroughly yet.
Nevermind, that's the long version of the answer. The short version of the answer is as follows :-
You need to have a shell script called /sbin/hotplug, with execution permission, the content
is something like this :-
#!/bin/sh
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/bnx2/$FIRMWARE > /sys/$DEVPATH/data
echo 0 > /sys/$DEVPATH/loading
That's will likely do the trick.
Cheers.
Hi, Please ignore my previous post.
i do see that DEVPATH is the Path under /sys at which this device's sysfs directory can be found. i saw the documentation inside Documentation/firmware_class as well. From there i understood the way kernel is calling the firmware and how it needs to be passed from the user end. per your advise, I've created a script /sbin/hotplug as below:-
#!/bin/sh
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/bnx2/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Now the firmware is read while loading the module and it fails with an error message as below
firmware 0000:05:00.0: firmware_loading_store: vmap() failed
bnx2: Can't load firmware file "bnx2/bnx2-mips-06-4.6.16.fw"
bnx2: probe of 0000:05:00.0 failed with error -2
I am checking bnx2 driver code on why this failure is seen.
Thanks,
Krishnaprasad
HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 2x 256GB SSD Quadro 2000 Linux GA
$212.49
Intel Xeon E5-2697 V4 2.30 GHz 18C 2011-3 2400MHz 45MB 145W SR2JV CPU Processor
$45.00
Lenovo Thinkstation P510 E5-1620 V4 16GB RAM 512GB SSD DVD Quadro M2000 W10 Pro
$184.95
HP Z440 Workstation 18Cores Xeon E5-2699 V3 128GB 1TB SSD 2TB WIFI WIN11 R5-340X
$309.99
Intel Xeon E5-2680 v4 SR2N7 2.40GHz 35MB 14-Core LGA2011-3 CPU Processor
$14.99
SR1XP Intel Xeon E5-2680 v3 12 Core 30MB 2.5GHz LGA 2011-3 Grade A Processor
$3.96
Intel Xeon E7-8890 V4 2.20GHz 24-Core 60MB LGA2011 Server CPU Processor SR2SS
$29.99
Intel Xeon E5-2667 V4 SR2P5 (3.2GHZ/8-CORE/25MB/135W) PROCESSOR CPU
$29.95
Intel Xeon E5-2697 V4 2.30 GHz 18C 2011-3 2400MHz 45MB 145W SR2JV CPU Processor
$47.99
Supermicro X10DRI-T E-ATX Dual LGA 2011-3 Xeon v3/v4 Motherboard 3x16x 2x10GBe
$149.99