diff options
author | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-07-10 18:01:53 +0200 |
---|---|---|
committer | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-07-10 18:01:53 +0200 |
commit | 12682a6df639e61132fb6b4064edf4b931f31579 (patch) | |
tree | d09369c84f17c4272e0ccd5ff8dd4d9f65618f15 /getting-started | |
parent | 947042e2e95b108ec798662863bb2ebd658d32d9 (diff) |
Fix markdown lint
https://github.com/DavidAnson/markdownlint/blob/v0.5.0/doc/Rules.md
MD012 - Multiple consecutive blank lines
MD014 - Dollar signs used before commands without showing output
MD022 - Headers should be surrounded by blank lines
MD026 - Trailing punctuation in header
MD029 - Ordered list item prefix
MD031 - Fenced code blocks should be surrounded by blank lines
MD032 - Lists should be surrounded by blank lines
MD033 - Inline HTML
MD034 - Bare URL used
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'getting-started')
-rw-r--r-- | getting-started/customize_bitbake_conf.md | 15 | ||||
-rw-r--r-- | getting-started/footers/intel-footer.md | 51 | ||||
-rw-r--r-- | getting-started/footers/porter-footer.md | 3 | ||||
-rw-r--r-- | getting-started/footers/raspberrypi-footer.md | 6 | ||||
-rw-r--r-- | getting-started/machines/R-Car-Starter-Kit-gen3.md | 204 | ||||
-rw-r--r-- | getting-started/machines/intel.md | 59 | ||||
-rw-r--r-- | getting-started/machines/porter.md | 218 | ||||
-rw-r--r-- | getting-started/machines/qemu.md | 2 | ||||
-rw-r--r-- | getting-started/machines/raspberrypi.md | 7 | ||||
-rw-r--r-- | getting-started/setup-sdk-environment.md | 23 | ||||
-rw-r--r-- | getting-started/source-code.md | 85 | ||||
-rw-r--r-- | getting-started/troubleshooting.md | 30 |
12 files changed, 425 insertions, 278 deletions
diff --git a/getting-started/customize_bitbake_conf.md b/getting-started/customize_bitbake_conf.md index dc7dc6b..fa466ca 100644 --- a/getting-started/customize_bitbake_conf.md +++ b/getting-started/customize_bitbake_conf.md @@ -1,14 +1,16 @@ # Customize AGL build + To customize the AGL build, you edit local.conf file, located in the build/conf directory. -``` +```bash edit $AGL_TOP/build/conf/local.conf ``` ## Buildhistory + The OpenEmbedded build system creates this directory when you enable the build history feature. -``` +```bash INHERIT += "buildhistory" BUILDHISTORY_COMMIT = "1" ``` @@ -16,27 +18,30 @@ BUILDHISTORY_COMMIT = "1" For more information please check [Here][buildhistory] ## Deletion of temporary workspace + Removes work files after the OpenEmbedded build system has finished with them. -``` +```bash INHERIT += "rm_work" ``` For more information please check [Here][rm_work] ## Share sstate cache + The directory for the shared state cache. -``` +```bash SSTATE_DIR = "${HOME}/workspace_agl/sstate-cache" ``` For more information please check [Here][share_sstatecache] ## Share Download directory + The central download directory used by the build process to store downloads. -``` +```bash DL_DIR = "${HOME}/workspace_agl/downloads" ``` diff --git a/getting-started/footers/intel-footer.md b/getting-started/footers/intel-footer.md index 191ff98..0c75128 100644 --- a/getting-started/footers/intel-footer.md +++ b/getting-started/footers/intel-footer.md @@ -1,47 +1,52 @@ ## BIOS update -Both the Joule and the Minnowboard require a BIOS upgrade. **Don t loose time trying without.**<br> -https://firmware.intel.com/projects/minnowboard-max<br> -https://software.intel.com/en-us/flashing-the-bios-on-joule + +Both the Joule and the Minnowboard require a BIOS upgrade. **Don t loose time trying without.** +<https://firmware.intel.com/projects/minnowboard-max> +<https://software.intel.com/en-us/flashing-the-bios-on-joule> ## Creating a bootable image -Multiple options are avaiable but dd and tar can very easily let you down due to the requirement to pass SMACK labels, create a proper UEFI configuration and a few other tricks.<br> -The script [mkefi-agl.sh](https://github.com/dominig/mkefi-agl.sh) has been done to help you.<br> -The option -h will print the help and the option -v will detailled the operation and ease any debug.<br> - -## Selecting the SD or USB to boot. -When booting a Minnowboard or a Joule you can change the default boot device by hitting F2 during initial UEFI boot. -It's easier to acheive it in the right time with a USB keyboard than via serial link. -During boot USB hub are not supported, you need to connect the keyboard directly in the USB socket.<br> -It's also preferable to use F9 and to change the boot order once for all.<br> + +Multiple options are avaiable but dd and tar can very easily let you down due to the requirement to pass SMACK labels, create a proper UEFI configuration and a few other tricks. +The script [mkefi-agl.sh](https://github.com/dominig/mkefi-agl.sh) has been done to help you. +The option -h will print the help and the option -v will detailled the operation and ease any debug. + +## Selecting the SD or USB to boot + +When booting a Minnowboard or a Joule you can change the default boot device by hitting F2 during initial UEFI boot. +It's easier to acheive it in the right time with a USB keyboard than via serial link. +During boot USB hub are not supported, you need to connect the keyboard directly in the USB socket. +It's also preferable to use F9 and to change the boot order once for all. Please note: You can only change the boot order, when a valid device is inserted in the corresponding port (USB or SD). -The Minnow, Joule, many laptops and NUCs will not accept to boot with some USB3 stick. If you have some trouble to get your USB3 stick detected during boot, swap it for a USB2. In anycase working with SD card is faster to flash and to boot. SD should be prefered.<br> +The Minnow, Joule, many laptops and NUCs will not accept to boot with some USB3 stick. If you have some trouble to get your USB3 stick detected during boot, swap it for a USB2. In anycase working with SD card is faster to flash and to boot. SD should be prefered. The Joule seems to refuse to boot with my SD-HC-I type cards while I had no problem with the Minnow. If you work with a Joule, use regular SD-HC (mode 4 and 10 work fine) - ## Serial debug Port -Serial debug port ID varies with the HW platform :<br> -By default AGL build Intel target as a Minnowboard where serial is /dev/ttyS0 <br> -On Joule and MRB the serial debug is /dev/ttyS2 <br> +Serial debug port ID varies with the HW platform : +By default AGL build Intel target as a Minnowboard where serial is /dev/ttyS0 +On Joule and MRB the serial debug is /dev/ttyS2 You may have to change the configuration in your boot loader which is located in the EFI partition. ## Serial debug cable -On the Minnowboard the serial cable is a FTDI serial cable. The wiring can be found [here](http://wiki.minnowboard.org/MinnowBoard_MAX_HW_Setup).<br> -On the Joule the serial connection is done via the micro USB cable which is not provided in the Developer kit. Details can be found [here](https://software.intel.com/en-us/node/667851).<br> +On the Minnowboard the serial cable is a FTDI serial cable. The wiring can be found [here](http://wiki.minnowboard.org/MinnowBoard_MAX_HW_Setup). +On the Joule the serial connection is done via the micro USB cable which is not provided in the Developer kit. Details can be found [here](https://software.intel.com/en-us/node/667851). Interface speed is 115200 bps, 8 bits, no parity, no flow control ## Which port name is used to define the connected display(s) -Port naming may change with HW platforms and connected display. The simplest is to check following the fist boot, in the systemd journal which display names are listed.<br> -``` +Port naming may change with HW platforms and connected display. The simplest is to check following the fist boot, in the systemd journal which display names are listed. + +```bash journalctl |grep Output ``` -**Note:** The Output information is only listed if a real Display is connected to the connector on the board.<br> -The file holding that configuration is /etc/xdg/weston/weston.ini<br> + +**Note:** The Output information is only listed if a real Display is connected to the connector on the board. +The file holding that configuration is /etc/xdg/weston/weston.ini Common Display name for Intel are + * HDMI-A-1 * HDMI-A-2 * LVDS-1 diff --git a/getting-started/footers/porter-footer.md b/getting-started/footers/porter-footer.md index 697ff39..7d1417d 100644 --- a/getting-started/footers/porter-footer.md +++ b/getting-started/footers/porter-footer.md @@ -5,7 +5,7 @@ If Weston fails to start double check : and verify that the output name and screen resolution matches the configured U-Boot environment. For example on Renesas Porter board rev 1.0 with screen resolution 1024x768: -``` +```bash [core] shell=desktop-shell.so backend=drm-backend.so @@ -21,4 +21,3 @@ mode=1024x768 #mode=1920x1080 #mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync ``` - diff --git a/getting-started/footers/raspberrypi-footer.md b/getting-started/footers/raspberrypi-footer.md index cb914dc..f5ff16f 100644 --- a/getting-started/footers/raspberrypi-footer.md +++ b/getting-started/footers/raspberrypi-footer.md @@ -2,7 +2,7 @@ Append to following lines to **conf/local.conf** to include libomxil under a commercial license to your build: -``` +```bash # For libomxil LICENSE_FLAGS_WHITELIST = "commercial" @@ -13,7 +13,7 @@ IMAGE_INSTALL_append = " libomxil" If you have Raspberry Pi official 7" touchscreen connected, you can rotate it with these lines in /etc/xdg/weston/weston.ini -``` +```bash root@raspberrypi3:/etc/xdg/weston# cat weston.ini [core] backend=drm-backend.so @@ -49,7 +49,7 @@ It is possible to debug AGL images on Raspberry Pi using 3.3V USB to serial cabl * Plug the USB connector of the cable to your computer and use your favorite tool for serial communication, for example on Ubuntu and other Linux distributions you may use screen: -``` +```bash sudo screen /dev/ttyUSB0 115200 ``` 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 - diff --git a/getting-started/setup-sdk-environment.md b/getting-started/setup-sdk-environment.md index 1435b50..3479a21 100644 --- a/getting-started/setup-sdk-environment.md +++ b/getting-started/setup-sdk-environment.md @@ -1,4 +1,5 @@ # AGL SDK Quick Setup + This tutorial explains how to quickly setup an environment suitable to building and packaging AGL Applications using the SDK and a Docker container. The current tutorial has been tested on Linux, but may work with a few adjustments for Windows or MacOS. @@ -15,6 +16,7 @@ which belong to uid=1664(devel) gid=1664(devel). (Note: password is *devel*) The script 'create_container' presented below instantiates a new container and shares some volumes with the host: + * /xdt (the build directory inside the container) is stored in ~/ssd/xdt_$ID (specific to instance ID) * /home/devel/mirror is stored in ~/ssd/localmirror_$ID (specific to instance ID) * /home/devel/share => points to ~/devel/docker/share (shared by all containers) @@ -27,12 +29,15 @@ mkdir ~/ssd ~/devel chmod a+w ~/ssd ~/devel ``` -**Note**: - * To gain access from your host on files created within the container, your +**Note**: + +* To gain access from your host on files created within the container, your host account requires to be added to group id 1664. ## Step 3: install the "Generic AGL Worker" Docker Image + ### Get docker image + #### Pre-built image A pre-built image is available on automotivelinux download public site and can be used directly. @@ -47,24 +52,28 @@ docker images; jenkins latest 55720d63e328 5 weeks ago 711.9 MB hello-world latest c54a2cc56cbb 5 months ago 1.848 kB ``` + #### Rebuilt image + The Docker image for AGL Worker can be rebuilt using the scripts published here [docker-worker-generator](https://git.automotivelinux.org/AGL/docker-worker-generator/). ### Start image + Then, use the 'create_container' script to start a new, fresh container based on the AGL Worker image: -**Note**: - * The password for the id 'devel' inside the docker image is 'devel'. + +**Note**: + +* The password for the id 'devel' inside the docker image is 'devel'. ```bash git clone https://git.automotivelinux.org/AGL/docker-worker-generator; cd docker-worker-generator; ./contrib/create_container 0; docker ps; - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - 4fb7c550ad75 docker.automotivelinux.org/agl/worker:3.0 "/usr/bin/wait_for_ne" 33 hours ago Up 33 hours 0.0.0.0:2222->22/tcp, 0.0.0.0:69->69/udp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:10809->10809/tcp agl-worker-odin-0-sdx + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + 4fb7c550ad75 docker.automotivelinux.org/agl/worker:3.0 "/usr/bin/wait_for_ne" 33 hours ago Up 33 hours 0.0.0.0:2222->22/tcp, 0.0.0.0:69->69/udp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:10809->10809/tcp agl-worker-odin-0-sdx ``` - ## Step 4: install the AGL SDK for your target Here, we assume that we just built an image 'agl-demo-platform-crosssdk' using the Yocto build procedure documented in the [Getting Started](../) section of the documentation. diff --git a/getting-started/source-code.md b/getting-started/source-code.md index 9b60b82..0c2c387 100644 --- a/getting-started/source-code.md +++ b/getting-started/source-code.md @@ -1,5 +1,3 @@ - - # Introduction: Building target AGL image with Yocto project The standard Yocto process is made of the following steps: @@ -9,55 +7,57 @@ The standard Yocto process is made of the following steps: * Downloading the proprietary drivers and installing them in the build environment (if needed). * Build the image. * Boot using SD-CARD. - * Create an SD-CARD. - * Configure to boot on SD-CARD. - * Copy the image to the SD-CARD. - * Boot the board on it. + * Create an SD-CARD. + * Configure to boot on SD-CARD. + * Copy the image to the SD-CARD. + * Boot the board on it. For convenience, the resulting development images are made available [Here][AGL snapshots master latest] If you want to bypass the build phase and quick boot the board, you can download the image tarball and the kernel then follow the installation procedure. ## Setting up your operating system + The very first step is to ensure that your system can run the build system of the Yocto Project. **Important**: it only runs on Linux - * if your system is Windows© or iOS© you should use a virtualization solution (Virtualbox, VMWare ...) to run a Linux VM on your system. +* if your system is Windows© or iOS© you should use a virtualization solution (Virtualbox, VMWare ...) to run a Linux VM on your system. For AGL 2.1, Yocto Project 2.1, known as krogoth, has been selected for the BSP and build system. Reference data for configuring your system can be found in the Yocto documentation [Here][yocto ref Manual] - - Here after an extract of this documentation for most common Linux distributions: * The build system should be able to run on any modern distributions that has the following versions for: - * Python - * Git 1.7.8 or greater - * tar 1.24 or greater - * GCC, … + * Python + * Git 1.7.8 or greater + * tar 1.24 or greater + * GCC, … -#### Note: -* Python 2.7.3 or greater excluding Python 3.x, which is not supported. +**Note**: +* Python 2.7.3 or greater excluding Python 3.x, which is not supported. ### Ubuntu and Debian + The essential and graphical support packages you need for a supported Ubuntu or Debian distribution are shown in the following command: -``` +```bash sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev xterm cpio curl ``` -#### Note: +**Note**: + * Also note that for this tutorial, the utility 'curl' has been added to the list of packages to install. ### Fedora + The essential and graphical packages you need for a supported Fedora distribution are shown in the following command: -``` +```bash sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \ diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \ ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \ @@ -65,85 +65,96 @@ sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \ ``` ### OpenSUSE + The essential and graphical packages you need for a supported OpenSUSE distribution are shown in the following command: -``` +```bash sudo zypper install python gcc gcc-c++ git chrpath make wget python-xml \ diffstat texinfo python-curses patch socat libSDL-devel xterm curl ``` ### CentOS + The essential and graphical packages you need for a supported CentOS distribution are shown in the following command: -``` +```bash sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \ diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \ socat SDL-devel xterm curl ``` # Download AGL Source Code + The AGL source code and Yocto layers are maintained on the AGL Gerrit server. For information on how to create accounts for gerrit see [Getting Started with AGL][Getting Started with AGL]. ## Setting up the build environment + In the following, your top level directory is noted as “AGL_TOP”. For example, we will set AGL_TOP to point to a directory “$HOME/workspace_agl”: -``` +```bash export AGL_TOP=$HOME/workspace_agl mkdir -p $AGL_TOP ``` ## Prepare Repo Tool + AGL Uses the 'repo' tool for managing repositories. You need to setup layers of AGL. You can use the commands below to prepare Repo: -``` +```bash mkdir -p ~/bin export PATH=~/bin:$PATH curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo ``` -#### Note: +**Note**: + * More information about the tool 'repo' [Here][repo info] ## Download source + You can choose your source release ### Download Latest Stable Release + To download all layers for the for the latest stable release, Chinook 3.0.1: -``` +```bash cd $AGL_TOP repo init -b chinook -m chinook_3.0.1.xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo repo sync ``` ### Download Latest on Chinook Branch + To download all layers on the current release branch which may be in the midst of testing or changes prior to the next stable release: -``` +```bash cd $AGL_TOP repo init -b chinook -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo repo sync ``` ### Download Master Branch + To download all code from master: -``` +```bash cd $AGL_TOP repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo repo sync ``` ## Set up Build Environment Info + AGL has created a set up script for defining the target build and desired optional features. To get a complete list of the options available run. -``` +```bash cd $AGL_TOP source meta-agl/scripts/aglsetup.sh -h ``` @@ -155,18 +166,18 @@ Once you run aglsetup.sh with your desired parameters, you can build any target Here is the list of features for AGL 2.1 that can be specified in the aglsetup.sh command line: * in **meta-agl** - * **agl-archiver**: - * **agl-devel**: activate development options (empty root password, debugger, strace, valgrind …) - * **agl-isafw**: - * **agl-netboot**: enable network boot support through TFTP and NBD (see meta-netboot layer) + * **agl-archiver**: + * **agl-devel**: activate development options (empty root password, debugger, strace, valgrind …) + * **agl-isafw**: + * **agl-netboot**: enable network boot support through TFTP and NBD (see meta-netboot layer) * in **meta-agl-devel** - * **agl-oem-extra-libs**: - * **agl-renesas-kernel**: + * **agl-oem-extra-libs**: + * **agl-renesas-kernel**: * in **meta-agl-extra** - * **agl-appfw-smack**: enables IoT.bzh Application Framework + SMACK + Cynara - * **agl-demo**: enable layer meta-agl-demo and meta-qt5 - required to build * agl-demo-platform - * **agl-localdev**: add a local layer named “meta-localdev” in meta directory and a local.dev.inc conf file if present - * **agl-sota**: enable SOTA components and dependencies (meta-sota, meta-filesystems, meta-ruby, meta-rust are added) + * **agl-appfw-smack**: enables IoT.bzh Application Framework + SMACK + Cynara + * **agl-demo**: enable layer meta-agl-demo and meta-qt5 - required to build * agl-demo-platform + * **agl-localdev**: add a local layer named “meta-localdev” in meta directory and a local.dev.inc conf file if present + * **agl-sota**: enable SOTA components and dependencies (meta-sota, meta-filesystems, meta-ruby, meta-rust are added) For newer features or to get more details on a given feature, take a look at the configuration files stored for each feature and/or each machine in meta-agl/templates and meta-agl-extra/templates. diff --git a/getting-started/troubleshooting.md b/getting-started/troubleshooting.md index 183d0c9..258311e 100644 --- a/getting-started/troubleshooting.md +++ b/getting-started/troubleshooting.md @@ -8,14 +8,15 @@ When using tar to create the SDcard, it is a common error to not copy the extend Verify that **tar** version is 1.28 or newer: -``` +```bash tar --version tar (GNU tar) 1.28 [snip] ``` If it is not the case, a native up-to-date version of tar is also generated while building AGL distribution: -``` + +```bash tmp/sysroots/x86_64-linux/usr/bin/tar-native/tar --version tar (GNU tar) 1.28 [snip] @@ -23,16 +24,17 @@ tar (GNU tar) 1.28 To copy Automotive Grade Linux (AGL) files AND EXTENDED ATRIBUTES onto the SDcard using tar the command is: -``` +```bash tar --extract --numeric-owner --preserve-permissions --preserve-order --totals \ --xattrs-include='*' --directory=DESTINATION_DIRECTORY --file=agl-demo-platform.....tar.bz2 ``` ## meta-rust + Due to a known bug in the upstream of meta-rust the Yocto/OE recipe for rust-cross may fail while building RVI SOTA Client or another application written in the Rust programming language. Until the complete resolution of the issue the workaround is to disable all use of the CXX11 ABI by applying the following lines to **conf/local.conf**: -``` +```bash LD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0" TARGET_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0" CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0" @@ -40,15 +42,20 @@ CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0" BUILD_CXXFLAGS_remove_pn-gcc-runtime = "-D_GLIBCXX_USE_CXX11_ABI=0" TARGET_CXXFLAGS_remove_pn-gcc-runtime = "-D_GLIBCXX_USE_CXX11_ABI=0" CXXFLAGS_remove_pn-gcc-runtime = "-D_GLIBCXX_USE_CXX11_ABI=0" ``` + ## Screen orientation for Splash and in Weston + Depending of your scren mounting the default orientation of the UI an/or splash screen might be incorrect. -To change the orientation of the splash screen patch -``` +To change the orientation of the splash screen patch + +```bash File: /etc/systemd/system/sysinit.target.wants/psplash-start.service Line: ExecStart=/usr/bin/psplash -n -a 90 ``` + To change the orientation of the UI in Weston patch -``` + +```bash File: /etc/xdg/weston/weston.ini Line: transform=90 ``` @@ -63,7 +70,7 @@ To disable IVI-Shell and revert to the "plain old" weston desktop, you can follo * Modify */etc/xdg/weston/weston.ini* and comment the line mentioning IVI-shell. For example on Porter board: -``` +```bash [core] backend=drm-backend.so #shell=ivi-shell.so @@ -72,7 +79,7 @@ To disable IVI-Shell and revert to the "plain old" weston desktop, you can follo * modify */usr/lib/systemd/user/afm-user-daemon.service* and comment the line specifying QT Wayland backend: -``` +```bash ... #Environment=QT_WAYLAND_SHELL_INTEGRATION=ivi-shell ... @@ -80,12 +87,11 @@ To disable IVI-Shell and revert to the "plain old" weston desktop, you can follo * disable Homescreen services: -``` +```bash # systemctl disable HomeScreenAppFrameworkBinderAGL.service # systemctl disable HomeScreen.service # systemctl disable InputEventManager.service # systemctl disable WindowManager.service ``` -* Reboot your target and you should then be able to start apps on the standard weston screen using afm-util - +* Reboot your target and you should then be able to start apps on the standard weston screen using afm-util
\ No newline at end of file |