From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Tue, 27 Nov 2007 15:56:18 -0500 Subject: [U-Boot-Users] [PATCH]: tools: fix fw_printenv tool to compile again In-Reply-To: <87sl2rfmxy.fsf@denx.de> References: <20071126221946.48B6D247C1@gemini.denx.de> <871wacjb3r.fsf@denx.de> <474C390C.8060007@qstreams.com> <87sl2rfmxy.fsf@denx.de> Message-ID: <474C8472.4080706@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Markus Klotzb?cher wrote: > Hi Ben, > > Ben Warren 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 , 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 (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