The 'dpkg' utility is required in order to build Debian packages. If it is not
installed and available on the build system, the 'make' instructions will fail
with a Python traceback. Fix this by detecting its availability and doing a
graceful exit if not (or simply skip the step).
Tracked-On: #7109
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Co-authored-by: David Kinder <david.b.kinder@intel.com>
Currently, if board.xml and scenario.xml are specified,
the variable $(BOARD) and $(SCENARIO) are path, but the
parameters passed in to generate debian package should be
board and scenario name. So add a conversion function to
ensure that the function passed to the generated debian
package is board and scenario name.
Tracked-On: #6688
Signed-off-by: Hu Fenglin <fenglin.hu@intel.com>
1. "make clean && make BOARD=nuc11tnbi5 SCENARIO=shared" will generate the acrn debian package.
2. "make clean && make board_inspector" will generate the acrn board_inspector debian package
Tracked-On: #6688
Signed-off-by: Hu Fenglin <fenglin.hu@intel.com>
Add a couple of missing dependencies in the ACRN Makefiles:
1. 'acrn.bin' is required before the hypervisor can be installed
2. The 'acrn_mngr.h' needs to be installed ('tools-install') in
the build folder.
Tracked-On: #6360
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
User could use make targz-pkg command to generate tar package in
build directory,which could help user simplify the process
of installing acrn hypervisor in target board. user need to copy the
tarball package to target board,and extract it to "/" directory.
Tracked-On: #6355
Signed-off-by: liu hang1 <hang1.liu@intel.com>
Reviewed-by: VanCutsem, Geoffroy <geoffroy.vancutsem@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
The ACRN life_mngr is not built by default as it is a component
that will run in the User VM. Instead we create a 'life_mngr'
(and 'life_mngr-install') targets to build it individually from
the top-level folder.
Tracked-On: #5660
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Add the 'hvdefconfig' as a pre-requisite before building the hypervisor.
This solves the problem when using multiple parallel threads (i.e.
"make -j2").
Tracked-On: #5874
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
The 'iasl' binary (from the acpica) package can be installed in
different locations depending on the distribution. By default,
we look for it under '/usr/sbin/'. But it is also often found
under '/usr/bin'. This can be overwritten by setting the ASL_COMPILER
flag when compiling ACRN.
This patch goes one step further and automatically determine where
'iasl' is on the development system if the ASL_COMPILER variable
has not been set already.
Tracked-On: #5854
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Enhance the 'misc/Makefile' to improve readability by grouping the
tools based on whether these are `services` or `debug_tools`
(following the folders they're in) and also create separate build
folders instead of putting *both* services and debug_tools in the
build/misc/debug_tools folder (default value).
Tracked-On: #5793
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This patch allows the invocation of configuration-related hypervisor
targets from the top-level Makefile. The configuration summary is now
reported by the hypervisor rather than inspecting the variables directly.
Tracked-On: #5772
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The top-level Makefile should not define any default value as the
hypervisor may have its own configurations set by previous builds.
This patch also changes the hypervisor default RELEASE to `n`.
Tracked-On: #5772
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
For clarity, we now prefer y|n over 0|1 as the values of boolean options on
make command lines. This patch applies this preference to the Makefile of
the device model and tools, while RELEASE=0|1 is still supported for
backward compatibility.
Tracked-On: #5772
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
We already passes BOARD, SCENARIO and RELEASE to recursive `make`, which
makes it unnecessary to export those variables. This patch explicitly
passes TOOLS_OUT as well and removes the explicit export for clarity.
Tracked-On: #5772
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Remove vm_configs folder and move all the XML files and generic code example into config_tools/data
Tracked-On: #5644
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
With Kconfig being removed from the configuration process and configuration
files generated in build directories, we no longer need KCONFIG_FILE or
TARGET_DIR in the top-level Makefile. This patch removes rules that infer
BOARD/SCENARIO from Kconfig files or specify where generated configuration
files are saved.
A warning is generated if a user defines TARGET_DIR while the build can
proceed normally. An error is raised if a user defines KCONFIG_FILE.
v2:
* BOARD/SCENARIO now accept paths relative to where Makefile resides in
Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Explicitly set the SHELL variable in the top-level Makefile. This ensures that
'echo -e' as used in the Makefile behaves correctly on various systems. It does
require /bin/bash to be present but that is probably true on many systems.
Tracked-On: #5588
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This reverts commit e2590d88aa. It introdcues a
regression for systems that have '/bin/sh' pointing at '/bin/bash'.
Tracked-On: #5588
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Fix the formatting for the cfg.log (build/hypervisor/cfg.log) generation. The
'echo' command uses '-e' but that gets put as-is into the log file. Removing
the '-e' argument fixes it.
Tracked-On: #5561
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Since now we support direct boot only, we don't have to use FIRMWARE variable
to differentiate between sbl/GRUB and UEFI boot.
After this change:
- "FIRMWARE=sbl/uefi" should be removed from make commands.
- the firmware name is removed from the installed ACRN image. For example,
acrn.apl-up2.sbl.sdc.32.out will be changed to acrn.apl-up2.sdc.32.out.
Tracked-On: #5197
Signed-off-by: Zide Chen <zide.chen@intel.com>
Previously we have complicated check mechanism on platform_acpi_info.h which
is supposed to be generated by acrn-config tool, but given the reality that
all configurations should be generated by acrn-config before build acrn
hypervisor, this check is not needed anymore.
Tracked-On: #5077
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
The SDC scenario configurations will not be validated so remove it from
build makefile;
Tracked-On: #5077
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
The make command is same as old configs layout:
under acrn-hypervisor folder:
make hypervisor BOARD=xxx SCENARIO=xxx [TARGET_DIR]=xxx [RELEASE=x]
under hypervisor folder:
make BOARD=xxx SCENARIO=xxx [TARGET_DIR]=xxx [RELEASE=x]
if BOARD/SCENARIO parameter is not specified, the default will be:
BOARD=nuc7i7dnb SCENARIO=industry
Tracked-On: #5077
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
1. not need 'clean' when building ACRN-HV/DM each time
2. correct efi-stub wrong dependency
Tracked-On: #2412
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
SCENARIO XML file has included RELEASE or DEBUG info already, so if RELEASE
is not specified in make command, Makefile should not override RELEASE info
in SCENARIO XML. If RELEASE is specified in make command, then RELEASE info
in SCENARIO XML could be overridden by make command.
The patch also fixed a issue that get correct board defconfig when build
hypervisor from TARGET_DIR;
Tracked-On: #4688
Signed-off-by: Victor Sun <victor.sun@intel.com>
The SCENARIO xml file already includes all information of KCONFIG file,
use KCONFIG_FILE/SCENARIO_FILE parameter at same time would introduce
conflict so this case should be invalid.
Tracked-On: #4616
Signed-off-by: Victor Sun <victor.sun@intel.com>
CONFIG_MAX_KATA_VM_NUM is a scenario specific configuration, so it is better
to put the MACRO in scenario folder directly, to instead the Kconfig item in
Kconfig file which should work for all scenarios;
Tracked-On: #4616
Signed-off-by: Victor Sun <victor.sun@intel.com>
Basicly ACRN scenario is a configuration name for specific usage. By giving
scenario name ACRN will load corresponding VM configurations to build the
hypervisor. But customer might have their own scenario name, change the
scenario type from choice to string is friendly to them since Kconfig source
file change will not be needed.
With this change, CONFIG_$(SCENARIO) will not exist in kconfig file and will
be instead of CONFIG_SCENARIO, so the Makefile need to be changed accordingly;
Tracked-On: #4616
Signed-off-by: Victor Sun <victor.sun@intel.com>
Customer might have specific folder where stores their own configurations
for their customized scenario/board, so add TARGET_DIR parameter to support
option that build hyprvisor with specified configurations.
So valid usages are: (target = all | hypervisor)
1. make <target>
2. make <target> KCONFIG_FILE=xxx [TARGET_DIR=xxx]
3. make <target> BOARD=xxx SCENARIO=xxx [TARGET_DIR=xxx]
4. make <target> BOARD_FILE=xxx SCENARIO_FILE=xxx [TARGET_DIR=xxx]
5. make <target> KCONFIG_FILE=xxx BOARD_FILE=xxx SCENARIO_FILE=xxx [TARGET_DIR=xxx]
If TARGET_DIR parameter is not specified in make command, hypervisor will be
built with board configurations under hypervisor/arch/x86/configs/ and scenario
configurations under hypervisor/scenarios/. Moreover, the configurations would
be overwritten if BOARD/SCENARIO files are specified in make command.
If TARGET_DIR parameter is specified in make command, hypervisor will be built
with configuration under that folder if no BOARD/SCENARIO files are specified.
When BOARD/SCENARIO files are available in make command, the TARGET_DIR is used
to store configurations that BOARD/SCENARIO file provided, i.e. Configurations
in TARGET_DIR folder will be overwritten.
Tracked-On: #4517
Signed-off-by: Victor Sun <victor.sun@intel.com>
When user use make parameters to specify BOARD and SCENARIO, there might
be some conflict because parameter of KCONFIG_FILE/BOARD_FILE/SCENARIO_FILE
also includes BOARD/SCENARIO info. To simplify, we only alow below valid
usages:
1. make <target>
2. make <target> KCONFIG_FILE=xxx
3. make <target> BOARD=xxx SCENARIO=xxx
4. make <target> BOARD_FILE=xxx SCENARIO_FILE=xxx
5. make <target> KCONFIG_FILE=xxx BOARD_FILE=xxx SCENARIO_FILE=xxx
Especially for case 1 that no any parameters are specified:
a. If hypervisor/build/.config file which generated by "make menuconfig"
exist, the .config file will be loaded as KCONFIG_FILE:
i.e. equal: make <target> KCONFIG_FILE=hypervisor/build/.config
b. If hypervisor/build/.config file does not exist,
the default BOARD/SCENARIO will be loaded:
i.e. equal: make <target> BOARD=$(BOARD) SCENARIO=$(SCENARIO)
Tracked-On: #4517
Signed-off-by: Victor Sun <victor.sun@intel.com>
When user finish doing "make menuconfig", the .config file is saved in
acrn-config/hypervisor/build/ by default. So current Makefile will check
whether this customized .config file exists and then continue to do
following make process. But this might not true in the real user case,
user could put this customized .config file anywhere.
To resolve this problem, the patch add a KCONFIG_FILE parameter to handle
such case. When KCONFIG_FILE is specified, hypervisor could build hypervisor
with the specific configuration file.
Tracked-On: #4517
Signed-off-by: Victor Sun <victor.sun@intel.com>
Set default CONFIG_KATA_VM_NUM to 1 in SDC scenario so that user could
have a try on Kata container without rebuilding hypervisor.
Please be aware that vcpu affinity of VM1 in CPU partition mode
would be impacted by this patch.
Tracked-On: #4232
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
The BOARD and SCENARIO parameter of make hypervisor might be overridden
by menuconfig file or BOARD/SCENARIO XML files in make process, also the
$(BOARD)_acpi_info.h would be involved in build if exist, but user might
not be aware of that because the message could be easily ignored from
flooding logs. So give the configuration summary at the end of hypervisor
build process would be helpful for end user.
Tracked-On: #3779
Signed-off-by: Victor Sun <victor.sun@intel.com>
If "make menuconfig" chooses hybrid or logical_partition scenario,
currently the build fails with "SCENARIO <$(SCENARIO)> is not supported.".
- CONFIG_LOGICAL_PARTITION: "awk -F "_|=" '{print $$2}'" yields the second
field (LOGICAL) only. The new "cut -d '_' -f 2-" keeps all fields after
"CONFIG_".
- Add the missing HYBRID scenario.
Tracked-On: #4067
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
The $(BOARD)_acpi_info.h is generated by acrn-config tool, remove this
header in make clean would cause failure when user finish configuring
in webUI and start to make acrn-hypervisor by the command
"make hypervisor BOARD=xxx SCENARIO=yyy" because we mandatory do make
clean before making hypervisor.
The patch replace the file removal with a warning string to hint user
to check the file validity.
Tracked-On: #3779
Signed-off-by: Victor Sun <victor.sun@intel.com>
The *.mk files under misc/acrn-config/library are all rules for hypervisor
makefiles only, so move these files to hypervisor/scripts/makefile/ folder.
The folder of acrn-config/library/ will be used to store python script lib only.
Tracked-On: #3779
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Terry Zou <terry.zou@intel.com>
If we don't enforce passing BOARD_FILE/SCENARIO_FILE param to
hypervisor/Makefile, the BOARD_FILE/SCENARIO_FILE value would
not be overridden to its realpath in hypervisor/Makefile when
make hypervisor.
Tracked-On: #4067
Signed-off-by: Victor Sun <victor.sun@intel.com>
We now have four methods to configure board and scenario when
build acrn (sorted with priority):
1. Change them with "make menuconfig" in hypervisor directory
2. Give baord_file/scenario_file as make command parameters
3. Give BOARD/SCENARIO as make command parameters
4. Use BOARD/SCENARIO default value defined in Makefile file
With this patch, we make sure we follow priority exactly.
Tracked-On: #4067
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Victor Sun <victor.sun@intel.com>
Currently make hypervisor will depend on a $(BOARD).config file to load
board defconfig which triggered by oldconfig process, this will block
make from XMLs for a new board because $(BOARD).config never exist.
This requires us to patch configuration for new board earlier than make
oldconfig.
Tracked-On: #4067
Signed-off-by: Victor Sun <victor.sun@intel.com>
Usually We use '==' or '=' to compare strings under sh environment,
but '==' is not supported by dash which is the default sh environment
on Ubuntu, this leads efi build failure with current makefile.
Change the '==' to '=' to support both bash and dash.
Tracked-On: #3779
Signed-off-by: Victor Sun <victor.sun@intel.com>
In commit "d0489ef3b7efcd4feca0a5ee11b1fd4f9a88864a", try to
move the sbl-hypervisor target to function. But missed the
EFI_OBJDIR parameter for install/install-debug function.
Another problem is we use same EFI_OBJDIR for all uefi build.
We now put the EFI_OBJDIR to the build out to avoid this issue.
Tracked-On: #3779
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Binbin Wu <binbin.wu@intel.com>
Add new build target for hybrid mode with uefi on platform apl-up2.
Also break long dependency target line to short one.
Tracked-On: #3779
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
To remove several duplicated Makefile cmdline, introduce the
functions to build/install acrn.
If we need to add new build to sbl-hypervisor (which is used
by integration team), we only need to define a new target and
call acrn build/install functions with correct parameters. And
then make sbl-hypervisor depend on that new target.
Tracked-On: #3779
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Previously we generate config patch based on config xml in toplevel Makefile,
it brings two issues:
1. we could not generate xml configuration patch with hypervisor source only;
2. The github commit info of current code base which is defined in version.h
will be overwritten by the new generated config patch, then the lost commit
info would impact build identify and bug reproducing.
This patch fixed these two issues. Besides, the patch also modify the logic of
platform_acpi_info file existence judgement, which need to be depends on the
acrn-config patch.
Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
1. if SCENARIO=$(SCENARIO) is specified in make param, then override
the default CONFIG_$(SCENARIO) value in existed .config. This means
we don't need to modify the default SCENARIO config in Kconfig file
to build the hypervisor;
2. Some board name shortcuts like apl-nuc/kbl-nuc-i7 need to be converted
to official board name to make sure overrides working;
3. Previously make sbl-hypervisor did not load the defconfig so the
defconfig for boards are lost, this patch fix this issue;
4. remove SCENARIO param when make hypervisor, because SCENARIO could
be got from SCENARIO_NAME which parsed from .config;
Tracked-On: #3593
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
1. This patch enabled one path for compiling the souce code which
generated by acrn-config tools.
The usage below:
$ make hypervisor BOARD_FILE=$(board.xml) SCENARIO_FILE=$(scenario.xml)
if BOARD_FILE and SCENARIO_FILE are not specified, fallback to previous
compiling hypervisor usage:
$ make hypervisor BOARD=$(board) SCENARIO=$(scenario)
v1-v2:
1). update commit message
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
We are trying to add both industry and sdc images to CL build. To
maintain the build interface unchanged (no change from CL side), we
extend the build command to generate the different target images.
To identity different images, we use rule:
$(HV_FILE).$(BOARD).$(FIRMWARE).$(SCENARIO)
as target image file name.
Tracked-On: #3593
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
The top-level Makefile white-lists BOARDs require to generate UEFI
executable, but more UEFI BOARDs have been supported since then.
As a result, the build instructions in existing documents may not be
sufficient for those new BOARD targets, if the reader misses to supply
the FIRMWARE variable while building the hypervisor.
Instead of adding new UEFI BOARD types using the original long if-else
statements, I'd like to propose to white-list SBL BOARD types, and add
the new SBL BOARD types to the list while needed.
Tracked-On: #3541
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>