§2023-11-07
- Step 1 – Enable source code repo
alexlai@hc4Bookworm:/$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main <-- deb-src : Indicate that you need source code for .DEB files
deb http://security.debian.org/debian-security bookworm-security main
deb-src http://security.debian.org/debian-security bookworm-security main
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main
deb-src http://deb.debian.org/debian/ bookworm-updates main
-
apt update
-
apt source
apt install dpkg-dev
, make sure that it was installed!
root@hc4Bookworm:/# apt-cache search linux-source
linux-source - Linux kernel source (meta-package)
linux-source-6.1 - Linux kernel source for version 6.1 with Debian patches
root@hc4Bookworm:/# apt source linux-source-6.1 <-- do not use root, use normal user
...
dpkg-source: info: applying features/all/ethernet-microsoft/0028-net-mana-Configure-hwc-timeout-from-hardware.patch
dpkg-source: info: applying features/all/ethernet-microsoft/0029-net-mana-Rename-mana_refill_rxoob-and-remove-some-em.patch
dpkg-source: info: applying features/all/ethernet-microsoft/0030-net-mana-Add-gdma-stats-to-ethtool-output-for-mana.patch
W: Download is performed unsandboxed as root as file 'linux_6.1.55-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
alexlai@hc4Bookworm:~/build/src$ ls
linux-6.1.55 linux_6.1.55-1.debian.tar.xz linux_6.1.55-1.dsc linux_6.1.55.orig.tar.xz
-
linux-6.1.55: This is a directory that contains the actual source code of the Linux kernel version 6.1.55. You can find the complete source code of the kernel within this directory. Developers use this source code to build, modify, and customize the kernel to suit their needs.
-
linux_6.1.55-1.debian.tar.xz: This file is a compressed archive (in the .tar.xz format) that contains the Debian-specific packaging information for the Linux kernel version 6.1.55. In a Debian-based Linux distribution, such as Ubuntu, the Linux kernel source is typically packaged with Debian-specific build scripts and configuration files to make it easier to build custom kernel packages for that distribution.
-
linux_6.1.55-1.dsc: The .dsc file is a Debian source control file. It contains metadata and checksums for the source package, including information about the source files and how the package should be built. This file is used by the Debian packaging tools to build binary packages from the source.
-
linux_6.1.55.orig.tar.xz: This file is the original source code of the Linux kernel version 6.1.55, compressed in the .tar.xz format. It's the pristine, unmodified source code of the kernel as released by the Linux kernel development team. This file is typically used as a reference or starting point when building custom kernel packages.
In summary, these files and directories represent the source code and packaging information for the Linux kernel version 6.1.55, and they are typically used by developers and maintainers to work with and build customized kernel packages for Debian-based Linux distributions.