1 # U-boot script for tizen Amlogic (Odroid-C4/N2, VIM3/VIM3L)
2 # Auto Detection of Monitor settings based on your Screen information
3 # Below values are from Hardkernel ubuntu-20.04.4.0-mate-odroid-c4-hc4-20201020.img
4 # (Hardkernel / Odroid-c4)
5 if test $board_name = "odroid-c4"; then
7 setenv display_autodetect "true"
8 setenv monitor_onoff "false" # true or false
11 setenv voutmode "hdmi"
12 setenv disablehpd "false"
14 setenv max_freq_a55 "1908" # 1.908 GHz, default value
17 # (Hardkernel) Normal HDMI Monitors
18 if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi
21 setenv boot_args \"voutmode=${voutmode} disablehpd=${disablehpd} overscan=${overscan} monitor_onoff=${monitor_onoff} gpiopower=479 \"
23 elif test $board_name = "odroid-n2"; then
24 # (Hardkernel / Odroid-n2)
25 # Auto Detection of Monitor settings based on your Screen information
26 setenv display_autodetect "true"
29 # Controls if HDMI PHY should output anything to the monitor
30 setenv monitor_onoff "false" # true or false
33 # This value scales down the actual screen size by the percentage below
34 # valid range is 80 to 100
37 ### voutmode : hdmi or dvi
38 setenv voutmode "hdmi"
39 # setenv voutmode "dvi"
41 # HPD enable/disable option
42 setenv disablehpd "false"
44 # max cpu frequency for big core, A73 in MHz unit
45 # setenv max_freq_a73 "2004" # 2.004 GHz
46 # setenv max_freq_a73 "1992" # 1.992 GHz
47 # setenv max_freq_a73 "1908" # 1.908 GHz
48 setenv max_freq_a73 "1800" # 1.8 GHz, default value
49 # setenv max_freq_a73 "1704" # 1.704 GHz
51 # max cpu frequency for little core, A53 in MHz unit
52 # setenv max_freq_a53 "1992" # 1.992 GHz
53 setenv max_freq_a53 "1896" # 1.896 GHz, default value
54 # setenv max_freq_a53 "1704" # 1.704 GHz
58 # CPU's 0 and 1 are the A53 (small cores)
59 # CPU's 2 to 5 are the A73 (big cores)
60 # Lowering this value disables only the bigger cores (the last cores).
66 setenv boot_args \"max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} disablehpd=${disablehpd} overscan=${overscan} monitor_onoff=${monitor_onoff} \"
69 setenv tizen_tmp_kernel_addr_r "0x1000000"
71 # Enter to recovery mode if reboot_reason is recovery
72 if test "${reason}" = "recovery"; then;
74 setenv bootmode recovery
77 # boot from ram0 if there is sbin
78 if test -e $bootdev $mmcrootdev:$ramdiskpart sbin/init; then;
81 setenv rootdev mmcblk${mmcrootdev}p${mmcrootpart}
82 setenv bootmode normal
85 # setting console device if noting is set
86 if test -z "${console}"; then;
87 setenv console "console=ttyS0,115200n8 earlycon=aml-uart,0xff803000"
89 echo "console: ${console}"
94 # To use comdline for using serial console. /* Normal mode */
95 setenv bootargs \"root=/dev/${rootdev} rootwait rw no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs ${cmode} usb-xhci.tablesize=2 logo=osd0,loaded ${console} ${boot_args} ${opts}\"
97 # Find the ramdisk offset and block count
98 part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start
99 part size $bootdev $mmcrootdev $ramdiskpart ramdisk_size
101 # Set to ramdisksize with real partition size. (Need to multiply block-size 0x200)
102 setexpr ramdisksize $ramdisk_size * 200
103 setexpr tizen_kernel_addr_r $ramdisk_addr_r + $ramdisksize
105 echo "Searching for kernel in" $boot_prefixes; for prefix in $boot_prefixes; do
106 if load $bootdev $mmcbootdev:$mmcbootpart $tizen_tmp_kernel_addr_r $prefix$kernel; then;
107 echo ${bootmode} "boot";
108 echo "Found kernel ${kernel} in ${prefix}";
109 unzip ${tizen_tmp_kernel_addr_r} ${tizen_kernel_addr_r};
110 load $bootdev $mmcbootdev:$mmcbootpart $fdt_addr_r $fdtfile;
111 if test -e mmc $mmcrootdev:$ramdiskpart sbin/init; then;
112 echo "Loading Ramdisk from partition"${ramdiskpart};
113 mmc read $ramdisk_addr_r $ramdisk_start $ramdisk_size;
115 booti $tizen_kernel_addr_r $ramdisk_addr_r:$ramdisksize $fdt_addr_r;