SDcard creation
---------------

* insert SDcard and determine device:

    # lsblk

* set SDCARD device (replace 'ABC' by proper device name): 

    # SDCARD=/dev/sdABC

$ set image URL: 

    # IMGURL=http://iot.bzh/download/public/2017/EmbeddedWorld/RCarM3_demo/agl-demo-platform-crosssdk-m3ulcb.raw.xz

* copy image to SDcard:
    - with bmaptool:
        # bmaptool copy $IMGURL /dev/$SDCARD

    - with dd:
        # wget -O - $IMGURL | xzcat | dd of=$SDCARD bs=4M
        # sync

* eject SDcard 

M3/H3 Board setup
-----------------

* insert SDcard into M3board

* turn on the board 

* (optional): adjust uboot parameters to boot on SDcard without initrd
  For this, you can follow this template: https://git.automotivelinux.org/AGL/meta-agl/tree/meta-netboot/README.renesas-gen3

* boot for the first time: wait a while (20 to 30 secs) after login prompt to let the first boot procedure to finish
  NB: weston may not start... screen can remain black... or even more strange things may happen :\

* log on console and reboot:

    # sync; reboot -f

* reboot the board and log onto console to execute post-install scripts

* check apps:

    # afm-util list 
    ...

* if apps are not installed correctly:

    # for x in /usr/AGL/apps/*.wgt; do afm-util install $x; done

* install navigation map (UK or JP):

    # /usr/AGL/apps/download_mapdata_uk.sh /
    or
    # /usr/AGL/apps/download_mapdata_jp.sh /

* (optional): copy some (free) media for mediaplayer playlist:
    # mkdir /home/root/Music/
    # cd /home/root/Music
    # BASEURL=http://iot.bzh/download/public/2017/EmbeddedWorld/RCarM3_demo/Music
    # for x in $(wget -O - $BASEURL/all.lst); do wget $BASEURL/$x; done

* (optional): if screen orientation is not correct, adjust the following files:

    # /etc/xdg/weston/weston.ini
    # /lib/systemd/system/psplash-start.service