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
7f3605a3
Commit
7f3605a3
authored
Dec 15, 2017
by
Igor Pecovnik
Browse files
DTB selector for SolidRun boards.
parent
310ba226
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
7f3605a3
...
...
@@ -982,6 +982,19 @@ function jobs ()
fi
;;
# Switch to alternative kernels
#
"DTB"
)
aval_cubox
if
[[
$exitstatus
=
0
]]
;
then
BOX_LENGHT
=
$((${#
TARGET_BOARD
}
+
24
))
;
dialog
--title
"Switching board config"
--backtitle
"
$BACKTITLE
"
--yes-label
"Reboot"
--no-label
"Cancel"
--yesno
"
\n
Reboot to
$TARGET_BOARD
settings?"
7
$BOX_LENGHT
if
[[
$?
=
0
]]
;
then
sed
-i
"s/^fdt_file=.*/fdt_file=
$TARGET_BOARD
/"
/boot/armbianEnv.txt
&&
grep
-q
"fdt_file=
$TARGET_BOARD
"
/boot/armbianEnv.txt
||
echo
"fdt_file=
$TARGET_BOARD
"
>>
/boot/armbianEnv.txt
reboot
;
fi
fi
;;
# Switch to alternative kernels
#
...
...
debian-config-submenu
View file @
7f3605a3
...
...
@@ -339,6 +339,31 @@ function aval_kernel ()
}
#-----------------------------------------------------------------------------------------------------------------------------------------#
# check if board has alternative kernels
#
function
aval_cubox
()
{
LIST
=(
"imx6dl-hummingboard.dtb"
"HB Solo/DualLite"
"imx6dl-hummingboard-emmc-som-v15.dtb"
"HB Solo/DualLite v1.5 with eMMC"
"imx6dl-hummingboard-som-v15.dtb"
"HB Solo/DualLite v1.5"
\
"imx6dl-hummingboard2.dtb"
"HB2 Solo/DualLite"
"imx6dl-hummingboard2-emmc-som-v15.dtb"
"HB2 Solo/DualLite v1.5 with eMMC"
"imx6dl-hummingboard2-som-v15.dtb"
"HB2 Solo/DualLite v1.5"
\
"imx6q-hummingboard.dtb"
"HB Dual/Quad"
"imx6q-hummingboard-emmc-som-v15.dtb"
"HB Dual/Quad v1.5 with eMMC"
"imx6q-hummingboard-som-v15.dtb"
"HB Dual/Quad v1.5"
\
"imx6q-hummingboard2.dtb"
"HB2 Dual/Quad"
"imx6q-hummingboard2-emmc-som-v15.dtb"
"HB2 Dual/Quad v1.5 with eMMC"
"imx6q-hummingboard2-som-v15.dtb"
"HB2 Dual/Quad v1.5"
\
"imx6dl-cubox-i.dtb"
"Cubox-i Solo/DualLite"
"imx6dl-cubox-i-emmc-som-v15.dtb"
"Cubox-i Solo/DualLite v1.5 with eMMC"
"imx6dl-cubox-i-som-v15.dtb"
"Cubox-i Solo/DualLite v1.5"
\
"imx6q-cubox-i.dtb"
"Cubox-i Dual/Quad"
"imx6q-cubox-i-emmc-som-v15.dtb"
"Cubox-i Dual/Quad v1.5 with eMMC"
"imx6q-cubox-i-som-v15.dtb"
"Cubox-i Dual/Quad v1.5"
)
LIST_LENGHT
=
$((${#
LIST
[@]
}
/
2
))
;
if
[
"
$LIST_LENGHT
"
-eq
1
]
;
then
TARGET_BOARD
=
${
AVAL_KERNEL
[0]
}
else
exec
3>&1
TARGET_BOARD
=
$(
dialog
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
--title
"Select board configuration"
--clear
--menu
""
$((
6
+
${
LIST_LENGHT
}))
80 25
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exitstatus
=
$?
;
exec
3>&-
fi
}
#-----------------------------------------------------------------------------------------------------------------------------------------#
# select video modes for a10 and a20
#
...
...
@@ -527,6 +552,7 @@ while true; do
[[
-d
${
OVERLAYDIR
}
]]
&&
\
LIST+
=(
"Hardware"
"Toggle hardware configuration: UART, I2C, etc."
)
[[
"
$LINUXFAMILY
"
=
cubox
&&
"
$BRANCH
"
=
"next"
]]
&&
LIST+
=(
"DTB"
"Switch board .dtb configuration"
)
[[
-f
/usr/bin/bin2fex
&&
"
$LINUXFAMILY
"
=
sun
*
i
&&
"
$BRANCH
"
=
"default"
]]
&&
LIST+
=(
"Fexedit"
"Board (fex) settings editor"
)
[[
$(
apt-cache search
--names-only
'^linux-'
$(
lsb_release
-cs
)
'-root.*.'
$BOARD
''
|
sed
's/.*(\(.*\))/\1/'
|
awk
'{print $1}'
\
|
wc
-l
)
-gt
1
]]
&&
LIST+
=(
"Switch"
"Switch to alternative kernels"
)
...
...
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