From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by mail.openembedded.org (Postfix) with ESMTP id 72C96601D4 for ; Thu, 7 Apr 2016 11:57:08 +0000 (UTC) Received: from mail.nefkom.net (unknown [192.168.8.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3qgh0M4blrz3hjWd; Thu, 7 Apr 2016 13:57:07 +0200 (CEST) X-Auth-Info: Qn83XtFxuk+QIgydEhNgSlLZJ9lzojiIxx2mAgFKqKw= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTPSA id 3qgh0G5hPbzvdWS; Thu, 7 Apr 2016 13:57:00 +0200 (CEST) Message-ID: <57063CDB.5000801@denx.de> Date: Thu, 07 Apr 2016 12:56:27 +0200 From: Marek Vasut User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Ruslan Bilovol , openembedded-core@lists.openembedded.org References: <1460014829-27799-1-git-send-email-rbilovol@cisco.com> In-Reply-To: <1460014829-27799-1-git-send-email-rbilovol@cisco.com> Cc: xe-linux-external@cisco.com Subject: Re: [PATCH] kernel-uimage: build per-architecture target image X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2016 11:57:09 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 04/07/2016 09:40 AM, Ruslan Bilovol wrote: > Commit e69525: "kernel: Build uImage only when really > needed" hardcoded target kernel image to zImage for > case if uImage is generated by OpenEmbedded buildsystem. > > However not all kernel architectures support zImage > target, for example AArch64 doesn't, so building of > kernel is failing on this step. Moreover, possible > target images may vary depending on arch. > > So instead of hardcoding it to zImage, let it be > architecture-dependent. Currently added for and > verified with AArch64. > > Signed-off-by: Ruslan Bilovol > --- > meta/classes/kernel-uimage.bbclass | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass > index f73965b..a6a5912 100644 > --- a/meta/classes/kernel-uimage.bbclass > +++ b/meta/classes/kernel-uimage.bbclass > @@ -1,6 +1,8 @@ > inherit kernel-uboot > > python __anonymous () { > + import re > + > kerneltype = d.getVar('KERNEL_IMAGETYPE', True) > if kerneltype == 'uImage': > depends = d.getVar("DEPENDS", True) > @@ -13,7 +15,12 @@ python __anonymous () { > # KEEPUIMAGE == yes. Otherwise, we pack compressed vmlinux into > # the uImage . > if d.getVar("KEEPUIMAGE", True) != 'yes': > - d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage") > + kernelarch = d.getVar('ARCH', True) > + > + if re.match('arm64', kernelarch): target_image = 'Image' I'm not quite convinced it's a great idea to add arch-specific handling into generic bbclass. By checking kernel-uboot.bbclass, I see you only need to generate vmlinux for both the uImage and fitImage, so I suspect this should be set to "vmlinux" for both arm32 and arch64. What do you think ? > + else: target_image = 'zImage' > + > + d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", target_image) > } > > do_uboot_mkimage() { > -- Best regards, Marek Vasut