[Feedback on issues] 如何获取V25的内核源码?
Tofloor
poster avatar
cql1983
deepin
2026-01-22 10:19
Author

我安装了deepin V25,内核时6.6.120-arm64-desktop-hwe这个版本,我想手工自己编译源码发现不论是apt source还是直接在源地址的pool/main/l/linux-upstream/ pool/main/l/linux 目录,都找不到6.6.120-arm64-desktop-hwe这个版本的内核源码包 ,请问如何才能获取机器运行的内核对应版本的源码包 ?

尝试查找的几个方法:

  1. github.com/deepin-community/kernel 这个仓库有6.6版本下的几个tag,但6.6.120-arm64-desktop-hwe甚至6.6.120这个tag也没有。
  2. apt source (source.list已开启deb-src)
  3. apt search linux-source ,只有6.5,6.6.9的包。
Reply Favorite View the author
All Replies
deepin流云
Super Moderator
Community OP
2026-01-22 10:22
#1

deepin的源码都在GitHub上开源,这是内核模块的:

https://github.com/deepin-community/kernel

Reply View the author
cql1983
deepin
2026-01-22 10:27
#2
deepin流云

deepin的源码都在GitHub上开源,这是内核模块的:

https://github.com/deepin-community/kernel

我已经尝试过在这个仓库找了,但是找不到6.6.120这个版本的源码。

其他发行版本,无论是商业的redhat,还是debian ,ubuntu,都有当前运行时内核版本源码的,deepin为什么不没有 ?

Reply View the author
sweetyfish
deepin
2026-01-22 10:48
#3
cql1983

我已经尝试过在这个仓库找了,但是找不到6.6.120这个版本的源码。

其他发行版本,无论是商业的redhat,还是debian ,ubuntu,都有当前运行时内核版本源码的,deepin为什么不没有 ?

这个就是吧
图片.png

Reply View the author
忘怀
deepin
2026-01-22 11:13
#4

sudo dmesg 或者别的读取内核日志第一行例如

[ 0.000000] Linux version 6.6.120-amd64-desktop-hwe (root@deepinci-amd7) (gcc (Deepin 12.3.0-17deepin12) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) (5da5b667a) #25.01.00.15 SMP PREEMPT_DYNAMIC Wed Jan 14 14:45:46 CST 2026

其中(5da5b667a)部分就是git commitid 可以唯一对应构建点

例如

https://github.com/deepin-community/kernel/commit/5da5b667a

Reply View the author
cql1983
deepin
2026-01-22 13:48
#5
忘怀

sudo dmesg 或者别的读取内核日志第一行例如

[ 0.000000] Linux version 6.6.120-amd64-desktop-hwe (root@deepinci-amd7) (gcc (Deepin 12.3.0-17deepin12) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) (5da5b667a) #25.01.00.15 SMP PREEMPT_DYNAMIC Wed Jan 14 14:45:46 CST 2026

其中(5da5b667a)部分就是git commitid 可以唯一对应构建点

例如

https://github.com/deepin-community/kernel/commit/5da5b667a

👍👍👍

太感谢了,还真没注意用commit id来溯源。

Reply View the author
neko
deepin
Ecological co-builder
Q&A Team
2026-01-22 15:00
#6
cql1983

👍👍👍

太感谢了,还真没注意用commit id来溯源。

也可以用apt source命令下载源代码,需要把apt源的src选项打开

Reply View the author
LiuYongzhang
deepin
2026-01-22 15:23
#7
Reply View the author
cql1983
deepin
2026-01-22 17:19
#8

感谢各位大佬指点,已经通过github上源码checkout对应的commit id,获得对应的版本了,已经满足我需求了。

Reply View the author
忘怀
deepin
2026-01-22 18:25
#9
It has been deleted!
忘怀
deepin
2026-01-22 18:25
#10

看了下这个 编译内核依赖缺pahole,DEBUG_INFO_BTF需要这个

我一般是直接 sudo apt install bc build-essential zstd flex bison libssl-dev make libelf-dev git debhelper pahole libncurses-dev gcc-12-plugin-dev 一把梭装完的

Reply View the author