what package contains the raw vmlinux image?

Robert P. J. Day rpjday at crashcourse.ca
Thu Jul 1 12:11:26 UTC 2010


On Thu, 1 Jul 2010, Markus Schönhaber wrote:

> 01.07.2010 12:45, Robert P. J. Day:
>
> >   on the other hand, he suggests that there is a way to build one,
> > and i have to imagine that involves downloading the source
> > corresponding to the current kernel, doing a configuration with
> > the corresponding config file, and simply doing a regular build,
> > which should theoretically produce a vmlinux file that *exactly*
> > matches the running kernel (and it's important that it match
> > *exactly*, otherwise, it has no value for debugging).
>
> Well, if you're going to build the kernel yourself anyway, you could
> use both, vmlinuz and vmlinux, from that build. That should make
> pretty sure that they match.

  of course i could, but that assumes that i have the ability to
reboot to a new kernel, and i'm not making that assumption.

  at the risk of sounding a bit self-serving, i'm trying to write
another lesson in my online course in introductory kernel programming
-- debugging a running kernel and loadable modules with gdb -- and
that requires both a raw vmlinux file and access to /proc/kcore.

  the default ubuntu kernel does in fact come configured with what is
required for this -- DEBUG_INFO and PROC_KCORE -- so a running system
already has everything necessary, except for a vmlinux file that
*exactly* matches the running kernel.

  i will, of course, point out in that lesson that if one has the
freedom to build and reboot, then that's the way to go.  but for
consistency, a lot of what i'm covering can be done just running the
stock kernel so i'd like to stick with that.

  i *think* i have the recipe now, but i'm going to confirm it first
before saying any more.

rday

p.s.  here's the self-serving part:

http://crashcourse.ca/introduction-linux-kernel-programming/introduction-linux-kernel-programming

--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Top-notch, inexpensive online Linux/OSS/kernel courses
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the ubuntu-users mailing list