Update Renesas gen3 setup script for BSP 2.19.
[AGL/meta-agl.git] / meta-agl-bsp / meta-rcar-gen3 / scripts / setup_mm_packages.sh
1 #!/bin/bash
2
3 ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170427.zip"
4 ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170427.zip"
5
6 COPY_SCRIPT="$METADIR/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh"
7
8 test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
9 DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
10 EXTRACT_DIR=$METADIR/binary-tmp
11
12
13 function copy_mm_packages() {
14         if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
15                 mkdir -p $EXTRACT_DIR
16                 cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR
17                 cp --update $DOWNLOAD_DIR/$ZIP_2 $EXTRACT_DIR
18         else
19                 echo -n "The graphics and multimedia acceleration packages for "
20                 echo -e "the R-Car Gen3 board BSP 2.19 can be downloaded from:"
21                 echo -e " <https://www.renesas.com/solutions/automotive/rcar-demoboard.html>"
22                 echo -e
23                 echo -n "These 2 files from there should be stored in your"
24                 echo -e "'$DOWNLOAD_DIR' directory."
25                 echo -e "  $ZIP_1"
26                 echo -e "  $ZIP_2"
27                 return 1
28         fi
29
30         if [ -f $COPY_SCRIPT ]; then
31                 cd $METADIR/meta-renesas-rcar-gen3/
32                 $COPY_SCRIPT -d -f $EXTRACT_DIR
33                 cd ..
34         else
35                 echo "scripts to copy drivers for Gen3 not found."
36                 return 1
37         fi
38 }