3 ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190212.zip"
4 ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190212.zip"
6 #BUG FIX PART (AGL JIRA SPEC-2253)
7 ARCHIVE_PREFIX_NAME="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux"
8 ZIP_BUGFIX=$ARCHIVE_PREFIX_NAME"-weston5-20190516.zip"
9 TAR_BUGFIX=$ARCHIVE_PREFIX_NAME"-20190516.tar.gz"
11 COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh"
13 test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
14 DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
15 EXTRACT_DIR=$METADIR/binary-tmp
18 [[ -t 1 ]] && stdout_in_terminal=1
20 [[ $stdout_in_terminal == 0 ]] && return
27 if [[ $? != 0 ]]; then
28 echo "tput: terminal doesn't support color settings, continuing" >&2
33 color_green=$(color bold 2)
34 color_yellow=$(color bold 3)
35 color_red=$(color bold 1)
36 color_none=$(color none)
39 echo "${color_red}$@${color_none}" >&2
46 function copy_mm_packages() {
47 # first clean up workdir
48 [[ -d $EXTRACT_DIR ]] && rm -r $EXTRACT_DIR
50 if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
52 cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR
53 cp --update $DOWNLOAD_DIR/$ZIP_2 $EXTRACT_DIR
55 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_1+"\" NOT EXTRACTING CORRECTLY"
56 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY"
57 log "The graphics and multimedia acceleration packages for "
58 log "the R-Car Gen3 board BSP can be downloaded from:"
59 log "<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>"
61 error "These 2 files from there should be stored in your"
62 error "'$DOWNLOAD_DIR' directory."
68 if [ -f $COPY_SCRIPT ]; then
69 cd $METADIR/bsp/meta-renesas-rcar-gen3/
70 $COPY_SCRIPT -d -f $EXTRACT_DIR
73 log "scripts to copy drivers for Gen3 not found."
77 #BUG FIX PART (AGL JIRA SPEC-2253)
78 #Detect supported machine
79 if [ $MACHINE == "m3ulcb" ] || [ $MACHINE == "h3ulcb" ]
81 GFX_ARCHIVE_NAME="EVARTM0RC779*GLPG0001SL41C_2_0_8_C";
82 GFX_BINARIES_NAME="EVA_r8a*_linux_gsx_binaries_gles.tar.bz2";
84 log "Note: graphics bug (SPEC-2253) will not be fixed for the requested machine ($MACHINE)."
88 if [ -f $DOWNLOAD_DIR/$ZIP_BUGFIX ]; then
89 cp --update $DOWNLOAD_DIR/$ZIP_BUGFIX $EXTRACT_DIR
91 error "ERROR: FILE '$DOWNLOAD_DIR/$ZIP_BUGFIX' NOT FOUND."
92 log "The graphics and multimedia acceleration packages for "
93 log "the R-Car Gen3 board BSP can be downloaded from:"
94 log "<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>"
96 error "This archive should be stored in your '$DOWNLOAD_DIR' directory."
97 error "Requested archive name: '$ZIP_BUGFIX'"
101 #Extract the only the needed GFX binaries
102 unzip -d $EXTRACT_DIR -oq $EXTRACT_DIR/$ZIP_BUGFIX
103 tar -C $EXTRACT_DIR -zxf $EXTRACT_DIR/$TAR_BUGFIX
104 mv $EXTRACT_DIR/$ARCHIVE_PREFIX_NAME/*/*.zip $EXTRACT_DIR
106 #Manage the needed GFX binaries
107 find $EXTRACT_DIR -name "$GFX_ARCHIVE_NAME.zip" -exec unzip -d $EXTRACT_DIR -oq {} \;
108 find $EXTRACT_DIR -name "$GFX_BINARIES_NAME" -exec mv -t $EXTRACT_DIR {} \;
109 for f in `find $EXTRACT_DIR -name "$GFX_BINARIES_NAME" -exec basename {} \;`
111 mv $EXTRACT_DIR/${f} "$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module"/${f:4}
115 rm -r $EXTRACT_DIR/$ARCHIVE_PREFIX_NAME
116 rm -r $EXTRACT_DIR/$GFX_ARCHIVE_NAME
118 log "The graphics hotfix for BUG SPEC-2253 has been successfully applied."
120 # clean up workdir if not done by older script