
U-Boot Users:
I want to add a featue to the makefile configuration so that a user can compile u-boot including a directory that gets compiled as a stand alone program. I propose that users can enter a directory when configuring the board, for example
make BOARD_config SA=my_stand_alone_prog_dir
so that the user can specify a directory to be compiled with u-boot. As you can see, the SA directory is added to the mkconfig.mk file and then included as a SUBDIRS when compiling. The purpose of this option is to allow a user to *easily* include a directory containing a stand alone program.
Is this an appropreate feature? Should this be done differently? After implementing changes from your comments, I'll properly document this option and send an appropreate patch.
-Jeffrey
----------Proposed patch------------
diff --git a/Makefile b/Makefile index 9a27bc2..26cf02a --- a/Makefile +++ b/Makefile @@ -231,6 +231,11 @@ # The "tools" are needed early, so put t # Don't include stuff already done in $(LIBS) SUBDIRS = tools \ examples +# Include a directory with a stand alone program in it if the user has +# configured u-boot for it. +ifeq ($(COMPILE_STAND_ALONE),y) +SUBDIRS += $(STAND_ALONE_DIR) +endif
.PHONY : $(SUBDIRS)
diff --git a/mkconfig b/mkconfig index c3e4cea..da6e2c8 --- a/mkconfig +++ b/mkconfig @@ -72,6 +72,11 @@ echo "BOARD = $4" >> config.mk
[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
+if [ -n "$SA" ]; then + echo "COMPILE_STAND_ALONE = y" >> config.mk + echo "STAND_ALONE_DIR = ${SA}" >> config.mk +fi + # # Create board specific header file #