X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Frkcommon.h;h=8790f1ceab070b3a4bd9c1d2f4df069d7e80e54a;hb=424324d3ca9937a7be1e802df5d88932cc6e3396;hp=a21321fe83abddaea0afd65b34f91f2f960c7fb9;hpb=1f5541c8818d3ecd243f9bbf58db9ea5f55a3195;p=u-boot diff --git a/tools/rkcommon.h b/tools/rkcommon.h index a21321fe83..8790f1ceab 100644 --- a/tools/rkcommon.h +++ b/tools/rkcommon.h @@ -10,6 +10,7 @@ enum { RK_BLK_SIZE = 512, + RK_INIT_SIZE_ALIGN = 2048, RK_INIT_OFFSET = 4, RK_MAX_BOOT_SIZE = 512 << 10, RK_SPL_HDR_START = RK_INIT_OFFSET * RK_BLK_SIZE, @@ -55,6 +56,25 @@ int rkcommon_get_spl_size(struct image_tool_params *params); int rkcommon_set_header(void *buf, uint file_size, struct image_tool_params *params); +/** + * rkcommon_verify_header() - verify the header for a Rockchip boot image + * + * @buf: Pointer to the image file + * @file_size: Size of entire bootable image file (incl. all padding) + * @return 0 if OK + */ +int rkcommon_verify_header(unsigned char *buf, int size, + struct image_tool_params *params); + +/** + * rkcommon_print_header() - print the header for a Rockchip boot image + * + * This prints the header, spl_name and whether this is a SD/MMC or SPI image. + * + * @buf: Pointer to the image (can be a read-only file-mapping) + */ +void rkcommon_print_header(const void *buf); + /** * rkcommon_need_rc4_spl() - check if rc4 encoded spl is required *