[U-Boot-Users] [PATCH]: tools: fix fw_printenv tool to compile again

Jerry Van Baren gerald.vanbaren at ge.com
Tue Nov 27 21:56:18 CET 2007


Markus Klotzbücher wrote:
> Hi Ben,
> 
> Ben Warren <bwarren at qstreams.com> writes:
> 
>> Markus Klotzbücher wrote:
>>> How about the following:
>>>
>>> This patch updates the fw_printenv/fw_setenv userspace tool to include
>>> the correct MTD header in order to compile against current kernel
>>> headers. Backward compatibility is preserved by introducing an option
>>> MTD_VERSION which can be set to "old" for compilation using the old MTD
>>> headers. Along with this a number of warnings are fixed.
>>>
>> Sounds good to me.  It'd be cooler if make could detect the
>> presence/absence of <linux/mtd-user.h>, but I'm not enough of a build
>> system whiz to know how to do that.
> 
> I'm afraid nor am I. Suggestions welcome.

I'm not sure it is a reasonable suggestion, but something like...

ifeq ($(strip $(wildcard /usr/include/mtd/mtd-user.h)),)
	MTD_VERSION=old
else
	MTD_VERSION=new
endif

This is using a hardcoded path for <linux/mtd-user.h> (odd, my system 
has it in a different place than Markus referenced - probably my 
ignorance or configuration).  This may be acceptable, or there may be a 
better way to do this.  (Use VPATH?  Things get complicated doing that.)

[snip]

> Viele Grüße / Best regards
> 
> Markus Klotzbücher

Best regards,
gvb




More information about the U-Boot mailing list