Re: Can I have 2 script within a single binary?
Stefan Hajnoczi <[email protected]> Tue, 20 Oct 2009 12:47:18 +0100
| Newsgroups | gmane.network.etherboot.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Oct 19, 2009 at 4:17 PM, sobtwmxt <[email protected]> wrote: > Am I right that issuing > > make EMBEDDED_IMAGE=../contrib/scripts/static.gpxe > > and > > make EMBEDDED_IMAGE=../contrib/scripts/gpxelinux.gpxe > > in a row will produce 2 lkrns that are mostly the same? This will build two separate lkrn files, overwriting the first with the second unless you copy it out of the way. > Can I make > a single lkrn or image or something? If I can make a single binary, > can I also choose at run time, interactively, wheather to run > static or gpxelinux? You can use commas to separate filenames for the EMBEDDED_IMAGE option: make EMBEDDED_IMAGE=static.gpxe,dynamic.gpxe The first embedded image will be executed when gPXE starts. There is currently no user input command so you cannot prompt the user which script to boot. Working with multiple images can be tricky because the Linux kernel initrd and multiboot module loading will try to use any known image as an initrd/module. The way to solve this is to use imgfree <unused image name> before booting the Linux or multiboot kernel so unused scripts will not be considered part of the initrd/module. Bottom line: achieving what you describe is possible with some workarounds and knowledge of internals, but in the long run there needs to be a better solution. Stefan ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference