# Build an image for Porter board In this section, we will go on the image compilation for the Porter board within the Docker container. ## Download Renesas proprietary drivers For the Porter board, we first need to download the proprietary drivers from Renesas web site. The evaluation version of these drivers can be found here: [http://www.renesas.com/secret/r_car_download/rcar_demoboard.jsp](http://www.renesas.com/secret/r_car_download/rcar_demoboard.jsp) under the **Target hardware: R-Car H2, M2 and E2** section: ![renesas download](pictures/renesas_download.jpg) Note that you have to register with a free account on MyRenesas and accept the license conditions before downloading them. The operation is fast and simple but nevertheless mandatory to access evaluation of non open-source drivers for free. Once you register, you can download two zip files: store them in a directory visible from the container, for example in the directory `$MIRRORDIR/proprietary-renesas-r-car` (`$MIRRORDIR` was created previously in section [Start the container](#anchor-start-container) and adjust the permissions. The zip files should then be visible from the inside of the container in `/home/devel/mirror`: ```bash $ chmod +r /home/devel/mirror/proprietary-renesas-r-car/*.zip $ ls -l /home/devel/mirror/proprietary-renesas-r-car/ total 8220 -rw-r--r-- 1 1000 1000 6047383 Jul 11 11:03 R-Car_Series_Evaluation_Software_Package_for_Linux-20151228.zip -rw-r--r-- 1 1000 1000 2394750 Jul 11 11:03 R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-20151228.zip ``` ## Setup the build environment We should first prepare the environment to build images. This can be easily done thanks to a helper script named `prepare_meta`. This script does the following: - check for an updated version at [https://github.com/iotbzh/agl-manifest](https://github.com/iotbzh/agl-manifest) - pull Yocto layers from git repositories, following a snapshot manifest - setup build configuration (build/conf files) The following options are available: ```bash devel@bsp-devkit:~$ prepare_meta -h prepare_meta [options] Options: -f|--flavour what flavour to us default: 'iotbzh' possible values: 'stable','unstable','testing', 'iotbzh' ... see agl-manifest git repository -o|--outputdir output directory where subdirectories will be created: meta, build, ... default: current directory (.) -l|--localmirror specifies a local mirror directory to initialize meta, download_dir or sstate-cache default: none -r|--remotemirror specifies a remote mirror directory to be used at build time for download_dir or sstate-cache default: none -p|--proprietary Directory containing Renesas proprietary drivers for RCar platform (2 zip files) default: none -e|--enable