mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
This makes Odroid C2 use linux-amlogic and similar linux patches as WeTek Hub u-boot patch updated to allow overwriting env vars boot.ini updated to reflect missing features in linux-amlogic
70 lines
2.2 KiB
Bash
70 lines
2.2 KiB
Bash
#!/bin/sh
|
|
################################################################################
|
|
# This file is part of LibreELEC - https://LibreELEC.tv
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
|
# Copyright (C) 2016 Team LibreELEC
|
|
#
|
|
# LibreELEC is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# LibreELEC is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
|
################################################################################
|
|
|
|
hdmimode=1080p60hz
|
|
|
|
# Parse command line arguments
|
|
for arg in $(cat /proc/cmdline); do
|
|
case $arg in
|
|
hdmimode=*)
|
|
hdmimode="${arg#*=}"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Enable first framebuffer
|
|
echo 0 > /sys/class/graphics/fb0/blank
|
|
|
|
# Disable second framebuffer
|
|
echo 1 > /sys/class/graphics/fb1/blank
|
|
|
|
# Disable framebuffer scaling
|
|
echo 0 > /sys/class/graphics/fb0/free_scale
|
|
echo 0 > /sys/class/graphics/fb1/free_scale
|
|
|
|
# set initial video state
|
|
echo 1 > /sys/class/video/disable_video
|
|
|
|
# Set framebuffer geometry to match the resolution
|
|
case $hdmimode in
|
|
480*) X=720 Y=480 ;;
|
|
576*) X=720 Y=576 ;;
|
|
720p*) X=1280 Y=720 ;;
|
|
*) X=1920 Y=1080 ;;
|
|
esac
|
|
|
|
fbset -fb /dev/fb0 -g $X $Y 1920 2160 32
|
|
fbset -fb /dev/fb1 -g 32 32 32 32 32
|
|
|
|
# Enable scaling for 4K output
|
|
case $hdmimode in
|
|
4k*|smpte*|2160*)
|
|
echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis
|
|
echo 0 0 3839 2159 > /sys/class/graphics/fb0/window_axis
|
|
echo 1920 > /sys/class/graphics/fb0/scale_width
|
|
echo 1080 > /sys/class/graphics/fb0/scale_height
|
|
echo 0x10001 > /sys/class/graphics/fb0/free_scale
|
|
;;
|
|
esac
|
|
|
|
# Include deinterlacer into default VFM map
|
|
echo rm default > /sys/class/vfm/map
|
|
echo add default decoder ppmgr deinterlace amvideo > /sys/class/vfm/map
|