Skip to content

Conversation

@chp-io
Copy link
Contributor

@chp-io chp-io commented Apr 19, 2021

This PR implements a mechanism to read settings from a config file, in addition to the EFI arguments.

  • By default the config file is read from EFI\Boot\bareflank.cfg but it can be changed at compile time with EFI_CONFIG_FILE_PATH
  • Read arguments from bareflank.cfg if the file exists and if none were given from the shell cmdline (i.e. argv/argc)
  • Ignore lines starting with # and whitespaces. Use the same format as with the command line, e.g. --enable-xue to build argv / argc
  • Add an option to passthrough all PCIe devices of a certain class, e.g. --pci-pt-class 2 for network, and don't passthrough by default.
  • Add an option to passthrough explicitly a PCIe device, e.g. --pci-pt <bdf>

chp-io added 6 commits April 19, 2021 14:50
- Fix the bfdriver common code that uses BF{INFO,DEBUG,ALERT,ERROR} to
print ASCII messages from EFI

- Use our API instead of Print directly for EFI specific code
If no args are given to bareflank.efi directly, they will be read from
`EFI\bareflank\bareflank.cfg`.

Lines starting with `#` are comments.
Newlines and tabs are supported.
Currently, only network devices (class 2) are supported.
Instead of passthrough by default, we now need to specify the
`--pci-pt-class 2` argument.
@chp-io chp-io changed the title efi: Add config file support and don't passthrough by default [mono] efi: Add config file support and don't passthrough by default Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant