Make 'magic' cache and utilize unpatched kernel source

Request new features that might make using Gentoox better.
Post Reply
Krazy
Adept
Posts: 54
Joined: Wed Sep 10, 2003 8:41 pm
Location: Auckland, New Zealand

Make 'magic' cache and utilize unpatched kernel source

Post by Krazy »

Hi,

My suggestion is to modify the kernel patch script so that it stores "virgin" 2.4.22 kernel source (archive) somewhere, and then uses this 'cache' whenever a new patch is required by copying the source to /usr/src/, then applying diffs and compiling as always...

Currently, everytime there is a kernel patch, a whole copy of the original 2.4.22 kernel is download (at around 30Mb), and this is wasteful! Just use the cached copy instead!!

[Yes, I know there is a flag set after a copy is downloaded, expanded and patched with diffs...]

Add a md5 checksum for hack protection, and you should be good to go.

Why the suggestion? Well I was having problems with magic desiring to rebuild my kernel everytime (regardless of whether needed), and so I hacked together a manual build script to solve my particular issue, including using my pre-existing cached kernel source archive.

My meagre download limit certainly appreciates a saving of 30Mb for each patch!

8)
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

Yep.. its definitely a good idea, one ive had planned for ages but never bothered to do. I'll look into it ;p
The original Xbox adaptation of Gentoo
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

Okay, its done (just testing it now)... and before you start thinking about it... No! It didnt take me this long to do, I had to go to work inbetween ;)
The original Xbox adaptation of Gentoo
Krazy
Adept
Posts: 54
Joined: Wed Sep 10, 2003 8:41 pm
Location: Auckland, New Zealand

Post by Krazy »

Wow, some real action on this! I thought it definitely was worth a mention, but didn't expect to get a solution so quickly. Way to go, ShaLLaX! :D
News: Kernel patch revamped
Following a post (or rather a kick up the ass) from the forums... I decided to make the kernel patch keep a cache of the vanilla kernel locally to save a 30mb download each time I release a new patch...
Glad to lend a helping hand, or foot :wink:

BTW, for interested parties, the new kernel source "cache" in question can found in /usr/share/gentoox-kernel [a new directory]; the actual source archive is "linux-2.4.22.tar.bz2"
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

Aye, and I figured I'd leave the downloaded patch file there, since lots of people have been asking me "HOW CAN I PATCH MY OWN KERNEL?!!!oneoneone" hehe
The original Xbox adaptation of Gentoo
Post Reply