diff options
author | Stephane Desneux <stephane.desneux@iot.bzh> | 2018-10-16 13:10:46 +0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@iot.bzh> | 2018-10-16 13:13:14 +0200 |
commit | 0eba225fb27ec0b87bfa80361314fec5ab901caa (patch) | |
tree | 02baf13e25b4d8989dc25051ff7ce3256ffb7bbd /getting-started | |
parent | 536b42be464af2f29fc5061489821c8903a6690a (diff) |
Import from docs-agl/docs
Change-Id: Id524561d87410e5463cddd123b30eb63d75b62bd
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'getting-started')
-rw-r--r-- | getting-started/customize_bitbake_conf.md | 53 | ||||
-rw-r--r-- | getting-started/footers/intel-footer.md | 90 | ||||
-rw-r--r-- | getting-started/footers/porter-footer.md | 23 | ||||
-rw-r--r-- | getting-started/footers/raspberrypi-footer.md | 56 | ||||
-rw-r--r-- | getting-started/images/RaspberryPi2-ModelB-debug-serial-cable.jpg | bin | 96123 -> 0 bytes | |||
-rw-r--r-- | getting-started/machines/R-Car-Starter-Kit-gen3.md | 633 | ||||
-rw-r--r-- | getting-started/machines/intel.md | 186 | ||||
-rw-r--r-- | getting-started/machines/qemu.md | 119 | ||||
-rw-r--r-- | getting-started/machines/raspberrypi.md | 39 | ||||
-rw-r--r-- | getting-started/setup-sdk-environment.md | 124 | ||||
-rw-r--r-- | getting-started/source-code.md | 201 | ||||
-rw-r--r-- | getting-started/troubleshooting.md | 210 |
12 files changed, 0 insertions, 1734 deletions
diff --git a/getting-started/customize_bitbake_conf.md b/getting-started/customize_bitbake_conf.md deleted file mode 100644 index fa466ca..0000000 --- a/getting-started/customize_bitbake_conf.md +++ /dev/null @@ -1,53 +0,0 @@ -# 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" -``` - -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" -``` - -For more information please check [Here][share_download] - -[buildhistory]: http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#maintaining-build-output-quality -[rm_work]: http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-tasks-rm_work -[share_sstatecache]: https://wiki.yoctoproject.org/wiki/Enable_sstate_cache -[share_download]: http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-DL_DIR diff --git a/getting-started/footers/intel-footer.md b/getting-started/footers/intel-footer.md deleted file mode 100644 index 967feb4..0000000 --- a/getting-started/footers/intel-footer.md +++ /dev/null @@ -1,90 +0,0 @@ -## BIOS update - -Both Joule and MinnowBoard-Max (not needed on Turbo) require a BIOS upgrade before running AGL on them. - -**Do not loose any time trying without upgrading your BIOS first.** - -For instructions on how to update the BIOS on those platforms, please refer to these documents: -* [MinnowBoard](https://firmware.intel.com/projects/minnowboard-max) -* [Intel Joule](https://software.intel.com/en-us/flashing-the-bios-on-joule) -* Intel MRB contact your technical support representative to get the non signed ABL firmware<br> -**Note** MRB users need to replace the mkefi-agl.sh script by mkabl-agl.sh - -## 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. -The script [mkefi-agl.sh](https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl.git;a=blob_plain;f=scripts/mkefi-agl.sh;hb=HEAD) has been done to help you. -The option -h will print the help and the option -v will detail the operation and ease any debug. - -## Installing your image on the internal eMMC - -It can be interesting to install the AGL image directly on the internal eMMC rather than to boot from and SD or a USB removable device. -The easiest to do so, is to add the required tools in your removable boot device, boot AGL from the removable device and -then use the mkefi-agl.sh script to install the image image on the internal eMMC. - * Add the tools to the AGL image. - ** Add a file site.conf in your build/conf directory with the following content: - ``` - INHERIT += "rm_work" - IMAGE_INSTALL_append = " linux-firmware-iwlwifi-7265d" - IMAGE_INSTALL_append = " parted e2fsprogs dosfstools" - IMAGE_INSTALL_append = " linux-firmware-i915 linux-firmware-ibt linux-firmware-iwlwifi-8000c" - add the iwlifi for your own device as needed - ``` - * rebuild your image and install it on your removable device with mkefi-agl.sh. - * add the AGL image file on your removable device in the home directory (for later installation) - ``` - the AGL image file created by yocto (.wic.xz) - located in build/tmp/deploy/images/intel-corei7-64/agl-demo-platform-intel-corei7-64.wic.xz - ``` - * boot AGL from your removable device - * connect to the AGL running image either via serial link or ssh - * locate the eMMC device name - * install image with mkefi-agl.sh - ``` - cat /proc/partitions - ``` - * install the AGL image on the eMMC with mkefi-agl.sh script - * remove the USB or SD boot device - * reboot - -## 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 achieve it in the right time with a USB keyboard than via serial link. -During boot USB hubs 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 MinnowBoard, Joule, many laptops and NUCs will not accept to boot with some USB3 sticks. If you have some trouble to get your USB3 stick detected during boot, swap it for a USB2. In any case working with SD card is faster to flash and to boot. SD should be preferred. -The Joule seems to refuse to boot with my SD-HC-I type cards while I had no problem with the MinnowBoard. 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. By default AGL build Intel target as a MinnowBoard where serial is `/dev/ttyS0`, on Joule and MRB the serial debug is `/dev/ttyS2`. -On Up boards the /dev/ttyS0 serial port is not easy to access and using /dev/ttyS4 which is routed on the Arduino connector.<br> [See pinout]( http://www.up-board.org/wp-content/uploads/2017/11/UP-Square-DatasheetV0.5.pdf) - -You may have to change the configuration in your bootloader which is located in the EFI partition. - -## Serial debug cable - -On the MinnowBoard the serial cable is an FTDI serial cable. The wiring can be found [here](http://wiki.minnowboard.org/MinnowBoard_MAX_HW_Setup).<br> -Up Boards use the same FDDI 3.3V adaptor than the Minnow but the pin out is not adjacent and requires to split the pins. -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 first 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. -The file holding that configuration is `/etc/xdg/weston/weston.ini`. - -Common Display names 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 deleted file mode 100644 index 7d1417d..0000000 --- a/getting-started/footers/porter-footer.md +++ /dev/null @@ -1,23 +0,0 @@ -## Weston - -If Weston fails to start double check : -``/etc/xdg/weston/weston.ini`` -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 - -[shell] -locking=true -# Uncomment below to hide panel -#panel-location=none - -[output] -name=HDMI-A-1 -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 deleted file mode 100644 index f5ff16f..0000000 --- a/getting-started/footers/raspberrypi-footer.md +++ /dev/null @@ -1,56 +0,0 @@ -# Commercial Licensed Packages - -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" - -IMAGE_INSTALL_append = " libomxil" -``` - -# Raspberry Pi Touchscreen with Rotation - -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 -shell=desktop-shell.so - -[shell] -locking=true -# Uncomment below to hide panel -#panel-location=none - -[launcher] -icon=/usr/share/weston/terminal.png -path=/usr/bin/weston-terminal - -[launcher] -icon=/usr/share/weston/icon_flower.png -path=/usr/bin/weston-flower - -[output] -name=DSI-1 -transform=270 -``` - -# Debugging - -It is possible to debug AGL images on Raspberry Pi using 3.3V USB to serial cable, such as [Olimex USB-Serial-Cable-F](https://www.olimex.com/Products/Components/Cables/USB-Serial-Cable/USB-Serial-Cable-F/), connected to the UART of the board. Follow the instructions below to connect a cable to the board (do it on your own risk, no warranty is provided): - -* Connect the BLUE wire if you are using Olimex USB-Serial-Cable-F to pin 6 of Raspberry Pi, -* Connect the RX line of the cable (GREEN wire if you are using Olimex USB-Serial-Cable-F) to pin 8 (TX line) of Raspberry Pi, -* Connect the TX line of the cable (RED wire if you are using Olimex USB-Serial-Cable-F) to pin 10 (RX line) of Raspberry Pi. - -![Olimex USB-Serial-Cable-F attached to Raspberry PI 2 for debugging through the serial console](images/RaspberryPi2-ModelB-debug-serial-cable.jpg) - -* 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 -``` - -Pay attention that the colors of the cable may vary depending on the vendor. If you have USB console cable from Adafruit please have a look [here](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/connect-the-lead). diff --git a/getting-started/images/RaspberryPi2-ModelB-debug-serial-cable.jpg b/getting-started/images/RaspberryPi2-ModelB-debug-serial-cable.jpg Binary files differdeleted file mode 100644 index e8026d6..0000000 --- a/getting-started/images/RaspberryPi2-ModelB-debug-serial-cable.jpg +++ /dev/null diff --git a/getting-started/machines/R-Car-Starter-Kit-gen3.md b/getting-started/machines/R-Car-Starter-Kit-gen3.md deleted file mode 100644 index 68a3798..0000000 --- a/getting-started/machines/R-Car-Starter-Kit-gen3.md +++ /dev/null @@ -1,633 +0,0 @@ -# AGL Kickstart on Renesas R-Car Starter Kit Gen3 (h3ulcb, m3ulcb, salvator-x(optional)) - -## Prerequisites - -* At this step, you are assumed to have downloaded the [AGL source code](/docs/getting_started/en/dev/reference/source-code.html). - -See the related paragraph if not done yet. - -* For creating the microSD card, you will need **bmaptool** - -There are pre-built packages (.deb or .rpm) for the supported host OSes, available at [this location]( -https://build.opensuse.org/package/show/isv:LinuxAutomotive:AGL_Master/bmap-tools) - -## Hardware - -Here is a non exhaustive list of hardware parts that could be used to setup the R-Car Starter Kit Gen3 board development environment: - -* Starter Kit Gen3 board with its 5V power supply -* micro USB-A cable for serial console (optional if using ethernet and ssh connection) -* USB 2.0 Hub (optional) -* Ethernet cable (optional if using serial console) -* HDMI type D (Micro connector) cable and associated display -* micro-SD Card (at least 4GB) and recommend to use class 10 type. -* USB touch screen device like the GeChic 1502i/1503i (optional) - -For more information and latest news, please check : - -* [elinux page for h3ulcb][R-car h3ulcb] -* [elinux page for m3ulcb][R-car m3ulcb] -* [elinux page for salvator-x][R-car salvator-x] - -Infotainment Carrier Board : - -* [elinux page for Kingfisher][R-car Kingfisher] - -**Note**:That the Salvator-X has NDA restrictions, so less documentation is available both here and elsewhere. - -The following documents may also be helpful: - -* [Yocto-Gen3 on elinux][R-car yocto] - -## BSP Version of R-Car Starter Kit Gen3 - -| AGL Version| Renesas version | -|:-:|:-:| -| AGL master | 3.9.0 | -| AGL 6.0.0 | 3.7.0 | -| AGL 5.0.x, 5.1.0| 2.23.1 | -| AGL 4.0.x |2.19.0 | - -## Building the AGL Demo Platform for R-Car Starter Kit Gen3 - -Before setting up the build environment, you need to download the proprietary drivers. - -* The version of the drivers you need can be displayed this way: - -```bash -grep -rn ZIP_.= $AGL_TOP/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh -``` - -* Download Renesas graphics drivers with a "click through" license from [Renesas website][rcar Linux Drivers 2] - * Under the Target hardware: **R-Car H3/M3** section. - -**Note**: - -* You have to register with a free account on MyRenesas and accept the license conditions before downloading the drivers. - The operation is fast and simple nevertheless mandatory to access evaluation of non open-source drivers for free. - Once you registered, you can download two zip files. -* It is recommended to store these drivers into your download directory (usually $HOME/Downloads, pointed by $XDG_DOWNLOAD_DIR in some OS). - * To avoid any errors, check that $XDG_DOWNLOAD_DIR is set to the directory where the drivers are stored, if not, set it using 'export' command -* Be sure to have the need rights for these files using : - -```bash -chmod a+r $XDG_DOWNLOAD_DIR/*.zip -``` - -* Check that the needed drivers files are found using : - -```bash -ls -1 $XDG_DOWNLOAD_DIR -[master] --rw-r--r--. 1 1664 agl-sdk 5.0M Jun 28 15:23 R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180627.zip --rw-r--r--. 1 1664 agl-sdk 3,1M Jun 28 15:24 R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180627.zip - -[Flounder] --rw-r--r--. 1 1664 agl-sdk 4.9M Apr 24 15:23 R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180423.zip --rw-r--r--. 1 1664 agl-sdk 3,0M Apr 24 15:24 R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180423.zip - -[Eel] --rw-r--r--. 1 1664 agl-sdk 4.5M Dec 8 15:23 R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston2-20170904.zip --rw-r--r--. 1 1664 agl-sdk 3,0M Dec 8 15:24 R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston2-20170904.zip -``` - -### 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 -``` - -* for machine **h3-salvator-x**: - -```bash -export MACHINE=h3-salvator-x -``` - -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 -``` - -**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 -The graphics and multimedia acceleration packages for -the R-Car Gen3 board can be downloaded from: - https://www.renesas.com/en-us/solutions/automotive/rcar-demoboard-2.html - -These 2 files from there should be store in your'/home/devel/Downloads' directory. - R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston2-20170904.zip - R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston2-20170904.zip -/home/working/workspace_agl_master/build_gen3 ---- fragment /home/working/workspace_agl_master/meta-agl/templates/base/99_setup_EULAconf.sh ---- end of setup script -OK -Generating setup file: /home/working/workspace_agl_master/build_gen3/agl-init-build-env ... OK ------------- aglsetup.sh: Done -[snip] -``` - -If you encounter 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 re-launch the procedure again. - -In any case, you can find out more information for the reason of the error in this file: - -```bash -[snip] - -~/workspace_agl/build/conf $ cat setup.log ---- beginning of setup script ---- fragment /home/thierry/workspace_agl/meta-agl/templates/base/01_setup_EULAfunc.sh ---- fragment /home/thierry/workspace_agl/meta-agl/templates/machine/m3ulcb/50_setup.sh -~/workspace_agl ~/workspace_agl/build -ERROR: FILES "+/home/thierry/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180423.zip+" NOT EXTRACTING CORRECTLY -ERROR: FILES "+/home/thierry/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180423.zip+" NOT EXTRACTING CORRECTLY -The graphics and multimedia acceleration packages for -the R-Car Gen3 board BSP can be downloaded from: -<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html> - -These 2 files from there should be stored in your -'/home/thierry/Downloads' directory. - R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180423.zip - R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180423.zip -ERROR: Script /home/thierry/workspace_agl/build/conf/setup.sh failed -[snip] -``` - -After this command, the working directory is changed to $AGL_TOP/build. - -If you do not want do this, another option is to add the '**-f**' option to agl_setup.sh. - -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" -or - MACHINE = "h3-salvator-x" -``` - -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 ...) - * ... - -We explicitely activate these debug facilities by specifying the “agl-devel agl-netboot” feature. - -### Build your image - -The process to build an image is simple: - -```bash -bitbake agl-demo-platform -``` - -You may need to install rpcgen to run this command. - -When finished (it may take few hours), you should get the final result: - -```bash -ls -l $AGL_TOP/build/tmp/deploy/images/$MACHINE -``` - -**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 the current version of Yocto used by AGL. - -## Booting AGL Image on R-Car Starter Kit Gen3 boards using a microSD card - -To boot the board using a micro-SD card, there are two operations that must be done prior to first initial boot: - -* Update all firmware on the device. -* Set up the board to boot on the SD-card. - -For each subsequent build you only need to rewrite the SD-card with the new image. - -### Firmware Update - -This proceedure is done in two steps. The 'Sample Loader and MiniMonitor update' step only needs to be done once per device. The 'Firmware stack update' step is mandatory only if you use AGl Eel (version 5.0) or later. - -#### Sample Loader and MiniMonitor update - -Follow the documentation on the [eLinux.org wiki][R-car loader update] to update to at least version 3.02. This is mandatory to run AGL. - -#### Firmware stack update - -As an AArch64 platform, both **h3ulcb** and **m3ulcb** have a firmware stack divided in : **ARM Trusted Firmware**, **OP-Tee** and **U-Boot**. - -If you use AGl Eel (version 5.0) or later, you must update the firmware using the following links to eLinux.org wiki: **[h3ulcb][R-car h3ulcb firmware update]** or **[m3ulcb][R-car m3ulcb firmware update]**. - -The files listed in the eLinux.org wiki table will be found in the directory: - -```bash -*\$AGL_TOP/build/tmp/deploy/images/$MACHINE* -``` - -The Salvator-X firmware update process is not documented on eLinux. - -### Prepare the SD-card on the host - -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 - [ 1971.462277] sd 6:0:0:0: [sdc] No Caching mode page found - [ 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 /dev/sdc. - -```bash -lsblk - - NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT - sda 8:0 0 167,7G 0 disk - ├─sda1 8:1 0 512M 0 part /boot/efi - ├─sda2 8:2 0 159,3G 0 part / - └─sda3 8:3 0 7,9G 0 part [SWAP] - sdb 8:16 0 931,5G 0 disk - └─sdb1 8:17 0 931,5G 0 part /media/storage - sdc 8:32 1 14,9G 0 disk - ├─sdc1 8:33 1 40M 0 part - └─sdc2 8:34 1 788M 0 part -``` - -**IMPORTANT NOTE**: This is a critical operation, each computer is different and removable devices can change from time to time: -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. -* Your desktop system probably offers 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, if the microSD card is associated with device *sdc*: - -Go to your build directory: - -```bash -cd $AGL_TOP/build/tmp/deploy/images/$MACHINE -``` - -You can use bmaptool to copy the **.wic.xz** file to the storage device, discovered in the previous step: - -```bash -bmaptool copy ./agl-demo-platform-$MACHINE.wic.xz $SDCARD -``` - -Or you can be uncompressed and written to the device: - -```bash - sudo umount /dev/sdc - xzcat ./agl-demo-platform-$MACHINE.wic.xz | sudo dd of=$SDCARD bs=4M - sync -``` - -### Booting the board - -* Turn the board off using the power switch. -* Insert the microSD-card. -* Verify that you have plugged in, at least : - * An external monitor on HDMI port - * An 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. - -## Serial Console Setup - -### 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) - -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 -[2097783.385862] usb 2-1.5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 -[2097783.385864] usb 2-1.5.3: Product: FT232R USB UART -[2097783.385866] usb 2-1.5.3: Manufacturer: FTDI -[2097783.385867] usb 2-1.5.3: SerialNumber: AK04WWCE -[2097783.388288] ftdi_sio 2-1.5.3:1.0: FTDI USB Serial Device converter detected -[2097783.388330] usb 2-1.5.3: Detected FT232RL -[2097783.388658] usb 2-1.5.3: FTDI USB Serial Device 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 115200 /dev/ttyUSB0 -``` - -or - -```bash -minicom -b 115200 -D /dev/ttyUSB0 -``` - -or - -```bash -screen /dev/ttyUSB0 115200 -``` - -### Power on the board to see a shell on the console - -* 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 -NOTICE: BL2: DDR1600(rev.0.15) -NOTICE: BL2: DRAM Split is 4ch -NOTICE: BL2: QoS is Gfx Oriented(rev.0.30) -NOTICE: BL2: AVS setting succeeded. DVFS_SetVID=0x52 -NOTICE: BL2: Lossy Decomp areas -NOTICE: Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570 -NOTICE: Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0 -NOTICE: Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0 -NOTICE: BL2: v1.1(release):41099f4 -NOTICE: BL2: Built : 19:20:52, Jun 9 2016 -NOTICE: BL2: Normal boot -NOTICE: BL2: dst=0xe63150c8 src=0x8180000 len=36(0x24) -NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=3072(0xc00) -NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000) -NOTICE: BL2: dst=0x44100000 src=0x8200000 len=524288(0x80000) -NOTICE: BL2: dst=0x49000000 src=0x8640000 len=1048576(0x100000) - - -U-Boot 2015.04 (Jun 09 2016 - 19:21:52) - -CPU: Renesas Electronics R8A7795 rev 1.1 -Board: H3ULCB -I2C: ready -DRAM: 3.9 GiB -MMC: sh-sdhi: 0, sh-sdhi: 1 -In: serial -Out: serial -Err: serial -Net: Board Net Initialization Failed -No ethernet found. -Hit any key to stop autoboot: 0 -=> -``` - -* For machine m3ulcb: - -``` -NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.14 -NOTICE: BL2: PRR is R-Car M3 Ver1.0 -NOTICE: BL2: Board is Starter Kit Rev1.0 -NOTICE: BL2: Boot device is HyperFlash(80MHz) -NOTICE: BL2: LCM state is CM -NOTICE: BL2: AVS setting succeeded. DVFS_SetVID=0x52 -NOTICE: BL2: DDR1600(rev.0.22)NOTICE: [COLD_BOOT]NOTICE: ..0 -NOTICE: BL2: DRAM Split is 2ch -NOTICE: BL2: QoS is default setting(rev.0.17) -NOTICE: BL2: Lossy Decomp areas -NOTICE: Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570 -NOTICE: Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0 -NOTICE: Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0 -NOTICE: BL2: v1.3(release):4eef9a2 -NOTICE: BL2: Built : 00:25:19, Aug 25 2017 -NOTICE: BL2: Normal boot -NOTICE: BL2: dst=0xe631e188 src=0x8180000 len=512(0x200) -NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800) -NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000) -NOTICE: BL2: dst=0x44100000 src=0x8200000 len=524288(0x80000) -NOTICE: BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000) - - -U-Boot 2015.04-dirty (Aug 25 2017 - 10:55:49) - -CPU: Renesas Electronics R8A7796 rev 1.0 -Board: M3ULCB -I2C: ready -DRAM: 1.9 GiB -MMC: sh-sdhi: 0, sh-sdhi: 1 -In: serial -Out: serial -Err: serial -Net: ravb -Hit any key to stop autoboot: 0 -=> -``` - -### Configure U-boot parameters - -Follow the steps below to configure the boot from microSD card and to set screen resolution: - -* Turn the board on using the power switch. -* Hit any key to stop autoboot (warning you have only few seconds). -* Type **printenv** to check if you have correct parameters for booting your board: - * Example for a h3ulcb: - - ``` - => 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 - ``` - - * Example for a m3ulcb: - - ``` - => 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 - ``` - - * To boot on a sd card, it is recommended to set your environment using these commands : - - ``` - setenv bootargs console=ttySC0,115200 ignore_loglevel vmalloc=384M video=HDMI-A-1:1920x1080-32@60 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait rootdelay=2 - setenv bootcmd run load_ker\; run load_dtb\; booti 0x48080000 - 0x48000000 - setenv load_ker ext4load mmc 0:1 0x48080000 /boot/Image - ``` - - * For machine h3ulcb (BSP >= 2.19): - - ``` - setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-es1-h3ulcb.dtb - ``` - - * For machine h3ulcb (BSP < 2.19): - - ``` - 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 - ``` - - * For machine m3ulcb with a kingfisher board: - - ```bash - setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7796-m3ulcb-kf.dtb - ``` - - * For machine h3ulcb with a kingfisher board: - - ```bash - setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-es1-h3ulcb-kf.dtb - ``` - - * Finally save boot environment: - - ```bash - saveenv - ``` - -* Now you can boot: - -``` -run bootcmd -``` - -### Console boot - -After booting, you should see the wayland display on the external monitor and a login prompt on the console, such as: - -* For machine h3ulcb: - -```bash -Automotive Grade Linux ${AGL_VERSION} h3ulcb ttySC0 - -h3ulcb login: root -``` - -* For machine m3ulcb: - -```bash -Automotive Grade Linux ${AGL_VERSION} m3ulcb ttySC0 - -m3ulcb login: root -``` - -Logging in on the console is easy: - -* login is 'root' -* password is empty (not asked) - -### Network access - -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 -1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default - inet 127.0.0.1/8 scope host lo - valid_lft forever preferred_lft forever -3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 - inet 10.0.0.27/24 brd 10.0.0.255 scope global eth0 - valid_lft forever preferred_lft forever -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 -ID="poky-agl" -NAME="Automotive Grade Linux" -VERSION="3.0.0+snapshot-20161202 (chinook)" -VERSION_ID="3.0.0-snapshot-20161202" -PRETTY_NAME="Automotive Grade Linux 3.0.0+snapshot-20161202 (chinook)" -``` - -## More Documentation - -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-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) - -[R-car m3ulcb]: http://elinux.org/R-Car/Boards/M3SK -[R-car m3ulcb firmware update]: https://elinux.org/R-Car/Boards/M3SK#Flashing_firmware -[R-car h3ulcb]: http://elinux.org/R-Car/Boards/H3SK -[R-car h3ulcb firmware update]: https://elinux.org/R-Car/Boards/H3SK#Flashing_firmware -[R-car salvator-x]: https://elinux.org/R-Car/Boards/Salvator-X -[R-car loader update]: http://elinux.org/R-Car/Boards/Kingfisher#How_to_update_of_Sample_Loader_and_MiniMonitor -[R-car Kingfisher]: https://elinux.org/R-Car/Boards/Kingfisher -[R-car yocto]: http://elinux.org/R-Car/Boards/Yocto-Gen3 -[rcar Linux Drivers]: https://www.renesas.com/solutions/automotive/rcar-download/rcar-demoboard.html -[rcar Linux Drivers 2]: https://www.renesas.com/en-us/solutions/automotive/rcar-download/rcar-demoboard-2.html -[Iot.bzh AGL-Kickstart-on-Renesas-Porter-Board]: http://docs.automotivelinux.org/docs/devguides/en/dev/reference/iotbzh2016/sdk/AGL-Kickstart-on-Renesas-Porter-board.pdf -[Iot.bzh AGL-Devkit-Image-and-SDK-for-Porter]: http://docs.automotivelinux.org/docs/devguides/en/dev/reference/iotbzh2016/sdk/AGL-Devkit-Image-and-SDK-for-porter.pdf -[Iot.bzh AGL-Devkit-Build-your-1st-AGL-Application]: http://docs.automotivelinux.org/docs/devguides/en/dev/reference/iotbzh2016/sdk/AGL-Devkit-Build-your-1st-AGL-Application.pdf -[Iot.bzh AGL_Phase2-Devkit-HowTo_bake_a_service]: http://docs.automotivelinux.org/docs/devguides/en/dev/reference/iotbzh2016/bsp/AGL_Phase2-Devkit-HowTo_bake_a_service.pdf - diff --git a/getting-started/machines/intel.md b/getting-started/machines/intel.md deleted file mode 100644 index 34957a8..0000000 --- a/getting-started/machines/intel.md +++ /dev/null @@ -1,186 +0,0 @@ -# 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 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-bit Intel Architecture (IA) platforms using UEFI as boot loader. -In addition to the MinnowBoard, support for the [upCore & UpSquared boards](http://www.up-board.org/upsquared/) has been added. -You need to run the 64-bit version of the UEFI bootloader. -MinnowBoard Max and Turbot as well as Joule are both 64-bit capable. - -**Note**: This page is more focused on those who want to create bespoke AGL images and BSPs. - -If you are interested in creating ***applications*** to run on AGL, please visit the [Developing Apps for AGL](https://wiki.automotivelinux.org/agl-distro/developer_resources_intel_apps) documentation. - -UEFI has evolved a lot recently and you likely want to check that your HW firmware is up-to-date, this is mandatory for both the MinnowBoard-Max and the Joule. Not required on Minnowboard-Turbo and Up boards. - -[`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 - -### Download a ready made image - -AGL provides ready made images for developers. -You will find them on [AGL Download web site](https://download.automotivelinux.org/AGL/release) -image are located in YourPreferedRelease/intel-corei7-64/deploy/images/intel-corei7-64/ -Create a bootable SD card with the script [mkefi-agl.sh](https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl.git;a=blob_plain;f=scripts/mkefi-agl.sh;hb=HEAD) -check the available options with the -v option. mkefi-agl.sh -v - -### 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. - -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` tool. Basic steps to download the AGL source code is described below and for more advanced topics involving the `repo` tool, please refer to the [`repo` documentation](https://source.android.com/source/using-repo.html "wikilink"). - -To install the `repo` tool: - -```bash - mkdir -p ~/bin; - export PATH=~/bin:$PATH; - curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo; - chmod a+x ~/bin/repo; -``` - -#### Configuring for the current *(older)* stable (Electric Eel 5.0.x) - -```bash - cd AGL-5.0.x; - repo init -b eel -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 - -```bash - repo sync; -``` - -#### Building the AGL distro - -You are now ready to initialise your Yocto build. -When running the command: - -```bash - source meta-agl/scripts/aglsetup.sh -h -``` - -You will notice the Intel entries - -```bash - intel-corei7-64 - joule -``` - -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 - source meta-agl/scripts/aglsetup.sh \ - -m intel-corei7-64 \ - -b build \ - agl-devel agl-demo agl-appfw-smack agl-netboot agl-audio-4a-framework -``` - -**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 -internet connection and will required several GB on /tmp as well as on your build directory** - -```bash - bitbake agl-demo-platform -``` - -**Your newly baked disk image (.wic.xz) 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). - -Once you have validated your process you can start to play/work with the snapshot pointer. - -Note that snapshot build may not work. - -Follow the directory: - -`intel-corei7-64/deploy/images/intel-corei7-64/` - -and download the file: - -`agl-demo-platform-intel-corei7-64.hddimg` - -## Create a bootable media - -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 - -### Check the device name where the media can be accessed with the command - -```bash - lsblk - # 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 : [mkefi-agl.sh](https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl.git;a=blob_plain;f=scripts/mkefi-agl.sh;hb=HEAD) - -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 options - -```bash - sh mkefi-agl.sh -v; -``` - -### create your media with the command adjusted to your configuration - -```bash - sudo sh mkefi-agl.sh MyAglImage.hdd /dev/sdX - #/dev/sdX is common for USB stick, /dev/mmcblk0 for laptop integrated SD card reader -``` - -## Boot the image on the target device - -1. Insert the created media with the AGL image in the target device - -1. Power on the device - -1. Select Change one off boot option (generally F12 key during power up) - -1. Select your removable device - -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. - -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) diff --git a/getting-started/machines/qemu.md b/getting-started/machines/qemu.md deleted file mode 100644 index 7bd14c0..0000000 --- a/getting-started/machines/qemu.md +++ /dev/null @@ -1,119 +0,0 @@ -# Building the AGL Demo Platform for QEMU - -To build the QEMU version of the AGL demo platform use machine **qemux86-64** along with features **agl-demo** and **agl-devel**: - -```bash -source meta-agl/scripts/aglsetup.sh -f -m qemux86-64 agl-demo agl-devel -bitbake agl-demo-platform -``` - -By default, the build will produce a compressed *vmdk* image in **tmp/deploy/images/qemux86-64/agl-demo-platform-qemux86-64.vmdk.xz** - -## Deploying the AGL Demo Platform for QEMU - -### Prepare an image for boot - -Decompress the **agl-demo-platform-qemux86-64.vmdk.xz** image to prepare it for boot. - -#### Linux - -```bash -cd tmp/deploy/images/qemux86-64 -xz -d agl-demo-platform-qemux86-64.vmdk.xz -``` - -#### Windows - -Download [7-Zip](http://www.7-zip.org/) and select **agl-demo-platform-qemux86-64.vmdk.xz** to be decompressed. - -## Boot an image - -### QEMU - -#### Install QEMU - -**Note**: if an AGL crosssdk has been created, it will contain a qemu binary for the host system. This SDK qemu binary has no graphics support and cannot currently be used to boot an AGL image. - -*Arch*: - -```bash -sudo pacman -S qemu -``` - -*Debian/Ubuntu*: - -```bash -sudo apt-get install qemu-system-x86 -``` - -*Fedora*: - -```bash -sudo yum install qemu-kvm -``` - -#### Boot QEMU - -Boot the **agl-demo-platform-qemux86-64.vmdk** image in qemu with kvm support: - -```bash -qemu-system-x86_64 -enable-kvm -m 2048 \ - -hda agl-demo-platform-qemux86-64.vmdk \ - -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt \ - -vga virtio -show-cursor \ - -device virtio-rng-pci \ - -serial mon:stdio -serial null \ - -soundhw hda \ - -net nic,vlan=0 \ - -net user,hostfwd=tcp::2222-:22 -``` - -### VirtualBox - -#### Install VirtualBox - -Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) 5.2.0 or later. - -#### Boot VirtualBox - -Boot the **agl-demo-platform-qemux86-64.vmdk** image in VirtualBox: - -* Start VirtualBox -* Click **New** to create a new machine - * Enter **AGL QEMU** as the *Name* - * Select **Linux** as the *Type* - * Select **Other Linux (64-bit)** as the *Version* - * Set *Memory size* to **2 GB** - * Click **Use an existing virtual hard disk file** under *Hard disk* - * Navigate to and select the **agl-demo-platform-qemux86-64.vmdk** image -* Ensure that the newly created **AGL QEMU** machine is highlighted and click **Start** - -### VMWare Player - -#### Install VMWare Player - -Download and install [VMWare Player](https://www.vmware.com/products/player/playerpro-evaluation.html) - -#### Boot VMWare Player - -Boot the **agl-demo-platform-qemux86-64.vmdk** image in VMWare Player: - -* Start VMWare Player -* Select **File** and **Create a New Virtual Machine** - * Select **I will install the operating system later** and click **Next** - * Select **Linux** as the *Guest Operating System*, **Other Linux 3.x kernel 64-bit** as the *Version*, and click **Next** - * Enter **AGL QEMU** as the *Name* and click **Next** - * Leave *disk capacity settings* unchanged and click **Next** - * Click **Finish** -* Select/highlight **AGL QEMU** and click **Edit virtual machine settings** - * Select/highlight **Memory** and click **2 GB** - * Select/highlight **Hard Disk (SCSI)** and click **Remove** - * Click **Add** - * Select **Hard Disk** and click **Next** - * Select **SCSI (Recommended)** and click **Next** - * Select **Use an existing virtual disk** and click **Next** - * Browse and select the **agl-demo-platform-qemux86-64.vmdk** image - * Click **Finish** - * Click **Keep Existing Format** - * Click **Save** -* Ensure that the newly created **AGL QEMU** machine is highlighted and click **Power On** diff --git a/getting-started/machines/raspberrypi.md b/getting-started/machines/raspberrypi.md deleted file mode 100644 index e016584..0000000 --- a/getting-started/machines/raspberrypi.md +++ /dev/null @@ -1,39 +0,0 @@ -# Building the AGL Demo Platform for Raspberry Pi - -## Raspberry Pi 3 - -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 -``` - -## Raspberry Pi 2 - -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 -``` - -## Booting AGL Demo Platform on Raspberry Pi - -Follow the steps below to copy the image to microSD card and to boot it on Raspberry Pi 2 or 3: - -* Connect your sdcard in your linux machine. -* Copy output image from build machine to linux machine that is connected your sdcard. (Often, those are same machines) -* Output Image location in build machine for Raspberry Pi 2: *tmp/deploy/images/raspberrypi2/agl-demo-platform-raspberrypi2.wic.xz* -* Output Image location in build machine for Raspberry Pi 3: *tmp/deploy/images/raspberrypi3/agl-demo-platform-raspberrypi3.wic.xz* -* Unmount the microSD card and after that flash output image to it card with root user: - -*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] -xzcat [output image] | sudo dd 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 deleted file mode 100644 index 691702c..0000000 --- a/getting-started/setup-sdk-environment.md +++ /dev/null @@ -1,124 +0,0 @@ -# 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. - -## Step 1: install Docker - -First install docker on your host, if not already done. -General instructions for Linux are available on the [Docker Site](https://docs.docker.com/engine/installation/linux/). - -Add yourself to the docker group. - -## Step 2: setup persistent workspace - -Docker images are pre-configured to use a particular uid:gid to enable the use -of OpenEmbedded build system. They provide a dedicated user account *devel* -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) - -Those shared volumes with the host needs the proper permissions to be accessible -from the contained environment. - -```bash -mkdir ~/ssd ~/devel -chmod a+w ~/ssd ~/devel -``` - -**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. - -First, download and load the image in your local Docker instance: - -```bash -wget -O - https://download.automotivelinux.org/AGL/snapshots/sdk/docker/docker_agl_worker-latest.tar.xz | docker load; -docker images; - REPOSITORY TAG IMAGE ID CREATED SIZE - docker.automotivelinux.org/agl/worker-generic 5.99-95 6fcc19b4e0d7 2 weeks ago 1.56GB - jenkins latest 55720d63e328 5 weeks ago 711.9 MB - hello-world latest c54a2cc56cbb 5 months ago 1.848 kB -``` - -Identify the IMAGE_ID you just loaded. In the example above, this is 6fcc19b4e0d7 - -```bash -export IMAGE_ID=6fcc19b4e0d7 -``` - -#### 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'. - -```bash -git clone https://git.automotivelinux.org/AGL/docker-worker-generator; -cd docker-worker-generator; -./contrib/create_container 0 $IMAGE_ID; -docker ps; - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - 4fb7c550ad75 6fcc19b4e0d7 "/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. - -So we can copy such file to the shared volume. - -For example, we could have built the SDK from another worker container listening with SSH on port 2223: - -```bash -create_container 1; -ssh -p 2223 devel@mybuilder.local; -... [ prepare build environment ] ... -bitbake agl-demo-platform-crosssdk; -... [ build happens in /xdt/build ] ... -cp /xdt/build/tmp/deploy/sdk/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-cortexa15hf-neon-toolchain-3.0.0+snapshot.sh ~/share; -``` - -then login to the first "SDK Container" and install the SDK: - -```bash -ssh -p 2222 devel@mysdk.local; -install_sdk ~/share/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-cortexa15hf-neon-toolchain-3.0.0+snapshot.sh; -``` - -## Step 5: build your application - -First, you must source the SDK environment you wish to use (you MUST repeat this step each time you open a new shell): - -```bash -source /xdt/sdk/environment-setup-<your_target> -``` - -You're then ready to go: get the sources, run the builds ... - -```bash -git clone <your repo for your app>; -cd <your app>; -cmake; make; make package; -``` diff --git a/getting-started/source-code.md b/getting-started/source-code.md deleted file mode 100644 index 3c5d6f4..0000000 --- a/getting-started/source-code.md +++ /dev/null @@ -1,201 +0,0 @@ -# Introduction: Building target AGL image with Yocto project - -The standard Yocto process is made of the following steps: - -* Setting up your operating system. -* Setting up the build environment for R-Car BSP. -* 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. - -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. - -For AGL 6.0, Yocto Project 2.4, known as rocko, 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, … - -**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**: - -* 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 \ - SDL-devel xterm curl -``` - -### 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 \ - python3 python3-curses glibc-locale -``` - -### 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**: - -* 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, eel 5.0.3: - -```bash -cd $AGL_TOP -repo init -b eel -m eel_5.1.0.xml -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 -``` - -Once you run aglsetup.sh with your desired parameters, you can build any target desired. - -## Features supported by aglsetup - -Here is the list of features for AGL 2.1 that can be specified in the aglsetup.sh command line: - -* in **meta-agl** - * agl-all-features - * agl-appfw-smack: enables IoT.bzh Application Framework + SMACK + Cynara - * agl-archiver - * agl-ci - * agl-ci-change-features - * agl-ci-change-features-nogfx - * agl-ci-snapshot-features - * agl-ci-snapshot-features-nogfx - * agl-devel: activate development options (empty root password, debugger, strace, valgrind …) - * agl-gplv2 - * agl-isafw - * agl-netboot: enable network boot support through TFTP and NBD (see meta-netboot layer) - * agl-profile-graphical - * agl-profile-graphical-html5 - * agl-profile-graphical-qt5 - * agl-profile-hud - * agl-profile-telematics - * agl-ptest - * agl-sota: enable SOTA components and dependencies (meta-sota, meta-filesystems, meta-ruby, meta-rust are added) -* in **meta-agl-demo** - * agl-demo: enable layer meta-agl-demo and meta-qt5 - required to build * agl-demo-platform - * agl-iotivity - * agl-sdl -* in **meta-agl-devel** - * agl-audio-4a-framework - * agl-audio-soundmanager-framework - * agl-egvirt - * agl-hmi-framework - * agl-oem-extra-libs - * agl-renesas-kernel - * agl-telemetry -* in **meta-agl-extra** - * agl-localdev: add a local layer named “meta-localdev” in meta directory and a local.dev.inc conf file if present - * blsched - -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. - -[AGL snapshots master latest]: https://download.automotivelinux.org/AGL/snapshots/master/latest/ -[yocto ref Manual]: http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#detailed-supported-distros -[Getting Started with AGL]: https://wiki.automotivelinux.org/start/getting-started -[repo info]: https://source.android.com/source/using-repo.html diff --git a/getting-started/troubleshooting.md b/getting-started/troubleshooting.md deleted file mode 100644 index d3ad889..0000000 --- a/getting-started/troubleshooting.md +++ /dev/null @@ -1,210 +0,0 @@ -# Troubleshooting - -## Extended attributes MUST be copied - -**IMPORTANT, The extended attribute set during image construction MUST be copied to the SD card.** - -When using tar to create the SDcard, it is a common error to not copy the extended attributes. Find below instruction for using tar. - -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] -``` - -To copy Automotive Grade Linux (AGL) files AND EXTENDED ATRIBUTES onto the SDcard using tar the command is: - -```bash -tar --extract --xz --numeric-owner --preserve-permissions --preserve-order --totals \ - --xattrs-include='*' --directory=DESTINATION_DIRECTORY --file=agl-demo-platform.....tar.xz -``` - -## 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" - -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 - -```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 -``` - -## Disabling Homescreen in AGL 4.0.x DD release - -**Problem**: new installed applications are not available on Homescreen and even if started manually through afm-util, the application starts but no surface appears. - -**Answer**: this is due to IVI-Shell integration with Qt and Homescreen. - -To disable IVI-Shell and revert to the "plain old" weston desktop, you can follow the 4 steps below: - -* 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 - ... -``` - -* modify */etc/afm/unit.env.d/qt-for-ivi-shell* and comment the line specifying QT Wayland backend: - -```bash - ... - #Environment=QT_WAYLAND_SHELL_INTEGRATION=ivi-shell - ... -``` - -(If you use vi, remove backup files by `rm /etc/afm/unit.env.d/*~`) - -* disable Homescreen services: - -```bash - # systemctl --user mask HomeScreen.service -``` - -* Reboot your target and you should then be able to start apps on the standard weston screen using afm-util - -## Adding media files to play with MediaPlayer - -AGL include the default MediaPlayer sample app which can be used to play music. The `lightmediascanner.service` by default will search for media under the `/media` folder. So if you plug in any USB stick containing music, they would be recognized and showed in the playlist of the MediaPlayer app menu. - -The current supported format is OGG. Please convert your files to ogg to play with MediaPlayer. - -In case you want to store music in another place, modify the `/usr/lib/systemd/user/lightmediascanner.service` file and change the `--directory` parameter to the path of that folder. - -If you don’t want to touch the ligthmediascanner service, you can also add a folder named "Music" under `/home/root` and put your music files there. - -## Configuring the Audio hardware - -AGL uses alsa as Audio configuration master. If the correct HW is not setup, the Audio system will fail to start what will also fails the demo Home Screen launch. -You need to configure Audio in 2 places - -* alsa -* 4A HAL - -### alsa - - The file /etc/asound.conf (at the beginning) tells which hardware will be used. - For example on an Intel Minnow or UP board your need to enter the following configuration. - -```bash - pcm.Speakers { - type dmix - slave {pcm "hw:PCH,3"} - ipc_key 1001 # ipc_key should be unique to each dmix - } -``` - -The correct value (here hw:PCH,3) can be obtained with the command: - -```bash - aplay -l - **** List of PLAYBACK Hardware Devices **** - card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] - Subdevices: 1/1 - Subdevice #0: subdevice #0 - card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] - Subdevices: 1/1 - Subdevice #0: subdevice #0 -``` - -Using hw:PCH rather than hw:0 will avoid you many trouble.\ -NOTE that the device number is not always 0. If you give no device number, alsa will assume device 0 (and the not the first available device), what can fail your configuration.\ -As the default is hw:0 (card 0 device 0), it will always fail on a Minnow or UP board. - -For info HW device for common configuration are: - -* for USB Audio -> hw:AUDIO,0 -* for Intel Analog output -> hw:PCH,0 (not available on Minnow, Joule, Up boards, ...) -* for Intel via -> HDMI hw:PCH,3 -* for MOST Unicens -> hw:ep016ch,0 - -### 4A HAL configuration - -AGL 4A needs to know which HAL shall be used. This is configured in the file: - -```bash -/usr/agl-service-audio-4a/ahl-agl-service-audio-4a-config.json -``` - -At the beginning of that file you will find the slected HAL (note the there is no correct default value). - -```bash -{ - "version": "0.2.0", - "policy_module": "AudioPolicy_v1", - "description": "High-level binding configuration file", - "note": "Devices and routings are always listed in order of priority (for device selection rules)", - "hal_list": ["intel-minnow"], - "audio_roles": [ -``` - -Here you see "intel-minnow" but common values are: - -* Intel laptop -> intel-pc -* Intel via HDMI -> intel-minnow -* Renesas -> Rcar-M3 -* USB Audio Speaker -> usb-audio -* MOSTS Unicens -> hal-most-unicens - -More HAL can be found on Gerrit (search projects named as 4a-hal*) - -## Installing the Map for the Navigation Application - -While the Navigation App is installed with all other demo Apps at first boot, the Maps required to be installed manually. - -### a) Method 1 on target download - - 1. Install the new image on the target - 2. boot a first time to install the demo Apps - 3. via ssh or serial connection, execute the script - * /usr/AGL/apps/download_mapdata_uk.sh\ - or - * /usr/AGL/apps/download_mapdata_jp.sh - -### b) At image creation - -Download on your build machine the desired maps and uncompress them on your target image before 1st boot. -This method is quicker and does not require to have the network enabled on the target device. -Map can be found here. - -* <http://agl.wismobi.com/data/japan_TR9/navi_data.tar.gz> -* <http://agl.wismobi.com/data/UnitedKingdom_TR9/navi_data_UK.tar.gz> - -Once that you have built your image on the SD card, uncompress the desired map in on the SD card at the position /YourMountPoint/var/mapdata\ -(YourMountPoint will vary with your build system). - -You can also use the script from the image to install the Mapdata on your SD card but there is little adavange in using that method. e.g. - -* download_mapdata_jp.sh /YourMountPoint |