enum {
RK_BLK_SIZE = 512,
- RK_INIT_SIZE_ALIGN = 2048,
+ RK_SIZE_ALIGN = 2048,
RK_INIT_OFFSET = 4,
RK_MAX_BOOT_SIZE = 512 << 10,
RK_SPL_HDR_START = RK_INIT_OFFSET * RK_BLK_SIZE,
RK_SPL_HDR_SIZE = 4,
- RK_SPL_START = RK_SPL_HDR_START + RK_SPL_HDR_SIZE,
- RK_IMAGE_HEADER_LEN = RK_SPL_START,
};
/**
* rkcommon_check_params() - check params
*
- * @return 0 if OK, -1 if ERROR.
+ * Return: 0 if OK, -1 if ERROR.
*/
int rkcommon_check_params(struct image_tool_params *params);
* This sets up a 2KB header which can be interpreted by the Rockchip boot ROM.
*
* @buf: Pointer to header place (must be at least 2KB in size)
- * @file_size: Size of the file we want the boot ROM to load, in bytes
- * @return 0 if OK, -ENOSPC if too large
*/
-int rkcommon_set_header(void *buf, uint file_size,
- struct image_tool_params *params);
+void rkcommon_set_header(void *buf, struct stat *sbuf, int ifd,
+ 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
+ * Return: 0 if OK
*/
int rkcommon_verify_header(unsigned char *buf, int size,
struct image_tool_params *params);
* Some socs cannot disable the rc4-encryption of the spl binary.
* rc4 encryption is disabled normally except on socs that cannot
* handle unencrypted binaries.
- * @return true or false depending on rc4 being required.
+ * Return: true or false depending on rc4 being required.
*/
bool rkcommon_need_rc4_spl(struct image_tool_params *params);
* @params: Pointer to the tool params structure
* @tparams: Pointer tot the image type structure (for setting
* the header and header_size)
- * @alignment: Alignment (a power of two) that the image should be
- * padded to (e.g. 512 if we want to align with SD/MMC
- * blocksizes or 2048 for the SPI format)
*
- * @return bytes of padding required/added (does not include the header_size)
+ * Return: 0 (always)
*/
int rkcommon_vrec_header(struct image_tool_params *params,
- struct image_type_params *tparams,
- unsigned int alignment);
+ struct image_type_params *tparams);
#endif