Kernel Hacking

From 36C3 Wiki
Description Write a simple kernel driver, debug and trace it remotely with gdb.
Website(s)
Type Hands-On
Kids session No
Keyword(s) hardware, embedded
Tags kernelhacking, programming, Linux
Person organizing vtec
Language en - English
en - English
Other sessions... ... further results

(Click here to refresh this page.)

Starts at 2019/12/29 12:00
Ends at 2019/12/29 15:00
Duration 180 minutes
Location Room:Lecture room M1
Subtitle Extra timeslot
Starts at 2019/12/30 16:00
Ends at 2019/12/30 19:00
Duration 180 minutes
Location Room:Lecture room M2
Description Write a simple kernel driver, debug and trace it remotely with gdb.
Website(s)
Type Hands-On
Kids session No
Keyword(s) hardware, embedded
Person organizing vtec
Language en - English
en - English
Other sessions... ... further results

(Click here to refresh this page.)


In this hands-on workshop, you have a chance to learn some cool tricks working with Linux kernel code. KGDB, the kernel debugger, allows you to debug a kernel running on a different architecture, remotely, just like you would debug a program running in userspace. A powerful trace infrastructure makes it easier to spot issues in time-sensitive systems, when setting a breakpoint is not an option.

1. General information

Day 3: Boards: 30
Day 4: Boards: 10
Cost: free
Registration: just come early, or PM myself (@wooe) on Twitter latest 28.12 23:59:59 if you would like to reserve a seat and board for yourself.

We will provide target boards based on NXP i.MX6ULL Cortex-A9 processors (SoMLabs VisionSOM + VisionCB) to be used during the training, cables, memory cards etc. Participants will be given a voucher code to order the kits at a discounted price.

2. Agenda

  1. Introduction and VM set-up
  2. Simple kernel driver that blinks LEDs
  3. Debugging with KGDB over a serial line
  4. Tracing

3. Prerequisites

  • Linux console basics
  • entry-level programming experience

The hands-on does not require you to write your own code, only un/comment.

4. Preparation

Bring your own laptop running Linux or Windows 7, 10. You will need a free USB-A port and an Ethernet port.

In order to get up and running quickly, it is recommended that you install VirtualBox with the Oracle Extension Pack.
For Windows: https://www.virtualbox.org/wiki/Downloads
Linux: use the package manager and documentation for your distro

There will be some time to do this during the hands-on, so don't worry if you come without VirtualBox installed.

5. FAQ

Q: Can I use a Macbook?
A: Sure, but we may not be able to help you get the VM set up if you are not running Linux or Windows. You can always team up with someone using a PC.

A: You forgot about Windows 8
Q: Are you still using Windows 8? ;)