Commit 995ca13b authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Enable changing screen resolution for Odroid N2

parent 86faa7a6
...@@ -592,6 +592,7 @@ function get_odroidmodes () ...@@ -592,6 +592,7 @@ function get_odroidmodes ()
IFS=$'\r\n' IFS=$'\r\n'
GLOBIGNORE='*' GLOBIGNORE='*'
SCREEN_RESOLUTION=($(cat /boot/boot.ini | grep -w "# setenv" | grep "hz" | cut -d'"' -f 2)) SCREEN_RESOLUTION=($(cat /boot/boot.ini | grep -w "# setenv" | grep "hz" | cut -d'"' -f 2))
SCREEN_RESOLUTION=($(cat /boot/boot.ini | grep "Progressive" | grep -v "setenv" | cut -d'"' -f 2))
local LIST=() local LIST=()
for i in "${SCREEN_RESOLUTION[@]}" for i in "${SCREEN_RESOLUTION[@]}"
do do
......
...@@ -234,9 +234,11 @@ function jobs () ...@@ -234,9 +234,11 @@ function jobs ()
fi fi
elif [[ "$LINUXFAMILY" = odroidc* ]]; then elif [[ "$LINUXFAMILY" = odroidc* || "$LINUXFAMILY" = odroidn2 ]]; then
get_odroidmodes get_odroidmodes
display_cmd="sed -i \"s/^setenv m .*/# &/\" /boot/boot.ini;sed -i '/setenv m \"$SCREEN_RESOLUTION\"/s/^# //g' /boot/boot.ini"; display_cmd="sed -i \"s/^setenv m .*/# &/\" /boot/boot.ini;sed -i '/setenv m \"$SCREEN_RESOLUTION\"/s/^# //g' /boot/boot.ini";
# odroid n2
display_cmd='sed -i "s/^setenv hdmimode .*/setenv hdmimode \"$SCREEN_RESOLUTION\"/" /boot/boot.ini; sed -i "s/^setenv display_autodetect .*/setenv display_autodetect \"false\"/" /boot/boot.ini';
else else
# a20 boards # a20 boards
get_a20modes get_a20modes
......
...@@ -84,8 +84,8 @@ while true; do ...@@ -84,8 +84,8 @@ while true; do
[[ "$LINUXFAMILY" = sun*i && "$BRANCH" = "default" && \ [[ "$LINUXFAMILY" = sun*i && "$BRANCH" = "default" && \
-n $(bin2fex </boot/script.bin 2>/dev/null | grep -w "hdmi_used = 1") ]] && LIST+=( "Display" "set the display resolution" ) -n $(bin2fex </boot/script.bin 2>/dev/null | grep -w "hdmi_used = 1") ]] && LIST+=( "Display" "Set the display resolution" )
[[ "$LINUXFAMILY" = odroidc* && "$BRANCH" = "default" ]] && LIST+=( "Display" "set the display resolution" ) [[ "$LINUXFAMILY" = odroidc* || "$LINUXFAMILY" = odroidn2 && "$BRANCH" = "default" ]] && LIST+=( "Display" "Set the display resolution" )
# desktop # desktop
if [[ -n $DISPLAY_MANAGER ]]; then if [[ -n $DISPLAY_MANAGER ]]; then
LIST+=( "Desktop" "Disable desktop or change login type" ) LIST+=( "Desktop" "Disable desktop or change login type" )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment