From: Marc Singer <elf@buici.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Start of new ARM920T target
Date: Mon, 7 Jul 2003 19:43:22 -0700 [thread overview]
Message-ID: <20030708024322.GA425@buici.com> (raw)
I'm sending an initial patch for the KEV7A400 dev board in order to
get some feedback about the configuration extension I'm proposing.
This is *not* complete. It ought not break any of the non-ARM9 builds
though it may break one of the ARM9 ones.
How it works:
1) The top-level script, ./mkconfigx, takes the configured
include/config.h file and compiles a list of defines roughly of
the (regex) form CONFIG_.*
2) These are transformed into CONFIG_.*=y
3) The written to ./configx.mk in a form that can be included
in Makefiles.
4) The cpu/arm920t/Makefile includes this file. I believe this
could be included in the ./config.mk file so that everyone
benefits.
5) The cpu/arm920t/Makefile has been turned up-side down to make it
more amenable to this form of configuration. The present form
isn't as elegant as it should, and will, be. It's there to make
the point of 'how' it might look. Notice that source files are
declared instead of object files.
6) The board/kev7a400/u-boot.lds has an important change.
Previously, the name of the start.o object file was hard coded.
Instead, start.S has been moved to a named section, .start, and
the linker script reflects this. The effect is the same as
before, but the dependency is removed.
The serial_lh7a400.c file could be moved to share a home with other
serial drivers.
With this sort of configuration methodology, the configuration file
selects the desired driver with something like this:
#define CONFIG_SERIAL_LH7A400
or
#define CONFIG_SERIAL_NS16550
Why do I prefer this? Ifdefs tend to make code harder to read. A few
are usually OK. As the code grows, it is desirable to separate the
conditionally compiled code. Likewise, whole file ifdefs are not very
clear. One can see the #ifdef at the top, and may not know if it
matches the one at the bottom of a long source file. With this
configuration method, needed files are explicitly built and linked
when the appropriate configuration option is present.
Cheers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-2.diff.gz
Type: application/octet-stream
Size: 19845 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20030707/a48fdc85/attachment.obj
next reply other threads:[~2003-07-08 2:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-08 2:43 Marc Singer [this message]
2003-07-17 23:34 ` [U-Boot-Users] Start of new ARM920T target Wolfgang Denk
2003-07-18 0:30 ` Marc Singer
2003-07-26 23:11 ` Wolfgang Denk
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=20030708024322.GA425@buici.com \
--to=elf@buici.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