Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about building iPXE with named configuration
2018-08-16, 20:01 (This post was last modified: 2018-08-16 21:40 by NiKiZe.)
Post: #4
RE: Question about building iPXE with named configuration
(2018-08-16 19:19)pxe_curious Wrote:  Does the content of the local file supersede the content of the other files?
Or does the file itself supersede?
I.e. should I make a copy of the whole file from src/config and edit that or create a new file that only includes the specific lines I want changed?
What I am understanding is to copy the files and make changes to them in the local folder. Just want to confirm I have this right.
Your local file is loaded after the general one, just as described on the named_configs page, you can also read the includes in the existing files.
I would recommend to only add what you need in your local/*.h
For example if the only thing I want to change is to have HTTPS enabled then my local/general.h would only have
Code:
#define     DOWNLOAD_PROTO_HTTPS
and nothing else

(2018-08-16 19:19)pxe_curious Wrote:  For both PCBIOS and EFI I edit the console.h file and uncomment the #define CONSOLE_FRAMEBUFFER line so that I can use the console command.
So that goes into config/local/general.h regardless since it is common for your builds.

(2018-08-16 19:19)pxe_curious Wrote:  In the general.h file I have been making the following changes:
- change #undef DOWNLOAD_PROTO_NFS to #define DOWNLOAD_PROTO_NFS, in case we want to use NFS
- comment out #define HTTP_AUTH_BASIC and #define HTTP_AUTH_DIGEST, we are not using that currently
- comment out #define CRYPTO_80211_* since we are not using wireless
- PCBIOS only: uncomment IMAGE_COMBOOT line, we want to be able to use COMBOOT modules
- comment out interface management commands for wireless, Infiniband and fiber channel
- uncomment the NSLOOKUP_CMD line
- PCBIOS only: uncomment the PXE_CMD line
- uncomment PING_CMD
- uncomment CONSOLE_CMD

For EFI, the PXE_CMD and IMAGE_COMBOOT lines won't work. That's why I think I need two separate versions of general.h.

DOWNLOAD_PROTO_NFS works for both, don't enable until you need to use it, and it is seemed as insecure so not allowed for signed EFI binaries. (which is one reason to avoid it for now)
HTTP_AUTH_* Do you need to disable them for any particular reason?
No wireless devices is pulled in by unidonly or snponly builds - so no need to disable any of that since it isn't included anyway.
If you are using Comboot.. then that needs some special handling.
Again, are commands in the way and causing you issues?
What are you using PXE_CMD for (which is the undocumented "startpxe" and "stoppxe")?
PING and CONSOLE, yup nice to have, common for both EFI and PCBIOS so goes into common one.

The reason for not changing anything unless you "have to" is that you might break something. So again only change a setting if you get errors without changing it.

After this I think you end up with only needing special case for COMBOOT
one way to do this is to use something like
Code:
#ifdef CONSOLE_PCBIOS
#define IMAGE_COMBOOT
#endif
this works via defaults.h which is pulled in by most configs, which in turn pulls in defaults/{_platform}.h
and since our local/*.h files are pulled in after anything else and can override those settings, we can also use those settings to define different behavior.

By checking the last 6 or so lines of general.h you can see how the order of includes are generally done.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Question about building iPXE with named configuration - NiKiZe - 2018-08-16 20:01



User(s) browsing this thread: 2 Guest(s)