Linux v4.15

This commit is contained in:
Ciro Santilli
2018-01-30 17:53:00 +00:00
parent 6b0f89a8b4
commit dc495f9334
5 changed files with 24 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
# Linux Kernel Module Cheat # Linux Kernel Module Cheat
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. 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.
![](screenshot.png) ![](screenshot.png)

4
configure vendored
View File

@@ -48,6 +48,10 @@ EOF
exit 0 exit 0
} }
# Without this started failing in kernel 4.15 with:
# Makefile:932: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
pkgs="$pkgs libelf-dev"
sudo apt-get update $y sudo apt-get update $y
# Building SDL for QEMU in Buildroot was rejected upstream because it adds many dependencies: # Building SDL for QEMU in Buildroot was rejected upstream because it adds many dependencies:
# https://patchwork.ozlabs.org/patch/770684/ # https://patchwork.ozlabs.org/patch/770684/

View File

@@ -1,4 +1,6 @@
/* /*
Print the jiffies every second.
Timers are callbacks that run when an interrupt happens, from the interrupt context itself. Timers are callbacks that run when an interrupt happens, from the interrupt context itself.
Therefore they produce more accurate timing than thread scheduling, which is more complex, Therefore they produce more accurate timing than thread scheduling, which is more complex,
@@ -15,12 +17,12 @@ See also:
#include <linux/module.h> #include <linux/module.h>
#include <linux/timer.h> #include <linux/timer.h>
static void callback(unsigned long data); static void callback(struct timer_list *data);
static unsigned long onesec; static unsigned long onesec;
DEFINE_TIMER(mytimer, callback, 0, 0); DEFINE_TIMER(mytimer, callback);
static void callback(unsigned long data) static void callback(struct timer_list *data)
{ {
pr_info("%u\n", (unsigned)jiffies); pr_info("%u\n", (unsigned)jiffies);
mod_timer(&mytimer, jiffies + onesec); mod_timer(&mytimer, jiffies + onesec);

2
linux

Submodule linux updated: d4160b40c5...225d02dc63

View File

@@ -2,21 +2,22 @@
## How to update the Linux kernel? ## How to update the Linux kernel?
If you don't care about educational patches:
cd linux
git fetch
git checkout master
If you do:
last_mainline_revision=v4.14 last_mainline_revision=v4.14
git rebase --onto master $last_mainline_revision next_mainline_revision=v4.15
cd linux
Then rebuild the kernel: git remote add up git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch up
git rebase --onto "$next_mainline_revision" "$last_mainline_revision"
./build -t linux-reconfigure ./build -t linux-reconfigure
Create and push a tag to make things saner:
git checkout -b "lkmc-${next_mainline_revision}"
git remote set-url origin git@github.com:cirosantilli/linux.git
git push --follow-tag
and update the README!
Now, all you kernel modules may break, although they are usually trivial breaks of things moving around headers or to sub-structs. Now, all you kernel modules may break, although they are usually trivial breaks of things moving around headers or to sub-structs.
The userland, however, should simply not break, as Linus enforces strict backwards compatibility of userland interfaces. The userland, however, should simply not break, as Linus enforces strict backwards compatibility of userland interfaces.