Retrieving the first block via PXE

This commit is contained in:
Thomas Oltmann 2025-07-07 02:55:26 +02:00
parent fcdea29944
commit e8e139ddf3
2 changed files with 31 additions and 3 deletions

View file

@ -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
View file

@ -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