Hi Erwan,
I really like the idea of your patch. Of course, the hard coding is
not really reasonable :-) Also, PXE is an x86-ism. What you've
really done is added a mechanism to publish a BOOTP name. We do need
to add a new option too as one may want to use -boot n without
publishing a BOOTP filename.
Using your patch as a basis, I've written three patches. The first
one is the tsize negotiation fix for the TFTP server. The second adds
a -bootp option for specifying the location of the BOOTP image. The
third changes the -tftp option to take root directory. The end
result, is that now you can say:
qemu -hda /tmp/a.img -boot n -tftp ~/tftpboot -bootp /pxelinux.0
And you get the same results without the hard coding. What do you think?