KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents
Revision 4 as of 2007-11-04 00:01:07
KernelNewbies:
  • RoelKluin

Your Name

Roel Kluin

Email: MailTo(12o3l AT SPAMFREE tiscali DOT nl) ...


CategoryHomepage

some scripts for configuring a kernel:

To translate a module name (as listed in modprobe -l or modinfo -n module) into a kernel .config option:

   #!/bin/bash
   mod="${1%.ko}";
   dir="${1%/*}";
   sed -e :a -e '/\\$/N; s/\\\n//; ta' "${dir#*/kernel/}/Makefile" | \
   sed -n "s/^obj-\$(CONFIG_\([A-Z0-9_]*\))\W*+=\W*"${mod##*/}"\.o$/\1/p";

a stupid sed script to check ioremap/iounmap balancing (can be adapted for others)

   git-grep -l '[^A-Za-z0-9]ioremap' | while read g; do
   echo "--------------------------[ $g ]--------------------------"
   sed -n "/[^A-Za-z0-9]ioremap.*(\(.*\))/,/^[}{]$/{
   s/\(.*return.*\)/\1\t\t-------return/
   tp
   s/\(.*goto.*\)/\1\t\t------goto/
   tp
   s/\(.*iounmap.*\)/\1\t\t<----/
   tp
   s/\(.*ioremap.*\)/\1\t\t---->/
   Tp
   =
   :p
   p
   }" $g
   done | less
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01