Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipxe: enable parallel building; allow embed script #34935

Merged
merged 1 commit into from Feb 17, 2018

Conversation

lheckemann
Copy link
Member

Motivation for this change

Faster builds, and support for embedded scripts.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build ipxe

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

error: while evaluating ‘callPackageWith’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/pkgs/top-level/all-packages.nix:2931:10:
while evaluating ‘makeOverridable’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/customisation.nix:117:8:
undefined variable ‘lib’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/pkgs/tools/misc/ipxe/default.nix:29:10

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

error: while evaluating 'callPackageWith' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/top-level/all-packages.nix:2931:10:
while evaluating 'makeOverridable' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix:117:8:
undefined variable 'lib' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/tools/misc/ipxe/default.nix:29:10

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

error: while evaluating 'callPackageWith' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:113:35, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix:2931:10:
while evaluating 'makeOverridable' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:72:24, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:117:8:
undefined variable 'lib' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/tools/misc/ipxe/default.nix:29:10

@grahamc
Copy link
Member

grahamc commented Feb 13, 2018

What does an embedded script do?

@lheckemann
Copy link
Member Author

It's an iPXE script which is embedded into the iPXE binary. This is useful for chainloading iPXE from stock PXE firmware without ending up in a boot loop.

@grahamc
Copy link
Member

grahamc commented Feb 13, 2018

Is this something like embedding

  if exists user-class and option user-class = "iPXE" {
      filename "http://my.web.server/real_boot_script.php";
  } else {
      filename "undionly.kpxe";
  }

but inside ipxe, instead of the dhcp server?

@lheckemann
Copy link
Member Author

Yep, pretty much. It also allows making boot ROMs that do not require a DHCP server at all.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘syslinux-2015-11-09’ in /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/pkgs/os-specific/linux/syslinux/default.nix:57 is not supported on ‘aarch64-linux’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘cdrkit-1.1.11’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/tools/cd-dvd/cdrkit/default.nix:27 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)


===========================================================
rm bin/10ec8139.rom.zinfo bin/1af41000.rom.zbin bin/version.ipxe.dsk.o bin/1af41000.rom.bin bin/ipxe.pxe.zinfo bin/ipxe.lkrn.zbin bin/ipxe.dsk.zinfo bin/version.undionly.kpxe.o bin/rtl8139.rom.zinfo bin/15ad07b0.rom.zbin bin/8086100f.mrom.zbin bin/rtl8139.rom.bin bin/version.1af41000.rom.o bin/808610d3.mrom.zbin bin/ipxe.hd.zbin bin/undionly.kpxe.zinfo bin/ipxe.hd.bin bin/10500940.rom.bin bin/80861209.rom.zbin bin/8086100f.mrom.zinfo bin/version.10500940.rom.o bin/8086100e.mrom.zbin bin/10ec8139.rom.bin bin/version.ipxe.hd.o bin/15ad07b0.rom.bin bin/version.15ad07b0.rom.o bin/808610d3.mrom.bin bin/ipxe.hd bin/version.808610d3.mrom.o bin/8086100e.mrom.zinfo bin/ipxe.hd.zinfo bin/ipxe.dsk.zbin bin/version.ipxe.pxe.o bin/8086100f.mrom.bin bin/rtl8139.rom.zbin bin/1af41000.rom.zinfo bin/8086100e.mrom.bin bin/10ec8139.rom.zbin bin/15ad07b0.rom.zinfo bin/version.10ec8139.rom.o bin/ipxe.pxe.zbin bin/version.10222000.rom.o bin/version.ipxe.lkrn.o bin/ipxe.pxe.bin bin/ipxe.lkrn.bin bin/undionly.kpxe.bin bin/ipxe.dsk.bin bin/version.8086100e.mrom.o bin/10222000.rom.bin bin/version.80861209.rom.o bin/10222000.rom.zbin bin/10222000.rom.zinfo bin/80861209.rom.zinfo bin/808610d3.mrom.zinfo bin/ipxe.lkrn.zinfo bin/10500940.rom.zbin bin/80861209.rom.bin bin/version.8086100f.mrom.o bin/10500940.rom.zinfo bin/undionly.kpxe.zbin bin/version.rtl8139.rom.o
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/g52gh0ah9jnscg3kpvp53v35zqg6qw4x-ipxe-20170922-74d90b3
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/g52gh0ah9jnscg3kpvp53v35zqg6qw4x-ipxe-20170922-74d90b3
checking for references to /tmp/nix-build-ipxe-20170922-74d90b3.drv-0 in /nix/store/g52gh0ah9jnscg3kpvp53v35zqg6qw4x-ipxe-20170922-74d90b3...
/nix/store/g52gh0ah9jnscg3kpvp53v35zqg6qw4x-ipxe-20170922-74d90b3

@lheckemann
Copy link
Member Author

@ehmry ?

@joachifm joachifm merged commit 90d34e7 into NixOS:master Feb 17, 2018
@lheckemann lheckemann deleted the ipxe-embed branch February 17, 2018 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants