diff options
| author | Brian Swetland <swetland@google.com> | 2009-04-28 16:05:07 -0700 |
|---|---|---|
| committer | Brian Swetland <swetland@google.com> | 2009-04-28 16:05:07 -0700 |
| commit | 2a63bb7abf1b27a7a2e8fd5951d77f71a2f290d4 (patch) | |
| tree | 5e3e2fbff2f0ce4a96bd109f6c3dcaf54a3b80c5 /fastboot/bootimg.c | |
| parent | 6181f70bd40fd020661841923e725df75a3a2793 (diff) | |
| download | system_core-2a63bb7abf1b27a7a2e8fd5951d77f71a2f290d4.tar.gz system_core-2a63bb7abf1b27a7a2e8fd5951d77f71a2f290d4.tar.bz2 system_core-2a63bb7abf1b27a7a2e8fd5951d77f71a2f290d4.zip | |
fastboot, mkbootimg: support alternate base addresses
Add the --base flag to mkbootimg and -b flag to fastboot, to allow
the default kernel base address (0x10000000) to be changed.
Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'fastboot/bootimg.c')
| -rw-r--r-- | fastboot/bootimg.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fastboot/bootimg.c b/fastboot/bootimg.c index 1d77b3c4..e5aea4eb 100644 --- a/fastboot/bootimg.c +++ b/fastboot/bootimg.c @@ -40,7 +40,7 @@ void bootimg_set_cmdline(boot_img_hdr *h, const char *cmdline) boot_img_hdr *mkbootimg(void *kernel, unsigned kernel_size, void *ramdisk, unsigned ramdisk_size, void *second, unsigned second_size, - unsigned page_size, + unsigned page_size, unsigned base, unsigned *bootimg_size) { unsigned kernel_actual; @@ -65,15 +65,14 @@ boot_img_hdr *mkbootimg(void *kernel, unsigned kernel_size, memcpy(hdr->magic, BOOT_MAGIC, BOOT_MAGIC_SIZE); - hdr->kernel_size = kernel_size; - hdr->kernel_addr = 0x10008000; + hdr->kernel_size = kernel_size; hdr->ramdisk_size = ramdisk_size; - hdr->ramdisk_addr = 0x11000000; - hdr->second_size = second_size; - hdr->second_addr = 0x10F00000; - - hdr->tags_addr = 0x10000100; - hdr->page_size = page_size; + hdr->second_size = second_size; + hdr->kernel_addr = base + 0x00008000; + hdr->ramdisk_addr = base + 0x01000000; + hdr->second_addr = base + 0x00F00000; + hdr->tags_addr = base + 0x00000100; + hdr->page_size = page_size; memcpy(hdr->magic + page_size, kernel, kernel_size); |
