Commit Graph

48 Commits

Author SHA1 Message Date
Victor Sun f657bae0a8 Makefile: do not rm board acpi info header
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>
2019-11-21 16:15:23 +08:00
Victor Sun 0d52f933da Makefile: move .mk file to hv scripts folder
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>
2019-11-13 16:05:30 +08:00
Victor Sun 5dd1c5350c Makefile: pass BOARD/SCENARIO FILE to make hv
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>
2019-11-12 14:02:34 +08:00
Victor Sun 9a3cc8f748 makefile: cover menuconfig way to configure board/scenario
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>
2019-11-11 15:01:50 +08:00
Victor Sun ed8fb94778 Makefile: support make from XML for new board
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>
2019-11-11 15:01:50 +08:00
wenlingz c8fa8e15f8 Modify KBL-NUC/SDC for default build
Tracked-On: #3968
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2019-11-01 09:06:45 +08:00
Victor Sun e7134585b6 makefile: add dash support to build efi
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>
2019-10-25 09:01:55 +08:00
Yin Fengwei fcbf9d7b2c makefile: fix efi stub install issue
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>
2019-10-12 16:06:44 +08:00
Yin Fengwei 43410fd008 Makefile: Add new build target for apl-up2/uefi/hybrid
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>
2019-10-09 09:51:15 +08:00
Yin Fengwei d0489ef3b7 Makefile: Add acrn build/install functions
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>
2019-10-09 09:51:15 +08:00
Victor Sun 3f3ec3865e Makefile: generate config patch in hypervisor/Makefile
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>
2019-09-20 19:39:22 +08:00
Victor Sun 0b65b8f05c Makefile: override .config with specified scenario
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>
2019-09-18 11:48:31 +08:00
Wei Liu 9389225633 makefile: enable xml config to build hypervisor
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>
2019-09-16 09:34:37 +08:00
Yin Fengwei adf3a59302 Makefile: Refine Makefile to generate both industry and sdc images
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>
2019-09-02 19:25:31 +08:00
Tonny Tzeng 0a067a833f make: white-list SBL firmware boards
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>
2019-08-12 11:24:55 +08:00
Nikhil Rane 4adc8102fd Makefile: Add install for uefi firmware
Add to include acrn.32.out during cl rpm
 generation as acrn.(board).32.out
This is required for Hybrid mode bringup in multios

Tracked-On:#3487
Signed-off-by: Nikhil Rane <nikhil.rane@intel.com>
2019-07-31 11:41:40 +08:00
Terry Zou a9c38a5cfb HV:Acrn-hypvervisor Root Directory Clean-up and create misc/ folder for Acrn daemons, services and tools.
This patch is to clean-up acrn-hypervisor root directory, targt only 5 folders under acrn-hypervisor:1.hypervisor,2.devicemodel,3.misc,4.doc,5.build

Tracked-On: #3482
Signed-off-by: Terry Zou <terry.zou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-07-29 22:58:24 +08:00
Wei Liu 948d58fb9c acrn-dm: enable debug option for acrn-dm
enable acrn-dm debug option via RELEASE=0(by default)

Tracked-On: #2939
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-04-16 15:24:25 +08:00
Tw 190b094075 Makefile: build for apl-nuc by default
apl-nuc will be the default board building for.

Tracked-On: #2780
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-03-15 14:10:20 +08:00
Tw 23e85ff12a Makefile: remove deprecated PLATFORM
PLATFORM is no longer used and is replaced with BOARD.

Tracked-On: #2708
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-03-13 10:26:55 +08:00
Victor Sun a25f1a4060 HV: remove default folder in configs
Add sos_vm.h as a template in configs folder and is linked to
configs/$(CONFIG_BOARD)/sos_vm.h.

If customer need a board specific sos_vm.h, make a copy in
configs/$(CONFIG_BOARD)/ and replace the symbol link.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-02-26 17:04:49 +08:00
Victor Sun f9b5e21bdc HV: rename board name of up2 to apl-up2
The Kconfig file of UP2 board was named as up2.config, rename to apl-up2.config
to make it consistent with naming of apl-mrb/kbl-nuc ...

The name change is also applied in Makefile to make sure compile success.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-02-26 17:04:49 +08:00
Xiaoguang Wu 80dc0bce3e DM: ACPI: Avoiding hard code the ASL_COMPILER macro
The ASL_COMPILER macro is hard coded as /usr/sbin/iasl, it is
complained by some developers. This patch changes it to a
flexible way, by which the following make command lines are
supported:

make
make devicemodel
make ASL_COMPILER=/path/to/iasl
make ASL_COMPILER=/path/to/iasl devicemodel

Tracked-On: #2298
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-02-01 13:47:55 +08:00
Ross Burton 5ba4afcffe Use $(MAKE) when recursing
Using 'make' directly means that the jobserver environment variables don't get
passed down, so sub-builds for example don't use -j.

This is documented as the wrong thing to do:
https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html#MAKE-Variable

Use $(MAKE) instead, and compile times drastically improve:

  acrn-devicemodel    do_compile   -13.5s   -89.6%      15.0s -> 1.6s

Tracked-On: #2370
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-24 08:22:32 +08:00
Tw 862ed16ed7 Makefile: add rules for installing debug information
Add rules for installing debug information.

Tracked-On: #2344
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-01-22 15:00:37 +08:00
Tw fe35dde421 Makefile: support SBL binary for E2E build
Currently, we support SBL on two different boards.
So build and install them all in E2E build.

Tracked-On: #2344
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-01-18 11:22:15 +08:00
Victor Sun 404fd9c935 HV: rename cb2_dnv to dnv_cb2
This will be consistent with naming of apl-mrb/kbl-nuc ...

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-01-11 10:55:14 +08:00
Tw 83034b7151 Makefile: specify BOARD&FIRMWARE in sb-hypervisor-install
BOARD&FIRMWARE are wrong When 'make sbl-hypervisor-install' w/o parameters
due to default platform is uefi. So set them clearly.

Tracked-On: #1995
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-12-26 16:19:59 +08:00
Tw c932faa241 Makefile: eliminate mistakes due to deprecated PLATFORM
PLATFORM is deprecated, let's use it only for board detection

Tracked-On: #1995
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-12-26 16:19:59 +08:00
Miguel Bernal Marin b4de4d1b0f Makefile: add RELEASE variable to make command
1. use RELEASE to control ./tools install target.

Tracked-On: #2168
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-24 22:24:27 +08:00
Mingqiang Chi 74849cd983 modulization:move out efi dir from hypervisor
move acrn-hypervisor/hypervisor/bsp/uefi/efi
to   arcn-hypervisor/efi-stub
move acrn-hypervisor/hypervisor/bsp/uefi/clearlinux
to   acrn-hypervisor/efi-stub/clearlinux

Changes to be committed:
  modified:   Makefile
  modified:   doc/getting-started/apl-nuc.rst
  renamed:    hypervisor/bsp/uefi/efi/Makefile -> efi-stub/Makefile
  renamed:    hypervisor/bsp/uefi/efi/boot.c -> efi-stub/boot.c
  renamed:    hypervisor/bsp/uefi/efi/boot.h -> efi-stub/boot.h
  renamed:    hypervisor/bsp/uefi/clearlinux/acrn.conf ->
	      efi-stub/clearlinux/acrn.conf
  renamed:    hypervisor/bsp/uefi/efi/efilinux.h -> efi-stub/efilinux.h
  renamed:    hypervisor/bsp/uefi/efi/malloc.c -> efi-stub/malloc.c
  renamed:    hypervisor/bsp/uefi/efi/multiboot.h -> efi-stub/multiboot.h
  renamed:    hypervisor/bsp/uefi/efi/pe.c -> efi-stub/pe.c
  renamed:    hypervisor/bsp/uefi/efi/stdlib.h -> efi-stub/stdlib.h
  modified:   hypervisor/Makefile

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-17 15:46:23 +08:00
Tw 59c2b33a90 Makefile: separate PLATFORM into BOARD+FIRMWARE
Combination of BOARD and FIRMWARE is a more precious definition.
And we decide PLATFORM_XXX based on FIRMWARE, remove relative one in
board config.

We reserve PLATFORM for backward compatibility.

Tracked-On: #1995
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Yin Fengwei < fengwei.yin@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-12-12 13:23:28 +08:00
Alek Du 2a656812df misc: totally remove misc folder
misc now has a new home: https://github.com/intel/ioc-cbc-tools.

The "Execstop" patch will be synced to new git tree soon.

ioc-cbc-tools was just added to Clear Linux, and will be added to
software-defined-cockpit bundle after this patch merged.

Merging this patch may cause some IOC releated feature block until we
get a new Clear Linux release. This is the switch window ...

Signed-off-by: Alek Du <alek.du@intel.com>
2018-08-10 10:40:49 +08:00
Wei Liu 11c209e862 DM: add tag info while no repo in release
there is no git repo, which download from github release,
however, acrn-dm -v will get tag info from this repo, in
such case, the tag info was null.
this patch will fix nul tag, which get it from CL mock build.

Tracked-On: #676
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-08-09 09:47:08 +08:00
Geoffroy Van Cutsem 2425583c6b Build system: add target to build documentation
This patch adds a new target to build the documentation
from the top-level directory. Here is how to use it (from
the top-level source directory):
   $ make doc
Or
   $ make O=build-test doc

To clean all documentation build artefacts, simply call
   $ make clean
Or
   $ make O=build-test clean

Calling 'make' with no arguments will *not* build the
documentation by default.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-15 13:32:08 +08:00
Yan, Like c84766a869 Tools: add Makefile for all tools
Add a Makefile under ./tools to avoid changing top-level Makefile frequently

Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-06-07 09:56:33 +08:00
Yu Wang d04b1419b2 misc: Add Makefile for misc directory
This patch adds build architecture for misc directory and support cbc_lifecycle
build.

Signed-off-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-01 10:22:52 +08:00
yuhong.tao@intel.com eada59c934 DM: adapt dm-monitor and acrnctl to use the helpers
Adapt dm-monitor and acrnctl to use the helper functions and new message
definitions in acrn_mngr.h.
These jobs must be done in one commit to avoid build problems:
1. message transmission and callback registration code are moved
 to libacrn-mngr.a, so old functions in dm-monitor could be removed to
 make code clean;
2. remove unnecessary monior_msg.h;
3. minor changes to acrnctl accordingly.

Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
signed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-05-31 11:25:47 +08:00
Miguel Bernal Marin 7811bdd51e Makefile: add a target to build sbl hypervisor
To build with only one command the sbl and efi hypervisor a target was
added which build the SBL hypervisor version.

Now you can call "make all sbl-hypervisor" and
"make install sbl-hypervisor-install"

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-24 19:35:03 +08:00
Jack Ren ac8b87505b acrn: allow to specify the build output folder
Usages: make O=<any folder>

Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-05-24 11:20:57 +08:00
CHEN Gang a9e36bdb4e tools: acrn-crashlog: add service/config files and scripts
This patch adds the service files, config files and script
to run automatically at boot. And it adds install/uninstall
part in Makefile. Compatiblity code for libsystemd.so and
libsystemd-journal.so is added in Makefile also.

Signed-off-by: Jin Zhi <zhi.jin@intel.com>
Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
2018-05-23 17:10:51 +08:00
Geoffroy Van Cutsem 975484a304 Fix the logic that sets the top-level build directory
The 'ROOT_OUT' variable does not allow to set the folder in
which all output files (objects, binaries, etc.) are built
and placed.

Overriding it from the command-line leads to 'build' folders
of the name set that are created in the tree eventually leading
to a failure during the build. This patch changes how the
output directory is constructed so that *all* output files
are put in there. It introduces a new variable called
'BUILD_DIR' to that effect.

It also incidentally fix the fact that 'make clean' only removes
that output directory which means it does not properly clean up
the tree if one overrides the 'ROOT_OUT' variable manually today.

To change where the build artefacts are placed, set 'BUILD_DIR'
to whatever you want, e.g.:
   $ make BUILD_DIR=build-test
Will create a top-level folder called 'build-test' where everything
will be put. 'make clean' will remove it (if called with the same
argument)

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-05-22 16:42:05 +08:00
Miguel Bernal Marin ba3192ab77 Makefile: fix PLATFORM variable at install target
The variable PLAT was renamed to PLATFORM, but was not updated in the
install target giving a failure when installing ACRN hypervisor.

Fixes: fc2b6fbe86 ("Makefile: keep using 'PLATFORM' variable for existing documentation")

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-19 08:14:31 +08:00
Tonny Tzeng fc2b6fbe86 Makefile: keep using 'PLATFORM' variable for existing documentation
Signed-off-by: Tonny Tzeng tonny.tzeng@intel.com
2018-05-18 15:02:09 +08:00
Miguel Bernal Marin d79d641679 Makefile: fix typos and style
Remove the trailing ";" and "\" and fix a typo in install.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-17 10:24:00 +08:00
Miguel Bernal Marin ace25dd3db Makefile: implement make install
The make install target was missing. This commits adds the intall target
which uses the install target from subprojects.

Also a make install target was created in each tool program.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-17 10:24:00 +08:00
Miguel Bernal Marin f7a93d8f33 Makefile: use -C parameter for recursive invocation
Instead of changing directories with "cd" command use the
-C parameter to change directory.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-17 10:24:00 +08:00
Minggui Cao fb19b296ea add a makefile under project root directory
it can be used as following:
  make ==> to make hypervisor & devicemodel & tools
also modify tools makefile to support out-dir setting.

Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
2018-05-15 18:03:34 +08:00