mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-28 09:31:32 +00:00
tools: imximage: display DCD block offset, length
These values can be used to sign a U-Boot image for use when loading an image through the Serial Download Protocol (SDP). Note that the address of 0x910000 is usable with the stock configuration of imx_usb_loader on i.MX6 and i.MX7 SOCs: https://github.com/boundarydevices/imx_usb_loader/blob/master/mx6_usb_work.conf#L3 Refer to the section on imx_usb_loader in this post for more details: https://boundarydevices.com/high-assurance-boot-hab-dummies/ Signed-off-by: Eric Nelson <eric@nelint.com>
This commit is contained in:
parent
36c0627ba5
commit
e5491f3ef5
1 changed files with 9 additions and 1 deletions
|
@ -281,7 +281,6 @@ static void set_dcd_rst_v2(struct imx_header *imxhdr, uint32_t dcd_len,
|
||||||
d = (struct dcd_v2_cmd *)(((char *)d) + len);
|
d = (struct dcd_v2_cmd *)(((char *)d) + len);
|
||||||
|
|
||||||
len = (char *)d - (char *)&dcd_v2->header;
|
len = (char *)d - (char *)&dcd_v2->header;
|
||||||
|
|
||||||
dcd_v2->header.tag = DCD_HEADER_TAG;
|
dcd_v2->header.tag = DCD_HEADER_TAG;
|
||||||
dcd_v2->header.length = cpu_to_be16(len);
|
dcd_v2->header.length = cpu_to_be16(len);
|
||||||
dcd_v2->header.version = DCD_VERSION;
|
dcd_v2->header.version = DCD_VERSION;
|
||||||
|
@ -501,10 +500,19 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
|
||||||
printf("Entry Point: %08x\n", (uint32_t)fhdr_v2->entry);
|
printf("Entry Point: %08x\n", (uint32_t)fhdr_v2->entry);
|
||||||
if (fhdr_v2->csf && (imximage_ivt_offset != UNDEFINED) &&
|
if (fhdr_v2->csf && (imximage_ivt_offset != UNDEFINED) &&
|
||||||
(imximage_csf_size != UNDEFINED)) {
|
(imximage_csf_size != UNDEFINED)) {
|
||||||
|
uint16_t dcdlen;
|
||||||
|
int offs;
|
||||||
|
|
||||||
|
dcdlen = hdr_v2->data.dcd_table.header.length;
|
||||||
|
offs = (char *)&hdr_v2->data.dcd_table
|
||||||
|
- (char *)hdr_v2;
|
||||||
|
|
||||||
printf("HAB Blocks: %08x %08x %08x\n",
|
printf("HAB Blocks: %08x %08x %08x\n",
|
||||||
(uint32_t)fhdr_v2->self, 0,
|
(uint32_t)fhdr_v2->self, 0,
|
||||||
hdr_v2->boot_data.size - imximage_ivt_offset -
|
hdr_v2->boot_data.size - imximage_ivt_offset -
|
||||||
imximage_csf_size);
|
imximage_csf_size);
|
||||||
|
printf("DCD Blocks: 00910000 %08x %08x\n",
|
||||||
|
offs, be16_to_cpu(dcdlen));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
imx_header_v2_t *next_hdr_v2;
|
imx_header_v2_t *next_hdr_v2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue