[U-Boot] RFC: "make DESTDIR=xxx install" ?

Ulf Samuelsson ulf.samuelsson at atmel.com
Sat Aug 15 07:01:21 CEST 2009


Wolfgang Denk skrev:
> Dear Ulf Samuelsson,
> 
> In message <4A84779F.7010201 at atmel.com> you wrote:
>> This still means that the external buildsystem need to
>> know the internals of u-boot.
> 
> You always have to know the interface to the U-Boot build framework,
> there is no way around that.

Yes, but today U-Boot does not provide any interface for copying
the build result to another place.
People have to dig into internals and if internals change,
then it is likely to be detected by something breaking.

> 
>> There is nothing to stop me calling u-boot with
>>
>> make DESTDIR=/tftpboot/$(MACHINE)
>> TARGET=$(MACHINE)-u-boot-$(U_BOOT_VERSION)-$(REVISION).bin install
> 
> Well, you must know that the U-Boot build framework does support these
> options (or whatever they might be called), assuming they existed.

Yes, but a "make install" is a much more stable interface.

>> If you maintain just a couple of boards, then it is inconvenient to
>> have a subdirectory.
>> If the tftp command in u-boot would fetch from that subdirectory
>> automatically, then it would be less of a pain.
> 
> Well, that's the default for many board configurations - at least for
> all where I have something to say about the implementation.

The proposal does not stop anyone from doing this.
You can do
make DESTDIR=/tftpboot TARGET=u-boot.bin install
make DESTDIR=/tftpboot/$(MACHINE) TARGET=u-boot-bin install
make DESTDIR=/tftpboot/$(MACHINE) \
	TARGET=$(MACHINE)-u-boot-$(U_VER)-$(REV).bin install

I am quite happy to let you put your binaries in the directory
of your choice.


> It's in your hands to make it the default for all your boards, too.
> 
>> I am happy with u-boot.bin as a default,
>> but there is nothing stopping you from adding more parameters
>> like FORMAT=srec or FORMAT=hex.
> 
> I'm not sure if this is the right approch. To me it seems that a small
> wrapper script, optimized for your (or my) purpose, is much more
> flexible and does not pollute the Makefile for features only very
> few people ever need.

I think the open source community has converged on the
"make DESTDIR=<dir> install" method

The important thing is however that the solution is
1) INSIDE the U-Boot tree
2) Designed to be stable, even if U-Boot evolves.
3) Documented so it is easy to use.

If your proposal is that the "wrapper" script is outside u-boot,
then this is nothing new. This is how it is done today,
Having wrapper scripts to an unstable interface is an
accident waiting to happen.

You have a unique position as the maintainer of U-Boot.
You know immediately when your scripts needs to be updated.
People working on a build environment does not neccessarily
have that knowledge, and if not, will run into trouble,
or rather their customers might.

Maybe I misunderstand you and you propose that the build-script
should be inside the tree.
Please clarify!




> Best regards,
> 
> Wolfgang Denk
> 



More information about the U-Boot mailing list