The easiest and most bandwidth-friendly way, if you expect to do this more than once, would be to clone the kernel's git repository and check out the version you want based on its tag. It's probably best to clone the linux-stable repo, since that will include tags for all of the stable releases:
If you do not want to download whole kernel commit history (which is well above 1 GiB), you can download only such part of the kernel Git repo that leads to your desired branch. E.g. to locally checkout the Ubuntu kernel in version 4.5, you'd do:
Download Kernel Source
I've been struggling to figure out where and how to get the various Linux kernel branches, so I wanted to expound upon that and show where I learned it. This research also allowed me to fix and update the link in the most-upvoted answer, which I recently did.
Ex: the OP's v2.6.32.2 is on this page here: I recommend downloading the .tar.xz version of the file, since it is the smallest: linux-2.6.36.2.tar.xz. The .sign file next to it contains the cryptographic PGP signature to verify the downloaded file's authenticity and integrity. Read more about that here, including seeing commands to verify the signature:
PrepatchPrepatch or "RC" [Release Candidate] kernels are mainline kernel pre-releases that are mostly aimed at other kernel developers and Linux enthusiasts. They must be compiled from source and usually contain new features that must be tested before they can be put into a stable release. Prepatch kernels are maintained and released by Linus Torvalds. [Their versions end in -rcX, where X is a number.]
MainlineMainline tree is maintained by Linus Torvalds. It's the tree where all new features are introduced and where all the exciting new development happens. New mainline kernels are released every 9-10 weeks.
StableAfter each mainline kernel is released, it is considered "stable." Any bug fixes for a stable kernel are backported from the mainline tree and applied by a designated stable kernel maintainer. There are usually only a few bugfix kernel releases until next mainline kernel becomes available -- unless it is designated a "longterm maintenance kernel." Stable kernel updates are released on as-needed basis, usually once a week.
LongtermThere are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees. [See a table of all of the long-term releases here: Most of them are supported for up to 6 years.]
I am planning to write some device drivers and I need to get the Linux kernel source. My Linux kernel version is 3.2.0-23-generic-pae and I downloaded the image from this. In many of the articles I have read, it tells me that I need to have the entire kernel tree to start inserting new modules.
Note - these commands work with any package. Just substitute 'linux' with the package you're interested in. And also note that 'apt-get source' doesn't need sudo access and will dump the source in your current directory.
Say you need kernel source for 3.19.0-58 :apt-get source linux-image-3.19.0-58-generic will get the source for the latest kernel in the series: 3.19.0-80 in this case, which is not what you asked for.
There are cases where it is simply more practical to download the linux kernel source and headers for the version you're interested in directly from (a pretty reliable URL/site that isn't going away [e.g. standard stackoverflow concern about stale links isn't not an issue])
Or maybe Internet networking might be broken on Linux machine (or VM) you're using, but file sharing or NFS works, where the source can be downloaded onto another machine and accessed via the filesystem.
Note: If the latest kernel version on the official website does not match the one mentioned in the steps below, replace the version number in the commands with the current latest version.
Other Packages Related to bcmwl-kernel-source depends
recommends
suggests
enhances
dep:dkms Dynamic Kernel Module Support Framework dep:libc6-dev GNU C Library: Development Libraries and Header Files dep:linux-libc-dev Linux Kernel Headers for development Download bcmwl-kernel-source Download for all available architectures ArchitecturePackage SizeInstalled SizeFiles amd641,513.2 kB7,878.0 kB [list of files] i3861,482.2 kB7,011.0 kB [list of files] This page is also available in the following languages:
This article is an introduction to building custom kernels from kernel.org sources. This method of compiling kernels is the traditional method common to all distributions. It can be, depending on your background, more complicated than using the Kernel/Arch Build System. Consider the Arch Build System tools are developed and maintained to make repeatable compilation tasks efficient and safe.
Install the base-devel meta package, which pulls in necessary packages such as make and gcc. It is also recommended to install the following packages, as listed in the default Arch kernel PKGBUILD: xmlto, kmod, inetutils, bc, libelf, git, cpio, perl, tar, xz.
It can be downloaded by simply right-clicking the tar.xz link in your browser and selecting Save Link As..., or any other number of ways via alternative graphical or command-line tools that utilise HTTP, TFTP, Rsync, or Git.
You should also verify the correctness of the download before trusting it. First grab the signature, then use that to grab the fingerprint of the signing key, then use the fingerprint to obtain the actual signing key:
Note the signature was generated for the tar archive (i.e. extension .tar), not the compressed .tar.xz file that you have downloaded. You need to decompress the latter without untarring it. Verify that you have xz installed, then you can proceed like so:
To finalise the preparation, ensure that the kernel tree is absolutely clean; do not rely on the source tree being clean after unpacking. To do so, first change into the new kernel source directory created, and then run the make mrproper command:
This is the most crucial step in customizing the default kernel to reflect your computer's precise specifications. Kernel configuration is set in its .config file, which includes the use of Kernel modules. By setting the options in .config properly, your kernel and computer will function most efficiently.
This method will create a .config file for the custom kernel using the default Arch kernel settings. If a stock Arch kernel is running, you can use the following command inside the custom kernel source directory:
There are several tools available to fine-tune the kernel configuration, which provide an alternative to otherwise spending hours manually configuring each and every one of the options available during compilation.
The chosen method should be run inside the kernel source directory, and all will either create a new .config file, or overwrite an existing one where present. All optional configurations will be automatically enabled, although any newer configuration options (i.e. with an older kernel .config) may not be automatically selected.
Once the changes have been made save the .config file. It is a good idea to make a backup copy outside the source directory. You may need to do this multiple times before you get all the options right.
Running lspci -k # from live media lists names of kernel modules in use. Most importantly, you must maintain cgroups support. This is necessary for systemd. For more detailed information, see Gentoo:Kernel/Gentoo Kernel Configuration Guide and Gentoo:Intel#Kernel or Gentoo:Ryzen#Kernel for Intel or AMD Ryzen processors.
Compilation time will vary from as little as fifteen minutes to over an hour, depending on your kernel configuration and processor capability. Once the .config file has been set for the custom kernel, within the source directory run the following command to compile:
This file must be copied to the /boot directory and renamed in the process. Provided the name is prefixed with vmlinuz-, you may name the kernel as you wish. In the examples below, the installed and compiled A.B.C kernel has been copied over and renamed to vmlinuz-linuxAB:
An existing mkinitcpio preset can be copied and modified so that the custom kernel initramfs images can be generated in the same way as for an official kernel. This is useful where intending to recompile the kernel (e.g. where updated). In the example below, the preset file for the stock Arch kernel will be copied and modified for kernel A.B.C, installed above.
The System.map file is not required for booting Linux. It is a type of "phone directory" list of functions in a particular build of a kernel. The System.map contains a list of kernel symbols (i.e function names, variable names etc) and their corresponding addresses. This "symbol-name to address mapping" is used by:
If your /boot is on a filesystem which supports symlinks (i.e. not FAT32), copy System.map to /boot, appending your kernel's name to the destination file. Then create a symlink from /boot/System.map to point to /boot/System.map-linuxAB:
This package depends on packages containing the sources of the latestLinux kernel. Other Packages Related to linux-source depends
recommends
suggests
enhances
dep:linux-source-4.9 Linux kernel source for version 4.9 with Debian patches Download linux-source Download for all available architectures ArchitecturePackage SizeInstalled SizeFiles all6.1 kB12.0 kB [list of files] This page is also available in the following languages (How to set the default document language):
Normally, most Linux distributions provide a binary package for the kernel itself (which is automatically installed), a package for its headers only (which can be used to compile new modules), and possibly a source package related the binary package. 2ff7e9595c
Comentarios