public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Add support for building extra packages
@ 2020-11-12 11:02 Grant Likely
  2020-11-13 22:45 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2020-11-12 11:02 UTC (permalink / raw)
  To: devel; +Cc: nd, Grant Likely

The build.sh script is very useful for setting up the build environment
before calling the package build. Sometimes additional packages are
needed when building the SCT. (e.g., it is useful to build ShellPkg).
Refactor the build code to allow additional DSCs to be added to the
build.

Signed-off-by: Grant Likely <grant.likely@arm.com>
---
 uefi-sct/SctPkg/build.sh | 34 +++++++++++++---------------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh
index cad17ccd..e7c18fef 100755
--- a/uefi-sct/SctPkg/build.sh
+++ b/uefi-sct/SctPkg/build.sh
@@ -250,28 +250,20 @@ mkdir -p $DEST_DIR
 cp $EDK_TOOLS_PATH/Source/C/bin/GenBin $DEST_DIR/GenBin
 
 #
-# Build the SCT package
+# Build the packages needed for the SCT
+# Set $DSC_EXTRA to any extra packages needed for the build
 #
-build -p SctPkg/UEFI/UEFI_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
-
-# Check if there is any error
-status=$?
-if test $status -ne 0
-then
-echo Could not build the UEFI SCT package
-        exit -1
-fi
-
-build -p SctPkg/UEFI/IHV_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
-
-# Check if there is any error
-status=$?
-if test $status -ne 0
-then
-echo Could not build the IHV SCT package
-        exit -1
-fi
-
+for DSC in SctPkg/UEFI/UEFI_SCT.dsc SctPkg/UEFI/IHV_SCT.dsc $DSC_EXTRA
+do
+	build -p $DSC -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
+	# Check if there is any error
+	status=$?
+	if test $status -ne 0
+	then
+		echo Could not build package $DSC
+		exit -1
+	fi
+done
 
 #
 # If the argument is clean, then don't have to generate Sct binary.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] Add support for building extra packages
  2020-11-12 11:02 [PATCH] Add support for building extra packages Grant Likely
@ 2020-11-13 22:45 ` Laszlo Ersek
  2020-11-16 11:55   ` Grant Likely
  0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2020-11-13 22:45 UTC (permalink / raw)
  To: devel, grant.likely; +Cc: nd

On 11/12/20 12:02, Grant Likely wrote:
> The build.sh script is very useful for setting up the build environment
> before calling the package build. Sometimes additional packages are
> needed when building the SCT. (e.g., it is useful to build ShellPkg).
> Refactor the build code to allow additional DSCs to be added to the
> build.
> 
> Signed-off-by: Grant Likely <grant.likely@arm.com>
> ---
>  uefi-sct/SctPkg/build.sh | 34 +++++++++++++---------------------
>  1 file changed, 13 insertions(+), 21 deletions(-)
> 
> diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh
> index cad17ccd..e7c18fef 100755
> --- a/uefi-sct/SctPkg/build.sh
> +++ b/uefi-sct/SctPkg/build.sh
> @@ -250,28 +250,20 @@ mkdir -p $DEST_DIR
>  cp $EDK_TOOLS_PATH/Source/C/bin/GenBin $DEST_DIR/GenBin
>  
>  #
> -# Build the SCT package
> +# Build the packages needed for the SCT
> +# Set $DSC_EXTRA to any extra packages needed for the build
>  #
> -build -p SctPkg/UEFI/UEFI_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
> -
> -# Check if there is any error
> -status=$?
> -if test $status -ne 0
> -then
> -echo Could not build the UEFI SCT package
> -        exit -1
> -fi
> -
> -build -p SctPkg/UEFI/IHV_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
> -
> -# Check if there is any error
> -status=$?
> -if test $status -ne 0
> -then
> -echo Could not build the IHV SCT package
> -        exit -1
> -fi
> -
> +for DSC in SctPkg/UEFI/UEFI_SCT.dsc SctPkg/UEFI/IHV_SCT.dsc $DSC_EXTRA
> +do
> +	build -p $DSC -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
> +	# Check if there is any error
> +	status=$?
> +	if test $status -ne 0
> +	then
> +		echo Could not build package $DSC
> +		exit -1
> +	fi
> +done
>  
>  #
>  # If the argument is clean, then don't have to generate Sct binary.
> 

meta: Grant, if the patch is not for the main "edk2" project /
repository, please place the name of the project / repository in the
bracketed subject prefix, e.g., [edk2-platforms PATCH].

CC'ing maintainers / reviewers is also highly recommended.

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] Add support for building extra packages
  2020-11-13 22:45 ` [edk2-devel] " Laszlo Ersek
@ 2020-11-16 11:55   ` Grant Likely
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2020-11-16 11:55 UTC (permalink / raw)
  To: Laszlo Ersek, devel; +Cc: nd



On 13/11/2020 22:45, Laszlo Ersek wrote:
> On 11/12/20 12:02, Grant Likely wrote:
> 
> meta: Grant, if the patch is not for the main "edk2" project /
> repository, please place the name of the project / repository in the
> bracketed subject prefix, e.g., [edk2-platforms PATCH].
> 
> CC'ing maintainers / reviewers is also highly recommended.

Will do. Sorry for the noise.

g.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-16 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-12 11:02 [PATCH] Add support for building extra packages Grant Likely
2020-11-13 22:45 ` [edk2-devel] " Laszlo Ersek
2020-11-16 11:55   ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox