Download binutils and ksymoops:
http://www.gnu.org/directory/GNU/binutils.html
http://www.gnu.org/directory/devel/debug/ksymoops. html
Unfortunately, binutils-2.14 doesn't work properly with
ksymoops-2.4.9, you'll need binutils-2.13.2.1 instead.
Unpack the sources.
Compiling binutils:
# ./configure --target=m68k-unknown-linux-gnu
# make
I picked the above target because I have a Coldfire 5272. A
different target would be needed for arm processors frex.
Make a binutils/lib dir:
# mkdir lib
# cd lib
# for i in ../*/*.a; do
> ln -s $i `basename $i`
> done
This extra dir just makes compiling ksymoops a little easier. Look
at ksymoops' makefile if you want more info (look for BFD_PREFIX).
Editing the ksymoops makefile (partially optional):
point DEF_VMLINUX and DEF_MAP at your uClinux/linux-2.4.x
source tree. Leave DEF_KSYMS, DEF_LSMOD and DEF_OBJECTS blank.
point BFD_PREFIX at the binutils source tree
DEF_TARGET := \"elf32-m68k\"
DEF_ARCH := \"m68k\"
Only the BFD_PREFIX needs to be set, the rest just change the
defaults of the command line switches.
Turning off the all-defaults warning (optional):
edit ksymoops.c
grep for the "Warning: You did not" text
change the if statement to an "if (0)" statement
This is nice because it surpresses the warning that shows up when
you don't specifically tell ksymoops where to look for things. If
you've made the makefile modifications above, you've already done
that, so the warning is unnecessary.
Compiling ksymoops:
# make
Testing ksymoops:
# ./ksymoops -t '?'
# ./ksymoops -a '?'
Lots of m68k targets should show up in both listings (or arm targets
or whatever).
I prefer to copy it to /usr/local/bin/m68k-elf-ksymoops to fit in
with the rest of the uClinux tool chain.
If you've found this FAQ helpful, please consider emailing
David McCullough (davidm@snapgear.com) and/or
Greg Ungerer (gerg@snapgeaer.com)
to ask them to include ksymoops into the uClinux toolchain.
|