Merge pull request #7 from Myself5/master
arm64: add support for dt.img
This commit is contained in:
@@ -72,6 +72,11 @@ else
|
||||
include $(multirom_local_path)/kexec-tools/Android.mk
|
||||
endif
|
||||
|
||||
# Make code aware of the Arch
|
||||
ifneq ($(TARGET_ARCH),arm64)
|
||||
LOCAL_CFLAGS += -DMR_NOT_64BIT
|
||||
endif
|
||||
|
||||
# adbd
|
||||
include $(multirom_local_path)/adbd/Android.mk
|
||||
|
||||
|
||||
16
multirom.c
16
multirom.c
@@ -1615,7 +1615,9 @@ int multirom_load_kexec(struct multirom_status *s, struct multirom_rom *rom)
|
||||
kexec_init(&kexec, kexec_path);
|
||||
kexec_add_arg(&kexec, "--mem-min="MR_KEXEC_MEM_MIN);
|
||||
#ifdef MR_KEXEC_DTB
|
||||
#ifdef MR_NOT_64BIT
|
||||
kexec_add_arg_prefix(&kexec, "--boardname=", TARGET_DEVICE);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
switch(rom->type)
|
||||
@@ -1684,11 +1686,17 @@ int multirom_fill_kexec_android(struct multirom_status *s, struct multirom_rom *
|
||||
kexec_add_arg(kexec, "--initrd=/initrd.img");
|
||||
|
||||
#ifdef MR_KEXEC_DTB
|
||||
if(libbootimg_dump_dtb(&img, "/dtb.img") >= 0)
|
||||
if(libbootimg_dump_dtb(&img, "/dtb.img") >= 0) {
|
||||
printf("DTB: dtb image found!");
|
||||
kexec_add_arg(kexec, "--dtb=/dtb.img");
|
||||
else
|
||||
}
|
||||
else {
|
||||
printf("DTB: no dtb image found!");
|
||||
#ifdef MR_NOT_64BIT
|
||||
kexec_add_arg(kexec, "--dtb");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
char cmdline[1536];
|
||||
strcpy(cmdline, "--command-line=");
|
||||
@@ -1847,11 +1855,15 @@ int multirom_fill_kexec_linux(struct multirom_status *s, struct multirom_rom *ro
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("DTB: dtb image found!");
|
||||
str = find_boot_file("%r/dtb.img", root_path, rom->base_path);
|
||||
}
|
||||
|
||||
if(!str)
|
||||
printf("DTB: no dtb image found!");
|
||||
#ifdef MR_NOT_64BIT
|
||||
kexec_add_arg(kexec, "--dtb");
|
||||
#endif
|
||||
else
|
||||
{
|
||||
kexec_add_arg_prefix(kexec, "--dtb=", str);
|
||||
|
||||
Reference in New Issue
Block a user