summaryrefslogtreecommitdiffstats
path: root/scripts/rkimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rkimage.c')
-rw-r--r--scripts/rkimage.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/scripts/rkimage.c b/scripts/rkimage.c
index 21a2838146..6e68d508ac 100644
--- a/scripts/rkimage.c
+++ b/scripts/rkimage.c
@@ -15,6 +15,7 @@
#include "common.h"
#include "common.c"
+#include "rockchip.h"
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
@@ -37,37 +38,6 @@ static void sha512(const void *buf, int len, void *out)
SHA512_Final(out, &sha512);
}
-#define NEWIDB_MAGIC 0x534e4b52 /* 'RKNS' */
-
-struct newidb_entry {
- uint32_t sector;
- uint32_t unknown_ffffffff;
- uint32_t unknown1;
- uint32_t image_number;
- unsigned char unknown2[8];
- unsigned char hash[64];
-};
-
-struct newidb {
- uint32_t magic;
- unsigned char unknown1[4];
- uint32_t n_files;
- uint32_t hashtype;
- unsigned char unknown2[8];
- unsigned char unknown3[8];
- unsigned char unknown4[88];
- struct newidb_entry entries[4];
- unsigned char unknown5[40];
- unsigned char unknown6[512];
- unsigned char unknown7[16];
- unsigned char unknown8[32];
- unsigned char unknown9[464];
- unsigned char hash[512];
-};
-
-#define SECTOR_SIZE 512
-#define PAGE_SIZE 2048
-
typedef enum {
HASH_TYPE_SHA256 = 1,
HASH_TYPE_SHA512 = 2,