projects/Amlogic: LePotato: clean up boot.ini and add config.ini support

This follows config.ini implementation for C2 by Raybuntu.
This commit is contained in:
kszaq 2018-01-28 20:56:32 +01:00
parent ac2da7e857
commit 9d8da6d41b
5 changed files with 96 additions and 98 deletions

View File

@ -1,113 +1,37 @@
#------------------------------------------------------------------------------------------------------
#
# boot.ini identification
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------
LIBRETECH-UBOOT-CONFIG
#------------------------------------------------------------------------------------------------------
#
# Boot Specific Stuff
#
#------------------------------------------------------------------------------------------------------
setenv bootrootfs "BOOT_IMAGE=kernel.img boot=LABEL=LIBREELEC disk=LABEL=STORAGE"
#------------------------------------------------------------------------------------------------------
#
# Console Setup
#
#------------------------------------------------------------------------------------------------------
setenv console "console=ttyS0,115200"
#------------------------------------------------------------------------------------------------------
#
# Video
# Setup the video output (default is 1080p60hz)
# 480 Lines (720x480)
# setenv hdmimode "480i60hz" # Interlaced 60Hz
# setenv hdmimode "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv hdmimode "480p60hz" # 480 Progressive 60Hz
# setenv hdmimode "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz
# 576 Lines (720x576)
# setenv hdmimode "576i50hz" # Interlaced 50Hz
# setenv hdmimode "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv hdmimode "576p50hz" # Progressive 50Hz
# setenv hdmimode "576p_rpt" # Progressive for Rear Projection Televisions 50Hz
# 720 Lines (1280x720)
# setenv hdmimode "720p60hz" # Progressive 60Hz
# setenv hdmimode "720p50hz" # Progressive 50Hz
# 1080 Lines (1920x1080)
# setenv hdmimode "1080i60hz" # Interlaced 60Hz
# setenv hdmimode "1080p60hz" # Progressive 60Hz
# setenv hdmimode "1080i50hz" # Interlaced 50Hz
# setenv hdmimode "1080p50hz" # Progressive 50Hz
# setenv hdmimode "1080p30hz" # Progressive 30Hz
# setenv hdmimode "1080p25hz" # Progressive 25Hz
# setenv hdmimode "1080p24hz" # Progressive 24Hz
# 4K (3840x2160)
# setenv hdmimode "2160p60hz" # Progressive 60Hz
# setenv hdmimode "2160p50hz" # Progressive 50Hz
# setenv hdmimode "2160p30hz" # Progressive 30Hz
# setenv hdmimode "2160p25hz" # Progressive 25Hz
# setenv hdmimode "2160p24hz" # Progressive 24Hz
# setenv hdmimode "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv hdmimode "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# 4K2K (4096x2160)
# setenv hdmimode "smpte60hz" # Progressive 60Hz SMPTE
# setenv hdmimode "smpte50hz" # Progressive 50Hz SMPTE
# setenv hdmimode "smpte30hz" # Progressive 30Hz SMPTE
# setenv hdmimode "smpte25hz" # Progressive 25Hz SMPTE
# setenv hdmimode "smpte24hz" # Progressive 24Hz SMPTE
# setenv hdmimode "smpte60hz420" # Progressive 60Hz SMPTE with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv hdmimode "smpte50hz420" # Progressive 50Hz SMPTE with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
#
#------------------------------------------------------------------------------------------------------
setenv condev "tty0"
setenv hdmimode "1080p60hz"
#------------------------------------------------------------------------------------------------------
#
# LibreELEC variables
#
# Setup the LibreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#------------------------------------------------------------------------------------------------------
setenv libreelec ""
#------------------------------------------------------------------------------------------------------
#
# Amremote
#
#------------------------------------------------------------------------------------------------------
setenv amremote "0"
#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# setenv hdmi_cec "0" # Disabled
# setenv hdmi_cec "1" # Enabled
#
#------------------------------------------------------------------------------------------------------
setenv hdmioutput "1"
setenv vpu "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv uenv_addr 0x13000000
fatload mmc 0:1 ${loadaddr} kernel.img
fatload mmc 0:1 ${dtb_mem_addr} dtb.img
if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
#------------------------------------------------------------------------------------------------------
#
# Board specific
#
#------------------------------------------------------------------------------------------------------
setenv libretech "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs consoleblank=0"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
setenv bootargs "${console} ${bootrootfs} ${libretech} ${cec} ${libreelec}"
# Prepare to boot
fatload mmc 0:1 ${loadaddr} kernel.img
setenv bootargs "console=${condev} ${bootrootfs} ${libretech} ${cec} ${libreelec}"
# Device tree modifications
bootm start ${loadaddr}
bootm start
bootm loados
bootm fdt
if test "${amremote}" = "0"; then fdt set /meson-ir status okay; fdt set /meson-remote status disabled; fi
# Remove Android partitions from device tree
fdt rm /partitions
if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
bootm prep
# Boot the board

View File

@ -0,0 +1,70 @@
#------------------------------------------------------------------------------------------------------
#
# config.ini
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Console Setup
# on serial port:
# condev="ttyS0,115200n8"
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# 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"
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# LibreELEC variables
#
# Setup the LibreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# libreelec="quiet"
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# hdmi_cec="0"
# hdmi_cec="1"
#
#------------------------------------------------------------------------------------------------------

View File

@ -28,7 +28,6 @@ if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot.ini ::
fi
# this is done by scripts/mkimage
#if [ -f "$RELEASE_DIR/3rdparty/bootloader/dtb.img" ]; then
# mcopy $RELEASE_DIR/3rdparty/bootloader/dtb.img ::
#fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi

View File

@ -24,3 +24,4 @@ mkdir -p $RELEASE_DIR/3rdparty/bootloader
cp -a $(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dtb.img $RELEASE_DIR/3rdparty/bootloader
cp -a $(get_build_dir $BOOTLOADER)/fip/u-boot.bin.sd.bin $RELEASE_DIR/3rdparty/bootloader/u-boot.bin
cp -a $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/boot.ini $RELEASE_DIR/3rdparty/bootloader
cp -a $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/config.ini $RELEASE_DIR/3rdparty/bootloader

View File

@ -62,4 +62,8 @@ makeinstall_target() {
if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/boot.ini ]; then
cp -av $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/boot.ini $INSTALL/usr/share/bootloader
fi
if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/config.ini ]; then
cp -av $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/config.ini $INSTALL/usr/share/bootloader
fi
}