boot_android: fix load address for boot image
The kernel image follows the header(default 0x800) in boot.img, we need to fix the load address for boot.img so that kernel image can align to 0x80000 as required by ARM64 kernel booting. Change-Id: I526ff38bfce2d8fd1571aff817ade11086f196e3 Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
09e52837fc
commit
3f251879bf
|
|
@ -41,6 +41,11 @@ static int do_boot_android(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
load_address = CONFIG_SYS_LOAD_ADDR;
|
||||
}
|
||||
|
||||
/* ARM64 kernel load addr need to align to 0x80000, and android boot.img
|
||||
* have a 2KB header, need to reserve space for it.
|
||||
*/
|
||||
load_address &= ~0x7ffff;
|
||||
load_address -= 0x800; /* default page size for boot header */
|
||||
dev_desc = blk_get_dev(argv[1], simple_strtoul(argv[2], NULL, 16));
|
||||
if (!dev_desc) {
|
||||
printf("Could not get %s %s\n", argv[1], argv[2]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue