iPXE discussion forum

Full Version: Docker build environment
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I've created a docker based build envirnment for iPXE. In the past I often had the problem that I've forgotten the requirements to build iPXE.
Of course I can find them in the documentation. But I'm not (re)building iPXE that often so I created a dockerized build environment for iPXE.
It creates a docker image with hopefully all requirements and builds iPXE with make all.

So with only a few commands I can build iPXE without (re)thinking about the build process.

Everything is on github:

Hopefully someone finds that usefull. PRs or Issues welcome.

Kind Regards,
Hopefully it is useful for some.

Remember tho that often different build targets is needed:
* building for efi
* building different drivers
* embed script
* add DEBUG=
Maybe something to consider support for.
I have myself tried to build a iPXE bootable iPXE build environment, but getting everything needed into a small-ish image is not always easy.
Thank you for your comment.

* building for efi:
You're right. I've changed the build command from "make all" to "make everything".

* building different drivers
At the moment I don't understand the need for this but need to read more the documentation for this.

* embed script
You mean embedding in the binary? Like documented here http://ipxe.org/embed#embedding_within_the_ipxe_binary ?
I will consider this. Maybe implement it in a day or two.

* add DEBUG
The log of the last build is saved under ./compile/logs/build.log
Or do you mean something else?
All I'm talking about is how to modify the make cmd line
See http://ipxe.org/appnote/buildtargets for different buildtargets - for example they are need for supporting usb nics with ecm--ncm--axge as one example.
make everything just in most cases just slow without benefit - since you most likely only want one or 2 binaries in the same build

yes EMBED= for scripts

DEBUG= as seen at http://ipxe.org/download#debug_builds

another tip, use make -j4 or even make -j8 for parallel builds which considerably speeds up things.
I've added three environment variables.
One for the build command, one for a path to a script that should be embedded and one for DEBUG objects.
Also make now compiles with -j4 by default. Though you can change it via the environment variable.

The environment variables ENV_EMBEDD and ENV_DEBUG aren't much tested. In theory they should work.
Reference URL's