Retrieving the first block via PXE
This commit is contained in:
parent
fcdea29944
commit
e8e139ddf3
2 changed files with 31 additions and 3 deletions
11
fernlader.ld
11
fernlader.ld
|
|
@ -1,7 +1,12 @@
|
|||
PHDRS {
|
||||
all PT_LOAD;
|
||||
}
|
||||
SECTIONS {
|
||||
.text 0x7C00: {
|
||||
lboot.o(.text*, .data*)
|
||||
loader.o(.text*, .data*, .bss*)
|
||||
}
|
||||
lboot.o(.text)
|
||||
*(.text)
|
||||
*(.data)
|
||||
*(.bss, COMMON)
|
||||
} :all
|
||||
memmap = ALIGN(8);
|
||||
}
|
||||
|
|
|
|||
23
lboot.S
23
lboot.S
|
|
@ -286,6 +286,29 @@ read_file:
|
|||
pxe_call PXE_TFTP_OPEN
|
||||
add $14+128, %sp
|
||||
|
||||
|
||||
|
||||
.set PXE_TFTP_READ, 0x0022
|
||||
push %cs
|
||||
push $tx_buf
|
||||
push $0
|
||||
push $0
|
||||
push $0
|
||||
pxe_call PXE_TFTP_READ
|
||||
add $10, %sp
|
||||
|
||||
|
||||
|
||||
.set PXE_TFTP_CLOSE, 0x0021
|
||||
push $0
|
||||
pxe_call PXE_TFTP_CLOSE
|
||||
add $2, %sp
|
||||
|
||||
|
||||
|
||||
mov $tx_buf, %si
|
||||
call print
|
||||
|
||||
ret
|
||||
|
||||
// print: print NUL-terminated string pointed to by SI
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue