Commit d0b32e01 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU install: on WSL, do not execute anything when user selects invalid options

(32-bit binaries are not going to work anyway)

--HG--
branch : qemu
parent 1a47841d99ff
...@@ -254,7 +254,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then ...@@ -254,7 +254,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then
else else
# WSL # WSL
if apt-cache show gdb-arm-none-eabi &>/dev/null; then if apt-cache show gdb-arm-none-eabi &>/dev/null; then
echo "1 - option not available on Windows 10 WSL (32-bit Linux binaries not supported)" echo "1 - Option not available on Windows 10 WSL (32-bit Linux binaries not supported)"
elif apt-cache show gdb-multiarch &>/dev/null; then elif apt-cache show gdb-multiarch &>/dev/null; then
echo "1 - Install gdb-multiarch and gcc-arm-none-eabi from Ubuntu repo (recommended)" echo "1 - Install gdb-multiarch and gcc-arm-none-eabi from Ubuntu repo (recommended)"
echo " GDB 8.1 is known to work well, but 8.2 is unable to run our scripts." echo " GDB 8.1 is known to work well, but 8.2 is unable to run our scripts."
...@@ -267,7 +267,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then ...@@ -267,7 +267,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then
echo " Will be installed in your home directory; you will have to modify PATH manually." echo " Will be installed in your home directory; you will have to modify PATH manually."
echo " Recommended." echo " Recommended."
echo echo
echo "3 - option not available on Windows 10 WSL (32-bit Linux binaries not supported)." echo "3 - Option not available on Windows 10 WSL (32-bit Linux binaries not supported)."
echo echo
echo "4 - Install gcc-arm-none-eabi from Ubuntu repository (64-bit binaries)" echo "4 - Install gcc-arm-none-eabi from Ubuntu repository (64-bit binaries)"
echo " and compile arm-none-eabi-gdb 8.1 from source. Slower, but known to work." echo " and compile arm-none-eabi-gdb 8.1 from source. Slower, but known to work."
...@@ -284,6 +284,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then ...@@ -284,6 +284,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then
case $answer in case $answer in
1) 1)
if apt-cache show gdb-arm-none-eabi &>/dev/null; then if apt-cache show gdb-arm-none-eabi &>/dev/null; then
if [ -n "$(uname -a | grep Microsoft)" ]; then exit 1; fi
# Ubuntu's 32-bit arm-none-eabi-gdb works fine (if available) # Ubuntu's 32-bit arm-none-eabi-gdb works fine (if available)
packages="$packages gdb-arm-none-eabi:i386 " packages="$packages gdb-arm-none-eabi:i386 "
elif apt-cache show gdb-multiarch &>/dev/null; then elif apt-cache show gdb-multiarch &>/dev/null; then
...@@ -308,6 +309,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then ...@@ -308,6 +309,7 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then
fi fi
;; ;;
3) 3)
if [ -n "$(uname -a | grep Microsoft)" ]; then exit 1; fi
# gcc-arm-embedded conflicts with gcc-arm-none-eabi # gcc-arm-embedded conflicts with gcc-arm-none-eabi
# but the dependencies are not configured properly # but the dependencies are not configured properly
# so we have to fix the conflict manually... # so we have to fix the conflict manually...
......
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