[gPXE] interrupt and serial
Stefan Hajnoczi
stefanha at gmail.com
Tue Feb 9 09:04:21 EST 2010
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.
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 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.
> 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.
Stefan
More information about the gPXE
mailing list