am 8417d698: handle 4096 byte pages if requested via --pagesize
Merge commit '8417d698cff733f3c5de08f2fa96b67bf4a9f795' into gingerbread-plus-aosp
* commit '8417d698cff733f3c5de08f2fa96b67bf4a9f795':
handle 4096 byte pages if requested via --pagesize
diff --git a/mkbootimg/mkbootimg.c b/mkbootimg/mkbootimg.c
index 3642647..bdc572e 100644
--- a/mkbootimg/mkbootimg.c
+++ b/mkbootimg/mkbootimg.c
@@ -71,7 +71,7 @@
-static unsigned char padding[2048] = { 0, };
+static unsigned char padding[4096] = { 0, };
int write_padding(int fd, unsigned pagesize, unsigned itemsize)
{
@@ -148,6 +148,12 @@
hdr.tags_addr = base + 0x00000100;
} else if(!strcmp(arg, "--board")) {
board = val;
+ } else if(!strcmp(arg,"--pagesize")) {
+ pagesize = strtoul(val, 0, 10);
+ if ((pagesize != 2048) && (pagesize != 4096)) {
+ fprintf(stderr,"error: unsupported page size %d\n", pagesize);
+ return -1;
+ }
} else {
return usage();
}