# kdev (linux kernel development tools)
```
Something I hope you know before go into the coding~
First, please watch or star this repo, I'll be more happy if you follow me.
Bug report, questions and discussion are welcome, you can post an issue or pull a request.
```
## 项目描述
本仓库提供kdev工具,用于快速构建内核编译环境、测试环境(QEMU/KVM)。
## 使用方式
假设,内核源代码目录位于```/data/linux-4.git```目录,
工作目录位于```/data/linux-4.git-build-x86_64```,
配置文件```linux4.kdev```位于工作目录中。
```shell
sourcedir = /kernel/linux-4.git
arch = x86_64
debug = True
nodocker = True
````
```shell
cd /data/linux-4.git-build-x86_64
```
切换到工作目录,执行如下命令:
```shell
kdev init
```
init 子命令用于安装内核构建依赖(执行apt-get install命令)
```shell
kdev kernel
```
kernel 子命令用于编译内核
```shell
kdev rootfs
```
rootfs 子命令用于构建根文件系统
```shell
kdev run
```
run 子命令运行虚拟机
```shell
kdev clean
```
clean 子命令用于清空编译
## 子命令详解
### kernel子命令
```shell
optional arguments:
-h, --help show this help message and exit
-V, --verbose show verbose output
-s SOURCEDIR, --sourcedir SOURCEDIR
set kernel source dir
-a ARCH, --arch ARCH set arch, default is x86_64
-w WORKDIR, --workdir WORKDIR
setup workdir
--debug enable debug
--nodocker, --host build kernel without docker environment
-j JOB, --job JOB setup compile job number
-c CLEAN, --clean CLEAN
clean docker when exit
--config CONFIG setup kernel build config
--bash break before build(just for docker build)
--mrproper make mrproper before build
```
* --mrproper 将清空工作目录进行完整编译,默认不清空,支持二次编译。经测试完整编译耗时6.36min,二次编译耗时0.63min
* --nodocker 不使用docker编译,使用host编译环境
* --bash 登陆 docker bash 终端
* --config 指定config配置
### rootfs子命令
```shell
usage: kdev rootfs [-h] [-V] [-s SOURCEDIR] [-a ARCH] [-w WORKDIR] [--debug] [-r]
optional arguments:
-h, --help show this help message and exit
-V, --verbose show verbose output
-s SOURCEDIR, --sourcedir SOURCEDIR
set kernel source dir
-a ARCH, --arch ARCH set arch, default is x86_64
-w WORKDIR, --workdir WORKDIR
setup workdir
--debug enable debug
-r, --release
```
## Debian Distribution Release
| 版本及代号 | 内核版本 | 稳定性 | 可用仓库 |
| ------------------------------ | ------------------------ | ------------------------------------------------ | ---------------------------------------------------------------------------------- |
| **Debian 12 (bookworm)** | 6.1/5.10(LTS)/5.15 | 当前的稳定(stable)版 | [链接](http://mirrors.tencent.com/debian/dists/bookworm/) |
| **Debian 11 (bullseye)** | 5.10(LTS) | 当前的旧的稳定(oldstable)版 | [链接](http://mirrors.tencent.com/debian/dists/bullseye/) |
| **Debian 10(buster)** | 4.19/4.20 | 当前的更旧的稳定(oldoldstable)版,现有长期支持 | [链接](http://mirrors.tencent.com/debian/dists/buster/) |
| Debian 9(stretch) | 4.9/4.10 | 已存档版本,现有扩展长期支持 | [链接](https://snapshot.debian.org/archive/debian/20220101T024315Z/dists/stretch/) |
| **Debian 8(jessie)** | 3.16/3.18 | 已存档版本,现有扩展长期支持 | [链接](http://snapshot.debian.org/archive/debian/20210326T030000Z/dists/jessie) |
| Debian 7(wheezy) | 3.2/3.4 | 被淘汰的稳定版 | [链接](http://snapshot.debian.org/archive/debian/20210326T030000Z/dists/wheezy) |
| **Debian 6.0(squeeze)** | 2.6.32/2.6.36/2.6.38/3.2 | 被淘汰的稳定版 | [链接](https://snapshot.debian.org/archive/debian/20160301T103342Z/dists/squeeze/) |
| Debian GNU/Linux 5.0(lenny) | 2.6.26 | 被淘汰的稳定版 | |
| Debian GNU/Linux 4.0(etch) | 2.6.18 | 被淘汰的稳定版 | |
| Debian GNU/Linux 3.1(sarge) | 2.4.27/2.6.8 | 被淘汰的稳定版 | |
| Debian GNU/Linux 3.0(woody) | 2.4.18/2.6.8 | 被淘汰的稳定版 | |
| Debian GNU/Linux 2.2(potato) | 2.2.10/2.4.18 | 被淘汰的稳定版 | |
| Debian GNU/Linux 2.1(slink) | 2.0.34/2.2.10 | 被淘汰的稳定版 | |
| Debian GNU/Linux 2.0(hamm) | 2.0.30/2.0.36 | 被淘汰的稳定版 | |
* 存档镜像: <https://snapshot.debian.org/>
## Ubuntu Distribution Release
| 版本及代号 | 内核版本 | 稳定性 | 可用仓库 |
| ----------------------------------------- | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ubuntu 22.04.X **LTS** (Jammy Jellyfish) | 5.15 | | [QCOW2](http://cloud-images.ubuntu.com/releases/jammy/) / [APT源](http://archive.ubuntu.com/ubuntu/dists/jammy/) / [ISO](https://old-releases.ubuntu.com/releases/jammy/) |
| Ubuntu 21.10 (Impish Indri) | 5.14 | | |
| Ubuntu 21.04 (Hirsute Hippo) | 5.11 | | |
| Ubuntu 20.10 (Groovy Gorilla) | 5.8 | | |
| Ubuntu 20.04.X **LTS** (Focal Fossa) | 5.4 | | [QCOW2](http://cloud-images.ubuntu.com/releases/focal/) / [APT源](http://archive.ubuntu.com/ubuntu/dists/focal/) / [ISO](https://old-releases.ubun
没有合适的资源?快使用搜索试试~ 我知道了~
Linux内核开发环境构建工具 (2.3.4.5.6.).zip
共26个文件
makefile:6个
dockerfile:5个
bashrc:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 124 浏览量
2024-02-11
11:55:20
上传
评论
收藏 93KB ZIP 举报
温馨提示
Linux内核开发环境构建工具 (2.3.4.5.6.)
资源推荐
资源详情
资源评论
收起资源包目录
Linux内核开发环境构建工具 (2.3.4.5.6.).zip (26个子文件)
kdev-master
Makefile 522B
LICENSE 1KB
deprecated-shell-kdev 14KB
linux5
bashrc 1KB
sources.list 646B
Makefile 464B
Dockerfile 523B
kdev.py 39KB
linux3
config-3.16.0-11-amd64 154KB
bashrc 1KB
Makefile 583B
Dockerfile 3KB
config-3.16.0-6-arm64 101KB
linux6
bashrc 1KB
sources.list 646B
Makefile 464B
Dockerfile 523B
.gitignore 43B
README.md 23KB
linux2
bashrc 1KB
Makefile 465B
Dockerfile 2KB
linux4
bashrc 1KB
sources.list 911B
Makefile 464B
Dockerfile 631B
共 26 条
- 1
资源评论
博士僧小星
- 粉丝: 1884
- 资源: 5877
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功