confidential-containers / td-shim

Confidential Containers Shim Firmware
Other
97 stars 53 forks source link

introduce xtask to build td-shim image #540

Closed gaojiaqi7 closed 1 year ago

gaojiaqi7 commented 1 year ago

Fix: https://github.com/confidential-containers/td-shim/issues/528

gaojiaqi7 commented 1 year ago

Run cargo image --help

Usage: xtask image [OPTIONS]

Options:
      --release
          Build artifacts in release mode, with optimizations and without log messages

  -t, --payload-type <PAYLOAD_TYPE>
          Type of payload to be launched by td-shim

          Possible values:
          - linux:      Payload Binary is bzImage or vmlinux, follow Linux boot protocol
          - executable: Payload Binary is a PE/COFF or ELF executable image as payload

  -o, --output <OUTPUT>
          Path of the output td-shim image file

      --no-default-features
          Disable the `default` features of td-shim crate, this flag will be set automatically when the payload type is executable

      --features <FEATURES>
          List of features to activate separated by comma

  -m, --metadata <METADATA>
          Path of customized metadata configuration file

  -l, --layout <LAYOUT>
          Path of customized layout configuration file, the layout source file of the payload type specified by `payload-type` will be overwritten

  -p, --payload <PAYLOAD>
          Package the payload binary into td-shim image

      --example-payload
          Package the example payload binary into td-shim image, payload-type will be set to executable

      --enroll-file <ENROLL_FILE>
          <Guid>,<FilePath> Enroll raw files into into CFV of td-shim image

      --enroll-key <ENROLL_KEY>
          <Guid>,<FilePath> Enroll public key file into CFV of td-shim image

  -h, --help
          Print help (see a summary with '-h')