class

Bootstrap::EfiAppBuilder

Inherits Bootstrap::CLI < Reference < Object

Build EFI .efi applications from Crystal sources via cross-compilation.

Crystal does not currently expose an *-unknown-efi target triple, so this command intentionally compiles to a Windows COFF object and then links it as an EFI application. This follows the PE/COFF image format used by UEFI.

References:

  • UEFI Specification 2.10, chapter 2 (PE/COFF image requirements).
  • LLVM lld-link docs for /subsystem:efi_application.

Class methods

command_line_override

Return the command name exposed in bq2 --help.

Source
crystal_build_argv(crystal_exe : String, arch : Arch, input : String, object_path : String) : Array(String)

Build the Crystal compiler command line used for cross-compilation.

Source
crystal_target_triple(arch : Arch) : String

Return the Windows triple Crystal can emit COFF objects for.

Source
linker_build_argv(linker_exe : String, object_path : String, output : String, entrypoint : String) : Array(String)

Build the linker command line used to emit the final EFI image.

Source
object_path_for(output : String) : String

Return the intermediate object path for the requested output image.

Source
parse_arch(value : String) : Arch

Return the target architecture parsed from user input.

Source
run(args : Array(String), _command_name : String) : Int32

Dispatch command execution for the busybox-style CLI.

Source
run_with_runner(args : Array(String), stderr : IO = STDERR, &command_runner : Array(String) -> Int32) : Int32

Parse options, compile the Crystal source to COFF, then link an EFI image.

Source
summary

Summarize this command for CLI help output.

Source

Nested types