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

Re: [ImageBuilder] UBOOT_SOURCE/SCRIPTS variables must always be set


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: "Miccio, Luca" <luca.miccio@xxxxxxx>
  • Date: Tue, 19 Nov 2024 10:36:52 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.12) smtp.rcpttodomain=kernel.org 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=lC8+7P4BZ4TtVH7pSD2h0XJoYBoRY8fes6yNWaAApKs=; b=dH1uF9ZqRO439Xe7RBPclkTNhWNVzs5ccRa+SziXxsTdLvOTMrnAvJCHZu0MDb4eocp7rkPftVy+tZbTa0qiIyq38QGxrYt0z7jfrxnUUIxN3Nodfl4AtVAQltnqWsEjFtO6Ina1M1Km9XWlRPXA1PDQam99f0sdLNc9fOZtG+oEotulgnO9bMwiuEVcpaq23LR8A5dhKDGCL8xSjC/8KGQL0l0yODt7U5M/mIZysnE49A8QW91b5PahcNAvcYsY6yTFH5tZ0TC0icoHnysAoFY9lATk9NrE/njStu6/le6Qbbva3Jp3LDF6XORF58IiAOK3keFvC1FYZuWK19EaDA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NugkcZLAA63JwMXDdRkB1yQCMJJSqyO8n1OKynQkEjONjpfJLnAIEL8PaDdjCc804AdrLz9oBmujCHQbvB/ROmJC1H5aJ+EQAjc6ZI/iWsob/q9nSys//H9JJLo/oIm98Q1RDzxMEhRUh1qOLcaOYtM0s/Q+gKmoto76fDu7cUY3kGCWP5XnhU/GLvXocO7VQy34EYDW7JS0JI4p2jFn+SwjHFMkKtZ8TUonaSITlqsnBEnKsWzWsTHSIJ9rYhLiKgrD1Te+fxLxa6XbNtQNErivTAM0kQSZgCbYZyzv2HaraAmvasbTpfZuf3T4mXLO2KWPp598iEatcDPAqSabCw==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 19 Nov 2024 09:37:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Stefano,

On 11/19/2024 1:23 AM, Stefano Stabellini wrote:
> 
> 
> On Mon, 18 Nov 2024, Luca Miccio wrote:
>> The current README incorrectly omits the need for the UBOOT_SOURCE and
>> UBOOT_SCRIPT variables for uboot-script-gen to function properly.
>> Moreover, the script silently fails if these variables are not set.
>> Return an error if the the UBOOT_SCRIPT variable is not set and
>> correct the documentation accordingly.
>>
>> Signed-off-by: Luca Miccio <luca.miccio@xxxxxxx>
>> ---
>>  README.md                |  3 ++-
>>  scripts/uboot-script-gen | 12 ++++++++++++
>>  2 files changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/README.md b/README.md
>> index 4fcd908..ae2fdfd 100644
>> --- a/README.md
>> +++ b/README.md
>> @@ -272,7 +272,8 @@ Where:
>>
>>  - UBOOT_SOURCE and UBOOT_SCRIPT specify the output. They are optional
>>    as you can pass -o FILENAME to uboot-script-gen as a command line
>> -  parameter
>> +  parameter. It has to be set either in the config file or CLI argument
>> +  though.
>>
>>  - APPEND_EXTRA_CMDS: is optional and specifies the path to a text file
>>    containing extra u-boot commands to be added to the boot script before
>> diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
>> index dcf5bdb..b07cbf1 100755
>> --- a/scripts/uboot-script-gen
>> +++ b/scripts/uboot-script-gen
>> @@ -1210,6 +1210,18 @@ then
>>      UBOOT_SCRIPT="$uboot_out_opt".scr
>>      UBOOT_SOURCE="$uboot_out_opt".source
>>  fi
>> +
>> +if test ! "$UBOOT_SOURCE"
>> +then
>> +    echo "UBOOT_SOURCE not set, either specify it in the config or set it 
>> with the -o option"
>> +    exit 1
>> +fi
>> +
>> +if test ! "$UBOOT_SCRIPT"
>> +then
>> +    UBOOT_SCRIPT="$UBOOT_SCRIPT".scr
> 
> This doesn't look right? Did you mean:
> 
>   UBOOT_SCRIPT="${UBOOT_SOURCE%.source}.scr"
> 

Yes you're right. It's a typo. I will send a V2 right away.

> 
>> +fi
>> +
>>  if test "$fit_opt" && ! test "$FIT"
>>  then
>>      FIT="${UBOOT_SOURCE%.source}.fit"
>> --
>> 2.34.1
>>

Thanks,
Luca



 


Rackspace

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