summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Swetland2010-08-11 18:56:49 -0500
committerBrian Swetland2010-08-11 18:56:49 -0500
commit8417d698cff733f3c5de08f2fa96b67bf4a9f795 (patch)
treef328017c6dd3f2117e70ba656fb57dd21875c743 /mkbootimg
parentf2af88e81af5efb2d585963507f798d5a8b93d67 (diff)
downloadplatform-system-core-8417d698cff733f3c5de08f2fa96b67bf4a9f795.tar.gz
platform-system-core-8417d698cff733f3c5de08f2fa96b67bf4a9f795.tar.xz
platform-system-core-8417d698cff733f3c5de08f2fa96b67bf4a9f795.zip
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 364264711..bdc572e50 100644
--- a/mkbootimg/mkbootimg.c
+++ b/mkbootimg/mkbootimg.c
@@ -71,7 +71,7 @@ int usage(void)
71 71
72 72
73 73
74static unsigned char padding[2048] = { 0, }; 74static unsigned char padding[4096] = { 0, };
75 75
76int write_padding(int fd, unsigned pagesize, unsigned itemsize) 76int write_padding(int fd, unsigned pagesize, unsigned itemsize)
77{ 77{
@@ -148,6 +148,12 @@ int main(int argc, char **argv)
148 hdr.tags_addr = base + 0x00000100; 148 hdr.tags_addr = base + 0x00000100;
149 } else if(!strcmp(arg, "--board")) { 149 } else if(!strcmp(arg, "--board")) {
150 board = val; 150 board = val;
151 } else if(!strcmp(arg,"--pagesize")) {
152 pagesize = strtoul(val, 0, 10);
153 if ((pagesize != 2048) && (pagesize != 4096)) {
154 fprintf(stderr,"error: unsupported page size %d\n", pagesize);
155 return -1;
156 }
151 } else { 157 } else {
152 return usage(); 158 return usage();
153 } 159 }