The officially official Devuan Forum!

You are not logged in.

#1 2019-03-12 21:30:03

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

[SOLVED] Trimming the cloned Linux tree

Hello:

I getting set up to try my hand at customizing my kernel to something more specific to my rig's hardware.
I am not expecting to change/add anything hardware wise in the mid term (its basically ca. 2000 hardware) and doing so may (?) help me with some issues I have. 

To do so, I followed the instructions here:

https://dev1galaxy.org/viewtopic.php?id=564

Everything (hopefully) went as expected.

Now, when I do git tag -l, I see that I have downloaded everything from v2.6.11 to v5.0-rc8 ...
All 3.6Gb worth of Linux branches ...   

Now I understand what "Use git to clone the Linux branch (all of it to start)" really means. 8-)

I don't think I need to have anything before 4.8 so, expecting to find different folders for each branch (is this how it is named?) I see that it is not the case and cannot figure out what to prune (delete).       

How can I go about getting rid of the code I don't intend to use/need without damaging the whole git clone?

Thanks in advance.

A.

Note:
I *think* there's a typo on the page that would need to be corrected.

"Use   git   to clone the Linux branch (all of it to start)"

 git clone [url]https://github.com/torvalds/linux.git[/url]

should be: Use git to clone the Linux branch (all of it to start)

 git clone https://github.com/torvalds/linux.git

Last edited by Altoid (2019-03-13 12:30:15)

Offline

#2 2019-03-13 11:15:06

KatolaZ
Member
Registered: 2017-03-11
Posts: 79  

Re: [SOLVED] Trimming the cloned Linux tree

Hi,

why do you need the git repo of the kernel at all? if you just want to compile the kernel yourself, use one of the tarballs available at www.kernel.org You should get the git repo only if you want to contribute to kernel development. If you are determined to have a repo anyway, you should try a shallow clone, but that's not particularly easy in a repo as large as that...

HTH

KatolaZ

Offline

#3 2019-03-13 11:54:49

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] Trimming the cloned Linux tree

Hello:

KatolaZ wrote:

why do you need the git repo of the kernel at all?

Good question.

Even though I started in IT ~1996 (all MS stuff, no development/coding, just TS and HW maintenance), I'm relatively new to Linux and a total novice with respect to kernels and compilations.
So I looked around in the forum, found what seemed to be what I wanted to do and followed the instructions on the page.

To do so, I followed the instructions here:
https://dev1galaxy.org/viewtopic.php?id=564

These are correct but make no distinction between compiling a kernel and contributing to kernel development.
Something that is quite obviously way above my head and most probably, way above the head of most of those posting here to find Devuan related answers.
In my case, a way to compile or upgrade to the latest kernel.

In fact, the title of the post indicates that it is what I was wanting to do:

HOWTO wrote:

    » HOWTO: upgrade Devuan (stable) to the latest Linux kernel

So I guess that's why ...  =-)

KatolaZ wrote:

... just want to compile the kernel yourself ...

Yes, that is exactly what I want to (try to) do.

KatolaZ wrote:

... use one of the tarballs available at www.kernel.org

Right.
Thanks a lot for the heads up.

KatolaZ wrote:

... get the git repo only if you want to contribute to kernel development.

I seriously doubt I can do that.
Make some suggestions, maybe.

KatolaZ wrote:

... you should try a shallow clone, but that's not particularly easy in a repo as large as that...

Indeed ...
As I have found from what I have been reading on the web and the results of my countless efforts.

KatolaZ wrote:

HTH

Indeed it has.

Maybe the admins/OP could consider adding a note to the post I've cited.

It's undoubtedly a commendable effort on behalf of the OP but a warning or caveat explaining that the instructions contained are not what is needed to *just* compile a kernel would be a plus.
Or maybe addiitonal instructions (given the complexity involved) on how to do it without a full git ie: with a tarball like you suggest   

Thanks a lot for your input. (and to the OP, of course)

Cheers,

A.

Last edited by Altoid (2019-03-13 12:02:17)

Offline

#4 2019-03-13 12:00:19

KatolaZ
Member
Registered: 2017-03-11
Posts: 79  

Re: [SOLVED] Trimming the cloned Linux tree

BTW, if you just need a newer kernel in Devuan ASCII, ascii-backports has the latest 4.19. I mean, you normally don't need to compile a kernel from scratch. You obviously can do that, but even if you choose to to so, either use the corresponding debian source package for "linux", or compile it through kernel-package, or at least use `make bindeb-pkg`, so that you will get a .deb package that you can install and remove.

My2Cents

KatolaZ

P.S.: Please be more accurate with quoting: from your message it looks like I said something which I actually did not say at all ;-)

Last edited by KatolaZ (2019-03-13 12:00:49)

Offline

#5 2019-03-13 12:27:29

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] Trimming the cloned Linux tree

Hello:

KatolaZ wrote:

... just need a newer kernel in Devuan ASCII ...

I really don't know if I need a newer one just yet.

To start, maybe a more compact one, tailored to the specific hardware I use.
There's (what seems to be) a hardware issue I'm troubleshooting and I may also find out more about what's going on with a kernel that has only what I need. 

KatolaZ wrote:

... use the corresponding debian source package for "linux", or compile it through kernel-package, or at least use `make bindeb-pkg`, so that you will get a .deb package that you can install and remove.

Yes, that's looks like what I'm needing.
Will have to find the corresponding how-to.

I recall that, when exploring the Mint distribution (a rolling release), I could install other kernels ie: older or newer and then remove them as required.
They were all in the rpm repository but that's not the case with Devuan which is why I'm attempting this.

Once again, thanks for your input.
You've been very helpful.

Best,

A.

Offline

Board footer