[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ImageBuilder] uboot-script-gen: fix arm64 xen u-boot image generation


  • To: Grygorii Strashko <grygorii_strashko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Thu, 17 Apr 2025 13:29:15 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T8cSOcA6tZh3QpLyLSZ7HnTeCUHBldxUsp+r0svp+B8=; b=NWyHCWWS7QqGfFs4z64IhUd1bOqwAegvGpuZbsBbVWhkij+3HtCgIpelUn7mOthyjTkPNek2FaojScRdvh4eMQr+NkDhgsHAka5VxYUOC39PIUxLh+4/nuNCB+dzD0SL3MvxW4JXUkGLWTCs9pbliWlFuQDDdsXmQtM8dmLy5YHV8f5hf296KfvEwcJ/idQvOvWE5Pwm2B1SB6uZj02HxkC3hBvY1C38GSwLa6ubnUxClxt7BU9zOu5B+ZdZqAXh4DkTfYEZzzRvOhIh+W9JXfdRTnbVT9HrddhhYmZhtJTHL4D6MoBERQIP+roMOWfXO3Timf1SBMQl+BKF4nUClA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J5SJLVQhI1JpDrneDsWEHspqwQNQcYfi+c0aBlt6W4cTxiMlL2KWGe8T1cWYW9NUWKM44qsE4Z9nr7Tf45CXIsMkXlvaoyHayu6t2UOEzTxdVtdjpAavWRhFEgz/LrC4c16eWIjRJadcmoDI9KjR7XhqZB9KLTmvODXvsDbYeWiAKgcckpVD+9joegmFRm5P/sWr67WXRU6v9nw3R+IiKWU98NAFP7jWvzKpudmKQrht9aj1bGwjbTkAbs5xrgaFSx3yATXI4hdpqQFz5a1T2BrN5zU9NehD8vYw3OiaytkIkHyDk8Sc6PCaQKOm943wjrtKLC5fOsvGVS23WOdsZg==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 17 Apr 2025 12:29:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed Apr 16, 2025 at 5:10 PM BST, Grygorii Strashko wrote:
>
>
> On 16.04.25 17:26, Alejandro Vallejo wrote:
>> On Wed Apr 16, 2025 at 11:44 AM BST, Grygorii Strashko wrote:
>>>
>>>
>>> On 16.04.25 04:03, Stefano Stabellini wrote:
>>>> On Mon, 14 Apr 2025, Grygorii Strashko wrote:
>>>>> From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>>>>>
>>>>> The current code in generate_uboot_images() does not detect arm64 properly
>>>>> and always generates ARM u-boot image. This causes Xen boot issues.
>>>>>
>>>>> Fix it by searching for "ARM64" for AArch64 binary detection.
>>>>>
>>>>> - mkimage -l xen.ub
>>>>> Before:
>>>>> Image Type:   ARM Linux Kernel Image (uncompressed)
>>>>>
>>>>> After:
>>>>> Image Type:   AArch64 Linux Kernel Image (uncompressed)
>>>>>
>>>>> Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>>>>> ---
>>>>>    scripts/uboot-script-gen | 6 +++---
>>>>>    1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
>>>>> index a9f698f00fd1..c4d26caf5e0e 100755
>>>>> --- a/scripts/uboot-script-gen
>>>>> +++ b/scripts/uboot-script-gen
>>>>> @@ -815,13 +815,13 @@ function linux_config()
>>>>>    
>>>>>    generate_uboot_images()
>>>>>    {
>>>>> -    local arch=$(file -L $XEN | grep "ARM")
>>>>> +    local arch=$(file -L $XEN | grep -o "ARM64")
>>>>
>>>> My file -L gives:
>>>>
>>>> for arm32: ARM OpenFirmware [...]
>>>> for arm64: Aarch64
>>>>
>>>> So the ARM64 grep wouldn't work as intended. Is the version of `file'
>>>> that you are using really printing ARM64?
>>>
>>> Hm, yes.
>>>
>>>     file -L xen
>>>     xen: Linux kernel ARM64 boot executable Image, little-endian, 4K pages
>>>
>>>     file -v
>>>     file-5.41
>>>
>>> u-boot boot command:
>>>      bootm 0x4EA00000 - 0x4EE00000
>>>
>>>
>>>    If so, we can do:
>>>>
>>>>     file -L $XEN | grep -E 'ARM64|Aarch64'
>>>
>>> sure. I'll update.
>> 
>> Missing escape? I think it's needed even with single quotes.
>> 
>>    file -L $XEN | grep -E 'ARM64\|Aarch64'
>
> No. It's extended regular expressions ("-E") no need for escape.
> Also it works with both '' and "".

Ah, fair enough. My brain escaped the -E :)

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.