summaryrefslogtreecommitdiffstats
path: root/getting-started/machines
diff options
context:
space:
mode:
Diffstat (limited to 'getting-started/machines')
-rw-r--r--getting-started/machines/R-Car-Starter-Kit-gen3.md204
-rw-r--r--getting-started/machines/intel.md59
-rw-r--r--getting-started/machines/porter.md218
-rw-r--r--getting-started/machines/qemu.md2
-rw-r--r--getting-started/machines/raspberrypi.md7
5 files changed, 301 insertions, 189 deletions
diff --git a/getting-started/machines/R-Car-Starter-Kit-gen3.md b/getting-started/machines/R-Car-Starter-Kit-gen3.md
index 7e58377..7138e5b 100644
--- a/getting-started/machines/R-Car-Starter-Kit-gen3.md
+++ b/getting-started/machines/R-Car-Starter-Kit-gen3.md
@@ -24,17 +24,18 @@ The following documents may also be helpful:
Before setting up the build environment, you need to download the proprietary drivers.
* Download Renesas graphics drivers with a "click through" license from Renesas website [Link][rcar Linux Drivers]
- * Under the Target hardware: **R-Car H3/M3** section.
+ * Under the Target hardware: **R-Car H3/M3** section.
-#### Note:
+**Note**:
* You have to register with a free account on MyRenesas and accept the license conditions before downloading them the drivers.
-The operation is fast and simple but nevertheless mandatory to access evaluation of non open-source drivers for free.
-Once you registered, you can download two zip files.
+ The operation is fast and simple but nevertheless mandatory to access evaluation of non open-source drivers for free.
+ Once you registered, you can download two zip files.
* The files must be stored into your download directory (usually $HOME/Downloads, pointed by $XDG_DOWNLOAD_DIR).
+
Here after is an example of the typical files downloaded at the time of writing:
-```
+```bash
test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
chmod a+r $XDG_DOWNLOAD_DIR/*.zip
ls -1 $XDG_DOWNLOAD_DIR
@@ -43,26 +44,25 @@ total 8220
-rw-r--r--. 1 1664 agl-sdk 2.7M Dec 8 15:24 R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170427.zip
```
-## Setting up the build environment:
+## Setting up the build environment
Define the type of R-Car Starter Kit board as a variable:
* for machine **h3ulcb** (Starter Kit Premier/H3) :
- ```
+ ```bash
export MACHINE=h3ulcb
```
* for machine **m3ulcb** (Starter Kit Pro/M3):
- ```
+ ```bash
export MACHINE=m3ulcb
```
-
Now, init your build environment:
-```
+```bash
cd $AGL_TOP
source meta-agl/scripts/aglsetup.sh -m $MACHINE -b build agl-devel agl-demo agl-netboot agl-appfw-smack agl-localdev
```
@@ -70,7 +70,7 @@ source meta-agl/scripts/aglsetup.sh -m $MACHINE -b build agl-devel agl-demo agl-
**IMPORTANT NOTE**: Read the log to be sure you had no error during your setup.
In case of missing graphics drivers, you could notice an error message as follow:
-```
+```bash
[snip]
--- fragment /home/working/workspace_agl_master/meta-agl/templates/machine/h3ulcb/50_setup.sh
/home/working/workspace_agl_master /home/working/workspace_agl_master/build_gen3
@@ -96,39 +96,40 @@ After this command, the working directory is changed to $AGL_TOP/build.
Users may want to check that the board is correctly selected in the environment:
-```
+```bash
grep -w -e "^MACHINE =" $AGL_TOP/build/conf/local.conf
MACHINE = "h3ulcb"
or
MACHINE = "m3ulcb"
```
-Configure for Release or Development:
+Configure for Release or Development:
+
* development images contain extra tools for developer convenience, in particular:
- * a debugger (gdb)
- * some tweaks, including a disabled root password
- * a SFTP server
- * the TCF Agent for easier application deployment and remote debugging
- * some extra system tools (usb, bluetooth ...)
- * ...
+ * a debugger (gdb)
+ * some tweaks, including a disabled root password
+ * a SFTP server
+ * the TCF Agent for easier application deployment and remote debugging
+ * some extra system tools (usb, bluetooth ...)
+ * ...
We explicitely activate these debug facilities by specifying the “agl-devel agl-netboot” feature.
-## Build your image:
+## Build your image
The process to build an image is simple:
-```
+```bash
bitbake agl-demo-platform
```
When finished (it may take few hours), you should get the final result:
-```
+```bash
ls -l $AGL_TOP/build/tmp/deploy/images/$MACHINE
```
-#### Note
+**Note**:
In case of failure of the build it is safe to first check that the Linux distribution chosen for your host has been validated for version 2.2 of Yocto.
# Booting AGL Image on R-Car Starter Kit Gen3 boards using a microSD card
@@ -144,7 +145,7 @@ Then, for each build, the SD-card is merely rewritten and used to boot the confi
Plug the microSD card and get its associated device by either running *`dmesg | tail -15`* or *`lsblk`*, for example:
-```
+```bash
dmesg | tail -15
[ 1971.462160] sd 6:0:0:0: [sdc] Mode Sense: 03 00 00 00
@@ -155,7 +156,7 @@ dmesg | tail -15
Here, the SD-card is attached to the device /dev/sdc.
-```
+```bash
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
@@ -174,15 +175,16 @@ lsblk
so you should repeat this operation each time you insert the microSD card to confirm the device name.
In the example above, we see:
+
* the first SATA drive as 'sda'.
* 'sdc' corresponds to the microSD card, and is also marked as removable device by *lsblk* which is a good confirmation.
### Partition and format the SD-card
* Create an EXT4 partition on the SD-card using fdisk and set the MBR.
-For example, if the microSD card is */dev/sdc*:
+ For example, if the microSD card is */dev/sdc*:
-```
+```bash
sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.27.1).
@@ -214,14 +216,14 @@ sudo fdisk /dev/sdc
* Initialize the ext4 partition using “mke2fs”; for example, if the microSD card is associated with *sdc*:
-```
+```bash
sudo mke2fs -t ext4 -O ^64bit /dev/sdc1
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 3911168 4k blocks and 979200 inodes
Filesystem UUID: 690804b9-6c7d-4bbb-b1c1-e9357efabc52
Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
+ 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
@@ -240,7 +242,7 @@ Insert the SD-card into your build host:
* In the next sample code, we'll suppose that the SD-card mount directory is stored in the variable $SDCARD.
* For example, if the microSD card is associated with device *sdc*:
-```
+```bash
export SDCARD=/tmp/agl
mkdir -p $SDCARD
sudo mount /dev/sdc1 $SDCARD
@@ -248,19 +250,19 @@ sudo mount /dev/sdc1 $SDCARD
Go to your build directory:
-```
+```bash
cd $AGL_TOP/build/tmp/deploy/images/$MACHINE
```
Make sure the filesystem is empty:
-```
+```bash
sudo rm -rf ${SDCARD:-bad_dir}/*
```
**IMPORTANT NOTE**: Verify that **tar** version is 1.28 or newer: this is required to create extended attributes correctly on the SD-card, and in particular SMACK labels used to enforce security. Check with the following command:
-```
+```bash
tar --version
tar (GNU tar) 1.28
[snip]
@@ -268,51 +270,56 @@ tar (GNU tar) 1.28
If your distribution is up to date on this dependency, you can use the host tool directly.
Let's define a variable for the following steps:
-```
+
+```bash
TAR=$(which tar)
```
+
Otherwise, a native up-to-date version of tar is also generated while building AGL distribution:
-```
+
+```bash
TAR=$AGL_TOP/build/tmp/sysroots/x86_64-linux/usr/bin/tar-native/tar
$TAR --version
tar (GNU tar) 1.28
[snip]
```
+
Copy Automotive Grade Linux (AGL) files onto the mircoSD card by extracting the root file system archive:
-```
+```bash
sudo $TAR --extract --numeric-owner --preserve-permissions --preserve-order --totals \
--xattrs-include='*' --directory=$SDCARD --file=agl-demo-platform-h3ulcb.tar.bz2
```
Copy Kernel Image and Device Tree Blob file into the **boot** directory:
+
* For machine h3ulcb (BSP >= 2.19):
-```
+```bash
sudo cp Image-r8a7795-es1-h3ulcb.dtb $SDCARD/boot/
```
* For machine h3ulcb (BSP < 2.19):
-```
+```bash
sudo cp Image-r8a7795-h3ulcb.dtb $SDCARD/boot/
```
* For machine m3ulcb:
-```
+```bash
sudo cp Image-r8a7796-m3ulcb.dtb $SDCARD/boot/
```
Ensure the changes have been written to the disk:
-```
+```bash
sync
```
Unmount the microSD card:
-```
+```bash
sudo umount $SDCARD
```
@@ -321,27 +328,27 @@ sudo umount $SDCARD
* Turn the board off using the power switch.
* Insert the microSD-card.
* Verify that you have plugged in, at least, the following:
- * External monitor on HDMI port
- * Input device (keyboard, mouse, touchscreen...) on USB port.
+ * External monitor on HDMI port
+ * Input device (keyboard, mouse, touchscreen...) on USB port.
* Turn the board on using the power switch.
-After a few seconds, you'll see the AGL splash screen on the display and you'll be able to log in on the console terminal or in the graphic screen.
+ After a few seconds, you'll see the AGL splash screen on the display and you'll be able to log in on the console terminal or in the graphic screen.
# Serial Console Setup
-## Install a serial client on your computer.
+## Install a serial client on your computer
This can be “screen”, “picocom”, “minicom”.
The lighter of the 3 is “picocom” (it has less dependencies).
-## Plug a USB cable from your computer to the serial CP2102 USB port (micro USB-A).
+## Plug a USB cable from your computer to the serial CP2102 USB port (micro USB-A)
With “dmesg” you can check the device created for the serial link.
Usually, it's /dev/ttyUSB0 but the number may vary depending on other USB serial ports connected to the host.
To get it, you must switch the board on.
For example:
-```
+```bash
dmesg | tail
[2097783.287091] usb 2-1.5.3: new full-speed USB device number 24 using ehci-pci
[2097783.385857] usb 2-1.5.3: New USB device found, idVendor=0403, idProduct=6001
@@ -358,19 +365,19 @@ The link is attached to the device /dev/ttyUSB0.
It is time to launch your serial client.
Example:
-```
+```bash
picocom -b 115200 /dev/ttyUSB0
```
or
-```
+```bash
minicom -b 115200 -D /dev/ttyUSB0
```
or
-```
+```bash
screen /dev/ttyUSB0 115200
```
@@ -378,7 +385,7 @@ screen /dev/ttyUSB0 115200
* For machine h3ulcb:
-```
+```bash
NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.7
NOTICE: BL2: PRR is R-Car H3 ES1.1
NOTICE: BL2: LCM state is CM
@@ -418,7 +425,7 @@ Hit any key to stop autoboot: 0
* For machine m3ulcb:
-```
+```bash
NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.8
NOTICE: BL2: PRR is R-Car M3 ES1.0
NOTICE: BL2: LCM state is CM
@@ -463,50 +470,50 @@ Follow the steps below to configure the boot from microSD card and to set screen
* Turn the board on using the power switch.
* Hit any key to stop autoboot (warning you have only few seconds).
* Type **print** to check if you have correct parameters for booting your board:
- * For machine m3ulcb:
+ * For machine m3ulcb:
- ```
+ ```bash
=> printenv
- baudrate=115200
- bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
- bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000
- bootdelay=3
- fdt_high=0xffffffffffffffff
- initrd_high=0xffffffffffffffff
- load_dtb=ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-h3ulcb.dtb
- load_ker=ext4load mmc 0:1 0x48080000 /boot/Image
- stderr=serial
- stdin=serial
- stdout=serial
- ver=U-Boot 2015.04 (Jun 09 2016 - 19:21:52)
-
- Environment size: 648/131068 bytes
+ baudrate=115200
+ bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
+ bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000
+ bootdelay=3
+ fdt_high=0xffffffffffffffff
+ initrd_high=0xffffffffffffffff
+ load_dtb=ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-h3ulcb.dtb
+ load_ker=ext4load mmc 0:1 0x48080000 /boot/Image
+ stderr=serial
+ stdin=serial
+ stdout=serial
+ ver=U-Boot 2015.04 (Jun 09 2016 - 19:21:52)
+
+ Environment size: 648/131068 bytes
```
* For machine h3ulcb:
- ```
+ ```bash
=> printenv
- baudrate=115200
- bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
- bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000
- bootdelay=3
- fdt_high=0xffffffffffffffff
- filesize=cdeb
- initrd_high=0xffffffffffffffff
- load_dtb=ext4load mmc 0:1 0x48000000 /boot/Image-r8a7796-m3ulcb.dtb
- load_ker=ext4load mmc 0:1 0x48080000 /boot/Image
- stderr=serial
- stdin=serial
- stdout=serial
- ver=U-Boot 2015.04 (Nov 30 2016 - 18:25:18)
-
- Environment size: 557/131068 bytes
+ baudrate=115200
+ bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
+ bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000
+ bootdelay=3
+ fdt_high=0xffffffffffffffff
+ filesize=cdeb
+ initrd_high=0xffffffffffffffff
+ load_dtb=ext4load mmc 0:1 0x48000000 /boot/Image-r8a7796-m3ulcb.dtb
+ load_ker=ext4load mmc 0:1 0x48080000 /boot/Image
+ stderr=serial
+ stdin=serial
+ stdout=serial
+ ver=U-Boot 2015.04 (Nov 30 2016 - 18:25:18)
+
+ Environment size: 557/131068 bytes
```
* If not, copy line by line:
- ```
+ ```bash
setenv bootargs console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
setenv bootcmd run load_ker\; run load_dtb\; booti 0x48080000 - 0x48000000
setenv load_ker ext4load mmc 0:1 0x48080000 /boot/Image
@@ -514,31 +521,31 @@ setenv load_ker ext4load mmc 0:1 0x48080000 /boot/Image
* For machine h3ulcb (BSP >= 2.19):
- ```
+ ```bash
setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-es1-h3ulcb.dtb
```
* For machine h3ulcb (BSP < 2.19):
- ```
+ ```bash
setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-h3ulcb.dtb
```
* For machine m3ulcb:
- ```
+ ```bash
setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7796-m3ulcb.dtb
```
* Finally save boot environment:
- ```
+ ```bash
saveenv
```
* Now you can boot:
-```
+```bash
run bootcmd
```
@@ -548,7 +555,7 @@ After booting, you should see the wayland display on the external monitor and a
* For machine h3ulcb:
-```
+```bash
Automotive Grade Linux 3.0.0+snapshot-20161201 h3ulcb ttySC0
h3ulcb login: root
@@ -556,13 +563,14 @@ h3ulcb login: root
* For machine m3ulcb:
-```
+```bash
Automotive Grade Linux 3.0.0+snapshot-20161201 m3ulcb ttySC0
m3ulcb login: root
```
Logging in on the console is easy:
+
* login is 'root'
* password is empty (not asked)
@@ -571,7 +579,7 @@ Logging in on the console is easy:
If the board is connected to a local network using ethernet and if a DHCP server is able to distribute IP addresses,
you can then determine the Gen3 board IP address and log in using ssh:
-```
+```bash
m3ulcb login: root
Last login: Tue Dec 6 09:55:15 UTC 2016 on tty2
root@m3ulcb:~# ip -4 a
@@ -586,7 +594,7 @@ root@m3ulcb:~#
Here, IP address is 10.0.0.27. Logging in using SSH is easy:
-```
+```bash
$ ssh root@10.0.0.27
Last login: Tue Dec 6 10:01:11 2016 from 10.0.0.13
root@m3ulcb:~# cat /etc/os-release
@@ -601,10 +609,10 @@ PRETTY_NAME="Automotive Grade Linux 3.0.0+snapshot-20161202 (chinook)"
Detailed guides on how to build AGL for Renesas boards and using AGL SDK inside a ready-to-use Docker container:
-* [AGL-Devkit-Build-your-1st-AGL-Application.pdf][Iot.bzh AGL-Devkit-Build-your-1st-AGL-Application]
-Generic guide on how to build various application types (HTML5, native, Qt, QML, …) for AGL.
-* [AGL-Devkit-HowTo_bake_a_service.pdf][Iot.bzh AGL_Phase2-Devkit-HowTo_bake_a_service]
-Generic guide on how to add a new service in the BSP.
+* [AGL-Devkit-Build-your-1st-AGL-Application.pdf][Iot.bzh AGL-Devkit-Build-your-1st-AGL-Application]
+ Generic guide on how to build various application types (HTML5, native, Qt, QML, …) for AGL.
+* [AGL-Devkit-HowTo_bake_a_service.pdf][Iot.bzh AGL_Phase2-Devkit-HowTo_bake_a_service]
+ Generic guide on how to add a new service in the BSP.
* [AGL-Kickstart-on-Renesas-Porter-Board.pdf][Iot.bzh AGL-Kickstart-on-Renesas-Porter-Board]
* [AGL-Devkit-Image-and-SDK-for-Porter.pdf][Iot.bzh AGL-Devkit-Image-and-SDK-for-Porter]
* [AGL Developer Website](http://docs.automotivelinux.org)
diff --git a/getting-started/machines/intel.md b/getting-started/machines/intel.md
index c2e8f0a..0c420d5 100644
--- a/getting-started/machines/intel.md
+++ b/getting-started/machines/intel.md
@@ -1,37 +1,43 @@
# Running AGL on Intel Minnowboard (and most Intel 64 bits HW)
## Scope
+
This documentation is aiming at people who want to run Automotive Grade
Linux (AGL) on an Intel Hardware (HW).
While the reference HW used by AGL project is the Open Source Minnowboard.
This documentation [MinnowBoard wiki](https://minnowboard.org/)
-can be used to enable most of 64 bits Intel Architecture (IA) using UEFI as boot loader.<br>
+can be used to enable most of 64 bits Intel Architecture (IA) using UEFI as boot loader.
In addition to the MinnowBoard, support for the the [Joule Developer Kit](https://software.intel.com/en-us/iot/hardware/joule/dev-kit) has been added.
-You need to run the 64 bits version of the UEFI boot.
+You need to run the 64 bits version of the UEFI boot.
Minnowbaord Max and Turbo has well as the Joule are both 64 bits capable.
-**Note** :
- * This page is more focused on please willing to create bespoke AGL image and BSP.
-If you are more interested by Apps creation, please visit [ Developing Apps for AGL](https://wiki.automotivelinux.org/agl-distro/developer_resources_intel_apps)
+**Note**:
+
+* This page is more focused on please willing to create bespoke AGL image and BSP.
+
+If you are more interested by Apps creation, please visit [ Developing Apps for AGL](<https://wiki.automotivelinux.org/agl-distro/developer>_resources_intel_apps)
UEFI has evolved a lot recently and you likely want to check that your HW firmware is up-to-date, this is mandatory for the Minnowboard and the Joule.
-[`https://firmware.intel.com/projects/minnowboard-max`](https://firmware.intel.com/projects/minnowboard-max)<br>
+[`https://firmware.intel.com/projects/minnowboard-max`](https://firmware.intel.com/projects/minnowboard-max)
[`https://software.intel.com/en-us/flashing-the-bios-on-joule`](https://software.intel.com/en-us/flashing-the-bios-on-joule)
## Where to find an AGL bootable image
-### Building an AGL image from scratch using Yocto.
+### Building an AGL image from scratch using Yocto
+
+**Note**:
+
+* An alternative method for building an image is to use the AGL SDK delivered in a Docker container.
-**Note:**:
- * An alternative method for building an image is to use the AGL SDK delivered in a Docker container.
There is currently no SDK dedicated to IA but the SDK provided for the Porter Board can build an IA image without changes (just aglsetup.sh needs to call for Intel).
see chapter 2 of [Porter QuickStart](http://iot.bzh/download/public/2016/sdk/AGL-Kickstart-on-Renesas-Porter-board.pdf "wikilink").
#### Download AGL source code
+
Downloading the AGL sources from the various Git repositories is automated with the repo
-tools [ to RepoDocumentation](https://source.android.com/source/using-repo.html "wikilink")
+tools [to RepoDocumentation](https://source.android.com/source/using-repo.html "wikilink")
To install the repo tool.
@@ -48,12 +54,14 @@ To install the repo tool.
cd AGL-3.0.x;
repo init -b chinook -m default.xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
```
+
#### Configuring for master (DD)
```bash
cd AGL-master;
repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo;
```
+
Once that you repo is initialised either with the stable or WIP, you need to sync the repo to fetch the various git trees.
#### Downloading the configured AGL source code
@@ -63,6 +71,7 @@ Once that you repo is initialised either with the stable or WIP, you need to syn
```
#### Building the AGL distro
+
You are now ready to initialise your Yocto build.
When running the command:
@@ -76,7 +85,8 @@ You will notice the Intel entries
intel-corei7-64
joule
```
-Simply select that entry to replace porter in the -m option.<br>
+
+Simply select that entry to replace porter in the -m option.
**Note:** agl-netboot option is required to create the right initramfs even if you do not boot from a network
```bash
@@ -85,6 +95,7 @@ Simply select that entry to replace porter in the -m option.<br>
-b build \
agl-devel agl-demo agl-appfw-smack agl-netboot
```
+
**Note:** use the option "-m joule" when building for a Joule developer Kit target.
Start the build **This can take several hours depending of your CPU and
@@ -93,13 +104,14 @@ internet connection and will required several GB on /tmp as well as on your buil
```bash
bitbake agl-demo-platform
```
-** Your newly baked disk image (.hddimg) will be located at **:
+
+**Your newly baked disk image (.hddimg) will be located at**:
`tmp/deploy/images/intel-corei7-64/`
##### Alternative: Download a *ready made* image from AGL web site
The Continuous Integration (CI) process from AGL creates and publish daily and stable builds.
-Pointers to both can be found in [ AGL supported HW](https://wiki.automotivelinux.org/agl-distro) (see Reference BSP/Intel).
+Pointers to both can be found in [AGL supported HW](https://wiki.automotivelinux.org/agl-distro) (see Reference BSP/Intel).
Once you have validated your process you can start to play/work with the snapshot pointer.
@@ -107,11 +119,11 @@ Note that snapshot build may not work.
Follow the directory:
-` intel-corei7-64/deploy/images/intel-corei7-64/`
+`intel-corei7-64/deploy/images/intel-corei7-64/`
and download the file:
-` agl-demo-platform-intel-corei7-64.hddimg`
+`agl-demo-platform-intel-corei7-64.hddimg`
## Create a bootable media
@@ -119,7 +131,7 @@ Depending your target HW you will use an USB stick, an SD card or a HDD/SDD.
The creation process remains the same independently of the selected support.
It does require to have access to a Linux machine with sudo or root password.
-### Insert you removable media in the corresponding interface.
+### Insert you removable media in the corresponding interface
### Check the device name where the media can be accessed with the command
@@ -128,17 +140,19 @@ It does require to have access to a Linux machine with sudo or root password.
# Note that you want the name of the raw device not of a partition on the media
#(eg. /dev/sdc or /dev/mmcblk0)
```
+
### Download the script mkefi-agl.sh
+
This script is present in the directory meta-agl/scripts from blowfish 2.0.4, alternatively you can download it from the following Git repo:
[https://github.com/dominig/mkefi-agl.sh](https://github.com/dominig/mkefi-agl.sh)
-
### check the available option
```bash
sh mkefi-agl.sh -v;
```
+
### create your media with the command ajusted to your configuration
```bash
@@ -158,11 +172,14 @@ This script is present in the directory meta-agl/scripts from blowfish 2.0.4, al
1. Let AGL boot
-**Note:**:
- * Depending on the speed of the removable media, the first boot may not complete, in that case simply reboot the device.
-This is quite common with USB2 sticks.
+**Note:**:
+
+* Depending on the speed of the removable media, the first boot may not complete, in that case simply reboot the device.
+
+This is quite common with USB2 sticks.
+
By default the serial console is configured and activated at the rate of 115200 bps.
## How to create your 1st AGL application
-[ Developing Apps for AGL](https://wiki.automotivelinux.org/agl-distro/developer_resources_intel_apps)
+[Developing Apps for AGL](https://wiki.automotivelinux.org/agl-distro/developer_resources_intel_apps)
diff --git a/getting-started/machines/porter.md b/getting-started/machines/porter.md
index 4cc1c8d..f556dd7 100644
--- a/getting-started/machines/porter.md
+++ b/getting-started/machines/porter.md
@@ -1,5 +1,7 @@
# Renesas Porter Hardware setup
+
Here is a non exhaustive list of hardware parts that could be used to setup the Porter board development environment:
+
* Porter board with its power supply
* mini USB-A cable for serial console
* USB 2.0 Hub
@@ -12,23 +14,29 @@ Here is a non exhaustive list of hardware parts that could be used to setup the
For more information and latest news, please check [Here][R-car Porter]:
-
The following documents may also be helpful:
+
* Porter Hardware Manual [Link][Porter HardwareManual]
* Porter (Rev B) Setup Manual [Link][PORTER SetupManual]
-# Building the AGL Demo Platform for Renesas Porter
+## Building the AGL Demo Platform for Renesas Porter
+
Before set up Build Environment you need to setup the proprietary drivers.
+
* Download Renesas graphics drivers with a "click through" license from Renesas website [Link][rcar demoboard]
under the Target hardware: R-Car H2, M2 and E2 section.
-#### Note:
+
+**Note**:
+
* that you have to register with a free account on MyRenesas and accept the license condition before downloading them.
-The operation is fast and simple but nevertheless mandatory to access evaluation of non open-source drivers for free.
-Once you registered, you can download two zip files.
+ The operation is fast and simple but nevertheless mandatory to access evaluation of non open-source drivers for free.
+ Once you registered, you can download two zip files.
* The files must be store into directory ~/Downloads (or $XDG_DOWNLOAD_DIR).
+
Here after is an example of their names:
-```
+
+```bash
chmod a+r $XDG_DOWNLOAD_DIR/*.zip
ls -l $XDG_DOWNLOAD_DIR
total 8220
@@ -36,18 +44,22 @@ total 8220
-rw-r--r-- 1 1000 1000 2394750 Jul 11 11:03 R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-20151228.zip
```
-### Set up Build Environment:
+## Set up Build Environment
+
* To build AGL demo platform for Renesas Porter board use machine **porter** and feature **agl-demo**:
-```
+
+```bash
cd $AGL_TOP
source meta-agl/scripts/aglsetup.sh -m porter -b build agl-devel agl-demo agl-netboot agl-appfw-smack
```
-#### Note:
+**Note**:
+
* **IMPORTANT** read the log to be sure to have any error during your setup.
+
In case the graphical drivers were not found, you could notice an error message as follow:
-```
+```bash
[snip]
--- fragment /ssd/agl2016-for-kickstart-update/meta-agl/templates/machine/porter/50_setup.sh
/ssd/agl2016-for-kickstart-update /ssd/agl2016-for-kickstart-update/build
@@ -64,56 +76,72 @@ Generating setup file: /ssd/agl2016-for-kickstart-update/build/agl-init-build-en
------------ aglsetup.sh: Done
[snip]
```
+
* If you encounters this issue, or any other unwanted behavior, you can fix the error mentioned and then clean up by removing the “$AGL_TOP/build” directory then launch the procedure again.
* After this command, the working directory is changed to $AGL_TOP/build.
* Users may want to check that the board is correctly selected in the environment:
-```
+```bash
grep -w -e "^MACHINE =" $AGL_TOP/build/conf/local.conf
MACHINE = "porter"
```
-* Configure for Release or Development:
+
+Configure for Release or Development:
Development images require extra tools for developer convenience, in particular:
- * a debugger (gdb)
- * some tweaks, including a disabled root password
- * a SFTP server
- * the TCF Agent for easier application deployment and remote debugging
- * ...
+
+* a debugger (gdb)
+* some tweaks, including a disabled root password
+* a SFTP server
+* the TCF Agent for easier application deployment and remote debugging
+* ...
+
We explicitely activate these Debug facilities by specifying the “agl-devel agl-netboot” feature.
-### Build your image:
+### Build your image
+
The process to build an image is simple:
-```
+
+```bash
bitbake agl-demo-platform
```
+
Once done, what may take up to few hours, you should get the end result in the directory:
-```
+
+```bash
$AGL_TOP/build/tmp/deploy/images/porter.
```
-#### Note:
+
+**Note**:
+
* In case of failure of the build it is safe to first check that the Linux distribution chosen for your host has been validated for version 2.0 of Yocto.
-# Booting AGL Demo Platform on Renesas Porter using a micro-SD card
-#### NOTE:
+## Booting AGL Demo Platform on Renesas Porter using a micro-SD card
+
+**Note**:
+
Porter boards have 2 SD slots:
+
* one for SD cards
* another one for micro-SD cards.
At the time of writing, we didn't succeed to boot a board using the SD slot with the current kernel (3.10):
+
* Only the micro-SD slot was usable.
To boot the board using a micro-SD card, there are two operations that should be done prior to first initial boot:
+
* Create a SD-card with one ext3 partition,
* Set up the board to boot on the SD-card.
Then for each build, the SD-card is merely rewritten and used to boot the configured board.
+
## Deployment
### Format the SD-card on the host
* Plug microSD card and get its associated device by either running *dmesg | tail -15* or *lsblk*, for example:
-```
+```bash
dmesg | tail -15
[ 1971.462160] sd 6:0:0:0: [sdc] Mode Sense: 03 00 00 00
@@ -121,9 +149,10 @@ dmesg | tail -15
[ 1971.462278] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[ 1971.463870] sdc: sdc1 sdc2
```
+
Here, the SD-card is attached to the device sdc.
-```
+```bash
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
@@ -137,16 +166,20 @@ lsblk
├─sdc1 8:33 1 40M 0 part
└─sdc2 8:34 1 788M 0 part
```
-#### Note:
+
+**Note**:
+
* **WARNING** This is a critical operation, each computer is different and device can change during time, so do this operation each time you incert the microSD card.
* In the **example** above, we see the first SATA drive as 'sda'.
* In the **example** above, 'sdc' corresponds to the microSD card.*
### Format the SD-card
-* Create EXT3 partition on the SD-card using fdisk and set the MBR.
- * For **example**, if the microSD card is */dev/sdc*:
-```
+Create EXT3 partition on the SD-card using fdisk and set the MBR.
+
+* For **example**, if the microSD card is */dev/sdc*:
+
+```bash
sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.27.1).
@@ -175,17 +208,19 @@ sudo fdisk /dev/sdc
Calling ioctl() to re-read partition table.
Syncing disks.
```
-* Initialize the ext3 partition using “mke2fs”:
- * for **example** if the microSD card is associated with *sdc*:
-```
+Initialize the ext3 partition using “mke2fs”:
+
+* for **example** if the microSD card is associated with *sdc*:
+
+```bash
sudo mke2fs -t ext3 /dev/sdc1
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 3911168 4k blocks and 979200 inodes
Filesystem UUID: 690804b9-6c7d-4bbb-b1c1-e9357efabc52
Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
+ 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
@@ -194,12 +229,14 @@ sudo mke2fs -t ext3 /dev/sdc1
```
### Copying the built image to the SD-card
+
Insert the SD-card into your build host:
+
* Your desktop system may probably offer a choice to mount the SD-card automatically in some directory.
* In the next sample code, we'll suppose that the SD-card mount directory is stored in the variable $SDCARD.
* For example **example** the microSD card is associated with device *sdc*:
-```
+```bash
export SDCARD=/tmp/agl
mkdir -p $SDCARD
sudo mount /dev/sdc1 $SDCARD
@@ -207,72 +244,85 @@ sudo mount /dev/sdc1 $SDCARD
Go to your build directory:
-```
+```bash
cd $AGL_TOP/build/tmp/deploy/images/porter
```
Make sure the filesystem is empty:
-```
+```bash
sudo rm -rf ${SDCARD:-bad_dir}/*
```
+
*** IMPORTANT ***
Verify that **tar** version is 1.28 or newer:
-```
+```bash
tar --version
tar (GNU tar) 1.28
[snip]
```
+
If your distribution is up to date on this dependency, you can use the host tool directly. Let's define a variable for the following steps:
-```
+
+```bash
TAR=$(which tar)
```
+
Otherwise, a native up-to-date version of tar is also generated while building AGL distribution:
-```
+
+```bash
TAR=$AGL_TOP/build/tmp/sysroots/x86_64-linux/usr/bin/tar-native/tar
$TAR --version
tar (GNU tar) 1.28
[snip]
```
+
Copy Automotive Grade Linux (AGL) files onto the mircoSD card by extracting the root file system archive:
-```
+```bash
sudo $TAR --extract --numeric-owner --preserve-permissions --preserve-order --totals \
--xattrs-include='*' --directory=$SDCARD --file=agl-demo-platform-porter.tar.bz2
```
Copy Kernel Image and Device Tree Blob file into the **boot** directory:
-```
+```bash
sudo cp uImage+dtb /tmp/agl/boot/
```
Ensure the changes have been written to the disk:
-```
+```bash
sync
```
+
Unmount the micrSD card:
-```
+```bash
sudo umount $SDCARD
```
+
### Booting the board
+
Turn the board off using the power switch.
Insert the microSD-card into the appropriate slot.
Verify that you have plugged in, at least, the following:
+
* External monitor on HDMI port
* Input device (keyboard, mouse, touchscreen...) on USB port.
+
Turn the board on using the power switch.
After a few seconds, you'll see the AGL splash screen on the display and you'll be able to log in on the console terminal (login is 'root', no password):
-```
+```bash
Automotive Grade Linux 2.0.0 porter ttySC6
porter login:
```
+
### To access the shell (serial)
+
Install a serial client on your computer.
This can be “screen”, “picocom”, “minicom”.
The lighter of the 3 is “picocom” (it has less dependencies).
@@ -280,7 +330,8 @@ Plug a USB cable from your computer to the serial CP2102 USB port of the porter
With “dmesg” you can check the device created for the serial link.
To get it, you must switch the board on.
For example:
-```
+
+```bash
dmesg | tail
[609575.767056] usb 2-1.6.4: new full-speed USB device number 21 using ehci-pci
[609575.854083] usb 2-1.6.4: New USB device found, idVendor=10c4, idProduct=ea60
@@ -297,23 +348,30 @@ dmesg | tail
[609576.068184] usb 2-1.6.4: reset full-speed USB device number 21 using ehci-pci
[609576.154125] usb 2-1.6.4: cp210x converter now attached to ttyUSB0
```
+
The link is attached to the device /dev/ttyUSB0.
It is time to launch your serial client.
Example:
-```
+
+```bash
picocom -b 38400 /dev/ttyUSB0
```
+
or
-```
+
+```bash
minicom -b 38400 -D /dev/ttyUSB0
```
+
or
-```
+
+```bash
screen /dev/ttyUSB0 38400
```
Power on the Porter board to see a shell on the console
-```
+
+```bash
KOELSCH SPI_LOADER(DDR3L_1333) V0.16a 2014.10.03
DEVICE S25FL512
@@ -342,26 +400,26 @@ Follow the steps below to configure boot from microSD card and to set screen res
* Type a character to abort the boot and enter the U-boot menu.
* Type **print** to check the environment:
-```
+```bash
print
```
* Verify that the ethaddr environment variable is set to the same MAC address value shown on the label on top of the RJ45 Ethernet connector.
* If not please set it using the following command:
-```
+```bash
setenv ethaddr <MAC address>
```
For example:
-```
+```bash
setenv ethaddr 2e:09:0a:00:75:b5
```
* Set the follow environment variables:
-```
+```bash
setenv bootargs_console 'console=ttySC6,38400 ignore_loglevel'
setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60'
setenv bootargs_root 'root=/dev/mmcblk0p1 rootdelay=3 ro rootfstype=ext4 rootwait'
@@ -369,17 +427,20 @@ setenv bootmmc '1:1'
setenv bootcmd_sd 'ext4load mmc ${bootmmc} 0x40007fc0 boot/uImage+dtb'
setenv bootcmd 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root}; run bootcmd_sd; bootm 0x40007fc0'
```
+
**WARNINGS:**
+
* If no display shows up when booting, e.g. for a non-full HD screen, replace **1920x1080** value in the **bootargs_video** variable with lower screen resolution such as **1024x768**. Unfortunately for the moment there are no universally supported setting.
* Depending on your board (Porter rev B or rev C, Koelsch etc.), the SD card slots may differ.
+
Try setting **bootmmc** to **0:1** or **2:1** depending on the slot and card format.
For Renesas Porter Rev 1.0 use screen resolution **1024x768** and set **bootmmc** to **2:1**.
* Save the environment variables:
-```
+```bash
saveenv
Saving Environment to SPI Flash...
SF: Detected S25FL512S with page size 256 KiB, total 64 MiB
@@ -388,12 +449,14 @@ saveenv
* Reboot:
-```
+```bash
reset
```
### Writing a “hello world” application
+
Yocto project provides a good reference on its complete solution for developers:
+
* ADT: The Application Development Toolkit is the complete solution;
* the cross-toolchain is a simple build environment.
@@ -403,61 +466,79 @@ Check the following document for more information [Link][iot.bzh SDK Kickstart o
Here, for a quick demo we will build the cross-toolchain and write a sample application.
First, let's create the build toolchain:
-```
+
+```bash
cd $AGL_TOP
source poky/oe-init-build-env
bitbake meta-ide-support
```
The small following “hello world” example:
-```
+
+```bash
cat hello.c
#include <stdio.h>
int main() { printf(“Hello world\n”); return 0; }
```
… can now be compiled and executed this way:
-```
+
+```bash
. $AGL_TOP/build/tmp/environment-setup-*
$CC -o hello hello.c
scp hello root@porterboard:/
ssh root@porterboard /hello
```
+
where 'porterboard' is replaced by the IP address or the hostname of your Porter board.
### Running CES 2016 Demos
+
The CES demos are located in /opt/AGL/CES2016 (on the microSD-Card).
To run the demo, execute the following commands on the target (from a weston terminal or from the serial console)
-```
+
+```bash
cd /opt/AGL/CES2016
export LD_PRELOAD=/usr/lib/libEGL.so
```
+
For the main demo, run:
-```
+
+```bash
/usr/bin/qt5/qmlscene -–fullscreen -I imports Main.qml
```
+
To start the demo using IVI Shell, run the appropriate scripts located in /opt/AGL/CES2016:
-```
+
+```bash
./switch_to_ivi-shell.sh
./start_CES2016_ivi-shell.sh
```
+
This will restart Weston with IVI Shell enabled and launch the demo.
With the above commands, the demo application has still some decorations.
They can be dropped by adding '--fullscreen' in the script. Use the following command once to modify the script.
-```
+
+```bash
sed -i 's/Main.qml/--fullscreen Main.qml/' start_CES2016_ivi-shell.sh
```
+
Then restart the demo:
-```
+
+```bash
killall qmlscene
./start_CES2016_ivi-shell.sh
```
-#### IMPORTANT:
+#### IMPORTANT
+
Please note that the current image uses Evaluation drivers:
+
* as a consequence, the graphics and multimedia acceleration provided by these drivers will stop after 3 hours. When this happens, simply reboot the board and restart the demo.
+
For more information, you can check the embedded README:
-```
+
+```bash
cat /opt/AGL/CES2016/README.md
Open source QML UI
@@ -484,12 +565,19 @@ Option b: start QML + CarNavigation:/home/navi. For the time being, CarNavigatio
```
### More Documentation
+
More documents, provide by [Iot.bzh][Iot.bzh link], are available to guide developers with AGL and Renesas boards:
+
* [AGL-Devkit-Image-and-SDK-for-porter.pdf][iot.bzh AGL-Devkit-Image-and-SDK-for-porter]
+
Detailed guide on how to build AGL for Renesas boards and using AGL SDK inside a ready-to-use Docker container.
+
* [AGL-Devkit-Build-your-1st-AGL-Application.pdf][Iot.bzh AGL-Devkit-Build-your-1st-AGL-Application]
+
Generic guide on how to build various application types (HTML5, native, Qt, QML, …) for AGL.
+
* [AGL-Devkit-HowTo_bake_a_service.pdf][Iot.bzh AGL_Phase2-Devkit-HowTo_bake_a_service]
+
Generic guide on how to add a new service in the BSP.
[R-car Porter]: http://elinux.org/R-Car/Boards/Porter
diff --git a/getting-started/machines/qemu.md b/getting-started/machines/qemu.md
index a9f6f5c..398eda5 100644
--- a/getting-started/machines/qemu.md
+++ b/getting-started/machines/qemu.md
@@ -2,7 +2,7 @@
To build the QEMU version of the AGL demo platform use machine **qemux86-64** and feature **agl-demo**:
-```
+```bash
source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-demo agl-netboot agl-appfw-smack
bitbake agl-demo-platform
```
diff --git a/getting-started/machines/raspberrypi.md b/getting-started/machines/raspberrypi.md
index 19a41ce..2300c4c 100644
--- a/getting-started/machines/raspberrypi.md
+++ b/getting-started/machines/raspberrypi.md
@@ -4,7 +4,7 @@
To build AGL demo platform for Raspberry Pi 3 use machine **raspberrypi3** and feature **agl-demo**:
-```
+```bash
source meta-agl/scripts/aglsetup.sh -m raspberrypi3 agl-demo agl-netboot agl-appfw-smack
bitbake agl-demo-platform
```
@@ -13,7 +13,7 @@ bitbake agl-demo-platform
To build AGL demo platform for Raspberry Pi 2 use machine **raspberrypi2** and feature **agl-demo**:
-```
+```bash
source meta-agl/scripts/aglsetup.sh -m raspberrypi2 agl-demo agl-netboot agl-appfw-smack
bitbake agl-demo-platform
```
@@ -30,11 +30,10 @@ Follow the steps below to copy the image to microSD card and to boot it on Raspb
*Note: the sdimage files can also be named rpi-sdimg-ota in case you have the **"agl-sota"** feature enabled*
-```
+```bash
sudo umount [sdcard device]
sudo dd if=[output image] of=[sdcard device] bs=4M
sync
```
* Plug your microSD card into Raspberry Pi 2 or 3 and boot the board
-