Skip to content

Commit dc495f9

Browse files
committed
Linux v4.15
1 parent 6b0f89a commit dc495f9

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Linux Kernel Module Cheat
22

3-
Run one command, get a QEMU Buildroot BusyBox virtual machine built from source with several minimal Linux kernel 4.14 module development example tutorials with GDB and KGDB step debugging and minimal educational hardware models. Limited GEM5 full system support. "Tested" in x86, ARM and MIPS guests, Ubuntu 17.10 host.
3+
Run one command, get a QEMU Buildroot BusyBox virtual machine built from source with several minimal Linux kernel 4.15 module development example tutorials with GDB and KGDB step debugging and minimal educational hardware models. Limited GEM5 full system support. "Tested" in x86, ARM and MIPS guests, Ubuntu 17.10 host.
44

55
![](screenshot.png)
66

configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ EOF
4848
exit 0
4949
}
5050

51+
# Without this started failing in kernel 4.15 with:
52+
# Makefile:932: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
53+
pkgs="$pkgs libelf-dev"
54+
5155
sudo apt-get update $y
5256
# Building SDL for QEMU in Buildroot was rejected upstream because it adds many dependencies:
5357
# https://patchwork.ozlabs.org/patch/770684/

kernel_module/timer.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/*
2+
Print the jiffies every second.
3+
24
Timers are callbacks that run when an interrupt happens, from the interrupt context itself.
35
46
Therefore they produce more accurate timing than thread scheduling, which is more complex,
@@ -15,12 +17,12 @@ See also:
1517
#include <linux/module.h>
1618
#include <linux/timer.h>
1719

18-
static void callback(unsigned long data);
20+
static void callback(struct timer_list *data);
1921
static unsigned long onesec;
2022

21-
DEFINE_TIMER(mytimer, callback, 0, 0);
23+
DEFINE_TIMER(mytimer, callback);
2224

23-
static void callback(unsigned long data)
25+
static void callback(struct timer_list *data)
2426
{
2527
pr_info("%u\n", (unsigned)jiffies);
2628
mod_timer(&mytimer, jiffies + onesec);

linux

Submodule linux updated from d4160b4 to 225d02d

maintainers.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
## How to update the Linux kernel?
44

5-
If you don't care about educational patches:
6-
5+
last_mainline_revision=v4.14
6+
next_mainline_revision=v4.15
77
cd linux
8-
git fetch
9-
git checkout master
10-
11-
If you do:
8+
git remote add up git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
9+
git fetch up
10+
git rebase --onto "$next_mainline_revision" "$last_mainline_revision"
11+
./build -t linux-reconfigure
1212

13-
last_mainline_revision=v4.14
14-
git rebase --onto master $last_mainline_revision
13+
Create and push a tag to make things saner:
1514

16-
Then rebuild the kernel:
15+
git checkout -b "lkmc-${next_mainline_revision}"
16+
git remote set-url origin [email protected]:cirosantilli/linux.git
17+
git push --follow-tag
1718

18-
./build -t linux-reconfigure
19+
and update the README!
1920

2021
Now, all you kernel modules may break, although they are usually trivial breaks of things moving around headers or to sub-structs.
2122

0 commit comments

Comments
 (0)