+## How to build the Firmware
+
+1. In a temporary working directory, clone poky the poky repository and check out the dunfell branch:
+```
+ git clone git://git.yoctoproject.org/poky
+ cd poky
+ git checkout dunfell
+ ..
+```
+2. Clone the Renesas BSP and it's dependent layers:
+```
+ git clone https://github.com/renesas-rcar/meta-renesas
+ cd meta-renesas
+ git checkout dunfell-dev-4.14
+ cd ..
+ git clone git://git.openembedded.org/meta-openembedded
+ cd meta-openembedded
+ git checkout dunfell
+ cd ..
+```
+3. Clone the reference hardware BSP layer:
+```
+ git clone https://gerrit.automotivelinux.org/gerrit/AGL/meta-agl-refhw
+```
+4. Create a build environment:
+```
+ . ./poky/oe-init-build-env build
+```
+5. Add the layers to `conf/bblayers.conf`, the `BBLAYERS` variable definition should look like:
+```
+ BBLAYERS ?= " \
+ /home/user/workdir/poky/meta \
+ /home/user/workdir/poky/meta-poky \
+ /home/user/poky/meta-yocto-bsp \
+ /home/user/workdir/meta-openembedded/meta-oe \
+ /home/user/workdir/meta-openembedded/meta-python \
+ /home/user/workdir/meta-renesas/meta-rcar-gen3 \
+ /home/user/workdir/meta-agl-refhw/meta-agl-refhw-gen3 \
+ "
+```
+6. Add the machine setting to `conf/local.conf`, for example:
+```
+ echo MACHINE=agl-refhw-h3 >> conf/local.conf
+```
+7. Build the firmware:
+```
+ bitbake arm-trusted-firmware optee-os u-boot
+```
+8. Afterwards, the firmware files will be in the directory `tmp/deploy/images/agl-refhw-h3`.
+