meta-rcar-gen3: add template with hw acceleration
[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-20160906.zip"
4 ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160906.zip"
5
6 COPY_SCRIPT="$METADIR/meta-rcar/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
11 function copy_mm_packages() {
12         if [ ! -d $METADIR/binary-tmp ]; then
13                 if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
14                         mkdir $METADIR/binary-tmp
15                         cd $METADIR/binary-tmp
16                         unzip -o $DOWNLOAD_DIR/$ZIP_1
17                         unzip -o $DOWNLOAD_DIR/$ZIP_2
18                         cd -
19                 else
20                         echo -n "The graphics and multimedia acceleration packages for "
21                         echo -e "the R-Car Gen3 board can be download from :"
22                         echo -e "  <http://www.renesas.com/secret/r_car_download/rcar_demoboard.jsp>"
23                         echo -e
24                         echo -n "These 2 files from there should be store in your"
25                         echo -e "'$DOWNLOAD_DIR' directory."
26                         echo -e "  $ZIP_1"
27                         echo -e "  $ZIP_2"
28                         return 1
29                 fi
30         fi
31
32         if [ -f $COPY_SCRIPT ]; then
33                 cd $METADIR/meta-rcar/
34                 $COPY_SCRIPT -d -f $METADIR/binary-tmp
35                 cd ..
36         else
37                 echo "scripts to copy drivers for Gen3 not found."
38                 return 1
39         fi
40 }