From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] Centralise documentation of CONFIG_ options (and finding unused ones)
Date: Mon, 11 Apr 2011 23:11:23 +1000 [thread overview]
Message-ID: <4DA2FDFB.1000901@gmail.com> (raw)
Hi All,
As a bit of a lark, I ran the following shell command:
grep -r -h -o -G "#define CONFIG.*" * | \
sed 's/#define[ \t]*//' | \
sed 's/^\([A-Za-z0-9_]*\).*/\1/' | \
sort -u > README.configuration.options
I then ran the result through the following script into
README.configuration.options.counted
#!/bin/bash
INPUT=doc/README.configuration.options
#!/bin/bash
INPUT=doc/README.configuration.options
for i in `cat $INPUT`
do
grep -rcs --exclude-dir=doc '\<'${i}'\>' * | \
cut -d : -f 2 | \
awk '{sum+=$1} END {printf("%d\t%s\n", sum, f);}' f=$i
done
The result? 5539 lines of pure configuration option goodness :)
Here's a little snippet:
6 CONFIG_100MHz
8 CONFIG_133MHZ_DRAM
7 CONFIG_300MHz
13 CONFIG_405
24 CONFIG_405CR
88 CONFIG_405EP
81 CONFIG_405EX
next reply other threads:[~2011-04-11 13:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 13:11 Graeme Russ [this message]
2011-04-14 6:17 ` [U-Boot] [RFC] Centralise documentation of CONFIG_ options (and finding unused ones) Albert ARIBAUD
2011-04-14 8:36 ` Graeme Russ
2011-04-14 9:14 ` Kumar Gala
2011-04-16 7:16 ` Graeme Russ
2011-04-17 13:30 ` Timur Tabi
2011-04-17 19:26 ` Graeme Russ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA2FDFB.1000901@gmail.com \
--to=graeme.russ@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox