[bootlin/training-materials updates] master: Remove obsolete embedded Linux challenges (91137939)
Michael Opdenacker
michael.opdenacker at bootlin.com
Wed Sep 2 11:12:22 CEST 2020
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/9113793999ac19caa1af2dfa22015903798d09e1
>---------------------------------------------------------------
commit 9113793999ac19caa1af2dfa22015903798d09e1
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date: Wed Sep 2 11:12:22 2020 +0200
Remove obsolete embedded Linux challenges
- Now replaced by the QEMU labs
("make full-embedded-linux-qemu-labs.pdf")
Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
>---------------------------------------------------------------
9113793999ac19caa1af2dfa22015903798d09e1
.../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 | 26 ----------
.../online-challenges/004-prepare-sd.txt | 41 ----------------
.../online-challenges/005-boot-linux-from-sd | 51 --------------------
.../online-challenges/006-rootfs.txt | 55 ----------------------
.../online-challenges/007-buildroot.txt | 18 -------
.../008-application-development.txt | 4 --
.../009-remote-application-debugging.txt | 4 --
.../online-challenges/known-issues.txt | 12 -----
11 files changed, 290 deletions(-)
diff --git a/resources/embedded-linux/online-challenges/000-install-ubuntu.txt b/resources/embedded-linux/online-challenges/000-install-ubuntu.txt
deleted file mode 100644
index c8c45294..00000000
--- a/resources/embedded-linux/online-challenges/000-install-ubuntu.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-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-20200617.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
deleted file mode 100644
index 5cbd2e3a..00000000
--- a/resources/embedded-linux/online-challenges/001-toolchain.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-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 "uClibc" 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
deleted file mode 100644
index 5a9fd0b2..00000000
--- a/resources/embedded-linux/online-challenges/002-uboot.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-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
deleted file mode 100644
index 5a2edf6e..00000000
--- a/resources/embedded-linux/online-challenges/003-linux-kernel.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-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)
-
-- Add CONFIG_DEVTMPFS_MOUNT to the configuration
-
-- 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.
-
- In the next challenge, we will also load the zImage and dtb
- from U-Boot after storing them in a FAT32 sdcard partition.
diff --git a/resources/embedded-linux/online-challenges/004-prepare-sd.txt b/resources/embedded-linux/online-challenges/004-prepare-sd.txt
deleted file mode 100644
index 95b3a56e..00000000
--- a/resources/embedded-linux/online-challenges/004-prepare-sd.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-Prepare SD card
----------------
-
-Goal: prepare an SD card image
-- to contain the zImage and DTB file for booting
- (instead of booting the kernel directly
- from the QEMU command line)
-- to contain the future root filesystem
-
-- Using the dd command, create a 1 GB file
- filled with zeros, called "sd.img"
- This will be used by QEMU as an SD card disk image
-
-- Run "cfdisk sd.img" and create the same partitions
- as in the "Block filesystems lab":
- - Partition 1: primary, 64M, bootable, "FAT16" type
- - Partition 2: primary, 8M, "Linux" type (default)
- - Partition 3: primary, all remaining space, "Linux" type (default)
- Write the changes and quit
-
-- Now use the loop driver to emulate block devices
- from this image and its partitions:
-
- sudo losetup -f --show --partscan sd.img
-
- -f: finds a free loop device
- --show: shows the loop device that it used
- --partscan: scans the loop device for partitions
- and creates additional /dev/loop<x>p<y> block
- devices.
-
-- Using such devices, you can now format the 3 partitions:
- - Partition 1: FAT16, with "boot" label
- - Partition 2: ext4, with "root" label
- - Partition 3: ext4, with "data" label
-
-- Last but not least, mount the first partition and
- copy the zImage and dtb file to it.
-
-- Unmount the first partition and release the loop device:
- sudo losetup -d /dev/loop<x>
diff --git a/resources/embedded-linux/online-challenges/005-boot-linux-from-sd b/resources/embedded-linux/online-challenges/005-boot-linux-from-sd
deleted file mode 100644
index 34a35df4..00000000
--- a/resources/embedded-linux/online-challenges/005-boot-linux-from-sd
+++ /dev/null
@@ -1,51 +0,0 @@
-Boot Linux from SD
-------------------
-
-We are going to load the kernel and DTB from the FAT
-filesystem in the first partition of the emulated SD card.
-
-To make this happen, we have to set U-Boot's "bootcmd"
-environment variable to do this.
-
-- The first thing we need is to recompile U-Boot with
- the ability to store its environment in a file in a FAT
- partition (our emulated machine doesn't have flash).
-
- So, go back to U-Boot's configuration and:
- - unset "Environment in flash memory" (CONFIG_ENV_IS_IN_FLASH)
- - set "Environment is in a FAT filesystem" (CONFIG_ENV_IS_IN_FAT)
- - set "Name of the block device for the environment" (CONFIG_ENV_FAT_INTERFACE) to "mmc"
- - set "Device and partition for where to store the environemt in FAT" (CONFIG_ENV_FAT_DEVICE_AND_PART) to "0:1"
- The above two settings correspond to the arguments of the "fatload" command
- (see the block filesystems lab)
- - Also add support for the "editenv" command (CONFIG_CMD_EDITENV)
- that is not present in the default configuration for our board
- Unfortunately, this command is currently broken.
-
-- Recompile U-Boot
-
-- Start QEMU again, but this time with the emulated SD card:
- qemu-system-arm -M vexpress-a9 -m 128M -nographic -kernel u-boot -sd sd.img
-
-- Then make sure that you can set and store an environment variable:
- setenv foo bar
- saveenv
-
-- Type "reset" and check that "foo" is still set:
- printenv foo
-
-- Now, run "bdinfo" and find that RAM starts at 0x60000000.
- We will load the kernel image from the SD's FAT partition to
- address 0x61000000, and the DTB at address 0x62000000
-
- Modify the "bootcmd" environment variable to do this,
- and then boot the kernel from such addresses in RAM.
-
- Also set the "bootargs" variable to use "ttyAMA0" as console.
- We will configure the root device in the next lab.
-
-- Run "saveenv" then "reset" and then make sure that the
- the board boots the Linux kernel as far as previously.
-
-It's now time to compile a root filesystem for Linux
-to use!
diff --git a/resources/embedded-linux/online-challenges/006-rootfs.txt b/resources/embedded-linux/online-challenges/006-rootfs.txt
deleted file mode 100644
index e575160a..00000000
--- a/resources/embedded-linux/online-challenges/006-rootfs.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Root filesystem with BusyBox
-----------------------------
-
-This challenge is derived from our "Tiny filesystem lab". Look
-at this lab for further instructions.
-
-- First, we will setup networking between the QEMU emulated
- machine and the host.
-
- The first thing to do is to create a /etc/qemu-myifup (for example)
- script that will bring up a network interface. Here are its contents:
-
-#!/bin/bash
-exec /sbin/ifconfig $1 192.168.100.1
-
- Of course, make this script executable:
- sudo chmod +x /etc/qemu-myifup
-
- As you can see, the host side will have IP address 192.168.100.1.
- We will use 192.168.100.2 for the target side.
-
-- Then, create an empty "nfsroot" directory
- Install the nfs-kernel-server
- Modify /etc/exports to export the new directory
-
-- Then, you will need root privileges to run QEMU this time,
- because of the need to bring up the network interface:
-
-sudo qemu-system-arm -M vexpress-a9 -m 128M -nographic -kernel u-boot -sd sd.img -net tap,script=/etc/qemu-myifup -net nic
-
- Also note the new net options:
- -net tap: creates a software network interface on the host side
- -net nic: adds a network device to the emulated machine
-
-- In QEMU, interrupt the countdown in U-Boot modify bootargs to
- setup the target IP address to 192.168.100.2
- and mount the root filesystem through NFS using the directory you created.
-
- Don't forget to run "saveenv"!
-
- Still in U-Boot, you can now run "reset" to reboot and attempt
- to boot Linux.
-
- If you need to kill QEMU, you'll have to do it with "sudo":
- sudo killall qemu-system-arm
-
-- Once the NFS root filesystem is mounted, proceed by compiling
- BusyBox with your toolchain, installing it, and eventually
- test the http interface and switch to shared libraries,
- following the normal lab instructions.
-
- To enable job control, instead of adding "ttyS0" to /etc/inittab,
- you will use "ttyAMA0", which is the serial device used for
- our emulated board.
-
diff --git a/resources/embedded-linux/online-challenges/007-buildroot.txt b/resources/embedded-linux/online-challenges/007-buildroot.txt
deleted file mode 100644
index d93eb0aa..00000000
--- a/resources/embedded-linux/online-challenges/007-buildroot.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Root filesystem with Buildroot
-------------------------------
-
-This challenge is derived from our "Buildroot" lab. Look
-at this lab for further instructions.
-
-The goal is to add rebuild the root filesystem with an audio player
-and play the sample sound.
-
-The command to run QEMU is the same. The emulated hardware already
-has sound support.
-
-Known issue: the sample.ogg sample will play in a weird way
-in QEMU (investigating, but no solution found yet). To have a
-correct result, add support for the "aplay"
-command in alsa-utils, and play the same in WAV format:
-https://github.com/bootlin/training-materials/blob/master/lab-data/embedded-linux/thirdparty/data/sample.ogg
-
diff --git a/resources/embedded-linux/online-challenges/008-application-development.txt b/resources/embedded-linux/online-challenges/008-application-development.txt
deleted file mode 100644
index dcf1ae3d..00000000
--- a/resources/embedded-linux/online-challenges/008-application-development.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Application development
------------------------
-
-This lab can be run on QEMU following the official instructions
diff --git a/resources/embedded-linux/online-challenges/009-remote-application-debugging.txt b/resources/embedded-linux/online-challenges/009-remote-application-debugging.txt
deleted file mode 100644
index dc12ad43..00000000
--- a/resources/embedded-linux/online-challenges/009-remote-application-debugging.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Remote application debugging
-----------------------------
-
-This lab can be run on QEMU following the official instructions
diff --git a/resources/embedded-linux/online-challenges/known-issues.txt b/resources/embedded-linux/online-challenges/known-issues.txt
deleted file mode 100644
index 2a07b35b..00000000
--- a/resources/embedded-linux/online-challenges/known-issues.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Current issues
---------------
-
-- "editenv" broken in U-Boot in QEMU
- (2020.07-rc2 status)
- This may be related to the fact
- that editing previous commands is broken too
- (need to investigate).
-
-- The "boot" command doesn't work either
- as an equivalent to "run bootcmd"
- (2020.04 status)
More information about the training-materials-updates
mailing list