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/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 if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
49 cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR
50 cp --update $DOWNLOAD_DIR/$ZIP_2 $EXTRACT_DIR
52 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_1+"\" NOT EXTRACTING CORRECTLY"
53 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY"
54 log "The graphics and multimedia acceleration packages for "
55 log "the R-Car Gen3 board BSP can be downloaded from:"
56 log "<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>"
58 error "These 2 files from there should be stored in your"
59 error "'$DOWNLOAD_DIR' directory."
65 if [ -f $COPY_SCRIPT ]; then
66 cd $METADIR/meta-renesas-rcar-gen3/
67 $COPY_SCRIPT -d -f $EXTRACT_DIR
70 log "scripts to copy drivers for Gen3 not found."
74 #BUG FIX PART (AGL JIRA SPEC-2253)
75 #Detect supported machine
76 if [ $MACHINE == "m3ulcb" ] || [ $MACHINE == "h3ulcb" ]
78 GFX_ARCHIVE_NAME="EVARTM0RC779*GLPG0001SL41C_2_0_8_C";
79 GFX_BINARIES_NAME="EVA_r8a*_linux_gsx_binaries_gles.tar.bz2";
81 log "Note: graphics bug (SPEC-2253) will not be fixed for the requested machine ($MACHINE)."
85 if [ -f $DOWNLOAD_DIR/$ZIP_BUGFIX ]; then
86 cp --update $DOWNLOAD_DIR/$ZIP_BUGFIX $EXTRACT_DIR
88 error "ERROR: FILE '$DOWNLOAD_DIR/$ZIP_BUGFIX' NOT FOUND."
89 log "The graphics and multimedia acceleration packages for "
90 log "the R-Car Gen3 board BSP can be downloaded from:"
91 log "<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>"
93 error "This archive should be stored in your '$DOWNLOAD_DIR' directory."
94 error "Requested archive name: '$ZIP_BUGFIX'"
98 #Extract the only the needed GFX binaries
99 unzip -d $EXTRACT_DIR -oq $EXTRACT_DIR/$ZIP_BUGFIX
100 tar -C $EXTRACT_DIR -zxf $EXTRACT_DIR/$TAR_BUGFIX
101 mv $EXTRACT_DIR/$ARCHIVE_PREFIX_NAME/*/*.zip $EXTRACT_DIR
103 #Manage the needed GFX binaries
104 find $EXTRACT_DIR -name "$GFX_ARCHIVE_NAME.zip" -exec unzip -d $EXTRACT_DIR -oq {} \;
105 find $EXTRACT_DIR -name "$GFX_BINARIES_NAME" -exec mv -t $EXTRACT_DIR {} \;
106 for f in `find $EXTRACT_DIR -name "$GFX_BINARIES_NAME" -exec basename {} \;`
108 mv $EXTRACT_DIR/${f} "$METADIR/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module"/${f:4}
112 rm -r $EXTRACT_DIR/$ARCHIVE_PREFIX_NAME
113 rm -r $EXTRACT_DIR/$GFX_ARCHIVE_NAME
115 log "The graphics hotfix for BUG SPEC-2253 has been successfully applied."