搜尋此網誌

2012年9月6日 星期四

EFI Shell2.0 commands -- bcfg(儲存NVRAM中的管理開機與驅動程式選項)

Manages the boot and driver options that are stored in NVRAM.

bcfg driver|boot [dump [-v]] [add # file "desc"] [addp # file "desc"][addh # handle "desc"] [rm #] [mv # #] [-opt # [[filename]|["data"]] | [KeyData ]]

Options:
driver      Display or modify the driver option list.
boot        Display or modify the boot option list.
dump      Display the option list.
-v           Display the option list with extra info including the optional data.
add         Add an option. The # is the number of options to add in hexadecimal. The file name of the UEFI application/driver for the option. The quoted parameter is the description of the option being added.
addh        Add an option that refers to the driver specified by handle. The # is the number of options to add, in hexadecimal. The handle is the driver handle, in hexadecimal. The device path for the option is retrieved from the handle. The quoted parameter is the description of the option being added.
addp        Add an option that refers to a specific file. Only the portion of the device path starting with the hard drive partition is placed in the option. The # is the number of options to add, in hexadecimal. The quoted parameter is the description of the option being added.
rm           Remove an option. The parameter lists the number of the options to remove in hexadecimal.
mv           Move an option. The first numeric parameter is the number of the option to move in hexadecimal. The second numeric parameter is the new number of the option being moved.
-opt         Display/modify the optional data associated with a driver or boot option. Followed either by the file name of the file which contains the binary data to be associated with the driver or boot option optional data or else the quotedelimited data which will be associated with the driver or boot option optional data.
KeyData      The packed value associated with a hot-key. This is the equivalent of the EFI_KEY_DATA value in the UEFI specification.
ScanCode     This is the UEFI-defined Scan code portion of the EFI_INPUT_KEY struction. This value is directly associated with the preceding KeyData value and there may be 1 to 4 entries per the UEFI specification. When one instance of this parameter has a non-zero value, the paired UnicodeChar value will have a zero-based value.
UnicodeChar  This is the Unicode value for the character associated with the preceding KeyData value. There may be 1 to 4 entries per the UEFI specification. When one instance of this parameter has a non-zero value, the paired ScanCode value will have a zero-based value.

Description:
Manages the boot and driver options stored in NVRAM. This command can display the Boot#### or Driver#### environment variables by using the dump option. The add option can be used to add a new Boot#### or Driver#### environment variable. The rm option can be used to delete a Boot#### or Driver#### environment variable, and finally, then mv option can be used to reorder the Boot#### and Driver#### environment variables. The add, rm, and mv options also update the BootOrder or DriverOrder environment variables as appropriate.

Examples:
To display driver options:
Shell> bcfg driver dump
"To display boot options:
Shell> bcfg boot dump
"To display verbosely of boot options:
Shell> bcfg boot dump -v
"To add a driver option #5
Shell> bcfg driver add 5 mydriver.efi "My Driver
"To add a boot option #3
Shell> bcfg boot add 3 osloader.efi "My OS
"To remove boot option #3
Shell> bcfg boot rm 3
"To move boot option #3 to boot option #7
Shell> bcfg boot mv 3 7
"To assign a CTRL-B hot-key to boot option #3.
Shell> bcfg boot -opt 3 0x40000200 0 0x42

Return Value:
  • SHELL_SUCCESS            The action was completed as requested.
  • SHELL_NOT_FOUND          The requested option was not found.
  • SHELL_INVALID_PARAMETER  One of the passed in parameters was incorrectly formatted or its value was out of bounds.
  • SHELL_UNSUPPORTED        The action as requested was unsupported.
  • SHELL_SECURITY_VIOLATION This function was not performed due to a security violation.
  • SHELL_OUT_OF_RESOURCES   There was insufficient free space for the request to be completed.

沒有留言:

張貼留言