Skip to content

Commit 1f79ad5

Browse files
committed
getting started back to getting started
1 parent ae9bbf9 commit 1f79ad5

File tree

2 files changed

+34
-36
lines changed

2 files changed

+34
-36
lines changed

README.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,6 @@
22

33
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

5-
![](screenshot.png)
6-
7-
Reserve 12Gb of disk and run:
8-
9-
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
10-
cd linux-kernel-module-cheat
11-
./configure && ./build && ./run
12-
13-
The first build will take a while ([GCC](https://stackoverflow.com/questions/10833672/buildroot-environment-with-host-toolchain), Linux kernel), e.g.:
14-
15-
- 2 hours on a mid end 2012 laptop
16-
- 30 minutes on a high end 2017 desktop
17-
18-
If you don't want to wait, you could also try to compile the examples and run them on your host computer as explained on the ["Run on host" section](run-on-host.md), but as explained on that section, that is dangerous, limited, and will likely not work.
19-
20-
After QEMU opens up, you can start playing with the kernel modules:
21-
22-
root
23-
insmod /hello.ko
24-
insmod /hello2.ko
25-
rmmod hello
26-
rmmod hello2
27-
28-
This should print to the screen:
29-
30-
hello init
31-
hello2 init
32-
hello cleanup
33-
hello2 cleanup
34-
35-
which are `printk` messages from `init` and `cleanup` methods of those modules.
36-
37-
All available modules can be found in the [`kernel_module` directory](kernel_module/).
38-
39-
See the [getting started section](getting-started.md) for further details.
40-
415
1. [**Getting started**](getting-started.md)
426
1. Action
437
1. Step debugging
@@ -63,3 +27,5 @@ See the [getting started section](getting-started.md) for further details.
6327
1. [Device tree](device-tree.md)
6428
1. [Maintainers](maintainers.md)
6529
1. [Bibliography](bibliography.md)
30+
31+
![](screenshot.png)

getting-started.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Getting started
22

3+
Reserve 12Gb of disk and run:
4+
5+
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
6+
cd linux-kernel-module-cheat
7+
./configure && ./build && ./run
8+
9+
The first build will take a while ([GCC](https://stackoverflow.com/questions/10833672/buildroot-environment-with-host-toolchain), Linux kernel), e.g.:
10+
11+
- 2 hours on a mid end 2012 laptop
12+
- 30 minutes on a high end 2017 desktop
13+
14+
If you don't want to wait, you could also try to compile the examples and run them on your host computer as explained on the ["Run on host" section](run-on-host.md), but as explained on that section, that is dangerous, limited, and will likely not work.
15+
16+
After QEMU opens up, you can start playing with the kernel modules:
17+
18+
root
19+
insmod /hello.ko
20+
insmod /hello2.ko
21+
rmmod hello
22+
rmmod hello2
23+
24+
This should print to the screen:
25+
26+
hello init
27+
hello2 init
28+
hello cleanup
29+
hello2 cleanup
30+
31+
which are `printk` messages from `init` and `cleanup` methods of those modules.
32+
33+
All available modules can be found in the [`kernel_module` directory](kernel_module/).
34+
335
## Module documentation
436

537
head kernel_module/modulename.c

0 commit comments

Comments
 (0)