From 32cde98e5cf15f3ac98dfa610f03e45bee2f98a1 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Fri, 27 Nov 2020 11:11:09 +0900 Subject: [PATCH] tizen: bootscript: amlogic: calculate tizen_kernel_add_r with ramdisk's size Calculate tizen_kernel_addr_r with ramdisk's size. It cat be prevented to overwrite the images. Change-Id: If766b514e40865c3a531c3ebbe75f6b7a6898b2a Signed-off-by: Jaehoon Chung --- tizen/bootscript/tizen-boot-amlogic-64b.scr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tizen/bootscript/tizen-boot-amlogic-64b.scr b/tizen/bootscript/tizen-boot-amlogic-64b.scr index eb1ba2a..b454df8 100644 --- a/tizen/bootscript/tizen-boot-amlogic-64b.scr +++ b/tizen/bootscript/tizen-boot-amlogic-64b.scr @@ -67,7 +67,6 @@ elif test $board_name == odroid-n2; then fi setenv fdt_addr_r "0x1000000" -setenv tizen_kernel_addr_r "0x2400000" setenv tizen_tmp_kernel_addr_r "0x1000000" setenv ramdisk_addr_r "0x1b00000" @@ -95,6 +94,10 @@ setenv bootargs \"root=/dev/${rootdev} rootwait rw no_console_suspend fsck.repai part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start part size $bootdev $mmcrootdev $ramdiskpart ramdisk_size +# Set to ramdisksize with real partition size. (Need to multiply block-size 0x200) +setexpr ramdisksize $ramdisk_size * 200 +setexpr tizen_kernel_addr_r $ramdisk_addr_r + $ramdisksize + echo "Searching for kernel in" $boot_prefixes; for prefix in $boot_prefixes; do if load $bootdev $mmcbootdev:$mmcbootpart $tizen_tmp_kernel_addr_r $prefix$kernel; then; echo ${bootmode} "boot"; -- 2.7.4