36
Kommentar:
|
8153
|
Gelöschter Text ist auf diese Art markiert. | Hinzugefügter Text ist auf diese Art markiert. |
Zeile 1: | Zeile 1: |
Describe EmbeddedLinuxFragen here. | ## page was renamed from EmbeddedLinuxSimmondsQuestions ## page was renamed from EmbeddedLinuxSimmonsQuestions ## page was renamed from EmbeddedLinuxFragen #format rst #language de Questions for the textbook **Chris Simmonds, Mastering Embedded Linux Programming, Packt Publishing, 2nd edition, 2017** <Hubert.Hoegl@hs-augsburg.de>, April 2016, 2018 Chapter 1: Starting Out ======================= 1. Why does your TV run Linux? (6 item points) #. What hardware conditions must be given to run Linux? #. What skills do you need to start a Linux project? #. What are the main players? #. Name the "four elements" #. What do you know about Open-Source licenses? #. Beagle Bone Black. Write down the main technical data. #. What is Qemu? How can I use it? #. For which purpose do you need the uml-utilities? Chapter 2: Learning About Toolchains ==================================== 1. Which components are in the standard GNU toolchain? #. Compare native and cross toolchains. #. What are the capabilities of the target CPU, which are essential for the toolchain? #. What reports the command ``gcc -dumpmachine``? #. Which C libraries do you know? #. Which alternatives do you know to get a toolchain? #. Create a toolchain using crosstool-ng! #. Follow the instructions in the "Anatomy of a toolchain" section. #. How do you cross-compile a program? #. How do you compile a program which uses the GNU autotools? Chapter 3: All about bootloaders ================================ 1. Describe the three phases of booting. #. Which information is passed from bootloader to kernel? #. What is a "device tree"? #. From which technology are the device trees derived? #. Device tree basics XXX add a device tree example here which should be explained (reg, phandles, interrupts, include files, compiling a DT) #. Which bootloaders do you know? (which is the most widely used?) #. Describe the steps needed to compile and install U-Boot. .. Omitted: Porting U-Boot to a new board (p. 61) .. Omitted: KConfig and U-Boot (p. 62) #. Describe how to use U-Boot? Cover the following items: - Environment variables - Boot image format - Loading images from cards and network - Start the Linux kernel #. How can you automate the boot process? #. Which are the board specific U-Boot files? #. How to build the Barebox bootloader? Chapter 4: Porting and configuring the kernel ============================================= 1. When was the Linux project started? #. Which three main jobs has the kernel? #. Describe the structure of *user space* and *kernel space* and how they interact. #. How does kernel version numbering work? What kernel version do you use? #. What are *mainline*, *stable* and *long-term* kernels? #. How is the kernel licensed? Can you run proprietary (closed) applications in user space? #. Questions about the kernel sources 1. How many files has the current kernel for your board? #. How does the kernel configuration work? #. How do you run ``menuconfig`` for cross-compilation? #. How do you configure the kernel with a default configuration for the BBB? #. How do you compile a zImage or uImage? #. Which information is displayed when you compile the kernel? How can you display all commands to the output? #. How do you compile the device trees? #. How do you compile and install modules? #. What does the kernel need after it has started? #. How does the initialization of user space work? #. How are the kernel log messages organized? Which messages are displayed if the log level is set to 7? #. What is the kernel command line and where is it described? Chapter 5: Building a root filesystem ===================================== 1. Welche Komponenten muss man mindestens im Root-Filesystem haben? #. Was bedeutet *FHS*? #. Wie funktionieren die *file permission bits*? #. In welchem Programm sind alle wesentlichen Werkzeuge fuer das Root-FS enthalten? #. Wofuer wird das *staging directory* verwendet? #. Mit welchen Kommandozeilenaufrufen baut man dieses Programm? #. Was sind *device nodes* und wie erzeugt man sie? #. Welche Bedeutung haben die Filesysteme /proc und /sysfs und wie mountet man sie? #. Wie installiert man Kernelmodule? #. Welches sind die drei Varianten, mit denen man dem Kernel das Root-FS servieren kann? #. Wie erzeugt man ein *initramfs*? #. Wie kann man das Root-FS ueber NFS bereitstellen? #. Es gibt drei Alternativen, mit denen man dynamisch Geraetedateien erzeugen kann. Wie heissen sie? #. Warum sind statisch generierte Geraetedateien gar nicht so schlecht? #. Wie funktioniert der Init Prozess? #. Wie konfiguriert man die *user accounts*? #. Mit welchem Programm kann man das neu gebaute Root-FS simulieren? Chapter 6: Selecting a build system =================================== 1. Welche Baukästen fuer Embedded Linux kennen Sie? #. Welche Hauptaufgaben hat ein Buildsystem? #. Wie konfiguriert und baut man Buildroot für ein bestimmtes Board, das bereits in Buildroot unterstützt wird? #. Aus welchen Bestandteilen besteht das Yoctoproject? #. Wie baut man mit Yocto ein komplettes GNU/Linux Betriebssystem für das Beagle Bone Black? #. Was bedeuten die "meta-" Einheiten in Yocto? Geben Sie ein paar Beispiele. #. Welches Programm verwendet Yocto zum Steuern der Kompilierung der Pakete? Chapter 9: Interfacing with Device Drivers ========================================== 1. Welche grundsaetzlichen Arten von Geraetetreibern gibt es? #. Was sind "major" und "minor numbers"? Wo sind diese Zahlen definiert? #. Wie kann man die Geraetedateien anlegen? #. Wozu braucht man Blocktreiber? #. Wozu dient das /proc Filesystem? #. Wozu dient das /sys Filesystem? #. Wozu verwendet man die folgenden Dateien:: /sys/devices /sys/class /sys/block #. Wie greift man aus dem *user-space* in der Regel auf Hardware zu? (bitte mit Beispielen) #. Wie reagiert man auf GPIO Interrupts im *user-space*? (hier sollte man das C Beispiel aus dem Buch verstehen) #. Wie steuert man LEDs im *user-space* an? #. Ueber welche Geraetedatei kann man die SPI Schnittstelle ansteuern? #. Ueber welche Geraetedatei kann man die I2C Schnittstelle ansteuern? #. Skizzieren Sie, wie man einen Geraetetreiber schreibt, kompiliert und laedt. #. Was ist der Unterschied zwischen einem *device tree* und *platform data*? Chapter 11: Managing Power ========================== XXX to do Chapter 14: Debugging with GDB ============================== 1. Wie muss man den Quelltext kompilieren, damit man ihn mit GDB debuggen kann? #. Was muss man tun, wenn GDB nicht nativ auf dem Target laeuft, z.B. weil zu wenig Speicher vorhanden ist? #. Wie kann man Anweisungen an GDB "skripten"? #. Nennen Sie die wichtigsten GDB Kommandos. #. Wie kann man GDB mit einem bereits laufenden Prozess verbinden? #. Wie kann man GDB zum Anzeigen eines simplen pseudografischen User-Interface bringen? #. Wie kann man den Code im Kernel debuggen? Chapter 16: Real-time programming ================================= 1. Muss Echtzeit-Programmierung immer *schnell* sein? #. Definieren Sie *soft-realtime* und *hard-realtime*. #. Wie schnell ist ungefaehr die Antwortzeit bei einem gewoehnlichen Kernel und wie schnell bei einem Echtzeit-Kernel? #. Wie haengt *Determinismus* beim Linux Kern vom Durchsatz ab? #. Welche Einfluesse wirken sich auf den Determinismus eines Linux Kernels aus (8 Stueck)? #. Was ist *kernel preemption* und wie aktiviert man sie? #. Was versteht man unter einem PREEMPT_RT Kernel? #. Was sind *threaded interrupt handler*? #. Wozu dient das Kommando ``chrt``? #. Was sind *high-resolution timer* und wie aktiviert man sie? #. Wie misst man die Scheduler-Latenz? #. Wie misst man allgemein Latenzzeiten im Kernel? |
Questions for the textbook
Chris Simmonds, Mastering Embedded Linux Programming, Packt Publishing, 2nd edition, 2017
<Hubert.Hoegl@hs-augsburg.de>, April 2016, 2018
Chapter 1: Starting Out
- Why does your TV run Linux? (6 item points)
- What hardware conditions must be given to run Linux?
- What skills do you need to start a Linux project?
- What are the main players?
- Name the "four elements"
- What do you know about Open-Source licenses?
- Beagle Bone Black. Write down the main technical data.
- What is Qemu? How can I use it?
- For which purpose do you need the uml-utilities?
Chapter 2: Learning About Toolchains
- Which components are in the standard GNU toolchain?
- Compare native and cross toolchains.
- What are the capabilities of the target CPU, which are essential for the toolchain?
- What reports the command gcc -dumpmachine?
- Which C libraries do you know?
- Which alternatives do you know to get a toolchain?
- Create a toolchain using crosstool-ng!
- Follow the instructions in the "Anatomy of a toolchain" section.
- How do you cross-compile a program?
- How do you compile a program which uses the GNU autotools?
Chapter 3: All about bootloaders
- Describe the three phases of booting.
- Which information is passed from bootloader to kernel?
- What is a "device tree"?
- From which technology are the device trees derived?
Device tree basics
XXX add a device tree example here which should be explained (reg, phandles, interrupts, include files, compiling a DT)
- Which bootloaders do you know? (which is the most widely used?)
- Describe the steps needed to compile and install U-Boot.
Describe how to use U-Boot? Cover the following items:
- Environment variables
- Boot image format
- Loading images from cards and network
- Start the Linux kernel
- How can you automate the boot process?
- Which are the board specific U-Boot files?
- How to build the Barebox bootloader?
Chapter 4: Porting and configuring the kernel
- When was the Linux project started?
- Which three main jobs has the kernel?
- Describe the structure of user space and kernel space and how they interact.
- How does kernel version numbering work? What kernel version do you use?
- What are mainline, stable and long-term kernels?
- How is the kernel licensed? Can you run proprietary (closed) applications in user space?
Questions about the kernel sources
- How many files has the current kernel for your board?
- How does the kernel configuration work?
- How do you run menuconfig for cross-compilation?
- How do you configure the kernel with a default configuration for the BBB?
- How do you compile a zImage or uImage?
- Which information is displayed when you compile the kernel? How can you display all commands to the output?
- How do you compile the device trees?
- How do you compile and install modules?
- What does the kernel need after it has started?
- How does the initialization of user space work?
- How are the kernel log messages organized? Which messages are displayed if the log level is set to 7?
- What is the kernel command line and where is it described?
Chapter 5: Building a root filesystem
- Welche Komponenten muss man mindestens im Root-Filesystem haben?
- Was bedeutet FHS?
- Wie funktionieren die file permission bits?
- In welchem Programm sind alle wesentlichen Werkzeuge fuer das Root-FS enthalten?
- Wofuer wird das staging directory verwendet?
- Mit welchen Kommandozeilenaufrufen baut man dieses Programm?
- Was sind device nodes und wie erzeugt man sie?
- Welche Bedeutung haben die Filesysteme /proc und /sysfs und wie mountet man sie?
- Wie installiert man Kernelmodule?
- Welches sind die drei Varianten, mit denen man dem Kernel das Root-FS servieren kann?
- Wie erzeugt man ein initramfs?
- Wie kann man das Root-FS ueber NFS bereitstellen?
- Es gibt drei Alternativen, mit denen man dynamisch Geraetedateien erzeugen kann. Wie heissen sie?
- Warum sind statisch generierte Geraetedateien gar nicht so schlecht?
- Wie funktioniert der Init Prozess?
- Wie konfiguriert man die user accounts?
- Mit welchem Programm kann man das neu gebaute Root-FS simulieren?
Chapter 6: Selecting a build system
- Welche Baukästen fuer Embedded Linux kennen Sie?
- Welche Hauptaufgaben hat ein Buildsystem?
- Wie konfiguriert und baut man Buildroot für ein bestimmtes Board, das bereits in Buildroot unterstützt wird?
- Aus welchen Bestandteilen besteht das Yoctoproject?
- Wie baut man mit Yocto ein komplettes GNU/Linux Betriebssystem für das Beagle Bone Black?
- Was bedeuten die "meta-" Einheiten in Yocto? Geben Sie ein paar Beispiele.
- Welches Programm verwendet Yocto zum Steuern der Kompilierung der Pakete?
Chapter 9: Interfacing with Device Drivers
- Welche grundsaetzlichen Arten von Geraetetreibern gibt es?
- Was sind "major" und "minor numbers"? Wo sind diese Zahlen definiert?
- Wie kann man die Geraetedateien anlegen?
- Wozu braucht man Blocktreiber?
- Wozu dient das /proc Filesystem?
- Wozu dient das /sys Filesystem?
- Wozu verwendet man die folgenden Dateien:: /sys/devices /sys/class /sys/block
- Wie greift man aus dem user-space in der Regel auf Hardware zu? (bitte mit Beispielen)
- Wie reagiert man auf GPIO Interrupts im user-space? (hier sollte man das C Beispiel aus dem Buch verstehen)
- Wie steuert man LEDs im user-space an?
- Ueber welche Geraetedatei kann man die SPI Schnittstelle ansteuern?
- Ueber welche Geraetedatei kann man die I2C Schnittstelle ansteuern?
- Skizzieren Sie, wie man einen Geraetetreiber schreibt, kompiliert und laedt.
- Was ist der Unterschied zwischen einem device tree und platform data?
Chapter 11: Managing Power
XXX to do
Chapter 14: Debugging with GDB
- Wie muss man den Quelltext kompilieren, damit man ihn mit GDB debuggen kann?
- Was muss man tun, wenn GDB nicht nativ auf dem Target laeuft, z.B. weil zu wenig Speicher vorhanden ist?
- Wie kann man Anweisungen an GDB "skripten"?
- Nennen Sie die wichtigsten GDB Kommandos.
- Wie kann man GDB mit einem bereits laufenden Prozess verbinden?
- Wie kann man GDB zum Anzeigen eines simplen pseudografischen User-Interface bringen?
- Wie kann man den Code im Kernel debuggen?
Chapter 16: Real-time programming
- Muss Echtzeit-Programmierung immer schnell sein?
- Definieren Sie soft-realtime und hard-realtime.
- Wie schnell ist ungefaehr die Antwortzeit bei einem gewoehnlichen Kernel und wie schnell bei einem Echtzeit-Kernel?
- Wie haengt Determinismus beim Linux Kern vom Durchsatz ab?
- Welche Einfluesse wirken sich auf den Determinismus eines Linux Kernels aus (8 Stueck)?
- Was ist kernel preemption und wie aktiviert man sie?
- Was versteht man unter einem PREEMPT_RT Kernel?
- Was sind threaded interrupt handler?
- Wozu dient das Kommando chrt?
- Was sind high-resolution timer und wie aktiviert man sie?
- Wie misst man die Scheduler-Latenz?
- Wie misst man allgemein Latenzzeiten im Kernel?