summaryrefslogtreecommitdiffstats
path: root/mkbootimg
diff options
context:
space:
mode:
authorBrian Swetland <swetland@google.com>2010-08-11 16:56:49 -0700
committerBrian Swetland <swetland@google.com>2010-08-11 16:56:49 -0700
commit8417d698cff733f3c5de08f2fa96b67bf4a9f795 (patch)
treef328017c6dd3f2117e70ba656fb57dd21875c743 /mkbootimg
parentf2af88e81af5efb2d585963507f798d5a8b93d67 (diff)
downloadsystem_core-8417d698cff733f3c5de08f2fa96b67bf4a9f795.zip
system_core-8417d698cff733f3c5de08f2fa96b67bf4a9f795.tar.gz
system_core-8417d698cff733f3c5de08f2fa96b67bf4a9f795.tar.bz2
handle 4096 byte pages if requested via --pagesize
Change-Id: I9299ebeced85dcf5e6e4686b99b28b9786be4f25 Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'mkbootimg')
-rw-r--r--mkbootimg/mkbootimg.c8
1 files changed, 7 insertions, 1 deletions
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 @@ int usage(void)
-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 @@ int main(int argc, char **argv)
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();
}