bsp/rcar-gen3: Avoid reinstall of drivers 50/22950/2
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 14 Nov 2019 13:29:21 +0000 (14:29 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 19 Nov 2019 16:18:58 +0000 (16:18 +0000)
When the ZIP files are already copied, it avoids to
reinstall the proprietary drivers.

This change is intended to facilitate workflows were
aglsetup is sparsely/rarely used.

Change-Id: I25275473d52ee7c811fdcaa50871bc1d385e868d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh

index 29d8825..2fc3d9f 100644 (file)
@@ -39,8 +39,17 @@ function log() {
 }
 
 function copy_mm_packages() {
-       # first clean up workdir
-       [[ -d $EXTRACT_DIR ]] && rm -r $EXTRACT_DIR
+    # first clean up workdir on need
+    if [ -d $EXTRACT_DIR ]; then
+        if [ -f $EXTRACT_DIR/$ZIP_1 -a -f $EXTRACT_DIR/$ZIP_2 ]; then
+            log   "The graphics and multimedia acceleration packages for R-Car Gen3 look already installed."
+            log   "To force their reinstallation, please, remove manually the directory:"
+            log   "           $EXTRACT_DIR"
+            log
+            return 0
+        fi
+        rm -r $EXTRACT_DIR
+    fi
 
     if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
         mkdir -p $EXTRACT_DIR