Skip to content
Permalink
Browse files

Amlogic-ng: refactor bootloader config files

  • Loading branch information...
adamg88 committed May 14, 2019
1 parent 8364207 commit 2c185c36346a5f9e3e88a7b2ab2ac0d14f86211b
Showing with 53 additions and 158 deletions.
  1. +13 −26 projects/Amlogic-ng/bootloader/Odroid_N2_boot.ini
  2. +40 −132 projects/Amlogic-ng/bootloader/config.ini
@@ -9,52 +9,39 @@ ODROIDN2-UBOOT-CONFIG
#
#------------------------------------------------------------------------------------------------------

setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv condev "console=ttyS0,115200 console=tty0"
setenv label "CoreELEC"
setenv hdmimode "1080p60hz"
setenv bmp_width "1920"
setenv bmp_height "1080"
setenv vout_mode "hdmi"
setenv hdmioutput "1"
setenv vpu "1"
setenv coreelec "quiet"
setenv hdmi_cec "1"
setenv maxcpus "6"
setenv max_freq_a73 "1800"
setenv max_freq_a53 "1896"
setenv rtc_shield "0"
setenv emmc_timeout "0"
setenv wol "1"
setenv hdmi_cec "1"
setenv remotewakeup "0x23dc4db2"
setenv decode_type "0"
setenv wol "1"
setenv heartbeat "1"
setenv emmc_timeout "0"
setenv coreelec "quiet"

setenv rootopt "BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv consoleopt "console=ttyS0,115200n8 console=tty0 no_console_suspend"

setenv loadaddr 0x11000000
setenv dtb_mem_addr 0x1000000
setenv uenv_addr 0x13000000

fatload mmc ${mmc_dev}:1 ${loadaddr} kernel.img
fatload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img

if fatload mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi

if test "${emmc_timeout}" = "1"; then showlogo ${hdmimode} ${bmp_width} ${bmp_height} timeout-logo-${bmp_height}.bmp.gz; sleep 30; mmc dev 1; mmc dev 0; fi

setenv irsetup "hk-lirc-helper.remotewakeup=${remotewakeup} hk-lirc-helper.decode_type=${decode_type}"
setenv device "no_console_suspend logo=osd0,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable voutmode=${vout_mode} hdmimode=${hdmimode} cvbsmode=nocvbs mac=${ethaddr} consoleblank=0 max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} enable_wol=${wol}"
setenv displayopt "hdmimode=${hdmimode} logo=osd0,loaded,0x3d800000"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec3f"; fi
setenv bootargs "${condev} ${bootrootfs} ${device} ${cec} ${coreelec} ${irsetup}"
if test "${emmc_timeout}" = "1"; then showlogo ${hdmimode} 1920 1080 timeout-logo-1080.bmp.gz; sleep 30; mmc dev 1; mmc dev 0; fi
setenv irsetup "hk-lirc-helper.remotewakeup=${remotewakeup} hk-lirc-helper.decode_type=${decode_type}"
setenv initargs "${rootopt} ${consoleopt} max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} enable_wol=${wol} ${cec} ${irsetup}"
setenv bootargs "${initargs} ${displayopt} ${coreelec}"

# Device tree modifications
bootm start
bootm loados
bootm fdt
if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
if test "${heartbeat}" = "0"; then fdt set /leds/blueled linux,default-trigger "none"; fi
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep

# Boot the board
bootm go
@@ -7,184 +7,92 @@
#------------------------------------------------------------------------------------------------------
#
# Console Setup
# on serial port:
# condev='ttyS0,115200'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Video
# Setup the video output
# hdmimode='480i60hz'
# hdmimode='480i_rpt'
# hdmimode='480p60hz'
# hdmimode='480p_rpt'
# hdmimode='576i50hz'
# hdmimode='576i_rpt'
# hdmimode='576p50hz'
# hdmimode='576p_rpt'
# hdmimode='720p60hz'
# hdmimode='720p50hz'
# hdmimode='1080i60hz'
# hdmimode='1080p60hz'
# hdmimode='1080i50hz'
# hdmimode='1080p50hz'
# hdmimode='1080p30hz'
# hdmimode='1080p25hz'
# hdmimode='1080p24hz'
# hdmimode='2160p60hz'
# hdmimode='2160p50hz'
# hdmimode='2160p30hz'
# hdmimode='2160p25hz'
# hdmimode='2160p24hz'
# hdmimode='2160p60hz420'
# hdmimode='2160p50hz420'
# hdmimode='smpte60hz'
# hdmimode='smpte50hz'
# hdmimode='smpte30hz'
# hdmimode='smpte25hz'
# hdmimode='smpte24hz'
# hdmimode='smpte60hz420'
# hdmimode='smpte50hz420'
# consoleopt='console=ttyS0,115200n8 console=tty0 no_console_suspend'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# HDMI/DVI Mode Configuration
# This will enforce the signal type of display
# vout_mode='hdmi'
# vout_mode='dvi'
# Display Setup
# Valid HDMI modes can be found at:
# https://wiki.odroid.com/odroid-n2/application_note/software/set_display_mode
#
# hdmimode='1080p60hz'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# CoreELEC variables
# CPU Frequency Control
#
# Setup the CoreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
# WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry at:
# https://wiki.odroid.com/odroid-n2/application_note/software/set_cpu_freq
#
# coreelec='quiet'
# max_freq_a73='1800'
# max_freq_a53='1896'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# hdmi_cec='0'
# hdmi_cec='1'
# HDMI CEC Control, 0=disable/1=enable
#
# hdmi_cec='1'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# CPU Frequency / Cores control
# IR setup for Odroid N2
# Setup a custom keycode to wake the N2 from suspend or poweroff
# You can stop kodi and eventlircd and use "ir-keytable -u" to obtain a compatible NEC keycode
#
# WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry:
# https://wiki.odroid.com/odroid-n2/application_note/software/set_cpu_freq
# remotewakeup="0x31ce4db2"
#
# decode_type can be one of the following:
# NEC=0, DUOKAN=1, TOSHIBA=2, RCA=3, RC5=4, RC6=5, NEC_TOSHIBA_2IN1=6, NEC_RCA_2IN1=7, RCMM=8,
# NEC_RC5_2IN1=9, NEC_RC5_2IN1=0xa
#
# MAX CPU's
# maxcpus='4'
# maxcpus='5'
# maxcpus='6'
#
# MAX Frequency for A73, big cores
# 2.004 GHz (overclock)
# max_freq_a73='2004'
# 1.908 GHz (overclock)
# max_freq_a73='1908'
# 1.800 GHz (default value)
# max_freq_a73='1800'
# 1.704 GHz
# max_freq_a73='1704
# 1.608 GHz
# max_freq_a73='1608'
# 1.512 GHz
# max_freq_a73='1512'
# 1.398 GHz
# max_freq_a73='1398'
# 1.200 GHz
# max_freq_a73='1200'
# 1.000 GHz
# max_freq_a73='1000'
# 667 MHz
# max_freq_a73='667'
# 500 MHz
# max_freq_a73='500'
# 250 MHz
# max_freq_a73='250'
# 100 MHz
# max_freq_a73='100'
#
# MAX Frequency for A53, little cores
# 1.992 GHz (overclock)
# max_freq_a53='1992'
# 1.896 GHz (default value)
# max_freq_a53='1896'
# 1.704 GHz
# max_freq_a53='1704
# 1.608 GHz
# max_freq_a53='1608'
# 1.512 GHz
# max_freq_a53='1512'
# 1.398 GHz
# max_freq_a53='1398'
# 1.200 GHz
# max_freq_a53='1200'
# 1.000 GHz
# max_freq_a53='1000'
# 667 MHz
# max_freq_a53='667'
# 500 MHz
# max_freq_a53='500'
# 250 MHz
# max_freq_a53='250'
# 100 MHz
# max_freq_a53='100'
# decode_type=0 # NEC
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# WOL setting for Odroid N2
# wol=1
# WOL Setting for Odroid N2
#
# wol=1
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# EMMC timeout for Odroid N2
# You can enable a boot delay of 30s before the kernel is loaded. This way you can boot from an
# SD card and you have time to insert the emmc module, otherwise it would boot Android from emmc
# automatically. This is especially useful if you want to install CoreELEC to emmc.
# emmc_timeout=1
# Heartbeat for Odroid N2
# You can disable the blue LED heartbeat with this option, 0=off/1=on
#
# heartbeat=1
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# IR setup for Odroid N2
# Setup a custom keycode to wake the N2 from suspend or poweroff
# You can stop kodi and eventlircd and use "ir-keytable -u" to obtain a compatible NEC keycode
#
# remotewakeup="0x31ce4db2"
# EMMC Timeout for Odroid N2
# BL1 is configured to boot from eMMC before SD-card, this option is useful if you have another OS
# installed on to an eMMC as it will delay bootup by 30s allowing you to boot from an SD-card and
# attach the eMMC during this time, u-boot will then boot from the SD-card and the eMMC will be
# be available to the OS allowing you to use installtoemmc or browse the eMMC contents.
#
# decode_type can be one of the following
# NEC=0, DUOKAN=1, TOSHIBA=2, RCA=3, RC5=4, RC6=5, NEC_TOSHIBA_2IN1=6, NEC_RCA_2IN1=7, RCMM=8,
# NEC_RC5_2IN1=9, NEC_RC5_2IN1=0xa
#
# decode_type=0 # NEC
# emmc_timeout=1
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Heartbeat for Odroid N2
# You can disable the blue LED heartbeat with this option, 0=off/1=on
# CoreELEC Developer Options
# Valid options are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# heartbeat=1
# coreelec='quiet'
#
#------------------------------------------------------------------------------------------------------

0 comments on commit 2c185c3

Please sign in to comment.
You can’t perform that action at this time.