Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
make error when building rom
2012-01-30, 17:08
Post: #1
make error when building rom
I'm having issues while compiling a rom for a Broadcom 57xx series onboard nic.

Code:
root@ubuntu:/home/ubuntu# lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
00:02.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
00:11.0 RAID bus controller: ATI Technologies Inc SB700/SB800 SATA Controller [Non-RAID5 mode] (rev 40)
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 42)
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40)
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller (rev 40)
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
00:16.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:16.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control
01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 210] (rev a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe (rev 10)
root@ubuntu:/home/ubuntu# lspci -n -s 02:00.0
02:00.0 0200: 14e4:165b (rev 10)
root@ubuntu:/home/ubuntu#


on the machine being used for compiling,

user@user-desktop:~/ipxe/src$ make
===========================================================

To create a bootable floppy, type
    cat bin/ipxe.dsk > /dev/fd0
where /dev/fd0 is your floppy drive.  This will erase any
data already on the disk.

To create a bootable USB key, type
    cat bin/ipxe.usb > /dev/sdX
where /dev/sdX is your USB key, and is *not* a real hard
disk on your system.  This will erase any data already on
the USB key.

To create a bootable CD-ROM, burn the ISO image
bin/ipxe.iso to a blank CD-ROM.

These images contain drivers for all supported cards.  You
can build more customised images, and ROM images, using
    make bin/<rom-name>.<output-format>

===========================================================
user@user-desktop:~/ipxe/src$ make bin/14e4165b.rom
  [LD] bin/14e4165b.rom.tmp
arch/i386/scripts/i386.lds:1: undefined symbol `obj_14e4165b' referenced in expression
make: *** [bin/14e4165b.rom.tmp] Error 1
user@user-desktop:~/ipxe/src$


Any help would be most welcome.

Regards,

R Wink
Find all posts by this user
Quote this message in a reply
2012-02-03, 15:40
Post: #2
RE: make error when building rom
From what I can see in src/drivers/net/tg3.c, line 3399, a very similar device seems to be supported. You can try to add a line for your specific PCI ID to that file and try to compile the bin/tg3.rom file.

If the tg3 driver doesn't work, you can try to do the same with the bnx2 driver.

In fact, showing the full output from lspci for this particular device in Linux should show you whether it is using the tg3 or bnx2 driver. iPXE uses the same name of drivers as Linux. Once you've added your PCI ID to the appropriate file you can try it out from a CD or USB stick. I would suggest waiting burning it into firmware until you know it works reasonably fast.

If no native driver exist for your card (that actually works) you can use the undionly.kpxe target together with chainloading. See the chainloading article on the main website for details on how.

If you have C skills you can try to look more closely at the init phase in the Linux kernel and see if you can adapt the correct driver in ipxe to initialize the card correctly.
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-02-03, 16:25
Post: #3
RE: make error when building rom
Thanks, I have a test rig with the same hardware here at home. I'll give it a go this weekend and post the results.

R
Find all posts by this user
Quote this message in a reply
2012-02-04, 20:52 (This post was last modified: 2012-02-04 21:50 by AnRkey.)
Post: #4
RE: make error when building rom
(2012-02-03 15:40)robinsmidsrod Wrote:  From what I can see in src/drivers/net/tg3.c, line 3399, a very similar device seems to be supported. You can try to add a line for your specific PCI ID to that file and try to compile the bin/tg3.rom file.

If the tg3 driver doesn't work, you can try to do the same with the bnx2 driver.

In fact, showing the full output from lspci for this particular device in Linux should show you whether it is using the tg3 or bnx2 driver. iPXE uses the same name of drivers as Linux. Once you've added your PCI ID to the appropriate file you can try it out from a CD or USB stick. I would suggest waiting burning it into firmware until you know it works reasonably fast.

If no native driver exist for your card (that actually works) you can use the undionly.kpxe target together with chainloading. See the chainloading article on the main website for details on how.

If you have C skills you can try to look more closely at the init phase in the Linux kernel and see if you can adapt the correct driver in ipxe to initialize the card correctly.

You're correct, the tg3 driver is being used in Ubuntu 10.04.3.

Code:
2:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe (rev 10)
    Kernel driver in use: tg3
    Kernel modules: tg3

I'm giving it a go now, I'll update with the results shortly.

src/drivers/net/tg3.c does not exist. I found src/drivers/net/tg3/tg3.c but that only has 1000 or so lines. I've edited it anyway, giving it a go now.
ubuntu@ubuntu:~/ipxe/src$ make bin/14e4165b.rom
[RULES] drivers/net/tg3/tg3.c
[DEPS] drivers/net/tg3/tg3.c
[BUILD] bin/tg3.o
[AR] bin/blib.a
ar: creating bin/blib.a
[LD] bin/14e4165b.rom.tmp
[BIN] bin/14e4165b.rom.bin
[ZINFO] bin/14e4165b.rom.zinfo
[ZBIN] bin/14e4165b.rom.zbin
[FINISH] bin/14e4165b.rom
rm bin/14e4165b.rom.zinfo bin/14e4165b.rom.bin bin/14e4165b.rom.zbin
ubuntu@ubuntu:~/ipxe/src$

That was quick, it seems to have compiled. Going to burn it to the rom in a moment.
Damn Sad

I emailed you the screenshot of the error.
Find all posts by this user
Quote this message in a reply
2012-02-05, 16:29
Post: #5
RE: make error when building rom
As far as I can tell, the new tg3 driver that was added to the git repository on Mon Jan 30 23:10:52 2012 is supposed to support your PCI ID already. No edits should be necessary. If it indeed does not work then you've found a bug, and you should report it to the mailinglist.

I would urge you to build the tg3.iso, tg3.usb or tg3.pxe make target while testing things out, and if you get that to work I would then go forward and try to flash it into the firmware of the card. Until you have an externally-loaded working driver I would keep the latest Broadcom PXE ROM in the firmware.

If you're using ISC dhcpd it is fairly simple to create a simple config that chainloads tg3.pxe for this particular host and force use of the native iPXE driver.
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-02-05, 17:48
Post: #6
RE: make error when building rom
Cool, I'll give it a go later tonight and report back.
Find all posts by this user
Quote this message in a reply
2012-02-06, 10:30
Post: #7
RE: make error when building rom
can you fix the forum upload function? I think it's a permissions issue on the temp upload dir.

I have screenshots and notes to upload.
Find all posts by this user
Quote this message in a reply
2012-02-06, 11:08
Post: #8
RE: make error when building rom
You need to talk to mcb30 about that issue. I don't have access to the server shell.
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-02-06, 11:22 (This post was last modified: 2012-02-06 11:23 by AnRkey.)
Post: #9
RE: make error when building rom
bin/ipxe.usb is working now. It's just the bin/14e4165b.rom that's not burn'able to the NIC pxe chip.

I've opted to boot from bin/ipxe.usb instead of an ISO or chain loading.

I'll report the rom issue to the devs a bit later.

Thanks, Robin!
(2012-02-06 11:08)robinsmidsrod Wrote:  You need to talk to mcb30 about that issue. I don't have access to the server shell.

I'll msg him later too. Thanks again!
Find all posts by this user
Quote this message in a reply
2012-02-06, 13:21
Post: #10
RE: make error when building rom
The romburning software might require a file that is exactly X number of bytes to work. You can usually make this happen by padding the file with NULL bytes. If you look at the rom files downloadable from Broadcom, maybe they are all the same size. Try to pad the ipxe rom file null bytes until you reach the same size. I believe there is a tutorial on how to do this on the main ipxe site, or possibly buried somewhere on the old etherboot wiki.
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-02-06, 13:58 (This post was last modified: 2012-02-06 14:43 by AnRkey.)
Post: #11
RE: make error when building rom
(2012-02-06 13:21)robinsmidsrod Wrote:  The romburning software might require a file that is exactly X number of bytes to work. You can usually make this happen by padding the file with NULL bytes. If you look at the rom files downloadable from Broadcom, maybe they are all the same size. Try to pad the ipxe rom file null bytes until you reach the same size. I believe there is a tutorial on how to do this on the main ipxe site, or possibly buried somewhere on the old etherboot wiki.

Do you have any more info on this procedure? I can't find it with a google search.
Find all posts by this user
Quote this message in a reply
2012-02-10, 16:16
Post: #12
RE: make error when building rom
(2012-02-06 13:58)AnRkey Wrote:  
(2012-02-06 13:21)robinsmidsrod Wrote:  The romburning software might require a file that is exactly X number of bytes to work. You can usually make this happen by padding the file with NULL bytes. If you look at the rom files downloadable from Broadcom, maybe they are all the same size. Try to pad the ipxe rom file null bytes until you reach the same size. I believe there is a tutorial on how to do this on the main ipxe site, or possibly buried somewhere on the old etherboot wiki.

Do you have any more info on this procedure? I can't find it with a google search.

I believe the padimg.pl script included in the ipxe codebase should help you out. See http://comments.gmane.org/gmane.network.ipxe.devel/365 for details.
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-02-28, 15:08
Post: #13
RE: make error when building rom
(2012-02-10 16:16)robinsmidsrod Wrote:  
(2012-02-06 13:58)AnRkey Wrote:  
(2012-02-06 13:21)robinsmidsrod Wrote:  The romburning software might require a file that is exactly X number of bytes to work. You can usually make this happen by padding the file with NULL bytes. If you look at the rom files downloadable from Broadcom, maybe they are all the same size. Try to pad the ipxe rom file null bytes until you reach the same size. I believe there is a tutorial on how to do this on the main ipxe site, or possibly buried somewhere on the old etherboot wiki.

Do you have any more info on this procedure? I can't find it with a google search.

I believe the padimg.pl script included in the ipxe codebase should help you out. See http://comments.gmane.org/gmane.network.ipxe.devel/365 for details.

I decided that this was starting to take up waaaay to much time so I switched to the Intel cards. Wow, what a difference. Everything just worked first time.

I can't figure out how to mount my freenas extent, but that's another thread for when I've lost the very last hair.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)