From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) by mail.openembedded.org (Postfix) with ESMTP id AEDDC65CBB for ; Tue, 12 Apr 2016 13:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2225; q=dns/txt; s=iport; t=1460466448; x=1461676048; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=xcRWWqPFE/0RkU67+J4T6IRH+tMmHTLl+It5sylyAuQ=; b=HTm+vKzMTgLR6cJTWJIiCMY7LDatlIKrwG9sUuycQfPAdPNt6/lJr3ar t1+3HN9DtsVE+rZ5otjtEgAkmzaMDVq8YAkTNhUC2MAVtoIsAyUSdefwq WILhK6n1fxfuv4A7UGxlR6Gw/o8r8Mn6jShg+H1I1VlC4N2WPqm655uTT w=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DOAQDX8QxX/xbLJq1ehQe4WIIPAQ2Bd?= =?us-ascii?q?IYNAoFpFAEBAQEBAQFlJ4RCAQEEIxVAARALDgQGAgIFFgsCAgkDAgECATcOBgE?= =?us-ascii?q?MBgIBAYgjrk+SIwEBAQEBAQEBAQEBAQEBAQEBGQtxhSWDSYEChA2DMoJWAQSOQ?= =?us-ascii?q?IlIjg2JOoVWjyceAQFCg2o5MIhIgT0BAQE?= X-IronPort-AV: E=Sophos;i="5.24,474,1454976000"; d="scan'208";a="676712414" Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2016 13:07:23 +0000 Received: from [10.61.89.247] (ams3-vpn-dhcp6648.cisco.com [10.61.89.247]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id u3CD7NiM004266; Tue, 12 Apr 2016 13:07:23 GMT To: Marek Vasut , openembedded-core@lists.openembedded.org References: <1460014829-27799-1-git-send-email-rbilovol@cisco.com> <57063CDB.5000801@denx.de> From: Ruslan Bilovol Message-ID: <570CF30B.8090208@cisco.com> Date: Tue, 12 Apr 2016 16:07:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <57063CDB.5000801@denx.de> X-Auto-Response-Suppress: DR, OOF, AutoReply 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: Tue, 12 Apr 2016 13:07:27 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 04/07/2016 01:56 PM, Marek Vasut wrote: > 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 ? Yes, it makes sense for me. I'll send updated patch soon Best regards, Ruslan > >> + else: target_image = 'zImage' >> + >> + d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", target_image) >> } >> >> do_uboot_mkimage() { >> >