Code Monkey home page Code Monkey logo

Comments (5)

jpoimboe avatar jpoimboe commented on July 19, 2024

Thanks @flaming-toast for reporting this issue!

I think we could do something like dpkg -l linux-image-$(uname -r), find the version in the output (e.g. 3.13.0-24.47), and then apt-get source linux=3.13.0-24.47. That still has the downside that you wouldn't be able to get older versions of the kernel, so you'd have to install the latest available kernel before it would work. But at least it would prevent mismatches between the running kernel and the compiled source.

As to how to get older versions of kernel source, I don't like the git clone approach so much because it's very slow and hackish. Maybe ubuntu has an archived source repository out there somewhere for older packages?

from kpatch.

jpoimboe avatar jpoimboe commented on July 19, 2024

Ah, found several versions of kernel source at http://us.archive.ubuntu.com/ubuntu/pool/main/l/linux/.

So maybe we could do dpkg -l linux-image-$(uname -r) to get the kernel version and then download the source from there.

from kpatch.

flaming-toast avatar flaming-toast commented on July 19, 2024

I've found apt-get source ${package}=${version} to be very fickle, and apt would be sneaky sometimes by choosing a different package over the one you supply as an argument. It's probably not reliable if we want to grab very specific versions of the kernel source.

I agree with your point about git -- cloning the ubuntu repo was painstakingly slow. We could use the pool archive to alleviate this issue for now.

So perhaps something like...
dpkg-query -W -f='$(Version}' linux-image-$(uname -r) to grab the exact version
With the extracted version numbers, use wget to download the deb package from http://us.archive.ubuntu/pool/main/l/linux/
Using dpkg -x to extract the deb to a temporary directory. Then extract the kernel source, compile, etc.

How does this all sound?

from kpatch.

jpoimboe avatar jpoimboe commented on July 19, 2024

Sounds good to me! Pull requests are welcome ;-)

from kpatch.

jpoimboe avatar jpoimboe commented on July 19, 2024

Fixed with #240.

from kpatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.