From 0deedc24ea5b437e401320d12f810017efecca3b Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 12 Nov 2020 15:14:52 +0100 Subject: [PATCH] tizen: use compressed kernel image To speed-up kernel load and reduce total image size, use compressed kernel image. Signed-off-by: Marek Szyprowski Change-Id: I9f30a4677851053082abb1aa32d93a789666170c --- board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr | 8 +++++--- board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr | 8 +++++--- board/amlogic/w400/tizen-boot-odroid-n2-64b.scr | 8 +++++--- include/samsung/tizen_amlogic.h | 16 ++++++++-------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr b/board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr index b5d3f6b..973878d 100644 --- a/board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr +++ b/board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr @@ -22,6 +22,7 @@ if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef # Set load addresses setenv fdt_addr_r "0x1000000" setenv tizen_kernel_addr_r "0x2400000" +setenv tizen_tmp_kernel_addr_r "0x1000000" setenv ramdisk_addr_r "0x1b00000" # This is for jumping to flash mode on u-boot. @@ -52,7 +53,7 @@ fi echo "console: ${console}" # Kernel image -kernel=Image +kernel=Image.gz # DT image by model setenv fdtfile \"meson64_odroidc4.dtb\" @@ -64,9 +65,10 @@ part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start part size $bootdev $mmcrootdev $ramdiskpart ramdisk_size echo "Searching for kernel in" $boot_prefixes; for prefix in $boot_prefixes; do -if load $bootdev $mmcbootdev:$mmcbootpart $tizen_kernel_addr_r $prefix$kernel; then; +if load $bootdev $mmcbootdev:$mmcbootpart $tizen_tmp_kernel_addr_r $prefix$kernel; then; echo ${bootmode} "boot"; - echo "Found kernel Image in" $prefix; + echo "Found kernel ${kernel} in ${prefix}"; + unzip ${tizen_tmp_kernel_addr_r} ${tizen_kernel_addr_r}; load $bootdev $mmcbootdev:$mmcbootpart $fdt_addr_r $fdtfile; if test -e mmc $mmcrootdev:$ramdiskpart sbin/init; then; echo "Loading Ramdisk from partition"${ramdiskpart}; diff --git a/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr b/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr index 29e5da5..0a9364e 100644 --- a/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr +++ b/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr @@ -46,6 +46,7 @@ setenv hdmimode "1080p60hz" # Set load addresses setenv fdt_addr_r "0x1000000" setenv tizen_kernel_addr_r "0x2400000" +setenv tizen_tmp_kernel_addr_r "0x1000000" setenv ramdisk_addr_r "0x1b00000" # This is for jumping to flash mode on u-boot. @@ -76,7 +77,7 @@ fi echo "console: ${console}" # Kernel image -kernel=Image +kernel=Image.gz # DT image by model setenv fdtfile \"kvim3_linux.dtb\" @@ -88,9 +89,10 @@ part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start part size $bootdev $mmcrootdev $ramdiskpart ramdisk_size echo "Searching for kernel in" $boot_prefixes; for prefix in $boot_prefixes; do -if load $bootdev $mmcbootdev:$mmcbootpart $tizen_kernel_addr_r $prefix$kernel; then; +if load $bootdev $mmcbootdev:$mmcbootpart $tizen_tmp_kernel_addr_r $prefix$kernel; then; echo ${bootmode} "boot"; - echo "Found kernel Image in" $prefix; + echo "Found kernel ${kernel} in ${prefix}"; + unzip ${tizen_tmp_kernel_addr_r} ${tizen_kernel_addr_r}; load $bootdev $mmcbootdev:$mmcbootpart $fdt_addr_r $fdtfile; if test -e mmc $mmcrootdev:$ramdiskpart sbin/init; then; echo "Loading Ramdisk from partition"${ramdiskpart}; diff --git a/board/amlogic/w400/tizen-boot-odroid-n2-64b.scr b/board/amlogic/w400/tizen-boot-odroid-n2-64b.scr index e2fd47c..63968d5 100644 --- a/board/amlogic/w400/tizen-boot-odroid-n2-64b.scr +++ b/board/amlogic/w400/tizen-boot-odroid-n2-64b.scr @@ -94,6 +94,7 @@ if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef # Set load addresses setenv fdt_addr_r "0x1000000" setenv tizen_kernel_addr_r "0x2400000" +setenv tizen_tmp_kernel_addr_r "0x1000000" setenv ramdisk_addr_r "0x1b00000" # This is for jumping to flash mode on u-boot. @@ -124,7 +125,7 @@ fi echo "console: ${console}" # Kernel image -kernel=Image +kernel=Image.gz # DT image by model setenv fdtfile \"meson64_odroidn2_drm.dtb\" @@ -136,9 +137,10 @@ part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start part size $bootdev $mmcrootdev $ramdiskpart ramdisk_size echo "Searching for kernel in" $boot_prefixes; for prefix in $boot_prefixes; do -if load $bootdev $mmcbootdev:$mmcbootpart $tizen_kernel_addr_r $prefix$kernel; then; +if load $bootdev $mmcbootdev:$mmcbootpart $tizen_tmp_kernel_addr_r $prefix$kernel; then; echo ${bootmode} "boot"; - echo "Found kernel Image in" $prefix; + echo "Found kernel ${kernel} in ${prefix}"; + unzip ${tizen_tmp_kernel_addr_r} ${tizen_kernel_addr_r}; load $bootdev $mmcbootdev:$mmcbootpart $fdt_addr_r $fdtfile; if test -e mmc $mmcrootdev:$ramdiskpart sbin/init; then; echo "Loading Ramdisk from partition"${ramdiskpart}; diff --git a/include/samsung/tizen_amlogic.h b/include/samsung/tizen_amlogic.h index cd02968..a86e013 100644 --- a/include/samsung/tizen_amlogic.h +++ b/include/samsung/tizen_amlogic.h @@ -20,16 +20,16 @@ /* DFU */ /* For SD */ #define DFU_ALT_SYSTEM_SD \ - "Image fat 0 1;" \ + "Image.gz fat 0 1;" \ "meson64_odroidn2_drm.dtb fat 0 1;" \ "meson64_odroidn2.dtb fat 0 1;" \ "meson64_odroidc4.dtb fat 0 1;" \ "kvim3_linux.dtb fat 0 1;" \ "boot.scr.uimg fat 0 1;" \ "params.bin fat 0 1;" \ - "vim3/Image fat 0 1;" \ - "odroid-n2/Image fat 0 1;" \ - "odroid-c4/Image fat 0 1;" \ + "vim3/Image.gz fat 0 1;" \ + "odroid-n2/Image.gz fat 0 1;" \ + "odroid-c4/Image.gz fat 0 1;" \ "vim3/params.bin fat 0 1;" \ "odroid-n2/params.bin fat 0 1;" \ "odroid-c4/params.bin fat 0 1;" \ @@ -46,7 +46,7 @@ /* For eMMC */ #define DFU_ALT_SYSTEM \ - "Image fat 1 1;" \ + "Image.gz fat 1 1;" \ "meson64_odroidn2_drm.dtb fat 1 1;" \ "meson64_odroidn2.dtb fat 1 1;" \ "meson64_odroidc4.dtb fat 1 1;" \ @@ -54,9 +54,9 @@ "boot.scr.uimg fat 1 1;" \ "boot.img part 1 1;" \ "params.bin fat 1 1;" \ - "vim3/Image fat 1 1;" \ - "odroid-n2/Image fat 1 1;" \ - "odroid-c4/Image fat 1 1;" \ + "vim3/Image.gz fat 1 1;" \ + "odroid-n2/Image.gz fat 1 1;" \ + "odroid-c4/Image.gz fat 1 1;" \ "vim3/params.bin fat 1 1;" \ "odroid-n2/params.bin fat 1 1;" \ "odroid-c4/params.bin fat 1 1;" \ -- 2.7.4