The version info is mainly used to tell the user when and where the binary is
compiled and built, this will change the hv version format.
The hv follows the format:
major.minor-stable/unstable-remote_branch-acrn-commit_date-commit_id-dirty
DBG/REL(tag-current_commit_id) scenario@board build by author date.
The '(tag-current_commit_id)' is optional, it exits only when there are
tags for current commit.
e.g.
with tag:
ACRN:\>version
HV: 3.1-stable-release_3.1-2022-09-27-11:15:42-7fad37e02-dirty DBG(tag: v3.1)
scenario3.1@my_desk_3.1 build by zhangwei 2022-11-16 07:02:37
without tag:
ACRN:\>version
HV: 3.2-unstable-master-2022-11-16-14:34:49-11f53d849-dirty DBG
scenario3.1@my_desk_3.1 build by zhangwei 2022-11-16 06:49:44
Tracked-On #8303
Signed-off-by: Zhangwei6 <wei6.zhang@intel.com>
In the top-level Makefile, the target "hypervisor" depends on "hvdefconfig"
because, at the time the latter is introduced, building without specifying
BOARD or SCENARIO is supported by using a pair of default board and
scenario XMLs.
This is no longer the case today, as BOARD and SCENARIO are now mandatory
command line options. As a result, that dependency is no longer necessary,
and this patch just removes that.
Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
To avoid hardcoding the minimum "iasl" version in multiple places, IASL_MIN_VER
is defined in the top-level Makefile and is passed to config_tools.
This patch verifies "iasl" version against IASL_MIN_VER directly in
config_tools.
Tracked-On: #7880
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
At build time (on the *dev* machine), config_tools depends on "iasl" to
generate the binary of ACPI tables for pre-launched VMs.
This patch does:
- pass ASL_COMPILER to config_tools
By default, ASL_COMPILER is initialized by "which iasl" at build time.
User could override it by specifying ASL_COMPILER as the build option,
like below:
make BOARD=xxxx SCENARIO=yyyy ASL_COMPILER=/usr/local/bin/iasl
- use ASL_COMPILER as the path to the "iasl" compiler in config_tools
v1 -> v2:
- add a check to make sure ASL_COMPILER is initialized to a value
Tracked-On: #7880
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
This patch does:
- define IASL_MIN_VER in the top-level Makefile and pass it Device Model
- verify the "iasl" version at run time
if "iasl" version is older than IASL_MIN_VER, refuse to launch the
post-launched VM and exit directly.
Tracked-On: #7880
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
At run time (on the *target* machine), acrn-dm depends on "iasl" to build
the ACPI tables for post-launched VMs.
This patch does:
- remove the dependency on ASL_COMPILER, which would only be used at build time
- add a new acrn-dm parameter "--iasl <iasl_compiler_path>"
If "--iasl <iasl_compiler_path>" is specified as the acrn-dm parameter,
acrn-dm uses <iasl_compiler_path> as the path to the "iasl" compiler;
otherwise, "which iasl" is used to detect the "iasl" compiler.
If "iasl" is not found at run time, refuse to launch the post-launched VM
and exit directly.
v2 -> v3:
- use "strlen" rather than "strncmp" to check whether asl_compiler
has been set or not
v1 -> v2:
- remove "iasl_param" and "with_iasl_param" to simplify the logic
Tracked-On: #7880
Signed-off-by: Victor Sun <victor.sun@intel.com>
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Clean the top-level Makefile by removing some old and obsolete targets that
are no longer used and for which we do not even have the required file (such
as $(BOARD).xml.
Tracked-On: #7632
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This patch use 'make clean' to clean up the files left after
a 'make configurator'.
Tracked-On: #7508
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Display acrn version string from `git describe --dirty` at UI footer to
help testing. Append the same version to deb package name as well.
Tracked-On: #7488
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
1. Support absolute path for scenario file.
2. Use the scenario xml file name as scenario name, but if it is
'scenario.xml', use the upper level directory name.
e.g.
SCENARIO=<pathxxx>/shared/scenario.xml
Then scenario name would be 'shared'.
3. Change 'realpath' to 'abspath' as we should keep the original path
for scenario file even it is a link file. This will make sure the
scenario name is always consistent with file set in 'SCENARIO='.
Tracked-On: #7345
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
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>