debian: create script to build acrn with debuild

$ debian/debian_build.sh -h
Usage: debian/debian_build.sh [--board_list ACRN_BOARDLIST] [--scenario_list ACRN_SCENARIOLIST] [--config_path CONFIGDIRS] [--release n|y] [acrn | board_inspector | clean]
Optional arguments:
  -h, --help           show this help message and exit
  -b, --board_list     list the boards to build, seperated by blank; build all scanned boards in the config path if specified as ""; build the default boards in debian rules if not specified
  -s, --scenario_list  list the scenarios to build, seperated by blank; build all scanned scenarios in the config path if specified as ""; build the default scenarios in debian rules if not specified
  -c, --config_path    specify the config path for the board and scenario configuration files, default use misc/config_tools/data if not specified
  -r, --release        build debug version with n, release version with y; default defined in debian rules if not specified
  acrn|board_inspector|clean    specify the build target, default value is acrn if not specified
Examples:
  debian/debian_build.sh
  debian/debian_build.sh -b nuc11tnbi5 -s shared
  debian/debian_build.sh -b "nuc11tnbi5 tgl-vecow-spc-7100-Corei7" -s "shared hybrid" -c misc/config_tools/data -r y
  debian/debian_build.sh -b "" -s shared
  debian/debian_build.sh board_inspector

Tracked-On: #8246
Signed-off-by: szhen11 <shuang.zheng@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
szhen11
2022-10-26 12:26:06 +08:00
committed by acrnsi-robot
parent e5c1eafba3
commit 41feb1053e
2 changed files with 125 additions and 3 deletions

6
debian/rules vendored
View File

@@ -36,8 +36,8 @@ ACRN_BOARDLIST ?= whl-ipc-i5 nuc11tnbi5 cfl-k700-i7 tgl-vecow-spc-7100-Corei7
ACRN_SCENARIOLIST ?= partitioned shared hybrid hybrid_rt
# for now build the debug versions
# set to 1 for RELEASE build
export RELEASE ?= 0
# set to y for RELEASE build
export RELEASE ?= n
# eventually add-in locally contributed configurations
-include debian/configs/configurations.mk
@@ -302,7 +302,7 @@ override_dh_auto_install-arch:
$(DESTDIR)$(docdir)/acrn-devicemodel
@:
@# adapt systemd services for tools (available in DEBUG build only)
$(if $(call strequ,${RELEASE},0), \
$(if $(call strequ,${RELEASE},n), \
$(Q)sed -i -e '/telemd.socket/d' -e '/prepare.service/d' \
$(DESTDIR)$(systemd_unitdir)/system/acrnprobe.service; \
sed -i '/telemd/d' \