Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
else
DISTRIB=$(cat /etc/lsb-release | grep "DISTRIB_ID" | awk -F "=" '{print $2}')
DISTRIB_RELEASE=$(cat /etc/lsb-release | grep "DISTRIB_RELEASE" | awk -F "=" '{print $2}')
# Numeric form of the release for comparisons: 26.04 -> 2604, 18.10 -> 1810
DISTRIB_VER=$(awk -F. '{ printf "%d%02d", $1, $2 }' <<< "$DISTRIB_RELEASE")
fi

AML_FLASH_TOOL_DIR="$BASE/aml-flash-tool"
Expand All @@ -28,14 +30,15 @@ error_msg() {
}

setup_ubuntu_host() {
local hostdeps="libusb-dev git parted lib32z1 lib32stdc++6 libusb-0.1-4 libusb-1.0-0-dev libusb-1.0-0 ccache libncurses5 pv base-files linux-base xz-utils"
local hostdeps="libusb-dev git parted lib32z1 lib32stdc++6 libusb-0.1-4 libusb-1.0-0-dev libusb-1.0-0 ccache pv base-files linux-base xz-utils"
local deps=()
local installed=$(dpkg-query -W -f '${db:Status-Abbrev}|${binary:Package}\n' '*' 2>/dev/null | grep '^ii' | awk -F '|' '{print $2}' | cut -d ':' -f 1)

if [[ "$DISTRIB" == "Ubuntu" ]] && [[ "$DISTRIB_RELEASE" == "18.10" || "$DISTRIB_RELEASE" =~ "20" || "$DISTRIB_RELEASE" =~ "22" || "$DISTRIB_RELEASE" =~ "24" ]]; then
hostdeps="$hostdeps lib32ncurses6"
# ncurses5 was dropped after 18.04; 18.10 and newer carry the ncurses6 packages
if (( DISTRIB_VER >= 1810 )); then
hostdeps="$hostdeps libncurses6 lib32ncurses6"
else
hostdeps="$hostdeps lib32ncurses5"
hostdeps="$hostdeps libncurses5 lib32ncurses5"
fi

for packet in $hostdeps; do
Expand Down
4 changes: 3 additions & 1 deletion aml-flash-tool/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
else
DISTRIB=$(cat /etc/lsb-release | grep "DISTRIB_ID" | awk -F "=" '{print $2}')
DISTRIB_RELEASE=$(cat /etc/lsb-release | grep "DISTRIB_RELEASE" | awk -F "=" '{print $2}')
# Numeric form of the release for comparisons: 26.04 -> 2604, 18.10 -> 1810
DISTRIB_VER=$(awk -F. '{ printf "%d%02d", $1, $2 }' <<< "$DISTRIB_RELEASE")
fi

FLASH_TOOL="$BASE/flash-tool"
Expand Down Expand Up @@ -56,7 +58,7 @@ if [ "$DISTRIB" != "macOS" ]; then
RULE="$RULES_DIR/70-persistent-usb-ubuntu12.rules"
sudo cp $RULE /etc/udev/rules.d
sudo sed -i s/OWNER=\"amlogic\"/OWNER=\"`whoami`\"/g /etc/udev/rules.d/$(basename $RULE)
elif [[ "$IGNORE_CHECK" == "yes" || "$DISTRIB_RELEASE" =~ "14" || "$DISTRIB_RELEASE" =~ "16" || "$DISTRIB_RELEASE" =~ "18" || "$DISTRIB_RELEASE" =~ "19" || "$DISTRIB_RELEASE" =~ "20" || "$DISTRIB_RELEASE" =~ "22" || "$DISTRIB_RELEASE" =~ "24" ]]; then
elif [[ "$IGNORE_CHECK" == "yes" ]] || (( DISTRIB_VER >= 1400 )); then
RULE="$RULES_DIR/70-persistent-usb-ubuntu14.rules"
sudo cp $RULE /etc/udev/rules.d
else
Expand Down
4 changes: 3 additions & 1 deletion aml-flash-tool/UNINSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
else
DISTRIB=$(cat /etc/lsb-release | grep "DISTRIB_ID" | awk -F "=" '{print $2}')
DISTRIB_RELEASE=$(cat /etc/lsb-release | grep "DISTRIB_RELEASE" | awk -F "=" '{print $2}')
# Numeric form of the release for comparisons: 26.04 -> 2604, 18.10 -> 1810
DISTRIB_VER=$(awk -F. '{ printf "%d%02d", $1, $2 }' <<< "$DISTRIB_RELEASE")
fi

KHADAS_TOOL_NAME="aml-burn-tool"
Expand Down Expand Up @@ -37,7 +39,7 @@ if [[ "$DISTRIB" != "macOS" ]]; then

if [[ "$DISTRIB_RELEASE" =~ "12" ]]; then
RULE="/etc/udev/rules.d/70-persistent-usb-ubuntu12.rules"
elif [[ "$DISTRIB_RELEASE" =~ "14" || "$DISTRIB_RELEASE" =~ "16" || "$DISTRIB_RELEASE" =~ "18" || "$DISTRIB_RELEASE" =~ "20" ]]; then
elif (( DISTRIB_VER >= 1400 )); then
RULE="/etc/udev/rules.d/70-persistent-usb-ubuntu14.rules"
else
# error_msg "Ubuntu $DISTRIB_RELEASE haven't been verified!"
Expand Down
4 changes: 3 additions & 1 deletion rk-flash-tool/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ else
ANDROID_TOOL_CONFIG="$BASE/tools/Linux_Upgrade_Tool/config.ini"
DISTRIB=$(cat /etc/lsb-release | grep "DISTRIB_ID" | awk -F "=" '{print $2}')
DISTRIB_RELEASE=$(cat /etc/lsb-release | grep "DISTRIB_RELEASE" | awk -F "=" '{print $2}')
# Numeric form of the release for comparisons: 26.04 -> 2604, 18.10 -> 1810
DISTRIB_VER=$(awk -F. '{ printf "%d%02d", $1, $2 }' <<< "$DISTRIB_RELEASE")
fi

FLASH_TOOL="$BASE/flash-tool"
Expand Down Expand Up @@ -54,7 +56,7 @@ fi
if [ "$DISTRIB" != "macOS" ]; then
echo "Installing USB rules..."

if [[ "$IGNORE_CHECK" == "yes" || "$DISTRIB_RELEASE" =~ "16" || "$DISTRIB_RELEASE" =~ "18" || "$DISTRIB_RELEASE" =~ "20" || "$DISTRIB_RELEASE" =~ "22" || "$DISTRIB_RELEASE" =~ "24" ]]; then
if [[ "$IGNORE_CHECK" == "yes" ]] || (( DISTRIB_VER >= 1600 )); then
RULE="$RULES_DIR/80-rockchip-usb.rules"
sudo cp $RULE /etc/udev/rules.d
else
Expand Down
4 changes: 3 additions & 1 deletion tone-dfu-tool/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if [ "$(uname -s)" = "Darwin" ] ; then
else
DISTRIB=$(cat /etc/lsb-release | grep "DISTRIB_ID" | awk -F "=" '{print $2}')
DISTRIB_RELEASE=$(cat /etc/lsb-release | grep "DISTRIB_RELEASE" | awk -F "=" '{print $2}')
# Numeric form of the release for comparisons: 26.04 -> 2604, 18.10 -> 1810
DISTRIB_VER=$(awk -F. '{ printf "%d%02d", $1, $2 }' <<< "$DISTRIB_RELEASE")
fi

KHADAS_TOOL="$BASE/tone-burn-tool"
Expand Down Expand Up @@ -51,7 +53,7 @@ fi
if [ "$DISTRIB" != "macOS" ]; then
echo "Installing USB rules..."

if [[ "$IGNORE_CHECK" == "yes" || "$DISTRIB_RELEASE" =~ "16" || "$DISTRIB_RELEASE" =~ "18" || "$DISTRIB_RELEASE" =~ "20" || "$DISTRIB_RELEASE" =~ "22" || "$DISTRIB_RELEASE" =~ "24" ]]; then
if [[ "$IGNORE_CHECK" == "yes" ]] || (( DISTRIB_VER >= 1600 )); then
RULE="$RULES_DIR/80-tone-usb.rules"
sudo cp $RULE /etc/udev/rules.d
else
Expand Down