[syslinux] blocksize and tsize at TFTP transfer
Geert Stappers
stappers at stappers.nl
Sun May 31 10:39:46 PDT 2009
Op 20090531 om 09:17 schreef Philippe Auphelle:
> hpa:
> > However your TFTP service doesn't honor blksize from pxelinux,
> > which seems very odd.
>
> That's what I mentioned before: It only recognizes blksize when it's
> the first option. That's why it does honor that of the PXE firmware,
> and not that from pxelinux: the leading tsize parm prevents it from
> seeing blksize. Talk about a dumb minimalist option parser...
To find out how smart the option parser of the TFTP server is,
have I compiled two versions pxelinux.0
One has 'tsize' after 'blksize'
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 9d9d5b4..192f652 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -2705,13 +2705,13 @@ KeepPXE db 0 ; Should PXE be kept around?
; TFTP commands
;
tftp_tail db 'octet', 0 ; Octet mode
-tsize_str db 'tsize' ,0 ; Request size
-tsize_len equ ($-tsize_str)
- db '0', 0
blksize_str db 'blksize', 0 ; Request large blocks
blksize_len equ ($-blksize_str)
asciidec TFTP_LARGEBLK
db 0
+tsize_str db 'tsize' ,0 ; Request size
+tsize_len equ ($-tsize_str)
+ db '0', 0
tftp_tail_len equ ($-tftp_tail)
alignz 2
The other one has 'tsize' removed
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 9d9d5b4..1b8127e 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -2560,7 +2560,7 @@ writestr_early equ writestr
copyright_str db ' Copyright (C) 1994-'
asciidec YEAR
- db ' H. Peter Anvin et al', CR, LF, 0
+ db ' H. Peter Anvin et al, no tsize', CR, LF, 0
err_bootfailed db CR, LF, 'Boot failed: press a key to retry, or wait for reset...', CR, LF, 0
bailmsg equ err_bootfailed
err_nopxe db "No !PXE or PXENV+ API found; we're dead...", CR, LF, 0
@@ -2705,9 +2705,9 @@ KeepPXE db 0 ; Should PXE be kept around?
; TFTP commands
;
tftp_tail db 'octet', 0 ; Octet mode
-tsize_str db 'tsize' ,0 ; Request size
-tsize_len equ ($-tsize_str)
- db '0', 0
+;NTS tsize_str db 'tsize' ,0 ; Request size
+;NTS tsize_len equ ($-tsize_str)
+;NTS db '0', 0
blksize_str db 'blksize', 0 ; Request large blocks
blksize_len equ ($-blksize_str)
asciidec TFTP_LARGEBLK
@@ -2720,7 +2720,7 @@ tftp_tail_len equ ($-tftp_tail)
; into socket structure)
;
tftp_opt_table:
- dw tsize_str, tsize_len, tftp_filesize
+;NTS dw tsize_str, tsize_len, tftp_filesize
dw blksize_str, blksize_len, tftp_blksize
tftp_opts equ ($-tftp_opt_table)/6
Both are in http://www.stappers.nl/gpm/ff/pxelinuxTsize.tgz
Looking forward to the test results.
Cheers
Geert Stappers
More information about the Syslinux
mailing list