[MinnowBoard] about system update

Дмитрий Оботуров oboturoff at gmail.com
Wed May 20 12:49:20 UTC 2015


There is a very simple answer to my question. It's a pity that I spent a lot
of time to find the answer to his question.

The solution:

1. we get the variable BootXXXX:
*EfiVar = BdsLibGetVariableAndSize (
L"Boot0001",
&gEfiGlobalVariableGuid,
&EfiVarSize
);*

2. we apply the following function:

*EFI_DEVICE_PATH * EfiVarToDevicePath(UINT16 *EfiVar) {
char *p = (char *) EfiVar;

return (EFI_DEVICE_PATH *)
(p + sizeof(UINT32) /* Attributes */
+ sizeof(UINT16) /* FilePathListLength*/
+ StrSize ((CHAR16*)(p + sizeof(UINT32) + sizeof(UINT16)))); /* Description
*/
}

EFI_DEVICE_PATH_PROTOCOL *DevicePath;
DevicePath = EfiVarToDevicePath(EfiVar)*

3.  we print the device path

*CHAR16 *TempStr;
TempStr = ConvertDevicePathToText(DevicePath, TRUE, FALSE);
Print(L"%a: %d String=%S\n", __func__, __LINE__,TempStr);*



--
View this message in context: http://minnowboard.57273.x6.nabble.com/MinnowBoard-about-system-update-tp1322p1542.html
Sent from the MinnowBoard mailing list archive at Nabble.com.


More information about the elinux-MinnowBoard mailing list