Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ruslan Bilovol <rbilovol@cisco.com>
To: Marek Vasut <marex@denx.de>, openembedded-core@lists.openembedded.org
Cc: xe-linux-external@cisco.com
Subject: Re: [PATCH] kernel-uimage: build per-architecture target image
Date: Tue, 12 Apr 2016 16:07:23 +0300	[thread overview]
Message-ID: <570CF30B.8090208@cisco.com> (raw)
In-Reply-To: <57063CDB.5000801@denx.de>

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 <rbilovol@cisco.com>
>> ---
>>   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() {
>>
>



      reply	other threads:[~2016-04-12 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  7:40 [PATCH] kernel-uimage: build per-architecture target image Ruslan Bilovol
2016-04-07 10:56 ` Marek Vasut
2016-04-12 13:07   ` Ruslan Bilovol [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570CF30B.8090208@cisco.com \
    --to=rbilovol@cisco.com \
    --cc=marex@denx.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=xe-linux-external@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox