This shows you the differences between two versions of the page.
iot:labs:11 [2015/06/29 22:35] avner.solomon |
iot:labs:11 [2020/01/07 18:55] (current) jan.vaduva [Lab 11: IoT usecase for Yocto Project] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Lab 11 Web Services ===== | + | ======Lab 11: IoT usecase for Yocto Project====== |
+ | Open the AGL getting started guide located at: [[https://docs.automotivelinux.org/docs/en/guppy/getting_started/reference/getting-started/image-workflow-intro.html|Developing an AGL Image]] | ||
+ | Set up your Linux system with the right packages (instruction are provided for Ubuntu, Fedora, CentOS and openSUSE) | ||
+ | |||
+ | - Install prerequisites: <code>$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ | ||
+ | build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ | ||
+ | xz-utils debianutils iputils-ping libsdl1.2-dev xterm xsltproc docbook-utils \ | ||
+ | fop dblatex xmlto make python-git curl</code> | ||
+ | - Define the work directory: <code>$ export AGL_TOP=$HOME/workspace_agl | ||
+ | $ mkdir -p $AGL_TOP | ||
+ | </code> | ||
+ | - Setup //repo// tool: <code>$ mkdir -p ~/bin | ||
+ | $ export PATH=~/bin:$PATH | ||
+ | $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | ||
+ | $ chmod a+x ~/bin/repo | ||
+ | </code> | ||
+ | - Download latest stable AGL release: <code>$ cd $AGL_TOP | ||
+ | $ repo init -b guppy -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo | ||
+ | $ repo sync | ||
+ | </code> | ||
+ | - Source //aglsetup.sh// script, to create the build directory: <code>$ source meta-agl/scripts/aglsetup.sh -f -m qemux86-64 agl-demo agl-devel</code> | ||
+ | - Build the OS image: <code>$ bitbake agl-demo-platform</code> | ||
+ | - Build the OS SDK image: <code>$ bitbake agl-demo-platform-crosssdk</code> | ||
+ | - Decompress the OS image that resulted after the build: <code>$ cd tmp/deploy/images/qemux86-64 | ||
+ | $ xz -d agl-demo-platform-qemux86-64.vmdk.xz</code> | ||
+ | - Boot the image with QEMU: <code>$ sudo apt-get install qemu-system-x86 | ||
+ | $ 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 | ||
+ | </code> | ||
+ | |||
+ | ===== Exercises===== | ||
+ | - Replicate a successful AGL setup. | ||
+ | - Get the list of packages the newly defined image has | ||
+ | - Check if packages such as openssh and screen are included in the image. | ||
+ | - Deploy the AGL image onto VirtualBox 5.2.0 or later. You could also try using the latest snapshot available: [[https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/|AGL Snapshot]] |