From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.128.65; helo=mail-wm1-f65.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F02BB21A00AE6 for ; Tue, 27 Nov 2018 01:50:14 -0800 (PST) Received: by mail-wm1-f65.google.com with SMTP id y185so1159208wmd.1 for ; Tue, 27 Nov 2018 01:50:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CqzF7fLrQh+IusuXBMQqn6XdwJDBlDbUa9E+s7MtYLY=; b=uShaY7qIuKLQ2uu3ePm5pDKiIaXoanlbXq/6LHK0m49WhLVvXJRKcpHIZmEsc6PvdH /pB+nLRL8KU+B8UkeoaEVd/tEggla7AOlWwfuDiV0HJfPIfR7oujhgt6JmzDJcTlqZIT YoefdYlZ/moq9PlxcFB0sjpD6cFF4W26wa5cL6ZmL2x/2y8oEI20TKGIc1KbgmTiCqTS iLES7avOnhwdDoufT5AvtFrIJ8qCOiorecW/qUCmp24gYlWLK6CzsddMqf3QeihA4HBS 9u/eYXfmA8oVZBHMfRG/msdamYdyONpiqRdj3dOzJUWAa457c1KUaSbMHsbppP7ej5yX uBzg== X-Gm-Message-State: AGRZ1gJDi/QwpDX90eiyPnL53iFOlAHM88cdfsFpENUuZTfU9Ty6+OXp 23vR7fLYV6AOnwmzAOBwZUcF3g5iI00= X-Google-Smtp-Source: AFSGD/WKgLqdR/ovsWxHm2sofS8AsEsKVEyRLrgQ5lnGsIyKot+V03UJ0neoeHDTUaMqsb/+1Yn+NQ== X-Received: by 2002:a1c:1f11:: with SMTP id f17mr26043342wmf.56.1543312212713; Tue, 27 Nov 2018 01:50:12 -0800 (PST) Received: from ?IPv6:2a01:e35:8a1f:dc10:bc9e:f614:2d6b:7cc9? ([2a01:e35:8a1f:dc10:bc9e:f614:2d6b:7cc9]) by smtp.gmail.com with ESMTPSA id v5sm6090704wrn.71.2018.11.27.01.50.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 01:50:11 -0800 (PST) To: Lokesh B V , edk2-devel@lists.01.org References: <[edk2] [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool> <1543307711-17472-1-git-send-email-lokesh.bv@arm.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: Date: Tue, 27 Nov 2018 10:50:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <1543307711-17472-1-git-send-email-lokesh.bv@arm.com> Subject: Re: [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 09:50:15 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, On 27/11/18 9:35, Lokesh B V wrote: > As the GenBin tool is necessary for SCT build, it is appropriate to > support it's build in the SCT build procedure. > > SctPkg/Tools: Fix incorrect line ending detection by GenBin tool > > Some windows editors uses "\r\n" for line feed. While processing uefi testcase > info file, the GenBin tool logic to skip line feed doesn't consider the presence > of carraige return(\r) in line feed. So this results in incorrect format error. Minor typo: "carriage" > > Cc: Supreeth Venkatesh > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Lokesh B V > --- > .gitignore | 1 + > uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c | 3 +++ > uefi-sct/SctPkg/build.sh | 31 ++++++++++++++++------------ > 3 files changed, 22 insertions(+), 13 deletions(-) > > diff --git a/.gitignore b/.gitignore > index 821ed66..3b8d818 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -1,2 +1,3 @@ > Build/ > tags/ > +*.[od] > diff --git a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c > index 61bb35b..4eaefcc 100644 > --- a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c > +++ b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c > @@ -2,6 +2,7 @@ > > Copyright 2006 - 2010 Unified EFI, Inc.
> Copyright (c) 2010 Intel Corporation. All rights reserved.
> + Copyright (c) 2018 ARM Ltd. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -176,6 +177,7 @@ Trim ( > for (Index1 = 0; Index1 < Length; Index1++) { > if ((String[Index1] != ' ' ) && > (String[Index1] != '\t') && > + (String[Index1] != '\r') && > (String[Index1] != '\n')) { > break; > } > @@ -193,6 +195,7 @@ Trim ( > for (Index1 = 0; Index1 < Length; Index1++) { > if ((String[Length - 1 - Index1] != ' ' ) && > (String[Length - 1 - Index1] != '\t') && > + (String[Length - 1 - Index1] != '\r') && > (String[Length - 1 - Index1] != '\n')) { > break; > } > diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh > index 73581c9..6198532 100755 > --- a/uefi-sct/SctPkg/build.sh > +++ b/uefi-sct/SctPkg/build.sh > @@ -1,7 +1,7 @@ > #!/bin/bash > # > # Copyright 2006 - 2015 Unified EFI, Inc.
> -# Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.
> +# Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.
> # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -228,21 +228,26 @@ else > echo using prebuilt tools > fi > > -# Copy GenBin file to Base tools directory > +if [[ ! -e $EDK_TOOLS_PATH/Source/C/bin/GenBin ]] > +then > + # build the GenBin if it doesn't yet exist > + echo Building GenBin > + make -C $EDK_TOOLS_PATH/../SctPkg/Tools/Source/GenBin > + status=$? > + if test $status -ne 0 > + then > + echo Error while building GenBin > + exit -1 > + fi > +else > + echo using prebuilt GenBin > +fi > + > +# Copy GenBin file to Base tools bin directory > DEST_DIR=`GetEdkToolsPathBinDirectory` > # Ensure the directory exist > mkdir -p $DEST_DIR > -case `uname -m` in > - x86_64) > - cp SctPkg/Tools/Bin/GenBin_lin_64 $DEST_DIR/GenBin > - ;; > - x86_32) > - cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin > - ;; > - *) > - cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin > - ;; > -esac > +cp $EDK_TOOLS_PATH/Source/C/bin/GenBin $DEST_DIR/GenBin > > # > # Build the SCT package >