CryptoPkg/openssl: add openssl3 configure scripts

Rewrite the script to configure openssl 3.0 from scratch.  It's two
scripts now:

 * Tiny helper script, dumping the perl configdata as json.
 * Actual configure.py script, written in python, which copies over
   the generated files to openssl-gen and updates the OpensslLib*.inf
   file lists and build flags.

The configuration workflow has changed a bit:

 * All generated files are stored in the OpensslGen directory tree.
 * For ec/no-ec builds two different header files are used.  Default is
   the ec variant, and the new EDK2_OPENSSL_NOEC define is used to
   select the no-ec build.  A five line wrapper include is used to pick
   the one or the other.
 * For non-accel builds -DOPENSSL_NO_ASM on the command line is used
   (same as before).
 * For configration defines the OPENSSL_FLAGS_$(variant) variable is
   used, where variant is the architecture for the accelerated builds
   and 'NOASM' for the non-accelerated builds.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Brian J. Johnson <brian.johnson@hpe.com>
Tested-by: Kenneth Lautner <klautner@microsoft.com>
This commit is contained in:
Gerd Hoffmann
2023-08-03 12:37:22 +08:00
committed by mergify[bot]
parent 7cede6d5f4
commit 81f5aa0700
3 changed files with 416 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/perl
#
# write out configdata.pm as json
#
use strict;
use warnings;
use JSON;
BEGIN {
my $openssldir = shift;
push @INC, $openssldir;
}
use configdata qw/%config %target %unified_info/;
my %data;
$data{'config'} = \%config;
$data{'target'} = \%target;
$data{'unified_info'} = \%unified_info;
print encode_json(\%data)