Differences

This shows you the differences between two versions of the page.

Link to this comparison view

isc:labs:kernel:tasks:01 [2021/11/29 13:59]
radu.mantu
isc:labs:kernel:tasks:01 [2021/12/02 14:09] (current)
radu.mantu
Line 1: Line 1:
 ==== 01. [??p] Prerequisites ==== ==== 01. [??p] Prerequisites ====
  
-=== [??p] Task A - Dependencies ​installation ​===+=== [??p] Task A - Dependencies ===
  
-{{:​isc:​labs:​kernel:​tasks:​skeleton.zip|}}+Before we get down to it, there are a few packages that need to be installed. The following commands //should// work on Ubuntu 20.04 Desktop. While most of these probably came with the base system, we'll enumerate them here for the sake of completeness. If you're using other desktop environments,​ most of these should have a correspondent (probably with an identical name).
  
-<note important+<code bash
-TODOUbuntu +[student@host]$ sudo apt update 
-</note>+[student@host]$ sudo apt install curl make gcc git iptables dnsutils qemu-system debootstrap libxtables-dev 
 +</​code>​ 
 + 
 +In case you're wandering what any of these are: 
 +  * ''​curl'':​ CLI tool for fetching (HTTP) data from servers 
 +  * ''​make'':​ project build automation tool 
 +  * ''​gcc'':​ GNU C compiler 
 +  * ''​git'':​ CLI tool for content tracking & versioning 
 +  * ''​iptables'':​ user space interface to the kernel'​s packet filter 
 +  * ''​dnsutils'':​ contains **dig** which we'll need to send out DNS queries 
 +  * ''​qemu-system'':​ PC system emulator; if you don't have space for all off them, install only **qemu-system-x86** or **-arm** 
 +  * ''​debootstrap'':​ user space environment bootstrapping tool 
 +  * ''​libxtables-dev'':​ development files for the packet filtering framework; needed for //"​xtables.h"//​ 
 + 
 +Moving forward, we prepared a code skeleton for you: {{:​isc:​labs:​kernel:​tasks:​skeleton.zip|}}. It's structure is as follows: 
 + 
 +<code bash> 
 +[student@host]$ tree -L 2 skeleton  
 +skeleton                    --root of workspace 
 +├── 02/                        --> task 2: basically a "Hello World"​ 
 +│   ├── Kbuild 
 +│   ├── Makefile 
 +│   ├── my_first_module.c 
 +│   └── patches/ 
 +├── 03/                        --> task 3: an iptables extension 
 +│   ├── include/ 
 +│   ├── module/ 
 +│   └── plugin/ 
 +└── images/ ​                   --> task 1: VM hard disk images (empty) 
 + 
 +7 directories,​ 3 files 
 +</​code>​ 
 + 
 +At this time, there'​s no point in taking a more detailed look at each file. In stead, let us focus on the task at hand and prepare our testing environment.
  
 === [??p] Task B - Development environment === === [??p] Task B - Development environment ===
  
-When developing new features for the kernel, chances are that you will screw up. Often. Depending on the severity, the kernel may or may not recover. So to avoid restarting your PC over and over, it's better to work in a minimal virtualized environment. As such, we will first bootstrap a loopback disk image with a basic Ubuntu system, but without the kernel. Eventually, we will boot a virtual ​macine ​with **qemu-system-x86_64** from this disk image, with a custom kernel that we will build ourselves.+When developing new features for the kernel, chances are that you will screw up. Often. Depending on the severity, the kernel may or may not recover. So to avoid restarting your PC over and over, it's better to work in a minimal virtualized environment. As such, we will first bootstrap a loopback disk image with a basic Ubuntu system, but without the kernel. Eventually, we will boot a virtual ​machine ​with **qemu-system-x86_64** from this disk image, with a custom kernel that we will build ourselves.
  
 <​note>​ <​note>​
isc/labs/kernel/tasks/01.1638187156.txt.gz · Last modified: 2021/11/29 13:59 by radu.mantu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0