[EX01] Introduction to Yocto and course development platform
This commit is contained in:
1
exercises/01/README.md
Normal file
1
exercises/01/README.md
Normal file
@@ -0,0 +1 @@
|
||||
instructions.md
|
71
exercises/01/instructions.md
Normal file
71
exercises/01/instructions.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Introduction
|
||||
|
||||
The goal of this first exercise session is to familiarize with the tools used throughout the exercises for COMP.CE.460.
|
||||
|
||||
Throughout the exercise sessions of COMP.CE.460 *Embedded Linux Drivers*, we designed, in collaboration with Wapice, a simulation of a typical industry workflow as a System Engineer. We are initially tasked with getting the board to boot a custom GNU Linux distribution built with Yocto.
|
||||
|
||||
The starting point of the simulation will be set at receiving a new sample board for a new embedded project.
|
||||
|
||||
Rather than providing step-by-step instructions, we provide a list of reading materials and resources you should familiarize with in order to solve the task at hand.
|
||||
|
||||
We will use a Ubuntu virtual machine (which already includes all the required prerequisites to successfully build the Yocto Project).
|
||||
The username and (very secure) password for the VM account are: `student`/`student`.
|
||||
|
||||
**WARNING**: be aware that **files on the VM will be erased at each reboot**, commit and push your work to your remote repository (or save your important files to an external drive) before rebooting the VM.
|
||||
|
||||
|
||||
|
||||
# Resources and reading material
|
||||
|
||||
- [Lecture #1 and #2 on Moodle][moodle.COMP.CE.460]
|
||||
- [Yocto Project Quick Start][YoctoQS]
|
||||
- [Yocto Reference Manual (C#7: *Source Directory Structure*)][YoctoREFMAN:sec7.1]
|
||||
- [PYNQ-Z1 Board Reference Manual][PYNQ-Z1-REFMAN]
|
||||
- [Git Submodules][Git Submodules]
|
||||
- [meta-pynq layer repository][meta-pynq]
|
||||
|
||||
# Checklist
|
||||
|
||||
- [ ] get a microSD kit for your group from the TA
|
||||
- [ ] clone Yocto `poky` and add support for the PYNQ board <u>**as submodules**</u>.
|
||||
- **Hint**: check documentation of the PYNQ support layer to determine the proper version of `poky` and other requirements
|
||||
- add each of these repositories as [Git Submodules] in the root of the student group repository
|
||||
- [ ] initialize the Build Environment, **making sure the *Build Directory* is created as `<STUDENT_REPO_ROOT>/build`**
|
||||
- notice that we require the *Build Directory* to be in a non-default location, requiring knowledge from the [linked section of the *Yocto Reference Manual*][YoctoREFMAN:sec7.1]
|
||||
- <u>DO NOT COMMIT THE WHOLE BUILD DIRECTORY</u>: only the configuration files should be committed.
|
||||
- [ ] setup your local configuration file
|
||||
- [ ] build `core-image-minimal`
|
||||
- **Hint**: building from scratch could require hours. Read on the *Yocto Reference Manual* about the `SSTATE_MIRRORS` variable and check the contents of `/opt/poky_cache` to speed up this step
|
||||
- [ ] verify that the build was successful and copy the *required* files to the microSD
|
||||
- required files:
|
||||
- uImage
|
||||
- u-boot.img
|
||||
- boot.bin
|
||||
- core-image-minimal-pynq.cpio.gz.u-boot
|
||||
- uEnv.txt
|
||||
- devicetree.dtb
|
||||
- [ ] turn off the PYNQ board and set it to boot from the microSD
|
||||
- [ ] turn on and connect via serial to verify successful boot
|
||||
- the USB connection provides power to the board and provides a USB serial port on the host workstation: by default the bootloader and the kernel expose a virtual console on this serial interface.
|
||||
- use PuTTY on the host to connect to the console
|
||||
- [ ] commit Yocto build configuration files to the student repository
|
||||
- [ ] commit the changes to the question file for this exercise to include your answers
|
||||
- [ ] <u>**push to your remote repository**</u>
|
||||
- [ ] demonstrate to the TA
|
||||
- [ ] <u>remember to recover your microSD card before leaving</u>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Git Submodules]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
|
||||
[YoctoQS]: https://docs.yoctoproject.org/2.4.3/yocto-project-qs/yocto-project-qs.html
|
||||
[moodle.COMP.CE.460]: https://moodle.tuni.fi/course/view.php?id=50067
|
||||
[YoctoREFMAN:sec7.1]: https://docs.yoctoproject.org/2.4.3/ref-manual/ref-manual.html#structure-core
|
||||
[PYNQ-Z1-REFMAN]: https://reference.digilentinc.com/_media/reference/programmable-logic/pynq-z1/pynq-rm.pdf
|
||||
[meta-pynq]: https://course-gitlab.tuni.fi/comp-ce-460-embedded-linux-drivers_2025-2026/meta-pynq
|
15
exercises/01/questions.md
Normal file
15
exercises/01/questions.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Exercise 01 - Q&A
|
||||
|
||||
## 1. What did you accomplish in this exercise?
|
||||
|
||||
|
||||
## 2. How does Yocto recognize that the target machine "pynq" is supported?
|
||||
|
||||
|
||||
## 3. Where do you find the device-tree source code for the PYNQ board?
|
||||
|
||||
|
||||
## 4. What is the priority of the PYNQ support layer?
|
||||
|
||||
|
||||
## 5. What additional applications are installed to the `core-image-minimal` target in the PYNQ support layer?
|
32
exercises/README.md
Normal file
32
exercises/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Introduction
|
||||
|
||||
Throughout the exercise sessions of COMP.CE.460 *Embedded Linux Drivers*, we designed, in collaboration with Wapice, a simulation of a typical industry workflow as a System Engineer.
|
||||
|
||||
The starting point of the simulation will be set at receiving a new sample board for a new embedded project.
|
||||
We are initially tasked with getting the board to boot a custom GNU Linux distribution built with Yocto, and will then proceed to develop a kernel driver to support a custom IP required for the project, eventually improving and tweaking it for real-time applications.
|
||||
We will also use Yocto to generate a dedicated SDK to develop and cross-compile userland applications for the project, and in the final stages we will go back to work on the bootloader to adapt to different usage requirements.
|
||||
|
||||
Rather than providing a step-by-step guide, in general the instructions for each exercise session will include an introduction detailing the specific goals of the exercise, links to related reading materials and resources, and a checklist to self-validate your progression towards the solution of the exercise.
|
||||
Generally each exercise will include an instructions file and a questions file: completion of the exercise requires completing the tasks listed in the instructions and adding answers to the questions file.
|
||||
|
||||
In general, the completion of each exercise will be marked after submitting a properly tagged commit (`ex??`, where `??` is replaced by the exercise number) to the group repository and presenting a working demonstration to the TA during the exercise sessions.
|
||||
The evaluation of the submitted commits is done manually and might require some time; unless otherwise stated, the deadline for submitting the solution to an exercise and to demonstrate it to the course staff is set to one week after the scheduled exercise session (i.e., the first exercise should be demonstrated either during the first or the second exercise session).
|
||||
|
||||
The exercise sessions are conducted in groups (exercises and seminar presentations will be organized using the same groups), using any of the PYNQ-Z1 boards installed in lab TC217 and a microSD card: each member of the group should make sure to have valid access rights to TC217 (or compile the required forms).
|
||||
|
||||
The course staff will provide a microSD card kit per group (which includes a microSD card and a USB microSD reader): **it is important that you take good care of the card and reader, as it is required that you return them after the last exercise. You will not be getting your final grade before you have returned the borrowed equipment!**.
|
||||
|
||||
# Tools
|
||||
|
||||
Throughout the course we will use the following tools:
|
||||
- Xilinx PYNQ-Z1 board (installed in TC217, must be set to boot from the microSD card)
|
||||
- microSD card kit (which includes a microSD card and a USB microSD reader)
|
||||
- Xilinx Vivado (installed in TC217 workstations)
|
||||
- vmware Workstation/Player (installed in TC217 workstations)
|
||||
- an Ubuntu virtual machine image:
|
||||
- the image comes preinstalled with all the requirements for Yocto development
|
||||
- located in `C:\Work\COMP-CE-460-vm` in TC217 workstations
|
||||
- it will be used for most of the development and compilation tasks
|
||||
- the image comes with vmware tools support: we will use `Shared Folders` to export the compiled artifacts to the host system and to write them to the microSD card
|
||||
- usr/pwd: student/student
|
||||
- **WARNING**: be aware that **files on the VM will be erased at each reboot**, commit and push your work to your remote repository (or save your important files to an external drive) before rebooting the VM.
|
Reference in New Issue
Block a user