[gPXE] Fwd: interrupt and serial
Luca
lucarx76 at gmail.com
Tue Feb 9 09:22:45 EST 2010
Thanks for replying, please see inline.
On Tue, Feb 9, 2010 at 6:04 AM, Stefan Hajnoczi <stefanha at gmail.com> wrote:
> On Tue, Feb 9, 2010 at 1:44 PM, Luca <lucarx76 at gmail.com> wrote:
> > I wanted to pass some parameters to gPXE, when it starts. As I do not
> want
> > to rebuild the gPXE image every time with a new script I thought of using
> > the serial for that.
>
> Let's discuss your setup and use case more. Perhaps there is an
> existing solution or we can come up with a generic solution that can
> be merged into mainline gPXE.
>
> I have an environment with several workstations, which I want to gPXE boot.
I have an environment with one DHCP server.
When gPXE starts, it gets from the DHCP server the path of the image it
should download.
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.
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.
> What are the constraints of your setup? Do you have a DHCP server?
> Can you set the boot filename handed out by the DHCP server?
>
>
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.
> > The reason is that in GPXE I can't use interrupts, so I keep polling the
> > serial for new data. Because of the polling, my gPXE serial code
> sometimes
> > looses some characters sent from the serial server (it is not fast enough
> to
> > read all characters sent by the server).
>
> When gPXE starts it could send a 'hello' message over the serial port
> and wait for a response. The server would respond with the
> configuration. I don't think there is a technical limitation
> preventing one from implementing this config-over-serial approach.
>
>
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.
> > I think it isn't possible to use interrupt in gPXE, am I wrong?
>
> gPXE does not use interrupts internally.
>
> > What about if I create a small embedded linux which can use the serial to
> > talk to the serial server and gets the parameters it needs and then pass
> > those back to gPXE?
> > In other words, gPXE starts and loads an external program (my embedded
> > linux), which returns to gPXE after talking with the serial server? Would
> > that be possible?
>
> Once Linux is started, gPXE is no longer resident. If you look at
> arch/i386/image/bzimage.c, gPXE shuts itself down before transferring
> control to the Linux kernel. Linux is then free to reuse the memory
> area that held gPXE.
>
>
Ok.
> Stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe/attachments/20100209/f1a98334/attachment.html
More information about the gPXE
mailing list