Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ipxe.efi with embedded scirpt hangs, precompiled ipxe.iso works, compilation errors
2017-02-22, 11:55 (This post was last modified: 2017-02-23 09:28 by kmwil.)
Post: #1
ipxe.efi with embedded scirpt hangs, precompiled ipxe.iso works, compilation errors
Hello,

I installed rEFInd on iMac (I believe it is Late 2013 or newer, Model A1419, EMC 2639) and compiled/embed my script to boot the specific Linux kernel. This setup worked fine until we had to upgrade to OS X Sierra. Now, something is wrong. Previously compiled ipxe.efi don't work anymore.

The Ethernet card is net0: BCM 57766, so the driver should be tg3.

To solve this issue i downloaded newest ipxe from git, compiled it and embed
a script.

Code:
#!ipxe                                                                          
                                                                                
ifconf --configurator dhcp net0                                                
kernel /blah/vmlinuz-lk net.ifnames=0 biosdevname=0 root=/dev/nfs ip=dhcp  
boot

Effect: everything hangs after selecting ipxe.efi from rEFInd.

When I embed shell script:

Code:
#!ipxe
shell

I get the shell. When I type something interface related (like dhcp or ifconf shell hangs). ifstat works fine.

And now: when I use precompiled ipxe.iso from your site it works fine. Card is up and running.

So I compiled the shell with tg3 DEBUG flags:
Code:
make bin-x86_64-efi/tg3.efi EMBED=shell.ipxe DEBUG=tg3:3,tg3_hw:3,tg3_phy:3

Effects:
Code:
Link is down
allocated iob_buffer for descriptor 0
...
allocated iob_buffer for descriptor 7

And here hangs...

Also, I cannot compile with all flags: I get errors like this:
Code:
[LD] bin-x86_64-efi/tg3.efi.tmp
bin-x86_64-efi/blib.a(librm.o): In function `pm_esp':
(.data.pm_esp+0x0): relocation truncated to fit: R_X86_64_32 against symbol `_estack' defined in .stack section in bin-x86_64-efi/blib.a(stack.o)
bin-x86_64-efi/blib.a(librm.o): In function `real_to_prot':
(.text16.real_to_prot+0x8): relocation truncated to fit: R_X86_64_16 against symbol `rm_ds' defined in .text16.data.rm_ds section in bin-x86_64-efi/blib.a(librm.o)
bin-x86_64-efi/blib.a(librm.o): In function `real_to_prot':
(.text16.real_to_prot+0x22): relocation truncated to fit: R_X86_64_16 against `.bss16.rm_virt_addrs'
bin-x86_64-efi/blib.a(librm.o): In function `real_to_prot':
(.text16.real_to_prot+0x2e): relocation truncated to fit: R_X86_64_16 against `.bss16.rm_virt_addrs'
bin-x86_64-efi/blib.a(librm.o): In function `real_to_prot':
(.text16.real_to_prot+0x33): relocation truncated to fit: R_X86_64_16 against `.bss16.rm_virt_addrs'
bin-x86_64-efi/blib.a(librm.o): In function `real_to_prot':
(.text16.real_to_prot+0x39): relocation truncated to fit: R_X86_64_16 against `.data16.gdt'
bin-x86_64-efi/blib.a(librm.o): In function `real_to_prot':
(.text16.real_to_prot+0x58): relocation truncated to fit: R_X86_64_32 against `.text.real_to_prot'
bin-x86_64-efi/blib.a(librm.o): In function `r2p_pmode':
(.text.real_to_prot+0x10): relocation truncated to fit: R_X86_64_32 against `.data.pm_esp'
bin-x86_64-efi/blib.a(librm.o): In function `r2p_pmode':
(.text.real_to_prot+0x17): relocation truncated to fit: R_X86_64_32 against symbol `idtr32' defined in .data.idtr32 section in bin-x86_64-efi/blib.a(librm_mgmt.o)
bin-x86_64-efi/blib.a(librm.o): In function `r2p_pmode':
(.text.real_to_prot+0x1f): relocation truncated to fit: R_X86_64_32 against symbol `rm_sp' defined in .bss.rm_ss_sp section in bin-x86_64-efi/blib.a(librm.o)
bin-x86_64-efi/blib.a(librm.o): In function `prot_to_real':
(.text.prot_to_real+0x2): additional relocation overflows omitted from the output
bin-x86_64-efi/blib.a(hidemem.o): In function `hide_region':
/nonraid/ipxe/ipxe_git/ipxe/src/arch/x86/interface/pcbios/hidemem.c:97: undefined reference to `_textdata'
/nonraid/ipxe/ipxe_git/ipxe/src/arch/x86/interface/pcbios/hidemem.c:98: undefined reference to `_etextdata'
bin-x86_64-efi/blib.a(hidemem.o): In function `hide_etherboot':
/nonraid/ipxe/ipxe_git/ipxe/src/arch/x86/interface/pcbios/hidemem.c:158: undefined reference to `_textdata'
/nonraid/ipxe/ipxe_git/ipxe/src/arch/x86/interface/pcbios/hidemem.c:171: undefined reference to `_text16_memsz'
/nonraid/ipxe/ipxe_git/ipxe/src/arch/x86/interface/pcbios/hidemem.c:172: undefined reference to `_data16_mem

Best Regards
Kamil
Find all posts by this user
Quote this message in a reply
2017-07-23, 15:09 (This post was last modified: 2017-07-23 15:11 by SebastianRoth.)
Post: #2
RE: ipxe.efi with embedded scirpt hangs, precompiled ipxe.iso works, compilation errors
Hello Kamil,

might this be related you think?

(2017-02-22 11:55)kmwil Wrote:  Also, I cannot compile with all flags: I get errors like this:
Code:
[LD] bin-x86_64-efi/tg3.efi.tmp
bin-x86_64-efi/blib.a(librm.o): In function `pm_esp':
(.data.pm_esp+0x0): relocation truncated to fit: R_X86_64_32 against symbol `_estack' defined in .stack section in bin-x86_64-efi/blib.a(stack.o)
...

What do you mean by "all flags". I am able to compile using the make line you posted without an issue (make bin-x86_64-efi/tg3.efi EMBED=shell.ipxe DEBUG=tg3:3,tg3_hw:3,tg3_phy:3).

Sebastian
Find all posts by this user
Quote this message in a reply
Post Reply 




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