From: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Agyeman, Prince" <prince.agyeman@intel.com>
Cc: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"Sinha, Ankit" <ankit.sinha@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"Oram, Isaac W" <isaac.w.oram@intel.com>,
"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-devel] [edk2-platforms/devel-MinPlatform] [PATCH v3 0/2] Adding python build script.
Date: Sat, 4 May 2019 02:14:21 +0000 [thread overview]
Message-ID: <49AB4ACB9627B8468F29D589A27B7455888E6F74@ORSMSX122.amr.corp.intel.com> (raw)
In-Reply-To: <cover.1556831443.git.prince.agyeman@intel.com>
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Agyeman, Prince
> Sent: Friday, May 3, 2019 4:19 PM
> To: devel@edk2.groups.io
> Cc: Kubacki, Michael A <michael.a.kubacki@intel.com>; Desimone,
> Nathaniel L <nathaniel.l.desimone@intel.com>; Sinha, Ankit
> <ankit.sinha@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Oram, Isaac W <isaac.w.oram@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [edk2-devel] [edk2-platforms/devel-MinPlatform] [PATCH v3 0/2]
> Adding python build script.
>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Ankit Sinha <ankit.sinha@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Isaac W Oram <isaac.w.oram@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
>
> Contributed-under: TianoCore Contribution Agreement 0.1
> Signed-off-by: Agyeman <prince.agyeman@intel.com>
>
>
> changes from v2:
> - fixed pep8 violations
> - implemented v2 review recommendations
> - added clean flag to clean specified platform
>
> Overview:
> WORKSPACE
> |
> |------edk2
> |------edk2-non-osi
> |------edk2-platforms
> | |--Platform
> | |---Intel
> | | |------build.cfg: Default build settings. These are overridden by
> | | | platform specific settings (build_config.cfg) and
> | | | then command-line settings.
> | | |
> | | |------build_bios.py: Main build script. Generic pre-build, build,
> | | | post-build, and clean functions.
> | | |
> | | |------ClevoOpenBoardPkg
> | | | |------N1xxWU
> | | | |---build_config.cfg: N1xxWU specific build
> | | | settings environment variables.
> | | |
> | | |------KabylakeOpenBoardPkg
> | | | |------KabylakeRvp3
> | | | |---build_config.cfg: KabylakeRvp3 specific
> | | | | build settings, environment variables.
> | | | |---build_board.py: Optional board-specific pre-build,
> build
> | | | and clean post-build functions.
> | | |------PurleyOpenBoardPkg
> | | | |------BoardMtOlympus
> | | | |---build_config.cfg: BoardMtOlympus specific
> | | | build settings, environment variables.
> | | | |---build_board.py: Optional board-specific pre-build,
> | | | | build, post-build and clean functions.
> |------FSP
>
>
> -------------------
> Details:
> -------------------
> What it is
> ----------
> These patches add python BIOS build scripts and build configuration files to
> build platforms under Intel/Platform.
>
>
> Why
> ----
> The reason behind this implementation is to use a cross platform build script
> to build minplaform BIOS.
>
>
> How it is done
> ----------------
> The python files:
> -----------------
> build_bios.py: The main build file. This script sets up the edk2 build
> enviroment using the default build.cfg settings and platform specific settings.
> It uses the configurations found in the build.cfg file to locate the platforms
> that are configured to use this build script.
> The path to each of the platform settings can be found under the
> "PLATFORMS"
> field within the build.cfg file. The platform specific settings are located in the
> platform's main directory.
> Example edk2-
> platforms/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg.
>
> The build_bios.py script contains the four main functions:
> - pre_build: Sets up the edk2 build enviroment variables, target.txt file
> - build: Uses the configurations to Build BIOS
> - post_build: Does post build processes like cleaning up files
> generated during the build process
> - clean: Cleans up the build directory.
>
> There are four addtional functions that dynamically import functions from
> the board's Optional/Additional python script if specified in board settings
> file's ADDITIONAL_SCRIPTS These four functions are the pre_build_board,
> build_board, post_build_board, clean_ex functions
>
>
> Board additional (Optional) python build script:
> ------------------------------------------------
> These are python scripts located in the board's main directory, An example
> Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_board.py
> If added, its path must be specified in board's settings file, under the field
> ADDITIONAL_SCRIPTS.
> Example ADDITIONAL_SCRIPTS =
> PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> If specified, the build_board, pre_build_board, post_build_board, clean_ex
> must be defined even if they are not use
>
>
> The config files
> -----------------
> build.cfg:
> -----------
> This is file contains the default BIOS build configuration.
>
> The default configurations are defined under the "DEFAULT_CONFIG" section
> of the file.
> Each of these can be overridden by the board specific setting as defined in
> the board's build config file. All paths must be separated by forward slashes.
> All the paths in the main build.cfg are relative to the minplaform
> WORKSPACE.
> Example:
> --------
> [DEFAULT_CONFIG]
> MIN_PACKAGE_TOOLS = edk2-
> platforms/Platform/Intel/MinPlatformPkg/Tools
>
> The PLATFORMS field in the build.cfg file informs build_bios.py about the
> available platforms that can be built with the build_bios.py.
> The path to the board specific config file must be relative to location of
> build_bios.py, Platform/Intel. It is in the format Boardname = BoardPath
>
> Example:
> --------
> [PLATFORMS]
> KabylakeRvp3 = KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
>
>
> Board Specific Build Settings file:
> ----------------------------------------
> This file is located in the board's main directory.
> The CONFIG field contains all the build enviroment variables.
> These values will override any the were specific under DEFAULT_CONFIG in
> the default build.cfg file.
> Example is Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
>
>
> Building BIOS
> -------------
>
> python build_bios.py -p BOARDNAME -t TOOLCHAIN
>
> usage: build_bios.py [-h] --platform
> {N1xxWU,KabylakeRvp3,BoardMtOlympus}
> [--toolchain TOOLCHAIN] [--DEBUG] [--RELEASE]
> [--TEST_RELEASE] [--RELEASE_PDB] [--list] [--cleanall]
> [--capsule] [--silent] [--performance] [--fsp] Build Help
>
> optional arguments:
> -h, --help show this help message and exit
> --platform {N1xxWU,KabylakeRvp3,BoardMtOlympus}, -p
> {N1xxWU,KabylakeRvp3,BoardMtOlympus}
> the platform to build
> --toolchain TOOLCHAIN, -t TOOLCHAIN
> using the Tool Chain Tagname to build the
> platform, overriding target.txt's TOOL_CHAIN_TAG
> definition
> --DEBUG, -d debug flag
> --RELEASE, -r release flag
> --TEST_RELEASE, -tr test release flag
> --RELEASE_PDB, -rp release flag
> --list, -l lists available platforms
> --cleanall cleans all
> --clean cleans specific platform
> --capsule capsule build enabled
> --silent silent build enabled
> --performance performance build enabled
> --fsp fsp build enabled
>
> Agyeman (2):
> Platform/Intel: Added python build script.
> Updated the build instructions to include the python script build
> instructions
>
> .../ClevoOpenBoardPkg/N1xxWU/build_config.cfg | 33 +
> .../KabylakeRvp3/build_board.py | 68 ++
> .../KabylakeRvp3/build_config.cfg | 34 +
> .../BoardMtOlympus/build_board.py | 177 ++++
> .../BoardMtOlympus/build_config.cfg | 32 +
> Platform/Intel/build.cfg | 56 +
> Platform/Intel/build_bios.py | 976 ++++++++++++++++++
> ReadMe.md | 76 ++
> 8 files changed, 1452 insertions(+)
> create mode 100644
> Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg
> create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_board.py
> create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> create mode 100644
> Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> create mode 100644
> Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_config.cfg
> create mode 100644 Platform/Intel/build.cfg create mode 100644
> Platform/Intel/build_bios.py
>
> --
> 2.19.1.windows.1
>
>
>
prev parent reply other threads:[~2019-05-04 2:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 23:19 [edk2-platforms/devel-MinPlatform] [PATCH v3 0/2] Adding python build script Agyeman, Prince
2019-05-03 23:19 ` [edk2-platforms/devel-MinPlatform] [PATCH v3 1/2] Platform/Intel: Added " Agyeman, Prince
2019-05-04 0:36 ` [edk2-devel] " Nate DeSimone
2019-05-04 2:14 ` Kubacki, Michael A
2019-05-03 23:19 ` [edk2-platforms/devel-MinPlatform] [PATCH v3 2/2] Updated the build instructions to include the python script build instructions Agyeman, Prince
2019-05-04 0:36 ` [edk2-devel] " Nate DeSimone
2019-05-04 2:14 ` Kubacki, Michael A
2019-05-04 0:36 ` [edk2-devel] [edk2-platforms/devel-MinPlatform] [PATCH v3 0/2] Adding python build script Nate DeSimone
2019-05-04 2:14 ` Kubacki, Michael A [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49AB4ACB9627B8468F29D589A27B7455888E6F74@ORSMSX122.amr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox