Skip to contentSkip to conversation

Different directories for source and object

U-Boot-Users Andreas Schweigstill 2 participants 2 messages Aug 30, 2005

lore
Share & tools
lore
#0 lore raw

Dear U-Boot community!

I would like to use separate directories for source and object file when compiling U-Boot, like it is possible for the Linux kernel 2.6.x. Unfortunately in U-Boot there are generated source and configuration files which also would have to be moved to the object file directories.

The reason for such a separation is that I would like to use a common source tree for several hardware configurations of the target system; a global "make all" should create all configurations at once.

Has somebody tried this?

With best regards
Andreas Schweigstill

Signature · 5 lines
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

I would like to use separate directories for source and object file when compiling U-Boot, like it is possible for the Linux

Submit a patch :-)

Quoted 3 lines

kernel 2.6.x. Unfortunately in U-Boot there are generated source and configuration files which also would have to be moved to the object file directories.

As long as you remember to re-build it after new files get added you can use a sym-linked tree for building.

Quoted 4 lines

The reason for such a separation is that I would like to use a common source tree for several hardware configurations of the target system; a global "make all" should create all configurations at once.

"At once" is probably not feasible, unless you have a massively parallel build host ;-) And if you have to build targets more or less sequentially, then you can actually do it sequentially. I don't see any immediate advantage over - for example - a trivial script like this:

	IMAGES="u-boot.bin u-boot.srec u-boot.map System.map"
	for board in ${LIST} ; do
		mkdir -p ../images/${board}/
		./MAKEALL ${board} && cp -l ${IMAGES} ../images/${board}/
	done

[Note: even on a fast SMP machine there is no significant difference between building N targets in parallel or sequentially.]

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Life and death are seldom logical."
"But attaining a desired goal always is."
	-- McCoy and Spock, "The Galileo Seven", stardate 2821.7