前言:
高通平台启动过程简述
PBL-SBL
01.如何修改borad-id 并且修改加载dtbo
注意修改这里可以打印加载的是哪个dtbo:
bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/LocateDeviceTree.c
这是一个被改造的函数:ReadDtbFindMatch
STATIC BOOLEAN
ReadDtbFindMatch (DtInfo *CurDtbInfo, DtInfo *BestDtbInfo, UINT32 ExactMatch)
{
EFI_STATUS Status;
CONST CHAR8 *BoardProp = NULL;
char *model = NULL;
int len;
const VOID *prop = NULL;
INT32 LenBoardId;
INT32 RootOffset = 0;
VOID *Dtb = CurDtbInfo->Dtb;
BOOLEAN FindBestMatch = FALSE;
/*Ensure MatchVal to 0 initially*/
CurDtbInfo->DtMatchVal = 0;
RootOffset = fdt_path_offset (Dtb, "/");
if (RootOffset < 0) {
DEBUG ((EFI_D_ERROR, "Unable to locate root node\n"));
return FALSE;
}
prop = fdt_getprop (Dtb, RootOffset, "model",&len);