From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mx.groups.io with SMTP id smtpd.web09.560.1632242113740690044 for ; Tue, 21 Sep 2021 09:35:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=EqKFvQXJ; spf=pass (domain: nuviainc.com, ip: 209.85.215.175, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f175.google.com with SMTP id k24so21232654pgh.8 for ; Tue, 21 Sep 2021 09:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=MHHOCsuw+jn6kNsXWE3sfiwvk2NSw6/SsDED/gAOoOo=; b=EqKFvQXJxq9W77kHLK14JL8ErwIXwONir1SLvA0b1L76XvwRQjE0Xe9c+BfZii6nJT kLOL9U1IlY1w7SpS8IYluvIaKPfhj2sHaQ6pIu2NDCLzvhn4TTQZwFqFtxlLVwEwy4an 5wkmNhCH78cS3ABNzTo1PuMyhoDsylauXBh2/lxmDlBM7xJ63GOrOG06r4RDio7M8stX UZZMBCxbjhHVbW9AHKU4rbmvpkkbgz+1LsIRWtGh4aGHUSUw3+s/rO6IJOrUg2+XtYyD 3wUqgRJ6fkd4i81HLFwGHea6mi6cSbMFB0iNw2UWNn1icm1qqor3FsoyEg+uNk/T/qlU kKLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=MHHOCsuw+jn6kNsXWE3sfiwvk2NSw6/SsDED/gAOoOo=; b=yitfaNspy6c1Xl+V78gb6pGYuestKmyM/P3dvbQudQrVbvgAYd6vHskWHXKtNf7/ul vMDRbESmn2SOIbQJ8FXk+CxOZbo/ZB12FtpjiClfodiqzRXgwlXX312WRpdfGp5ualzO I10M+NIsMGdfMnRT5639DebsjFweQwIzE+PMsj9huky/xvulbhs0nMTvdatBZnDhUBFV WwVvYUER/uDhYNIy3/nzN3sUspY8Ue8P9lo8JKx5+e/BAyxQiAkf6NvDO8KfH3T4ChpN t8JRqHJEUar9zrYr0WXYnc17n64q/Sg5gkQcsh/VwpoaMaw4lVOcctPhTfwVMFGWTUbh iqCg== X-Gm-Message-State: AOAM531R7I3me4ndrhkvVyorVks71q0GYhdD4cj0gR1PNh1sRWAV2/eU 5jorwO4AxX6RhpRHTBGHvidpoA== X-Google-Smtp-Source: ABdhPJwqGsNX8SYQ0un1ohzjHPtnli3bBbwdrzLZYGC3mk2gpCcTxoc4r3cFrAy3KZhCGPBJkV9E8Q== X-Received: by 2002:a62:8896:0:b0:437:701c:43d4 with SMTP id l144-20020a628896000000b00437701c43d4mr31437207pfd.21.1632242113009; Tue, 21 Sep 2021 09:35:13 -0700 (PDT) Return-Path: Received: from linbox.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id n19sm17797139pfa.60.2021.09.21.09.35.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Sep 2021 09:35:12 -0700 (PDT) Subject: Re: [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add IA32 support for py3 package creation batch script To: Jayaprakash Nevara , devel@edk2.groups.io Cc: Michael D Kinney References: <20210919122528.2184-1-n.jayaprakash@intel.com> <20210919122528.2184-2-n.jayaprakash@intel.com> From: "Rebecca Cran" Message-ID: <14c86990-fe49-f98d-7899-d6380a674011@nuviainc.com> Date: Tue, 21 Sep 2021 10:35:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210919122528.2184-2-n.jayaprakash@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US There are several lines with trailing whitespace. Could you fix them please? > git diff | grep " $" +echo Invalid command line arguments passed, please see the below usage instructions +   mkdir %OUT_FOLDER%\EFI\Tools +) +if not exist %OUT_FOLDER%\EFI\StdLib\lib\python36.8 ( +    echo Python EFI package available at %OUT_FOLDER% +echo Then use this script to create a Python EFI package On 9/19/21 6:25 AM, Jayaprakash Nevara wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3638 > > This change is to add IA32 support into py3 EFI package > creation batch script. Enhanced the script take Architecture > as an additional parameter. With this the script can be used > to create deployable Python 3.6.8 EFI package from X64 and IA32 builds > as required by the user > > Cc: Rebecca Cran > Cc: Michael D Kinney > Signed-off-by: Jayaprakash N > --- > .../Python/Python-3.6.8/Py368ReadMe.txt | 4 +- > .../Python-3.6.8/create_python368_pkg.bat | 62 ++++++++++++------- > 2 files changed, 41 insertions(+), 25 deletions(-) > > diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > index 94dbccc..8f4fdc6 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > @@ -118,11 +118,11 @@ system as follows: > A script, create_python368_pkg.bat , is provided which facilitates the population > of the target EFI package. Execute this script from within the > AppPkg/Applications/Python/Python-3.6.8 directory, providing the Tool Chain, Target > - Build and destination directory which is the path to the destination directory. > + Build, Architecture and Directory path to the destination directory. > The appropriate contents of the AppPkg/Applications/Python/Python-3.6.8/Lib and > Python368.efi Application from Build/AppPkg/RELEASE_VS2017/X64/ will be > ^^^^^^^^^^^^^^ > - copied into the specified destination directory. > + copied into the specified Destination directory. > > Replace "RELEASE_VS2017", in the source path, with values appropriate for your tool chain. > > diff --git a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat b/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat > index 6bbdbd9..2bb62b6 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat > +++ b/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat > @@ -2,47 +2,63 @@ > > set TOOL_CHAIN_TAG=%1 > set TARGET=%2 > -set OUT_FOLDER=%3 > +set ARCH=%3 > +set OUT_FOLDER=%4 > if "%TOOL_CHAIN_TAG%"=="" goto usage > if "%TARGET%"=="" goto usage > +if "%ARCH%"=="" goto usage > if "%OUT_FOLDER%"=="" goto usage > goto continue > > :usage > echo. > +echo Batch Script to create Python EFI Package. > echo. > +echo Invalid command line arguments passed, please see the below usage instructions > echo. > -echo Creates Python EFI Package. > -echo. > -echo "Usage: %0 " > -echo. > -echo ToolChain = one of VS2013x86, VS2015x86, VS2017, VS2019 > -echo Target = one of RELEASE, DEBUG > -echo OutFolder = Target folder where package needs to create > -echo. > +echo "Usage: %0 " > echo. > +echo ToolChain = one of VS2013x86, VS2015x86, VS2017, VS2019 > +echo Target = one of RELEASE, DEBUG > +echo Architecture = one of IA32, X64 > +echo OutFolder = Output directory for creating the package > echo. > > goto :eof > > :continue > cd ..\..\..\..\ > -IF NOT EXIST Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\X64\Python368.efi goto error > -mkdir %OUT_FOLDER%\EFI\Tools > -xcopy Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\X64\Python368.efi %OUT_FOLDER%\EFI\Tools\ /y > -mkdir %OUT_FOLDER%\EFI\StdLib\lib\python36.8 > -mkdir %OUT_FOLDER%\EFI\StdLib\etc > -xcopy AppPkg\Applications\Python\Python-3.6.8\Lib\* %OUT_FOLDER%\EFI\StdLib\lib\python36.8\ /Y /S /I > -xcopy StdLib\Efi\StdLib\etc\* %OUT_FOLDER%\EFI\StdLib\etc\ /Y /S /I > -goto all_done > - > -:error > -echo Failed to Create Python 3.6.8 Package, Python368.efi is not available on build location Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\X64\ > +if not exist Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python368.efi ( > + goto error > +) > > +if not exist %OUT_FOLDER%\EFI\Tools ( > + mkdir %OUT_FOLDER%\EFI\Tools > +) > +xcopy Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python368.efi %OUT_FOLDER%\EFI\Tools\ /y > > -:all_done > -exit /b %ec% > - > +if not exist %OUT_FOLDER%\EFI\StdLib\lib\python36.8 ( > + mkdir %OUT_FOLDER%\EFI\StdLib\lib\python36.8 > +) > +if not exist %OUT_FOLDER%\EFI\StdLib\etc ( > + mkdir %OUT_FOLDER%\EFI\StdLib\etc > +) > +xcopy AppPkg\Applications\Python\Python-3.6.8\Lib\* %OUT_FOLDER%\EFI\StdLib\lib\python36.8\ /Y /S /I > +xcopy StdLib\Efi\StdLib\etc\* %OUT_FOLDER%\EFI\StdLib\etc\ /Y /S /I > +echo. > > +if not x%OUT_FOLDER::=%==x%OUT_FOLDER% ( > + echo Python EFI package available at %OUT_FOLDER% > +) else ( > + echo Python EFI package available at %CD%\%OUT_FOLDER% > +) > +goto all_done > > +:error > +echo Failed to Create Python EFI Package > +echo Python368.efi is not available at Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\ > +echo Follow the instructions in Py368ReadMe.txt to build Python interpreter > +echo Then use this script to create a Python EFI package > > +:all_done > +exit /b %ERRORLEVEL%