From patchwork Wed Jun 22 07:56:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 903852 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5M7ufEP004881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 22 Jun 2011 07:57:03 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZIIU-00018S-Vd; Wed, 22 Jun 2011 07:56:27 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZIIU-00024U-Ki; Wed, 22 Jun 2011 07:56:26 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZIIR-00024A-HA for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2011 07:56:24 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1QZIIK-00034i-3Z; Wed, 22 Jun 2011 09:56:16 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.76) (envelope-from ) id 1QZIIJ-0006r4-5S; Wed, 22 Jun 2011 09:56:15 +0200 Date: Wed, 22 Jun 2011 09:56:15 +0200 From: Sascha Hauer To: Russell King - ARM Linux Subject: Re: i.MX consolidation patches Message-ID: <20110622075615.GJ6069@pengutronix.de> References: <1305823648-2428-1-git-send-email-s.hauer@pengutronix.de> <20110530075745.GA31492@S2100-06.ap.freescale.net> <20110601123522.GE23771@pengutronix.de> <20110601134749.GI3660@n2100.arm.linux.org.uk> <20110601141847.GG23771@pengutronix.de> <20110601142406.GJ3660@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110601142406.GJ3660@n2100.arm.linux.org.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:54:38 up 13:41, 30 users, load average: 1.21, 0.79, 0.87 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110622_035624_241264_A4ABD2BE X-CRM114-Status: GOOD ( 39.71 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Wolfgang Denk , alkml , Shawn Guo , Uwe =?iso-8859-15?Q?Kleine-K=F6nig?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 22 Jun 2011 07:57:03 +0000 (UTC) On Wed, Jun 01, 2011 at 03:24:06PM +0100, Russell King - ARM Linux wrote: > On Wed, Jun 01, 2011 at 04:18:47PM +0200, Sascha Hauer wrote: > > diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile > > index 9128fdd..e3b6f02 100644 > > --- a/arch/arm/boot/Makefile > > +++ b/arch/arm/boot/Makefile > > @@ -59,6 +59,11 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE > > > > endif > > > > +ifeq ($(CONFIG_ARM_PATCH_PHYS_VIRT),y) > > +$(obj)/uImage: $(obj)/zImage FORCE > > + @echo 'building uImages is incompatible with CONFIG_ARM_PATCH_PHYS_VIRT' > > + @false > > It may be better to drop the zImage dependency too, so that folk don't get > the message at the end of an otherwise successful kernel build - they may > decide to turn p2v patching off which would result in a rebuild. > > Or it could suggest the mkimage command which should be run, but with > inserted into it at the appropriate point - iow something > like: > > mkimage -A arm -O linux -T kernel -C none \ > -a -e \ > -n 'Linux-$(KERNELRELEASE)' -d arch/arm/boot/zImage uImage. > Coming back to this topic after a longer time, here is an updated patch doing exactly this. 8<------------------------------------------------------ [PATCH] ARM: do not allow to build uImages with ARM_PATCH_PHYS_VIRT U-Boot uImages expect a load address and a entry point in the image header. With CONFIG_ARM_PATCH_PHYS_VIRT these become variable and thus can not be compiled into the uImage. Instead of just failing we give a hint to the user how to generate an uImage for his hardware. Signed-off-by: Sascha Hauer --- arch/arm/boot/Makefile | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 9128fdd..934a67a 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -72,9 +72,19 @@ endif $(obj)/uImage: STARTADDR=$(LOADADDR) +ifeq ($(CONFIG_ARM_PATCH_PHYS_VIRT),y) +$(obj)/uImage: $(obj)/zImage FORCE + @echo 'CONFIG_ARM_PATCH_PHYS_VIRT is enabled, cannot build an uImage' + @echo 'with multiple start/load addresses. To generate an uImage' + @echo 'suitable for you hardware run:' + @echo '$(MKIMAGE) -A arm -O linux -T kernel -C none -a \ + -e -n 'Linux-$(KERNELRELEASE)' -d $< $@' + @false +else $(obj)/uImage: $(obj)/zImage FORCE $(call if_changed,uimage) @echo ' Image $@ is ready' +endif $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@