Skip to content

Commit

Permalink
fixed code formatting and unified
Browse files Browse the repository at this point in the history
  • Loading branch information
growupboron committed Oct 8, 2020
1 parent e899bab commit 3aae349
Show file tree
Hide file tree
Showing 9 changed files with 503 additions and 403 deletions.
71 changes: 37 additions & 34 deletions docs/0_Getting_Started/1_Quickstart/Using_Ready_Made_Images.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ AGL provides a number of pre-built ready-made images of various versions.

3. Install [QEMU](https://www.qemu.org/download/) :

```
```sh
$ apt-get install qemu
```

4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :

```
```sh
$ sudo apt install vinagre
```

5. Create boot directory and copy compressed images (prebuilt & kernel) into them :

```
```sh
$ mkdir ~/agl-demo/
$ cp ~/Downloads/agl-demo-platform-crosssdk-qemux86-64.ext4.xz ~/agl-demo/
$ cp ~/Downloads/bzImage ~/agl-demo/
Expand All @@ -44,13 +44,13 @@ AGL provides a number of pre-built ready-made images of various versions.

6. Extract prebuilt compressed image :

```
```sh
$ xz -v -d agl-demo-platform-crosssdk-qemux86-64.ext4.xz
```

7. Launch QEMU with vinagre (for scaling), remove `- snapshot \` if you want to save changes to the image files :
```
```sh
$ ( sleep 5 && vinagre --vnc-scale localhost ) &
qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22 \
-drive file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
Expand All @@ -59,26 +59,27 @@ AGL provides a number of pre-built ready-made images of various versions.
-m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
-append 'root=/dev/vda rw console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 verbose fstab=no'
```
- Login into AGL :
```sh
Automotive Grade Linux 9.99.4+snapshot qemux86-64 ttyS1
Automotive Grade Linux 9.99.4+snapshot qemux86-64 ttyS1
qemux86-64 login: root
qemux86-64 login: root
```
- Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
- To use vnc-viewer instead of vinagre :
```bash
```sh
$ ( sleep 5 && vncviewer ) &
qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22 \
-drive file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
-snapshot \
-vnc :0 -soundhw hda -machine q35 -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm \
-m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
-append 'root=/dev/vda rw console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 verbose fstab=no'
```
```
### 2. Virtual Box (Emulation)
Expand Down Expand Up @@ -112,13 +113,13 @@ AGL provides a number of pre-built ready-made images of various versions.
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-demo-platform-crosssdk-qemux86-64.wic.xz).
2. Extract the image into USB drive :

$ lsblk
$ sudo umount <usb_device_name>
$ xzcat agl-demo-platform-crosssdk-qemux86-64.wic.xz | sudo dd of=<usb_device_name> bs=4M
$ sync
```sh
$ lsblk
$ sudo umount <usb_device_name>
$ xzcat agl-demo-platform-crosssdk-qemux86-64.wic.xz | sudo dd of=<usb_device_name> bs=4M
$ sync
```
3. Boot from USB drive on the x86 system.
Expand All @@ -129,12 +130,13 @@ AGL provides a number of pre-built ready-made images of various versions.
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/raspberrypi4/deploy/images/raspberrypi4-64/agl-demo-platform-crosssdk-raspberrypi4-64.wic.xz).
2. Extract the image into the SD card of Raspberry Pi 4 :


$ lsblk
$ sudo umount <sdcard_device_name>
$ xzcat agl-demo-platform-crosssdk-raspberrypi4-64.wic.xz | sudo dd of=<sdcard_device_name> bs=4M
$ sync
```sh
$ lsblk
$ sudo umount <sdcard_device_name>
$ xzcat agl-demo-platform-crosssdk-raspberrypi4-64.wic.xz | sudo dd of=<sdcard_device_name> bs=4M
$ sync
```
**IMPORTANT NOTE:** Before re-writing any device on your Build Host, you need to
be sure you are actually writing to the removable MicroSD card and not some other
Expand Down Expand Up @@ -184,9 +186,9 @@ AGL provides a number of pre-built ready-made images of various versions.
For example, if your build host is a native Linux machine (e.g. Ubuntu)
you could use `screen` as follows from a terminal on the build host:
```
$ sudo screen /dev/ttyUSB0 115200
```
```sh
$ sudo screen /dev/ttyUSB0 115200
```
## R-Car H3SK (H3ULCB board)
Expand All @@ -198,18 +200,19 @@ AGL provides a number of pre-built ready-made images of various versions.
2. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/h3ulcb-nogfx/deploy/images/h3ulcb/agl-image-ivi-crosssdk-h3ulcb.wic.xz).
3. Extract the image into the boot device :

$ lsblk
$ sudo umount <boot_device_name>
$ xzcat agl-image-ivi-crosssdk-h3ulcb.wic.xz | sudo dd of=<boot_device_name> bs=4M
$ sync
```sh
$ lsblk
$ sudo umount <boot_device_name>
$ xzcat agl-image-ivi-crosssdk-h3ulcb.wic.xz | sudo dd of=<boot_device_name> bs=4M
$ sync
```
3. [Serial](https://elinux.org/R-Car/Boards/H3SK) into the board for debugging.
For example, if your build host is a native Linux machine (e.g. Ubuntu)
you could use `screen` as follows from a terminal on the build host:
```
```sh
$ sudo screen /dev/ttyUSB0 115200
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,25 @@ The remainder of this section provides steps on how to download the AGL source f
You can define an environment variable as your top-level AGL workspace folder.
Following is an example that defines the `$HOME/workspace_agl` folder using
an environment variable named "AGL_TOP":

$ export AGL_TOP=$HOME/AGL
$ echo 'export AGL_TOP=$HOME/AGL' >> $HOME/.bashrc
$ mkdir -p $AGL_TOP

```sh
$ export AGL_TOP=$HOME/AGL
$ echo 'export AGL_TOP=$HOME/AGL' >> $HOME/.bashrc
$ mkdir -p $AGL_TOP
```

2. **Download the `repo` Tool and Set Permissions:**
AGL Uses the `repo` tool for managing repositories.
Use the following commands to download the tool and then set its
permissions to allow for execution:

$ mkdir -p $HOME/bin
$ export PATH=$HOME/bin:$PATH
$ echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
$ curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo
$ chmod a+x $HOME/bin/repo
```sh
$ mkdir -p $HOME/bin
$ export PATH=$HOME/bin:$PATH
$ echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
$ curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo
$ chmod a+x $HOME/bin/repo
```

**NOTE:** See the
"[Repo Command Reference](https://source.android.com/setup/develop/repo)"
Expand All @@ -52,13 +56,14 @@ The remainder of this section provides steps on how to download the AGL source f
The release is static, tested, and known to work.
To download the latest stable release branch (i.e. Jellyfish), use
the following commands:

$ cd $AGL_TOP
$ mkdir jellyfish
$ cd jellyfish
$ repo init -b jellyfish -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
$ repo sync


```sh
$ cd $AGL_TOP
$ mkdir jellyfish
$ cd jellyfish
$ repo init -b jellyfish -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
$ repo sync
```

* **Cutting-Edge Files:**
Using the "cutting-edge" AGL files gives you a snapshot of the
Expand All @@ -68,29 +73,31 @@ The remainder of this section provides steps on how to download the AGL source f
absolute latest features, which are often under development, for AGL.

To download the "cutting-edge" AGL files, use the following commands:

$ cd $AGL_TOP
$ mkdir master
$ cd master
$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
$ repo sync

```sh
$ cd $AGL_TOP
$ mkdir master
$ cd master
$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
$ repo sync
```

Once you `sync` the repository, you have the AGL files in the form of
"layers" (e.g. `meta-*` folders).
You also have the `poky` repository in your AGL workspace.

Listing out the resulting directory structure appears as follows:

$ tree -L 1
.
├── bsp
├── external
├── meta-agl
├── meta-agl-cluster-demo
├── meta-agl-demo
├── meta-agl-devel
├── meta-agl-extra
└── meta-agl-telematics-demo

```sh
$ tree -L 1
.
├── bsp
├── external
├── meta-agl
├── meta-agl-cluster-demo
├── meta-agl-demo
├── meta-agl-devel
├── meta-agl-extra
└── meta-agl-telematics-demo
```

Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ run to initialize the build environment.

You can find this script here:

$AGL_TOP/master/meta-agl/scripts/aglsetup.sh

```sh
$AGL_TOP/master/meta-agl/scripts/aglsetup.sh
```

The script accepts many options that allow you to define build parameters such
as the target hardware (i.e. the machine), build directory, and so forth.
Use the following commands to see the available options and script syntax:

$ cd $AGL_TOP/master
$ source meta-agl/scripts/aglsetup.sh -h
```sh
$ cd $AGL_TOP/master
$ source meta-agl/scripts/aglsetup.sh -h
```

## AGL Machines (board support)

Expand All @@ -32,7 +35,7 @@ Note: This is also the place where you can add new boards.

Following is a list of the available machines (level of support varies!):

```
```sh
Available machines:
[meta-agl]
bbe # BeagleBoneEnhanced
Expand Down Expand Up @@ -61,8 +64,6 @@ Available machines:
qemuarm64 # Qemu AArch 64 (ARM 64bit)
* qemux86-64 # Qemu x86-64
raspberrypi4 # Raspberry Pi 4
```

## AGL Features
Expand All @@ -74,7 +75,7 @@ which they reside.

Following is a list of the available features:

```
```sh
Available features:
[meta-agl]
agl-all-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework agl-netboot )
Expand Down Expand Up @@ -219,7 +220,7 @@ Following is an example that initializes the build environment, selects "beagleb
for the machine, and chooses the "agl-demo" feature, which also includes the
"agl-appfw-smack", "agl-devel", and "agl-hmi-framework" features:

```
```sh
$ source meta-agl/scripts/aglsetup.sh -m qemux86-64 -b qemux86-64 agl-demo agl-devel
aglsetup.sh: Starting
Generating configuration files:
Expand All @@ -238,11 +239,8 @@ Generating configuration files:
OK
Generating setup file: /home/scottrif/workspace_agl/build/agl-init-build-env ... OK
aglsetup.sh: Done
Shell environment set up for builds.
You can now run 'bitbake target'
Common targets are:
- meta-agl: (core system)
agl-image-minimal
Expand All @@ -258,7 +256,6 @@ Common targets are:
agl-demo-platform (* default demo target)
agl-demo-platform-qa
agl-demo-platform-crosssdk
agl-demo-platform-html5
```

Expand Down
Loading

0 comments on commit 3aae349

Please sign in to comment.