ebisu: Use a specified path to integrate binaries
[AGL/meta-agl.git] / templates / machine / ebisu / 50_setup.sh
1 # setup proprietary gfx drivers and multimedia packages
2 pushd $METADIR 2>/dev/null
3
4 COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh"
5 EXTRACT_DIR=$METADIR/binary-tmp
6 #EBISU_BIN_PATH should contain the path where the .zip archive of E3 binaries is.
7
8 # Check the ebisu binaries path
9 if [[ ! -d $EBISU_BIN_PATH ]] || [[ $EBISU_BIN_PATH == "" ]]; then
10         echo "ERROR: E3 Binary path not valid."
11         echo "HELP: Export the path where the E3 Binaries ZIP file is into 'EBISU_BIN_PATH' then launch the setup again."
12         echo "HELP: Example: '$ export EBISU_BIN_PATH=`pwd`/ebisu_binaries'"
13         exit 1
14 else
15         [ -z "$(ls -A $EBISU_BIN_PATH)" ] && echo "ERROR: $EBISU_BIN_PATH is empty. Add the E3 Binaries ZIP file inside and try again." && exit 1
16 fi
17
18 if [ -f $COPY_SCRIPT ]; then
19         # Extract the ZIP into the tmp directory
20         mkdir -p $EXTRACT_DIR
21         unzip -q -o $EBISU_BIN_PATH/*.zip -d $EXTRACT_DIR
22
23         cd $METADIR/bsp/meta-renesas-rcar-gen3/
24         $COPY_SCRIPT $EXTRACT_DIR
25         cd ..
26
27         #Fix libpvrWAYLAND_WSEGL.so
28         #TODO
29
30         #Clean temp dir
31         rm -r $EXTRACT_DIR
32 else
33         echo "ERROR: Script to copy Renesas proprietary drivers for $MACHINE not found."
34         exit 1
35 fi
36
37 popd 2>/dev/null