summaryrefslogtreecommitdiff
path: root/recipes-core/mlinux-scripts
diff options
context:
space:
mode:
authorAndrii Pientsov <andrii.pientsov@globallogic.com>2020-05-23 10:11:35 +0300
committerAndrii Pientsov <andrii.pientsov@globallogic.com>2020-05-23 10:11:35 +0300
commit37b0bbd8eadd94b93059c8309300e9eea85607e3 (patch)
tree99a1e345477bf41d193f77a196f3dcfc20997378 /recipes-core/mlinux-scripts
parent5f14494ead03a5e6b9e2e541ffd94a7d66e3dfc5 (diff)
downloadmeta-mlinux-37b0bbd8eadd94b93059c8309300e9eea85607e3.tar.gz
meta-mlinux-37b0bbd8eadd94b93059c8309300e9eea85607e3.tar.bz2
meta-mlinux-37b0bbd8eadd94b93059c8309300e9eea85607e3.zip
Update mlinux-scripts. Leave only common scripts.
Diffstat (limited to 'recipes-core/mlinux-scripts')
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade69
-rw-r--r--recipes-core/mlinux-scripts/mlinux-scripts.inc8
-rw-r--r--recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb2
3 files changed, 1 insertions, 78 deletions
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade
deleted file mode 100755
index a377309..0000000
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-dofile=/var/volatile/do_flash_upgrade
-
-if [ $# != 1 ]; then
- echo "Usage: $0 upgrade.bin"
- exit 1
-fi
-
-set -e
-upgrade=$1
-
-mkdir -p /var/volatile
-cd /var/volatile
-
-# make sure firmware is for this device
-hw_version=$(cat /sys/devices/platform/mts-io/hw-version)
-firmware_model=$(tar -xO -f $upgrade model)
-shopt -s nocasematch
-if [[ ! "$hw_version" =~ ^$firmware_model- ]]; then
- logger -s -t firmware_upgrade "Wrong firmware for this hardware"
- logger -s -t firmware_upgrade "hw version: $hw_version"
- logger -s -t firmware_upgrade "firmware model: $firmware_model"
- exit 1
-fi
-
-files=(bstrap.bin uboot.bin uImage.bin config.jffs2 oem.jffs2 rootfs.jffs2 install.sh)
-
-tobeflashed=0
-# verify all MD5 sums
-for (( i = 0; i < ${#files[@]}; i++ )); do
- file=${files[i]}
- # if the file is in the tar, md5sum it
- if tar -t -f $upgrade | grep -F -q "$file"; then
- logger -s -t firmware_upgrade "Checking MD5 for $file..."
- if ! tar -x -f $upgrade $file.md5; then
- logger -s -t firmware_upgrade "MD5 is not found for the $file, upgrade aborted"
- exit 1
- fi
- if ! tar -xO -f $upgrade $file | md5sum -c $file.md5; then
- logger -s -t firmware_upgrade "MD5 check failed, upgrade aborted"
- exit 1
- fi
- tobeflashed=1
- fi
-done
-
-if (( $tobeflashed )); then
- mkdir -p /var/volatile/flash-upgrade
- mv -f $upgrade /var/volatile/flash-upgrade/upgrade.bin
- touch "${dofile}"
- chown "root:root" "${dofile}" || true
- uid=$(stat -c %u "${dofile}") || true
- result=$?
- if ((result != 0)) ; then
- logger -s -t firmware_upgrade "Cannot create ${dofile}"
- exit 1
- fi
- if ((uid != 0)) ; then
- logger -s -t firmware_upgrade "Cannot set ownership of ${dofile} to root"
- exit 1
- fi
- logger -s -t firmware_upgrade "Rebooting"
- sleep 1
- reboot
- exit 0
-else
- logger -s -t firmware_upgrade "Nothing to be flashed!"
- exit 1
-fi
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts.inc b/recipes-core/mlinux-scripts/mlinux-scripts.inc
index f4cfbee..afdc5f8 100644
--- a/recipes-core/mlinux-scripts/mlinux-scripts.inc
+++ b/recipes-core/mlinux-scripts/mlinux-scripts.inc
@@ -13,10 +13,6 @@ SRC_URI = "file://mlinux-wifi-ap \
file://mlinux-cell-router \
file://mlinux-cell-radio-ready \
"
-SRC_URI_append_mtbsp-at91 = " \
- file://mlinux-firmware-upgrade \
-"
-
do_install() {
install -d ${D}${sbindir} ${D}${sbindir}
@@ -28,7 +24,3 @@ do_install() {
install -m 755 ${WORKDIR}/mlinux-cell-router ${D}${sbindir}
install -m 755 ${WORKDIR}/mlinux-cell-radio-ready ${D}${sbindir}
}
-
-do_install_append_mtbsp-at91() {
- install -m 755 ${WORKDIR}/mlinux-firmware-upgrade ${D}${sbindir}
-}
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb b/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb
index 05c1b84..43dc162 100644
--- a/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb
+++ b/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb
@@ -2,6 +2,6 @@ DESCRIPTION = "Scripts to easily get started with common mLinux use cases"
require mlinux-scripts.inc
-PR = "r1"
+PR = "r2"
S = "${WORKDIR}/mlinux-scripts-${PV}"