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
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3
$22.45
CORSAIR - VENGEANCE LPX 32GB (2x16GB) 3200MHz DDR4 C16 DIMM Desktop Memory
$59.99
A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G
$13.99
Samsung 16GB (4x4GB) 1Rx8 PC3-12800U 1600Mhz DDR3 RAM Memory M378B5273DH0-CK0
$14.00
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$23.95
HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM
$9.64
New SK Hynix 8GB PC4 DDR4-2666 Desktop Memory
$13.00
Lot Of 10 Mixed Samsung 16GB 2Rx4 PC4-2133P RDIMM DDR4-17000 ECC Server Memory
$149.99
128GB (8x 16GB) DDR3 PC3-14900R ECC Server Memory HP DL360 DL380 DL580 G7 / G8
$48.99