| 
					Embedding a variable upon compile
				 | 
| 
					2015-07-29, 16:07 
				 Post: #1 | |||
| 
 | |||
| Embedding a variable upon compile 
					I'm just curious if it's possible to embed a variable when compiling undionly.kpxe We have a situation where we need multiple serial baud rates - we have the ability specify which version of undionly.kpxe to use for that specific baud rate/machine that netboots, but we need a way to pass through the baud rate to the next installer. Currently we have the ability to alter the version setting (http://ipxe.org/cfg/version) during compile, but we'd rather not use that method. I'm curious if there are any other settings/variables that we can alter the contents of. Thanks! | |||
| 
					2015-07-29, 18:25 
				 Post: #2 | |||
| 
 | |||
| RE: Embedding a variable upon compile (2015-07-29 16:07)nappington Wrote: I'm just curious if it's possible to embed a variable when compiling undionly.kpxe You could use an embedded script such as Code: #!ipxeit will set serialspeed variable and continue to boot. or you can have this in the script based on mac or other options. Use GitHub Discussions VRAM bin | |||
| 
					2015-07-30, 02:29 
(This post was last modified: 2015-07-30 02:29 by nappington.)
				 Post: #3 | |||
| 
 | |||
| RE: Embedding a variable upon compile 
					True that - however, that does require me to have a completely separate script for each serial speed variable and keep each of them up to date if I want to make any changes. I would like to use a single embedded script so I'm wondering if there's any way to set it hardcoded into the binary itself, similar to how I can make changes to the 'version' setting on compilation. | |||
| 
					2015-08-01, 08:00 
				 Post: #4 | |||
| 
 | |||
| RE: Embedding a variable upon compile 
					You can create an setting that returns a separate value that you set on compile time. But I don't see how that is easier than creating a build script.. Code: #!/bin/bashThis will combine a variable and the base script when this buildscript is run. So you will only have one script and the rest is still automatic. adding an embeded script - is the same as setting it in the binary itself - just much easier then any alternative. Use GitHub Discussions VRAM bin | |||
| 
					2015-08-02, 20:05 
				 Post: #5 | |||
| 
 | |||
| RE: Embedding a variable upon compile 
					Thanks for the answer - I wonder if there's an easier way to do it and if there's a way simply pull the baud rate directly from an iPXE shell? e.g. it's already in a variable somewhere that I can echo.
				 | |||
| 
					« Next Oldest | Next Newest »
				 | 
User(s) browsing this thread: 1 Guest(s)

 Search
Search Member List
Member List Calendar
Calendar Help
Help 

 



