User Tools

Site Tools


patches:mediatek_x20_lk

Below patch has to be applied to vendor/mediatek/proprietary/bootable/bootloader/lk of the AOSP.

diff --git a/app/mt_boot/mt_boot.c b/app/mt_boot/mt_boot.c
index c6f06ed..3a795a1 100644
--- a/app/mt_boot/mt_boot.c
+++ b/app/mt_boot/mt_boot.c
@@ -676,11 +676,12 @@ int boot_linux_fdt(void *kernel, unsigned *tags,
 	ret = fdt_setprop(fdt, offset, "reg", mem_reg_property,
 	                  ((int)get_mblock_num? get_mblock_num(): g_nr_bank ) * sizeof(dt_dram_info));
 	if (ret) return FALSE;
-
+#if 0
 	if (platform_atag_append) {
 		ret = platform_atag_append(fdt);
 		if (ret) return FALSE;
 	}
+#endif
 #ifdef MBLOCK_LIB_SUPPORT
 	ret = fdt_memory_append(fdt);
 	if (ret) return FALSE;
@@ -919,6 +920,8 @@ int boot_linux_fdt(void *kernel, unsigned *tags,
 	ret = fdt_setprop(fdt, offset, "atag,cmdline", buf, ptr - buf);
 	if (ret) return FALSE;
 
+	sprintf(cmdline, "%s%s", cmdline, " console=ttyS0,921600 clk_ignore_unused");
+
 	ret = fdt_setprop_string(fdt, offset, "bootargs", cmdline);
 	if (ret) return FALSE;
 
@@ -981,6 +984,8 @@ int boot_linux_fdt(void *kernel, unsigned *tags,
 	dprintf(CRITICAL,"lk boot reason = %s\n", g_boot_reason[boot_reason]);
 	dprintf(CRITICAL,"lk finished --> jump to linux kernel %s\n\n", g_is_64bit_kernel ? "64Bit" : "32Bit");
 
+	*(volatile unsigned int *)0x10007000 = 0x22000000;
+
 	if (g_is_64bit_kernel) {
 		lk_jump64((u32)entry, (u32)tags, 0, KERNEL_64BITS);
 	} else {
patches/mediatek_x20_lk.txt · Last modified: 2018/09/04 13:30 by matthias