From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.web10.2157.1632360564891772889 for ; Wed, 22 Sep 2021 18:29:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=8G2MUXsK; spf=pass (domain: nuviainc.com, ip: 209.85.216.41, mailfrom: rebecca@nuviainc.com) Received: by mail-pj1-f41.google.com with SMTP id cu17-20020a17090afa9100b0019e7708e61cso176121pjb.5 for ; Wed, 22 Sep 2021 18:29:24 -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=tc5PLeugzXF2mpq07CpPRpf1gp6fBgTjrzQtmtaCG/o=; b=8G2MUXsKR5Zep1y7i0aH1qLHIX63641rEd5I9JzWjLsEtRqkSaRCMk1BjnC1mNkaXM muemJCL9ugednyEOJZQI7n9NZX1ncUKFqL4OQy6FMtvI85ke33PtrncW2eTdQyT0sZoB W1Q+urrzrgUpNSD+n+2TRd09zG3t/YsZ0mSxvajx2QJqTlRUID9MKKzJXjxRI8kW5kFP oaK3CYBZZtF/M09SLykFf4cjuZYv68Nzf8zrh7LsA8hQrnJIjWavoyVBbmBlUO9QCV6u aQdk11HiyjWCSMLeYgso4PP0yxgo8gPoBU9SBU/WaI3G6C9N8ZpnN5tX3ZUvKAXJ5pAV CdzQ== 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=tc5PLeugzXF2mpq07CpPRpf1gp6fBgTjrzQtmtaCG/o=; b=lV9ovUhGKM+baOX8xoA7Ygjq9UPRM/xgyOWcT4miqM1QG5jmmng0u/3C00dgwneV6D o+aSFYrXJCFiTkNQL1vVjrbj+YVmyrWmW4OvHWN+APA4RCaYHpKMDvh+OiCnYKV0FeE+ q5Y5DUHoYIoFB55XDHXYY2mzg4x63qLkO7CwmNbzPEpcXt2dHyhb9fPr4fbctgz0VGze xzXddGH33WPCJqUhWWb3LJ8INeg2bg0OQZLO1TJHA/PJrvrSnOJm8kZ7mK3BFaoAjokl VVe3nxkUQVsgWeT060S5WL+AJEgzCaOdB4JpTcuY13hlMvLq6p1SZNhOplhXqOoVPBrj 47Cw== X-Gm-Message-State: AOAM530vm1Vl7mFBB1FskOwa8TBRYrMuXCdYn1l3GjAIdMQNLtjfbOOr doixHS3DD4+7S6lnj/XCo4K6Aw== X-Google-Smtp-Source: ABdhPJxwpDOep2cXRVgWDXVzDDXlTBLoiH77OOwYQEYEU3YWThHSV4oik57baMcoUbdriYUpF9pGHQ== X-Received: by 2002:a17:90a:b794:: with SMTP id m20mr2350318pjr.178.1632360564377; Wed, 22 Sep 2021 18:29:24 -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 u24sm3730462pfm.85.2021.09.22.18.29.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 18:29:23 -0700 (PDT) Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add IA32 support for py3 package creation batch script To: "Jayaprakash, N" , "devel@edk2.groups.io" Cc: "Kinney, Michael D" References: <20210919122528.2184-1-n.jayaprakash@intel.com> <20210919122528.2184-2-n.jayaprakash@intel.com> <14c86990-fe49-f98d-7899-d6380a674011@nuviainc.com> From: "Rebecca Cran" Message-ID: <2197330e-56a1-3827-8bd2-57b2ba0ca57e@nuviainc.com> Date: Wed, 22 Sep 2021 19:29:22 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US You should be able to use the same branch. -- Rebecca Cran On 9/21/21 8:33 PM, Jayaprakash, N wrote: > Hi Rebecca, > > Can I resubmit the patch after making these changes in the same development branch or does it require creating a new branch? > > Regards, > JP > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Rebecca Cran > Sent: 21 September 2021 22:05 > To: Jayaprakash, N ; devel@edk2.groups.io > Cc: Kinney, Michael D > Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add IA32 support for py3 package creation batch script > > 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% > > > >