* [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build [not found] <[edk2] [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool> @ 2018-11-27 8:35 ` Lokesh B V 2018-11-27 9:50 ` Philippe Mathieu-Daudé 0 siblings, 1 reply; 3+ messages in thread From: Lokesh B V @ 2018-11-27 8:35 UTC (permalink / raw) To: edk2-devel 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. Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Lokesh B V <lokesh.bv@arm.com> --- .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.<BR> Copyright (c) 2010 Intel Corporation. All rights reserved.<BR> + Copyright (c) 2018 ARM Ltd. All rights reserved.<BR> 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.<BR> -# Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.<BR> # # 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 -- 2.7.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build 2018-11-27 8:35 ` [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build Lokesh B V @ 2018-11-27 9:50 ` Philippe Mathieu-Daudé 2018-11-27 10:26 ` Lokesh Belathur Veerappa 0 siblings, 1 reply; 3+ messages in thread From: Philippe Mathieu-Daudé @ 2018-11-27 9:50 UTC (permalink / raw) To: Lokesh B V, edk2-devel 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 <supreeth.venkatesh@arm.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Lokesh B V <lokesh.bv@arm.com> > --- > .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.<BR> > Copyright (c) 2010 Intel Corporation. All rights reserved.<BR> > + Copyright (c) 2018 ARM Ltd. All rights reserved.<BR> > > 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.<BR> > -# Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.<BR> > +# Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.<BR> > # > # 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 > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build 2018-11-27 9:50 ` Philippe Mathieu-Daudé @ 2018-11-27 10:26 ` Lokesh Belathur Veerappa 0 siblings, 0 replies; 3+ messages in thread From: Lokesh Belathur Veerappa @ 2018-11-27 10:26 UTC (permalink / raw) To: Philippe Mathieu-Daudé, edk2-devel@lists.01.org Hi Philippe, -----Original Message----- From: Philippe Mathieu-Daudé <philmd@redhat.com> Sent: Tuesday, November 27, 2018 3:20 PM To: Lokesh Belathur Veerappa <Lokesh.BV@arm.com>; edk2-devel@lists.01.org Subject: Re: [edk2] [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build 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" Thanks, will update the patch. > > Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Lokesh B V <lokesh.bv@arm.com> > --- > .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.<BR> > Copyright (c) 2010 Intel Corporation. All rights reserved.<BR> > + Copyright (c) 2018 ARM Ltd. All rights reserved.<BR> > > 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.<BR> -# Copyright (c) 2011 > - 2015, ARM Ltd. All rights reserved.<BR> > +# Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.<BR> > # > # 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 > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-27 10:26 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <[edk2] [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool> 2018-11-27 8:35 ` [PATCH] [edk2-test][PATCH v2] SctPkg/build: Add support for GenBin tool build Lokesh B V 2018-11-27 9:50 ` Philippe Mathieu-Daudé 2018-11-27 10:26 ` Lokesh Belathur Veerappa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox