[U-Boot] Makefile and build stiching for ARM SoC

Hi list
This is my "Hi, I am new to U-Boot, how do I get started?" email..
I would like to add NXP's LPC32x0 SoC ARM926EJS based SoC, "specifc" code under "../cpu/arm926ejs/lpc32x0" as mentioned in the README file. So that our boards which uses LPC32x0 SoC can link with them.
Could someone let me know how I should add "Makefile" under .../lpc32x0 and how is that going get inovked from top leve "Makefile", I'm not expert in Makefiles, but should manage simple changes ?
The thing I'm missing is, how is to level Makefile's
xxxx_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs xxxx <aaa> <bbb>
To actually invoking which Makefiles in which sub-directories etc...
My appologies for not being up to speed to Makefiles and appreciate your helps.
A.
ps. NXP should have done this really !!!

Dear Ayewin Oung,
In message o2mae8480551005041105gfff68619wf6f9032cdd95995@mail.gmail.com you wrote:
This is my "Hi, I am new to U-Boot, how do I get started?" email..
Welcome.
The thing I'm missing is, how is to level Makefile's
xxxx_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs xxxx <aaa> <bbb>
To actually invoking which Makefiles in which sub-directories etc...
Here the top level Makefile sources your board settings:
153 # load ARCH, BOARD, and CPU configuration 154 include $(obj)include/config.mk 155 export ARCH CPU BOARD VENDOR SOC
Here it adds a make target for your board specific code:
250 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a 251 LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
And here it adds this to the list of libraries to build:
285 __OBJS := $(subst $(obj),,$(OBJS)) 286 __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
Here is the build dependency:
342 $(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
and here the build rule which will invoce your board dirctory's Makefile:
358 $(LIBBOARD): depend $(LIBS) 359 $(MAKE) -C $(dir $(subst $(obj),,$@))
Best regards,
Wolfgang Denk
participants (2)
-
Ayewin Oung
-
Wolfgang Denk