uCdot
search uCdot:
 
Embedded Linux and uClinux Developer Forum
 
uCdot
- FAQ
- Dev Boards
- Submit Story
- Submit FAQ
- Submit Dev Board
- Topics
- Authors
- About

- Preferences
- Older Stuff
- Past Polls
- Discussions
- Journals
- Messages

Embedded Linux
Mailing Lists
uClinux-dev (search)
Coldfire (search)
MTD
Microblaze (search)
ELUG
BDM-devel
Blackfin

Embedded Linux
Sites
uClinux.org
uClinux-Dist
uClibc
uClinux Directory
LinuxDevices
ARMulator
uClinux-elf-tools
Colilo
Kernel Archives
H8-uClinux
TLDP
Microblaze uClinux
BDM Tools
SkyEye (emulator)
LOM
SETR live CD
Blackfin uClinux

Embedded Linux
Companies
SecureComputing
SDCS
CodePoet
Arcturus
Cadenux
ARMtwister
uClinux.net
Xiptech
senTec
embedded^cl
Cwlinux
emlix
TimeSys
eSpark Infotech
SSV Embedded Systems
Embedded Minds
PeerSec Networks
Vortech Consulting
swissEmbedded
Synertronixx
Mbedthis Software
.vantronix
Aday
GraceLabs
Pengutronix
metux ITS
Codito Technologies
Firmix Software
PetaLogix
NuDesign
Merritt Technologies
WindRiver
OpenGear
Rubico
Analog Devices
Artila Electronics
Vyatta
Embest Info&Tech
Katalix Systems
WorkWare Systems
Kdev
Intellimetrix
Virtual Cogs
SYSGO
coresystems
ExactCODE
KOAN
EzHomeTech
Linux4biz
Linkodas
Trego
EMBEST
Boardcon
HITEG
FemtoLinux
Prosoft World
Witech

 
Building a cross-system ksymoops
FAQ studog writes "If you're building a uClinux based embedded system, you may once in a while get an oops on the console. It'd be nice to have ksymoops decode that for you, yes? Here's how:

These instructions current as of ksymoops-2.4.9 and binutils-2.14. Newer versions of these sources may require changes.

This FAQ entry assumes some basic familiarity with low level development. If you don't understand the "unpack the sources" instruction below, you might be better off finding someone who does to help you."

Read on for the details.

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.

    Tiny embedded ethernet device | Running PHP with BOA on uClinux  >

     

     
    uCdot Login
    Nickname:

    Password:

    [ Create a new account ]

    Related Links
  • Linux
  • SnapGear
  • Coldfire
  • uClinux
  • http://www.gnu.org/directory/G NU/binutils.html
  • http://www.gnu.org/directory/d evel/debug/ksymoops. html
  • studog
  • More on FAQ
  • Also by davidm
  • This discussion has been archived. No new comments can be posted.
    Building a cross-system ksymoops | Login/Create an Account | Top | Search Discussion
    Threshold:
    The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

    The Embedded Linux and uClinux Developer Forum is hosted by: SnapGear If you explain so clearly that nobody can misunderstand, somebody will.

    [ home | contribute story | older articles | past polls | faq | authors | preferences ]