Linux Kernel - How to obtain a particular version (right upto SUBLEVEL)
Asked Answered
A

2

32

I want to setup linux kernel 3.18.1 on my machine. How do I obtain the same?

What I have already tried:

  • Tried downloading from kernel.org. But the latest version is 3.18.3 and I am unable to find 3.18.1 there.
  • Cloned the linux kernel from git. However, only version 3.18 is tagged. The next tagged version is 3.18-rc1 etc. So where do I find 3.18.1?
Aerograph answered 25/1, 2015 at 13:15 Comment(2)
A blog mentioned this location: kernel.org/pub/linux/kernel/v3.x/linux-3.18.1.tar.xz so my particular problem is solved. But I would like someone to answer the question in general. How do I follow links from kernel.org to reach the above level?Aerograph
mirrors.edge.kernel.org/pub/linux/kernelProudman
W
41

kernel.org has a public (read-only) git repository that you can clone. It has also tags for every kernel version, so you can checkout a specific version:

# Clone the kernel to your local machine
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ cd linux-stable

# Find the tag for the version you want
$ git tag -l | grep 3.18.1
v3.18.1

# Create a new branch with that tag
$ git checkout -b my3.18.1 v3.18.1

Now the linux-stable directory will have the kernel version you wanted.

(I know you said v3.18.1 doesn't exist as a tag, but it does)

Edit: The asker says he was using Torvalds' github repo, which is why he could not find the tag for 3.18.1. This is expected, because Torvalds' github repo only contains tags for release candidates.

The asker is asking for a minor revision (the .1 in 3.18.1), so he needs to get that from https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/

Weevily answered 25/1, 2015 at 14:55 Comment(6)
I cloned from a different location (github.com/torvalds/linux.git) and did not find a tag for 3.18.1 in it.Aerograph
You probably want to use the stable/linux-stable.git repo on git.kernel.org instead. (Torvalds himself recommends people to use git.kernel.org instead of github, except in very special circumstances)Weevily
At any rate. You're not going to find minor revisions (the .1 in 3.18.1) on Torvald's github linux repo. You need to get those from git.kernel.org.Weevily
You're welcome. If you find that it still does not work, I would be happy to help.Weevily
Is there an official git repo with all the minor tags?Harpsichord
@AntonioPetricca Like this? git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/refs/…Weevily
C
0
The asker is asking for a minor revision (the .1 in 3.18.1), so he needs to get that from https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/

I don't agree with this

I can find 3.18.1 Linux kernel version from a mirror https://mirrors.tuna.tsinghua.edu.cn/kernel/v3.x/linux-3.18.1.tar.gz

No matter which mirror address you come from, this version will be included.

I think it is found in the wrong place. Since it is difficult to find a specific version on git.kernel.org, we can directly search for a specific version from the relevant mirror.

firt : goto mirror website: https://mirrors.tuna.tsinghua.edu.cn/kernel/v3.x/

second: Use the browser ctrl+F search 3.18.1 to find。

just like i found 3.18.1, you will find it

Carlyn answered 12/1 at 6:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.