diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2020-11-09 16:48:24 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2020-11-09 16:48:24 +0900 |
commit | 2fef4be88161940cb47ce86ff603f14725225c88 (patch) | |
tree | 676513afe88a8f332891c0ceb7cbd1ac38aadd1e | |
parent | c87c9e5ad0ab9cc67ba0bc5c8887db4ea2c36317 (diff) | |
download | u-boot-accepted/tizen/unified/20201110.125028.tar.gz u-boot-accepted/tizen/unified/20201110.125028.tar.bz2 u-boot-accepted/tizen/unified/20201110.125028.zip |
board: amlogic: add odroid-c4 boot script for tizensubmit/tizen/20201110.005738accepted/tizen/unified/20201110.125028
Add boot script for tizen.
Change-Id: If5c3992d710c0edda4a6641edfa07671bcc5f3a7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r-- | board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr | 80 |
1 files changed, 80 insertions, 0 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 new file mode 100644 index 0000000000..42ad8e1ca1 --- /dev/null +++ b/board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr @@ -0,0 +1,80 @@ +# U-boot script for tizen Odroid C4 +# Auto Detection of Monitor settings based on your Screen information +# Below values are from Hardkernel ubuntu-20.04.4.0-mate-odroid-c4-hc4-20201020.img +# (Hardkernel) +setenv display_autodetect "true" +setenv hdmimode "1080p60hz" +setenv monitor_onoff "false" # true or false +setenv overscan "100" +setenv sdrmode "auto" +setenv voutmode "hdmi" +setenv disablehpd "false" +setenv cec "true" +setenv disable_vu7 "true" +setenv max_freq_a55 "1908" # 1.908 GHz, default value +setenv enable_wol "0" + +# (Hardkernel) Normal HDMI Monitors +if test "${display_autodetect}" = "true"; then hdmitx edid; fi +if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi +if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi +if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi + +# 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 \"meson64_odroidc4.dtb\" + +setenv prefixes \"/odroid-c4\/\" + +# 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 max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} 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 $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 + |