From 6e4f8d39fd507a279a37b1f64894c0d92dd37720 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 26 May 2020 11:41:30 +0900 Subject: [PATCH] board: amlogic: add the boot script for vim3 Add the boot script for vim3. Signed-off-by: Jaehoon Chung --- board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr diff --git a/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr b/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr new file mode 100644 index 0000000..d6ed4c4 --- /dev/null +++ b/board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr @@ -0,0 +1,103 @@ +# U-boot script for tizen VIM3 + +# HDMI Mode +# Resolution Configuration +# Symbol | Resolution +# ----------------------+------------- +# "480x272p60hz" | 480x272 Progressive 60Hz +# "480x320p60hz" | 480x320 Progressive 60Hz +# "480p60hz" | 720x480 Progressive 60Hz +# "576p50hz" | 720x576 Progressive 50Hz +# "720p60hz" | 1280x720 Progressive 60Hz +# "720p50hz" | 1280x720 Progressive 50Hz +# "1080p60hz" | 1920x1080 Progressive 60Hz +# "1080p50hz" | 1920x1080 Progressive 50Hz +# "1080p30hz" | 1920x1080 Progressive 30Hz +# "1080p24hz" | 1920x1080 Progressive 24Hz +# "1080i60hz" | 1920x1080 Interlaced 60Hz +# "1080i50hz" | 1920x1080 Interlaced 50Hz +# "2160p60hz" | 3840x2160 Progressive 60Hz +# "2160p50hz" | 3840x2160 Progressive 50Hz +# "2160p30hz" | 3840x2160 Progressive 30Hz +# "2160p25hz" | 3840x2160 Progressive 25Hz +# "2160p24hz" | 3840x2160 Progressive 24Hz +# "smpte24hz" | 3840x2160 Progressive 24Hz SMPTE +# "2160p60hz420" | 3840x2160 Progressive 60Hz YCbCr 4:2:0 +# "2160p50hz420" | 3840x2160 Progressive 50Hz YCbCr 4:2:0 +# "640x480p60hz" | 640x480 Progressive 60Hz +# "800x480p60hz" | 800x480 Progressive 60Hz +# "800x600p60hz" | 800x600 Progressive 60Hz +# "1024x600p60hz" | 1024x600 Progressive 60Hz +# "1024x768p60hz" | 1024x768 Progressive 60Hz +# "1280x800p60hz" | 1280x800 Progressive 60Hz +# "1280x1024p60hz" | 1280x1024 Progressive 60Hz +# "1360x768p60hz" | 1360x768 Progressive 60Hz +# "1440x900p60hz" | 1440x900 Progressive 60Hz +# "1600x900p60hz" | 1600x900 Progressive 60Hz +# "1600x1200p60hz" | 1600x1200 Progressive 60Hz +# "1680x1050p60hz" | 1680x1050 Progressive 60Hz +# "1920x1200p60hz" | 1920x1200 Progressive 60Hz +# "2560x1080p60hz" | 2560x1080 Progressive 60Hz +# "2560x1440p60hz" | 2560x1440 Progressive 60Hz +# "2560x1600p60hz" | 2560x1600 Progressive 60Hz +# "3440x1440p60hz" | 3440x1440 Progressive 60Hz +setenv hdmimode "1080p60hz" + +# Set load addresses +setenv fdt_addr_r "0x1000000" +setenv tizen_kernel_addr_r "0x2400000" +setenv ramdisk_addr_r "0x1b00000" + +# This is for jumping to flash mode on u-boot. +if test "${bootmode}" = "download"; then; + setenv ramdiskpart 8 + setenv ramdisksize c00000 + setenv bootmode flash +fi + +if test "${bootmode}" = "flash"; then; + if test -n "${ipaddr}"; then; + ip_opt=\"ip=${ipaddr}::${gateway}:${netmask}\" + fi +fi + +# boot from ram0 if there is sbin +if test -e $bootdev $mmcrootdev:$ramdiskpart sbin/init; then; + setenv rootdev ram0 +else + setenv rootdev mmcblk${mmcrootdev}p${mmcrootpart} + setenv bootmode normal +fi + +# setting console device if noting is set +if test -z "${console}"; then; + setenv console "console=ttyS0,115200n8 earlycon=aml-uart,0xff803000" +fi +echo "console: ${console}" + +# Kernel image +kernel=Image +# DT image by model +setenv fdtfile \"kvim3_linux.dtb\" + +setenv boot_prefixes \"/\" + +# To use comdline for using serial console. /* Normal mode */ +setenv bootargs \"root=/dev/${rootdev} rootwait rw no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=1080p60hz cvbsmode=576cvbs usb-xhci.tablesize=2 logo=osd0,loaded ${console}\" + +# Find the ramdisk offset and block count +part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start +part size $bootdev $mmcrootdev $ramdiskpart ramdisk_size + +echo "Searching for kernel in"; for prefix in $boot_prefixes; do +if load $bootdev $mmcbootdev:$mmcbootpart $tizen_kernel_addr_r $prefix$kernel; then; + echo ${bootmode} "boot"; + load $bootdev $mmcbootdev:$mmcbootpart $fdt_addr_r $fdtfile; + if test -e mmc $mmcrootdev:$ramdiskpart sbin/init; then; + echo "Loading Ramdisk from partition"${ramdiskpart}; + mmc read $ramdisk_addr_r $ramdisk_start $ramdisk_size; + fi + booti $tizen_kernel_addr_r $ramdisk_addr_r:$ramdisksize $fdt_addr_r; +fi +done + -- 2.7.4