Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
c949c173
Commit
c949c173
authored
Oct 06, 2017
by
Igor Pecovnik
Browse files
Changing screen sizes from menu for A20 with legacy kernels
parent
54860f6e
Changes
2
Show whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
c949c173
...
@@ -143,25 +143,33 @@ function jobs ()
...
@@ -143,25 +143,33 @@ function jobs ()
#
#
"Display"
)
"Display"
)
# show display modes menu
# show display modes menu
if
[[
-f
/usr/bin/h3disp
]]
;
then
# h3 boards
get_h3modes
get_h3modes
dialog
--title
" Display output type "
--colors
--help-button
--help-label
"Back"
--no-label
"DVI"
--yes-label
"HDMI"
\
dialog
--title
" Display output type "
--colors
--help-button
--help-label
"Back"
--no-label
"DVI"
--yes-label
"HDMI"
\
--backtitle
"
$BACKTITLE
"
--yesno
"
\n
In case you use an HDMI-to-DVI converter choose DVI!"
7 57
--backtitle
"
$BACKTITLE
"
--yesno
"
\n
In case you use an HDMI-to-DVI converter choose DVI!"
7 57
output_type
=
$?
output_type
=
$?
if
[[
$output_type
=
0
||
$output_type
=
1
]]
;
then
if
[[
$output_type
=
0
||
$output_type
=
1
]]
;
then
if
[[
$output_type
=
0
]]
;
then
if
[[
$output_type
=
0
]]
;
then
display_cmd
=
"h3disp -m
$SCREEN_RESOLUTION
"
;
display_cmd
=
"h3disp -m
$SCREEN_RESOLUTION
"
;
else
else
display_cmd
=
"h3disp -m
$SCREEN_RESOLUTION
-d"
;
display_cmd
=
"h3disp -m
$SCREEN_RESOLUTION
-d"
;
fi
fi
fi
else
# a20 boards
get_a20modes
display_cmd
=
"sed -i
\"
s/^disp_mode=.*/disp_mode=
$SCREEN_RESOLUTION
/
\"
/boot/armbianEnv.txt"
;
fi
dialog
--title
" Display resolution "
--colors
--no-label
"Back"
--backtitle
"
$BACKTITLE
"
--yesno
\
dialog
--title
" Display resolution "
--colors
--no-label
"Back"
--backtitle
"
$BACKTITLE
"
--yesno
\
"
\n
S
etting new screen mode.
\n\n
Executing
\Z
1
$display_cmd
\Z
0 and reboot?
"
9 56
"
\n
S
witching to
\Z
1
$SCREEN_RESOLUTION
\Z
0 and reboot?
"
7 42
if
[[
$?
=
0
]]
;
then
if
[[
$?
=
0
]]
;
then
eval
$display_cmd
>
/dev/null
eval
$display_cmd
>
/dev/null
reboot
reboot
fi
fi
fi
;;
;;
...
...
debian-config-submenu
View file @
c949c173
...
@@ -348,6 +348,33 @@ function aval_kernel ()
...
@@ -348,6 +348,33 @@ function aval_kernel ()
}
}
#-----------------------------------------------------------------------------------------------------------------------------------------#
# select video modes for a10 and a20
#
function
get_a20modes
()
{
IFS
=
$'
\r
'
GLOBIGNORE
=
'*'
SCREEN_RESOLUTION
=(
"1920x1080p60"
"1280x720p60"
"1920x1080p50"
"1280x1024p60"
"1024x768p60"
"800x600p60"
"640x480p60"
"1360x768p60"
"1440x900p60"
"1680x1050p60"
)
local
LIST
=()
for
i
in
"
${
SCREEN_RESOLUTION
[@]
}
"
do
LIST+
=(
"
${
i
[0]//[[
:blank:]]/
}
"
""
)
done
LIST_LENGHT
=
$((${#
LIST
[@]
}
/
2
))
;
#echo $LIST_LENGHT
#exit
if
[
"
$LIST_LENGHT
"
-eq
1
]
;
then
SCREEN_RESOLUTION
=
${
SCREEN_RESOLUTION
[0]
}
else
exec
3>&1
SCREEN_RESOLUTION
=
$(
dialog
--nocancel
--backtitle
"
$BACKTITLE
"
--no-collapse
\
--title
"Select video mode"
--clear
--menu
""
$((
6
+
${
LIST_LENGHT
}))
25
$((
1
+
${
LIST_LENGHT
}))
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exec
3>&-
fi
}
#-----------------------------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------------------------#
# select video modes for h3
# select video modes for h3
#
#
...
@@ -707,7 +734,7 @@ while true; do
...
@@ -707,7 +734,7 @@ while true; do
[[
-f
/usr/bin/bin2fex
&&
"
$LINUXFAMILY
"
=
sun
*
i
&&
"
$BRANCH
"
=
"default"
]]
&&
LIST+
=(
"Fexedit"
"Board (fex) settings editor"
)
[[
-f
/usr/bin/bin2fex
&&
"
$LINUXFAMILY
"
=
sun
*
i
&&
"
$BRANCH
"
=
"default"
]]
&&
LIST+
=(
"Fexedit"
"Board (fex) settings editor"
)
if
[[
-n
$(
dpkg
-l
|
grep
linux-headers
)
]]
;
then
LIST+
=(
"Headers"
"Remove kernel headers"
)
;
else
\
if
[[
-n
$(
dpkg
-l
|
grep
linux-headers
)
]]
;
then
LIST+
=(
"Headers"
"Remove kernel headers"
)
;
else
\
LIST+
=(
"Headers"
"Install kernel headers"
)
;
fi
LIST+
=(
"Headers"
"Install kernel headers"
)
;
fi
[[
-f
/usr/bin/h3disp
&&
"
$LINUXFAMILY
"
=
"
sun
8i"
&&
"
$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"
)
# count number of menu items to adjust window sizee
# count number of menu items to adjust window sizee
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment