U-Boot Directory Structure
Start with the U-Boot README.
Add these bits gleaned from the user's list:-
SOCs
Assuming a SOC consisting of various peripherals and a core, using the example i.MX1
http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=02XPgQ82172.
<-------snip-------------->
> I'm afraid I'm quite a bit missing in this discussion. At last, where
> must I put the imx21 related code?
<-------snip-------------->
So if you have a IMX serial driver that should go to
drivers/serial/imx.c
and an ethernet driver to
drivers/net/imx.c
and your I2C driver to
drivers/i2c/imx.c
<-------snip-------------->
Best regards,
Wolfgang Denk
(From U-Boot user's list, Subject "arm SoC code in U-Boot")
Subject: [PATCH] Cleanup cpu/arm920t using SoC
Date: 2004-08-16 15:59:42 GMT
Hi there,
Since the cpu/ directory gets clobbered with peripheral driver code I
started cleaning up cpu/arm920t.
I introduced the concept of Soc (system on a chip) into the ./cpu directory.
That means that code that is cpu (i.e. core) specific resides in
cpu/$(CPU)/
and code that is specific to some SoC (i.e. vendor specific peripherals
around the core) is moved into
cpu/$(CPU)/$(SOC)/
Thus a library/archive "cpu/$(CPU)/$(SOC)/lib$(SOC).a" will be build and
linked. Examples will be
cpu/arm920t/imx/
cpu/arm920t/s3c24x0
One can select an SoC by passing the name of it to ./mkconfig just like
@./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0
If there's no VENDOR field (like "mpl" in the above line) one has to pass
NULL instead:
@./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx
=========================================================================
CHANGELOG
* Patch by Steven Scholz, 16 Aug 2004:
- Introducing the concept of SoCs "./cpu/$(CPU)/$(SOC)"
- creating subdirs for SoCs ./cpu/arm920t/imx and ./cpu/arm920t/s3c24x0
- moving SoC specific code out of cpu/arm920t/ into cpu/arm920t/$(SOC)/
- moving drivers/s3c24x0_i2c.c and drivers/serial_imx.c out of drivers/
into cpu/arm920t/$(SOC)/
=========================================================================
Since the patch is quite big I'll send it to Wolfgang directly. If it gets
applied I'd like to do the same with cpu/at91rm9200. That is introducing
"SOC = at91rm9200" and moving all at91rm9200 code ./cpu/arm920t/at91rm9200.
The patch does not break the build process for ARM9.
I tested "./MAKEALL ARM9"
my_target:
@$(MKCONFIG) -a BOARDNAME ARCH CPU BOARD VENDOR SOC
make my_target makes the links
include/asm -> asm-ARCH
include/asm-ARCH/arch -> arch-SOC
See also
--
PeterPearse - 08 Mar 2007