Skip to content

Commit 0400543

Browse files
committed
Improve top-level documentation
This patch introduced the changes: - Build instructions - Strip duplicated commands - Add more hyperlinks - Mention nerdctl as Docker CLI replacement
1 parent 62dbb1b commit 0400543

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
# The Linux Kernel Module Programming Guide
22

3-
This project keeps the Linux Kernel Module Programming Guide reasonably up to date, with [working examples](examples/) for recent 5.x kernel versions.
3+
This project keeps the Linux Kernel Module Programming Guide up to date, with [working examples](examples/) for recent 5.x kernel versions.
44
The guide has been around since 2001 and most copies of it on the web only describe old 2.6.x kernels.
55

66
The book can be freely accessed via https://sysprog21.github.io/lkmpg/ or [latest PDF file](https://github.com/sysprog21/lkmpg/releases).
77
The original guide may be found at [Linux Documentation Project](http://www.tldp.org/LDP/lkmpg/).
88

99
## Getting Started
1010

11-
### Compile on Local Machine
11+
### Summary
12+
1. Get the latest source code from the [GitHub page](https://github.com/sysprog21/lkmpg).
13+
2. Install the prerequisites.
14+
3. Generate PDF and/or HTML documents.
1215

13-
To prepare for build this book on your local machine, we're going to install TeXLive (MacTeX). On various Unix/Linux operating systems, this can be done simply by:
16+
### Step 1: Get the latest source code
17+
18+
Make sure you can run `git` with an Internet connection.
19+
20+
```shell
21+
$ git clone https://github.com/sysprog21/lkmpg.git && cd lkmpg
22+
```
23+
24+
### Step 2: Install the prerequisites
25+
26+
To gernate the book from source, [TeXLive](https://www.tug.org/texlive/) ([MacTeX](https://www.tug.org/mactex/)) is required.
27+
28+
For Ubuntu Linux, macOS, and other Unix-like systems, run the following command(s):
1429

1530
```bash
1631
# Debian / Ubuntu
@@ -24,35 +39,22 @@ $ brew install --cask mactex
2439
$ sudo tlmgr update --self
2540
```
2641

27-
Now we could build document with following commands:
28-
29-
```bash
30-
# download project
31-
$ git clone https://github.com/sysprog21/lkmpg.git && cd lkmpg
42+
Alternatively, using [Docker](https://docs.docker.com/) is recommended, as it guarantees the same dependencies with our GitHub Actions wokrflow.
43+
After install [docker engine](https://docs.docker.com/engine/install/) on your machine, pull the docker image [twtug/lkmpg](https://hub.docker.com/r/twtug/lkmpg) and run in isolated containers.
3244

33-
# run commands
34-
$ make all # Generate PDFdocument
35-
$ make html # Convert TeX to HTML
36-
$ make clean # Delete generated files
45+
```shell
46+
# pull docker image and run it as container
47+
$ docker pull twtug/lkmpg
48+
$ docker run --rm -it -v $(pwd):/workdir twtug/lkmpg
3749
```
3850

39-
### Compile with Docker
40-
41-
The compilation could be completed flawlessly using Docker. **Using Docker is recommended, as it guarantees the same dependencies with our GitHub Actions wokrflow.
51+
[nerdctl](https://github.com/containerd/nerdctl) is a Docker-compatible command line tool for [containerd](https://containerd.io/), and you can replace the above `docker` commands with `nerdctl` counterparts.
4252

43-
After [install docker engine](https://docs.docker.com/engine/install/) on your machine, pulling the docker image [twtug/lkmpg](https://hub.docker.com/r/twtug/lkmpg) and compile with it.
53+
### Step 3: Generate PDF and/or HTML documents
4454

45-
Execute followings
55+
Now we could build document with following commands:
4656

4757
```bash
48-
# download project
49-
$ git clone https://github.com/sysprog21/lkmpg.git && cd lkmpg
50-
51-
# pull docker image and run it as container
52-
$ docker pull twtug/lkmpg
53-
$ docker run --rm -it -v $(pwd):/workdir twtug/lkmpg
54-
55-
# run commands
5658
$ make all # Generate PDF document
5759
$ make html # Convert TeX to HTML
5860
$ make clean # Delete generated files

0 commit comments

Comments
 (0)