Hi all,
I have used CST tool to sign my OS binary file(nk.nb0), and used elftosb.exe tool to generate the SB file(nk_ivt.sb).
Now,I want to used the "authenticate_image" HAB API to verify my signed OS(sb file) in Eboot, but some parameters of "authenticate_image", I don't know how to assign.
authenticate_image(uint8_t cid, ptrdiff_t ivt_offset, void **start, size_t *bytes,hab_loader_callback_f loader)
cid ---- Type of target(memory or peripheral) <---- I have set to "1"
ivt_offset ---- Address of target region <--- I know this is the IVT offset in my signed file.I have assigned ivt_addr in .bd file as below.So I can't ensure whether I should assign ivt_offset to "0x8000" in my code.
/////////////bd file/////////////////////////////////
options {
driveTag = 0x00;
flags = 0x01;
}
constants {
nk_addr = 0x40200000;
hab_addr = 0xA000;
ivt_addr = 0x8000;
}
sources {
nk = "nk.nb0";
hab_nk = "nk_hab_data";
}
section (0) {
load nk > nk_addr;
load hab_nk > hab_addr;
load ivt (entry = nk_addr,csf = hab_addr) > ivt_addr;
hab call ivt_addr;
}
///////////////////////////////////////////////////////
start --- Initial image load address on entry <---- It's the memory address(0x40200000), right?
bytes --- Initial image size on entry <---- It's the total size of my signed OS, right?
loader --- callback function <---- NULL
Thanks for your time and assistance.
Regards,
Gary