Add endian swaps for BE_ARCHS.

Index: tools/rkcommon.c
--- tools/rkcommon.c.orig
+++ tools/rkcommon.c
@@ -456,7 +456,7 @@ int rkcommon_verify_header(unsigned char *buf, int siz
 	int ret;
 
 	/* spl_hdr is abandon on header_v2 */
-	if ((*(uint32_t *)buf) == RK_MAGIC_V2)
+	if (le32_to_cpu(*(uint32_t *)buf) == RK_MAGIC_V2)
 		return 0;
 
 	ret = rkcommon_parse_header(buf, &header0, &img_spl_info);
@@ -491,7 +491,7 @@ void rkcommon_print_header(const void *buf, struct ima
 	uint8_t image_type;
 	int ret, boot_size, init_size;
 
-	if ((*(uint32_t *)buf) == RK_MAGIC_V2) {
+	if (le32_to_cpu(*(uint32_t *)buf) == RK_MAGIC_V2) {
 		ret = rkcommon_parse_header_v2(buf, &header0_v2);
 
 		if (ret < 0) {
