Advertisement
klajkor

Odroid C4 boot ini, Ubuntu 22.04 LTS

Aug 14th, 2022
792
0
127 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.34 KB | Software | 0 0
  1. ODROIDC4-UBOOT-CONFIG
  2.  
  3. setenv bootlabel "Hardkernel Ubuntu 20.04"
  4.  
  5. setenv board "odroidc4"
  6. setenv display_autodetect "true"
  7. setenv hdmimode "1080p60hz"
  8. setenv monitor_onoff "false" # true or false
  9. setenv overscan "100"
  10. setenv sdrmode "auto"
  11. setenv voutmode "hdmi"
  12. setenv disablehpd "false"
  13. setenv cec "true"
  14. setenv disable_vu7 "true"
  15. setenv max_freq_a55 "1908"    # 1.908 GHz, default value
  16. setenv maxcpus "4"
  17. setenv enable_wol "0"
  18.  
  19. # Set load addresses
  20. setenv dtb_loadaddr "0x10000000"
  21. setenv dtbo_addr_r "0x11000000"
  22. setenv k_addr "0x1100000"
  23. setenv loadaddr "0x1B00000"
  24. setenv initrd_loadaddr "0x3700000"
  25.  
  26. if test "${variant}" = "hc4"; then
  27.        setenv max_freq_a55 "1800"
  28. fi
  29.  
  30. load mmc ${devno}:1 ${loadaddr} config.ini \
  31.     && ini generic ${loadaddr}
  32. if test "x${overlay_profile}" != "x"; then
  33.     ini overlay_${overlay_profile} ${loadaddr}
  34. fi
  35.  
  36. setenv condev "console=ttyS0,115200n8"   # on both
  37.  
  38.  
  39. ### Normal HDMI Monitors
  40. if test "${display_autodetect}" = "true"; then hdmitx edid; fi
  41. if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
  42. if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi
  43. if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
  44.  
  45. # Boot Args
  46. setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a55=${max_freq_a55} maxcpus=${m
  47. axcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} logo=osd0,loaded ${cec_enable} sdrmode=${sdrmode} enable_wol=${enable_wol} systemd.uni
  48. fied_cgroup_hierarchy=0"
  49.  
  50. # Load kernel, dtb and initrd
  51. load mmc ${devno}:1 ${k_addr} Image.gz
  52. load mmc ${devno}:1 ${dtb_loadaddr} amlogic/meson64_odroid${variant}.dtb
  53. load mmc ${devno}:1 ${initrd_loadaddr} uInitrd
  54. fdt addr ${dtb_loadaddr}
  55.  
  56. if test "x{overlays}" != "x"; then
  57.     fdt resize ${overlay_resize}
  58.     for overlay in ${overlays}; do
  59.         load mmc ${devno}:1 ${dtbo_addr_r} amlogic/overlays/${board}/${overlay}.dtbo \
  60.             && fdt apply ${dtbo_addr_r}
  61.     done
  62. fi
  63.  
  64. # unzip the kernel
  65. unzip ${k_addr} ${loadaddr}
  66.  
  67. # boot
  68. booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement