[Bochs] PXE TFTP Issues
Posted: Mon Oct 05, 2015 7:05 pm
So after several days of trying to get a working environment for PXE, and testing with known working Ubuntu Installer, I have ran into a road block (with Bochs).
On Bochs I get the following output:
Now on real hardware, this works flawlessly.
Here are parts of the code that I am currently working on:Here is my Bochs Config (part):And Also TriedCouln't find a bootrom for pcipnic - so did not test it.
My HW tests have been on 4 completely different computers (no similar HW at all... each with different NICs...)
And my research tells me PXE-E06 = Option ROM requires DDIM support or PXENV_STATUS_OUT_OF_RESOURCES.
Any suggestions on how to get Bochs working with PXE and TFTP? As it will not even boot ubuntu installer after the boot menu.
If it helps Bochs Setup:
NOTE: If you read this before I edited the timeout was caused by port number being littleendian not bigendian, but the issue still remains Bochs will not use TFTP after bootfile.
On Bochs I get the following output:
Code: Select all
Booting from Network [iPXE]...
iPXE starting execution...ok
iPXE initialising devices...ok
iPXE v1.0.0-591-g7aee315
iPXE 1.0.0+ -- Open Source Network Boot Firmware -- http://ipxe.org
Features: HTTP iSCSI DNS TFTP AoE bzImage COMBOOT ELF MBOOT PXE PXEXT
net0: b0:c4:20:00:00:00 using E1000_DEV_ID_82540EM on PCI00:03.0 (open)
[Link:up, TX:0 TXE:0 RX:0 RXE:0]
DHCP (net0 b0:c4:20:00:00:00)...... ok
net0: 192.168.1.165/255.255.255.0 gw 192.168.1.1
Next server: 192.168.1.1
Filename: pxeloader
tftp://192.168.1.1/pxeloader... ok
Getting PXE INFO....DONE!
Client IP Address 192.168.001.165
Server IP Address 192.168.001.001
Relay IP Address 000.000.000.000
Opening TFTP File: pxeboot.cfg...UNKNOWN ERROR 0x0006.
Here are parts of the code that I am currently working on:
Code: Select all
mov si, BOOTCFG
call TFTP_OPEN
...
PXE_TFTP_OPEN equ 0x0020
...
;ds:si = filename
TFTP_OPEN:
mov eax, DWORD [ServerIP]
mov DWORD [PXENV_TFTP_OPEN_t.SIP], eax
mov eax, DWORD [RelayIP]
mov DWORD [PXENV_TFTP_OPEN_t.GIP], eax
mov di, PXENV_TFTP_OPEN_t.Filename
.SetFileName:
lodsb
test al, al
jz .FNDone
mov BYTE [ds:di], al
inc di
jmp .SetFileName
.FNDone:
mov BYTE [ds:di], 0
mov ax, 69
xchg al, ah
mov WORD [PXENV_TFTP_OPEN_t.Port], ax ; tftp udp port number (BigEndin)
mov WORD [PXENV_TFTP_OPEN_t.PacketSize], 0x1000 ; 4096 byte packets
mov di, PXENV_TFTP_OPEN_t
mov bx, PXE_TFTP_OPEN
call usePXE
test ax, ax
mov ax, WORD [PXENV_TFTP_OPEN_t.Status]
jnz TFTP_ERROR
cld
ret
...
PXENV_TFTP_OPEN_t:
.Status dw 0
.SIP dd 0
.GIP dd 0
.Filename times 128 db 0
.Port dw 0
.PacketSize dw 0
...
usePXE:
push ds
push di
push bx
call far [PXEAPI]
add sp, 6
ret
Code: Select all
pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k
ne2k: enabled=1, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, bootrom="./pxe-ne2k_pci.rom"
Code: Select all
pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=e1000
e1000: enabled=1, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
e1000: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, bootrom="./pxe-e1000.rom"
My HW tests have been on 4 completely different computers (no similar HW at all... each with different NICs...)
And my research tells me PXE-E06 = Option ROM requires DDIM support or PXENV_STATUS_OUT_OF_RESOURCES.
Any suggestions on how to get Bochs working with PXE and TFTP? As it will not even boot ubuntu installer after the boot menu.
If it helps Bochs Setup:
Code: Select all
./configure --enable-smp --enable-cpu-level=6 --enable-all-optimizations --enable-x86-64 --enable-pci --enable-vmx --enable-debugger --enable-disasm --enable-debugger-gui --enable-logging --enable-fpu --enable-3dnow --enable-sb16 --enable-cdrom --enable-x86-debugger --enable-iodebug --enable-plugins --disable-docbook --with-sdl --with-x --with-x11 --with-term --enable-pnic --enable-ne2000 --enable-e1000 --enable-clgd54xx --enable-voodoo --enable-monitor-mwait --enable-avx