diff --git a/buildroot-external/board/odroidc2/boot-env.txt b/buildroot-external/board/odroidc2/boot-env.txt new file mode 100644 index 000000000..f71b78078 --- /dev/null +++ b/buildroot-external/board/odroidc2/boot-env.txt @@ -0,0 +1,129 @@ +# Custom modeline! +# To use custom modeline you need to disable all the below resolutions +# and setup your own! +# For more information check our wiki: +# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting +# Example below: +#m=custombuilt +#modeline=1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1 + +# 480 Lines (720x480) +#m=480i60hz +#m=480i_rpt +#m=480p60hz +#m=480p_rpt + +# 576 Lines (720x576) +#m=576i50hz +#m=576i_rpt +#m=576p50hz +#m=576p_rpt + +# 720 Lines (1280x720) +#m=720p50hz +#m=720p60hz + +# 1080 Lines (1920x1080) +#m=1080i60hz +m=1080p60hz +#m=1080i50hz +#m=1080p50hz +#m=1080p24hz + +# 4K (3840x2160) +#m=2160p30hz +#m=2160p25hz +#m=2160p24hz +#m=smpte24hz +#m=2160p50hz +#m=2160p60hz +#m=2160p50hz420 +#m=2160p60hz420 + +### VESA modes ### +#m=640x480p60hz +#m=800x480p60hz +#m=480x800p60hz +#m=800x600p60hz +#m=1024x600p60hz +#m=1024x768p60hz +#m=1280x800p60hz +#m=1280x1024p60hz +#m=1360x768p60hz +#m=1440x900p60hz +#m=1600x900p60hz +#m=1680x1050p60hz +#m=1600x1200p60hz +#m=1920x1200p60hz +#m=2560x1080p60hz +#m=2560x1440p60hz +#m=2560x1600p60hz +#m=3440x1440p60hz + +# HDMI BPP Mode +m_bpp=32 +#m_bpp=24 +#m_bpp=16 + +# HDMI DVI/VGA modes +# By default its set to HDMI, if needed change below. +# Uncomment only a single Line. +#vout=dvi +#vout=vga + +# HDMI HotPlug Detection control +# Allows you to force HDMI thinking that the cable is connected. +# true = HDMI will believe that cable is always connected +# false = will let board/monitor negotiate the connection status +hpd=true +#hpd=false + +# Monitor output +# Controls if HDMI PHY should output anything to the monitor +monitor_onoff=false + +# Server Mode (aka. No Graphics) +# Setting nographics to 1 will disable all video subsystem +# This mode is ideal of server type usage. (Saves ~300Mb of RAM) +nographics=0 + +# Meson Timer +# 1 - Meson Timer +# 0 - Arch Timer +# Using meson_timer improves the video playback however it breaks KVM (virtualization). +# Using arch timer allows KVM/Virtualization to work however you'll experience poor video +mesontimer=1 + +# UHS (Ultra High Speed) MicroSD mode enable/disable +disableuhs=false + +# MicroSD Card Detection enable/disable +# Force the MMC controlled to believe that a card is connected. +mmc_removable=true + +# USB Multi WebCam tweak +# Only enable this if you use it. +usbmulticam=false + +# CPU Frequency / Cores control +########################################### +### WARNING!!! WARNING!!! WARNING!!! +# Before changing anything here please read the wiki entry: +# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq +# +# MAX CPU's +#maxcpus=1 +#maxcpus=2 +#maxcpus=3 +maxcpus=4 + +# MAX Frequency +#max_freq=2016 +#max_freq=1944 +#max_freq=1944 +#max_freq=1920 +#max_freq=1896 +#max_freq=1752 +#max_freq=1680 +#max_freq=1656 +max_freq=1536 diff --git a/buildroot-external/board/odroidc2/post-image.sh b/buildroot-external/board/odroidc2/post-image.sh index 1041932bf..94d839af9 100755 --- a/buildroot-external/board/odroidc2/post-image.sh +++ b/buildroot-external/board/odroidc2/post-image.sh @@ -16,23 +16,10 @@ rm -rf ${BOOT_DATA} mkdir -p ${BOOT_DATA} cp ${BINARIES_DIR}/boot.scr ${BOOT_DATA}/boot.scr +cp ${BOARD_DIR}/boot-env.txt ${BOOT_DATA}/uboot-settings.txt cp ${BINARIES_DIR}/meson-gxbb-odroidc2.dtb ${BOOT_DATA}/meson-gxbb-odroidc2.dtb -# Update Boot options -( - echo -n -e "\x41\xD9\x12\xFF" - echo -n -e "\x00\x00" -) > ${BOOT_DATA}/uboot.env - -# Update Boot options -( - echo "kernel=u-boot.bin" - echo "disable_splash=1" - echo "dtparam=audio=on" - echo "arm_64bit=1" -) > ${BOOT_DATA}/config.txt - -echo "console=ttyS0,115200n8 console=tty0" > ${BOOT_DATA}/cmdline.txt +echo "console=tty0 console=ttyAML0,115200n8" > ${BOOT_DATA}/cmdline.txt function make_bootable() { local BL1="${BINARIES_DIR}/bl1.bin.hardkernel" diff --git a/buildroot-external/board/odroidc2/uboot-boot.sh b/buildroot-external/board/odroidc2/uboot-boot.sh index 1ac22878c..76733d464 100644 --- a/buildroot-external/board/odroidc2/uboot-boot.sh +++ b/buildroot-external/board/odroidc2/uboot-boot.sh @@ -1,160 +1,20 @@ -################################################### -# Changes made to this are overwritten every time there's a new upgrade -# To make your changes permanent change it on -# boot.ini.default -# After changing it on boot.ini.default run the bootini command to -# rewrite this file with your personal permanent settings. -# Documentation: http://odroid.com/dokuwiki/doku.php?id=en:c2_persistent_bootini -######################################################################## - -# Possible screen resolutions -# Uncomment only a single Line! The line with setenv written. -# At least one mode must be selected. - -# Custom modeline! -# To use custom modeline you need to disable all the below resolutions -# and setup your own! -# For more information check our wiki: -# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting -# Example below: -# setenv m "custombuilt" -# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1" - -# 480 Lines (720x480) -# setenv m "480i60hz" # Interlaced 60Hz -# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz -# setenv m "480p60hz" # 480 Progressive 60Hz -# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz - -# 576 Lines (720x576) -# setenv m "576i50hz" # Interlaced 50Hz -# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz -# setenv m "576p50hz" # Progressive 50Hz -# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz - -# 720 Lines (1280x720) -# setenv m "720p50hz" # 50Hz -# setenv m "720p60hz" # 60Hz - -# 1080 Lines (1920x1080) -# setenv m "1080i60hz" # Interlaced 60Hz -setenv m "1080p60hz" # Progressive 60Hz -# setenv m "1080i50hz" # Interlaced 50Hz -# setenv m "1080p50hz" # Progressive 50Hz -# setenv m "1080p24hz" # Progressive 24Hz - -# 4K (3840x2160) -# setenv m "2160p30hz" # Progressive 30Hz -# setenv m "2160p25hz" # Progressive 25Hz -# setenv m "2160p24hz" # Progressive 24Hz -# setenv m "smpte24hz" # Progressive 24Hz SMPTE -# setenv m "2160p50hz" # Progressive 50Hz -# setenv m "2160p60hz" # Progressive 60Hz -# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it) -# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it) - -### VESA modes ### -# setenv m "640x480p60hz" -# setenv m "800x480p60hz" -# setenv m "480x800p60hz" -# setenv m "800x600p60hz" -# setenv m "1024x600p60hz" -# setenv m "1024x768p60hz" -# setenv m "1280x800p60hz" -# setenv m "1280x1024p60hz" -# setenv m "1360x768p60hz" -# setenv m "1440x900p60hz" -# setenv m "1600x900p60hz" -# setenv m "1680x1050p60hz" -# setenv m "1600x1200p60hz" -# setenv m "1920x1200p60hz" -# setenv m "2560x1080p60hz" -# setenv m "2560x1440p60hz" -# setenv m "2560x1600p60hz" -# setenv m "3440x1440p60hz" - -# HDMI BPP Mode -setenv m_bpp "32" -# setenv m_bpp "24" -# setenv m_bpp "16" - -# HDMI DVI/VGA modes -# By default its set to HDMI, if needed change below. -# Uncomment only a single Line. -# setenv vout "dvi" -# setenv vout "vga" - -# HDMI HotPlug Detection control -# Allows you to force HDMI thinking that the cable is connected. -# true = HDMI will believe that cable is always connected -# false = will let board/monitor negotiate the connection status -setenv hpd "true" -# setenv hpd "false" - -# Monitor output -# Controls if HDMI PHY should output anything to the monitor -#setenv monitor_onoff "false" # true or false - -# Server Mode (aka. No Graphics) -# Setting nographics to 1 will disable all video subsystem -# This mode is ideal of server type usage. (Saves ~300Mb of RAM) -setenv nographics "0" - -# Meson Timer -# 1 - Meson Timer -# 0 - Arch Timer -# Using meson_timer improves the video playback however it breaks KVM (virtualization). -# Using arch timer allows KVM/Virtualization to work however you'll experience poor video -#setenv mesontimer "1" - -# UHS (Ultra High Speed) MicroSD mode enable/disable -#setenv disableuhs "false" - -# MicroSD Card Detection enable/disable -# Force the MMC controlled to believe that a card is connected. -#setenv mmc_removable "true" - -# USB Multi WebCam tweak -# Only enable this if you use it. -#setenv usbmulticam "false" - -# Default Console Device Setting -#setenv condev "console=ttyS0,115200n8 console=tty0" # on both - -# CPU Frequency / Cores control -########################################### -### WARNING!!! WARNING!!! WARNING!!! -# Before changing anything here please read the wiki entry: -# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq -# -# MAX CPU's -# setenv maxcpus "1" -# setenv maxcpus "2" -# setenv maxcpus "3" -setenv maxcpus "4" - -# MAX Frequency -# setenv max_freq "2016" # 2.016GHz -# setenv max_freq "1944" # 1.944GHz -# setenv max_freq "1944" # 1.944GHz -# setenv max_freq "1920" # 1.920GHz -# setenv max_freq "1896" # 1.896GHz -# setenv max_freq "1752" # 1.752GHz -# setenv max_freq "1680" # 1.680GHz -# setenv max_freq "1656" # 1.656GHz -setenv max_freq "1536" # 1.536GHz - - ########################################### - test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B" test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3 test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3 +if load mmc 0:1 ${ramdisk_addr_r} uboot-settings.txt; then + env import -t ${ramdisk_addr_r} ${filesize}; +fi + +# Board bootargs +if test "${m}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi +setenv bootargs_odroidc2 "${condev} no_console_suspend hdmimode=${m} ${cmode} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff} disableuhs=${disableuhs} mmc_removable=${mmc_removable} usbmulticam=${usbmulticam}" + # HassOS bootargs -setenv bootargs_hassos "no_console_suspend hdmimode=${m} m_bpp=${m_bpp} net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor cgroup_enable=memory" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor cgroup_enable=memory" # HassOS system A/B #setenv bootargs_a "root=PARTUUID=0d3e0000-06 rootfstype=squashfs ro" @@ -166,15 +26,12 @@ setenv bootargs_hassos "no_console_suspend hdmimode=${m} m_bpp=${m_bpp} net.ifna setenv bootargs_a "root=PARTUUID=0d3e0000-06 rootfstype=squashfs ro rootwait" setenv bootargs_b "root=PARTUUID=0d3e0000-08 rootfstype=squashfs ro rootwait" -# Preserve origin bootargs -setenv bootargs_odroidc2 -setenv fdt_org "0x1000000" -# Load extraargs -fileenv mmc 0:1 ${fdt_org} cmdline.txt cmdline -fatload mmc 0:1 ${fdt_org} meson-gxbb-odroidc2.dtb -fdt addr ${fdt_org} -#fdt get value bootargs_odroidc2 /chosen bootargs +usb start +# Load extraargs +fileenv mmc 0:1 ${ramdisk_addr_r} cmdline.txt cmdline +fatload mmc 0:1 ${fdt_addr_r} meson-gxbb-odroidc2.dtb +#fdt addr ${fdt_addr_r} # logical volumes get numbered after physical ones. # 1. boot @@ -195,14 +52,14 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1 echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining" setenv load_kernel "ext4load mmc 0:5 ${kernel_addr_r} Image" - setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}" + setenv bootargs "${bootargs_hassos} ${bootargs_odroidc2} ${bootargs_a} rauc.slot=A ${cmdline}" fi elif test "x${BOOT_SLOT}" = "xB"; then if test ${BOOT_B_LEFT} -gt 0; then setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining" setenv load_kernel "ext4load mmc 0:7 ${kernel_addr_r} Image" - setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}" + setenv bootargs "${bootargs_hassos} ${bootargs_odroidc2} ${bootargs_b} rauc.slot=B ${cmdline}" fi fi done @@ -221,7 +78,9 @@ fi echo "Loading kernel" run load_kernel echo " Starting kernel" -booti ${kernel_addr_r} - ${fdt_org} +printenv load_kernel +printenv bootargs +booti ${kernel_addr_r} - ${fdt_addr_r} echo "Fails on boot" reset diff --git a/buildroot-external/board/odroidc2/uboot.config b/buildroot-external/board/odroidc2/uboot.config index 1470a760e..40157cda2 100644 --- a/buildroot-external/board/odroidc2/uboot.config +++ b/buildroot-external/board/odroidc2/uboot.config @@ -15,3 +15,6 @@ CONFIG_DOS_PARTITION=y CONFIG_FS_EXT4=y CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_SETEXPR=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_CMD_FILEENV=y diff --git a/buildroot-external/package/hardkernel-sbl/Config.in b/buildroot-external/package/hardkernel-sbl/Config.in index e0699cbe5..32a50de56 100644 --- a/buildroot-external/package/hardkernel-sbl/Config.in +++ b/buildroot-external/package/hardkernel-sbl/Config.in @@ -14,11 +14,6 @@ config BR2_PACKAGE_HARDKERNEL_SBL_ODROID_C2 help For the Odroid-C2 -config BR2_PACKAGE_HARDKERNEL_SBL_ODROID_XU4 - bool "Odroid-XU4" - help - For the Odroid-XU4. NOT YET IMPLEMENTED!! - endchoice endif