[bootlin/training-materials updates] master: Challenges for the embedded Linux online course (1efebfff)
Michael Opdenacker
michael.opdenacker at bootlin.com
Thu May 28 08:05:17 CEST 2020
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/1efebfffe12931048c52e0d163c60b830c55c406
>---------------------------------------------------------------
commit 1efebfffe12931048c52e0d163c60b830c55c406
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date: Thu May 28 08:05:17 2020 +0200
Challenges for the embedded Linux online course
Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
>---------------------------------------------------------------
1efebfffe12931048c52e0d163c60b830c55c406
.../online-challenges/000-install-ubuntu.txt | 24 ++++++++++++++
.../online-challenges/001-toolchain.txt | 18 +++++++++++
.../embedded-linux/online-challenges/002-uboot.txt | 37 ++++++++++++++++++++++
.../online-challenges/003-linux-kernel.txt | 21 ++++++++++++
4 files changed, 100 insertions(+)
diff --git a/resources/embedded-linux/online-challenges/000-install-ubuntu.txt b/resources/embedded-linux/online-challenges/000-install-ubuntu.txt
new file mode 100644
index 00000000..9deb2b85
--- /dev/null
+++ b/resources/embedded-linux/online-challenges/000-install-ubuntu.txt
@@ -0,0 +1,24 @@
+Install Ubuntu
+--------------
+
+- Install Ubuntu 20.04 (64 bit) on one of your systems.
+ You can go to https://ubuntu.com/#download for a native
+ installation.
+
+- If you cannot make space for a separate Linux partition on
+ your (Windows?) system, an alternative is to install VirtualBox
+ (https://www.virtualbox.org/) and download and use our virtual
+ machine image:
+
+ https://f000.backblazeb2.com/file/bootlin-big-files/training/ubuntu-20.04-20200528.ova
+
+ In Virtualbox, you just have to use File -> Import Appliance
+ to create a new virtual machine from this image.
+
+ In this VM, here are the credentials:
+ User: tux
+ Password: tux
+
+- At the end, download and extract the below archive
+ into your home directory:
+ https://bootlin.com/doc/training/embedded-linux/embedded-linux-labs.tar.xz
diff --git a/resources/embedded-linux/online-challenges/001-toolchain.txt b/resources/embedded-linux/online-challenges/001-toolchain.txt
new file mode 100644
index 00000000..6cbf8931
--- /dev/null
+++ b/resources/embedded-linux/online-challenges/001-toolchain.txt
@@ -0,0 +1,18 @@
+Build your own toolchain
+------------------------
+
+- Download crosstool-ng and checkout the same commit
+ as used in the training lab instructions.
+
+- Configure crosstool-ng for generating an ARM toolchain
+ optimized for ARM Cortex A9
+
+ Then modify the configuration to generate
+ a toolchain using the "musl" c library.
+
+- Make sure you can compile the hello.c example
+ provided in ~/embedded-linux-labs/toolchain/
+
+- An alternative for this lab (if you are out of time)
+ is to download and install the latest bleeding edge
+ armv7-eabihf toolchain from https://toolchains.bootlin.com
diff --git a/resources/embedded-linux/online-challenges/002-uboot.txt b/resources/embedded-linux/online-challenges/002-uboot.txt
new file mode 100644
index 00000000..5a9fd0b2
--- /dev/null
+++ b/resources/embedded-linux/online-challenges/002-uboot.txt
@@ -0,0 +1,37 @@
+Compile and test U-Boot on QEMU
+--------------------------------
+
+- Install the qemu-system-arm package
+
+- Configure your environment to use the cross toolchain
+ that you used.
+
+- Download U-Boot v2020.04 and configure it for
+ to support the ARM Vexpress Cortex A9 board (vexpress_ca9x4_defconfig)
+
+- Compile U-Boot using your toolchain
+ This generates several binaries, including "u-boot" and "u-boot.bin"
+
+- Still in U-Boot sources, test that U-Boot works:
+ qemu-system-arm -M vexpress-a9 -m 128M -nographic -kernel u-boot
+
+ -M: emulated machine
+ -m: emulated RAM
+ -kernel: allows to load the binary directly in the emulated
+ machine and run the machine with it. This way, you don't
+ need a first stage bootloader. Of course, you don't
+ have this with real hardware.
+
+ Note: to exit QEMU, run the below command in another terminal:
+ killall qemu-system-arm
+
+- In the U-Boot prompt, type "help" to see what commands
+ are supported.
+
+ In later challenges, we will add SD card storage to the
+ emulated machine, so that we can load a kernel from such
+ storage.
+
+ But at this stage, you don't know how to create filesystem
+ images yet.
+
diff --git a/resources/embedded-linux/online-challenges/003-linux-kernel.txt b/resources/embedded-linux/online-challenges/003-linux-kernel.txt
new file mode 100644
index 00000000..38b0b5a1
--- /dev/null
+++ b/resources/embedded-linux/online-challenges/003-linux-kernel.txt
@@ -0,0 +1,21 @@
+Compile and test the Linux kernel on QEMU
+-----------------------------------------
+
+- Download the latest 5.6 release of Linux
+
+- Configure the environment to compile Linux
+ for ARM with your toolchain.
+
+- Configure your kernel for the ARM Vexpress
+ boards (vexpress_defconfig)
+
+- Compile your kernel
+
+- Test your kernel:
+ qemu-system-arm -M vexpress-a9 -m 128M -nographic -kernel arch/arm/boot/zImage -append "console=ttyAMA0" -dtb arch/arm/boot/dts/vexpress-v2p-ca9.dtb
+
+ -append: Linux kernel command line parameters
+
+ Make sure that Linux reaches the point where it panics because
+ it is unable to mount a root filesystem.
+ We will create one in the next challenge.
More information about the training-materials-updates
mailing list