To support the images exceeds 4GB, thor protocol 5.0 is applied.
This requires thor client support:
Ref: https://git.tizen.org/cgit/tools/lthor/commit/?id=
30fa9f0cbfc4b089bb7e733b9cb75a60e1d10369
u-boot thor downloader already supports protocol 5.0:
Ref: https://gitlab.denx.de/u-boot/u-boot/-/commit/
1fe9ae76b113103bcc40aa15949f9dd8aa0a06a2
Change-Id: I149361ca2f40b5775249f3672e3e19b2f6394b68
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
int32_t cnt; /* Int. Datas. */
} __attribute__((__packed__));
-#define VER_PROTOCOL_MAJOR 4
+#define VER_PROTOCOL_MAJOR 5
#define VER_PROTOCOL_MINOR 0
#define RQT_PKT_SIZE sizeof(struct rqt_pkt)
switch (rqt->sub_id) {
case RQT_DL_INIT:
- ctx->thor_file_size = (unsigned long)rqt->int_data[0];
+ ctx->thor_file_size = (uint64_t)rqt->int_data[0]
+ + ((uint64_t)rqt->int_data[1] << 32);
break;
case RQT_DL_FILE_INFO:
file_type = rqt->int_data[0];
break;
}
- ctx->thor_file_size = (unsigned long)rqt->int_data[1];
+ ctx->thor_file_size = (uint64_t)rqt->int_data[1]
+ + ((uint64_t)rqt->int_data[2] << 32);
memcpy(f_name, rqt->str_data[0], FILE_NAME_MAXLEN);
rsp.int_data[0] = DATA_PKT_SIZE;