Thanks for replying, please see inline.<div class="gmail_quote"><div class="im"><br><br>On Tue, Feb 9, 2010 at 6:04 AM, Stefan Hajnoczi <span dir="ltr"><<a href="mailto:stefanha@gmail.com" target="_blank">stefanha@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Tue, Feb 9, 2010 at 1:44 PM, Luca <<a href="mailto:lucarx76@gmail.com" target="_blank">lucarx76@gmail.com</a>> wrote:<br>
> I wanted to pass some parameters to gPXE, when it starts. As I do not want<br>
> to rebuild the gPXE image every time with a new script I thought of using<br>
> the serial for that.<br>
<br>
</div>Let's discuss your setup and use case more. Perhaps there is an<br>
existing solution or we can come up with a generic solution that can<br>
be merged into mainline gPXE.<br>
<br></blockquote></div><div>I have an environment with several workstations, which I want to gPXE boot. I have an environment with one DHCP server.<br>When gPXE starts, it gets from the DHCP server the path of the image it should download.<br>
<br>I want gPXE to be sure it's talking to the right server. So I modified a little bit the gPXE TLS code. I assume gPXE has the certificate of the HTTPS server it's going to talk to. During the TLS handshake, when the server sends its certificate, I have gPXE validating it. If the certificate sent by the server is the one gPXE has then gPXE knows it is talking to right server.<br>
<br>I have different HTTPS servers, and I want to be free to add a new one whenever I need. So I do not want to have this certificate compiled into gPXE. That's why when gPXE starts I want gPXE to talk to a serial server and get the certificate of the HTTPS is going to talk to.<br>
<br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What are the constraints of your setup? Do you have a DHCP server?<br>
Can you set the boot filename handed out by the DHCP server?<br>
<div><br></div></blockquote></div><div><br>The communication between the serial server and gPXE is secure, while
the communication between gPXE and the DHCP is over an open channel.
That's why I do not want to pass this information to gPXE as a DHCP
option.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
> The reason is that in GPXE I can't use interrupts, so I keep polling the<br>
> serial for new data. Because of the polling, my gPXE serial code sometimes<br>
> looses some characters sent from the serial server (it is not fast enough to<br>
> read all characters sent by the server).<br>
<br>
</div>When gPXE starts it could send a 'hello' message over the serial port<br>
and wait for a response. The server would respond with the<br>
configuration. I don't think there is a technical limitation<br>
preventing one from implementing this config-over-serial approach.<br>
<div><br></div></blockquote></div><div><br>That's what I'm doing right now. The problem I have is that as I use polling, sometimes I looses characters sent by the server (I do very few operations when I get a character, but still sometimes I miss some characters). This would not happen if I used interrupts.<br>
</div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
> I think it isn't possible to use interrupt in gPXE, am I wrong?<br>
<br>
</div>gPXE does not use interrupts internally.<br>
<div><br>
> What about if I create a small embedded linux which can use the serial to<br>
> talk to the serial server and gets the parameters it needs and then pass<br>
> those back to gPXE?<br>
> In other words, gPXE starts and loads an external program (my embedded<br>
> linux), which returns to gPXE after talking with the serial server? Would<br>
> that be possible?<br>
<br>
</div>Once Linux is started, gPXE is no longer resident. If you look at<br>
arch/i386/image/bzimage.c, gPXE shuts itself down before transferring<br>
control to the Linux kernel. Linux is then free to reuse the memory<br>
area that held gPXE.<br>
<font color="#888888"><br></font></blockquote></div><div><br>Ok.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888">
Stefan<br>
</font></blockquote></div><br>
</div><br>