Commit Graph

29 Commits

Author SHA1 Message Date
Junjie Mao 494ec8064a debian/rules: search for XML files only
When searching for scenario XMLs that are saved under the same directory as
a board XML, debian/rules uses the wildcard `*` which includes other
non-XML files. That causes some non-XML files to be considered as scenario
XMLs as well and will cause build-time errors when the build system
attempts to parse them as XMLs.

Change the wildcard expression to `*.xml` to restrict the found files to be
XML.

Tracked-On: #8344
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-29 18:05:42 +08:00
Junjie Mao bdb525aae3 debian/rules: change default BOARDLIST and SCENARIOLIST to empty
The variables BOARDLIST and SCENARIOLIST serve as filters of XMLs that are
found under the user-given directories, and there is no need to assume any
filter if a user does not specify that explicitly.

Update the default filters to none so that all found XMLs will be used if a
user does not state otherwise.

Tracked-On: #8246
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-29 17:32:27 +08:00
Xie, nanlin a58d2ebddc misc: Update sample launch scripts into generic_board folder.
Currently we use configurator to generate sample launch scripts and
configuration code, remove old ones and put all generated launch scripts
into generic_board.

Tracked-On: #6690
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2022-11-21 11:51:33 +08:00
Helmut Buchsbaum 3a1eb26de0 debian/rules: Cleanup egg-info directory of acrn-board-inspector
Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-16 16:36:20 +08:00
Helmut Buchsbaum 13937162e1 debian: Fix release package build
Since acrn-tools are not built when creating a release build, there are no
tool binaries to be installed. Generate the required debian/acrn-tools.install
file on the fly whenever a debug build is requested. This keeps this file
empty on a release build avoiding the resulting build errors about missing
files.

Additionally a package specific README.Debian file is added to explain this
behavior. It will be installed according to Debian packaging guidelines
at /usr/share/doc/acrn-tools/README.Debian.

Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-16 16:36:20 +08:00
Junjie Mao 6d48d4428a debian/rules: adapt to configurator-generated work folders
When building debian packages using one or more work folders generated by
the configurator, the build system will use the name of the work folder as
the scenario name because the configurator always names a scenario XML as
'scenario.xml'. Scenario names are important here because:

  1. they are used to name the installed hypervisor binaries and map files,
     and the postinst scripts will use those names to fetch the right
     binary to put under /boot.

  2. when multiple work folders defining different scenarios on the same
     board is given, use the basename of the scenario XMLs leads to a name
     conflict.

Not following the same scenario name derivation rule in debian/rule will
prevent a proper hypervisor binary to be put under /boot and lead to
boot-time failure. The potential scenario name collisions can also cause
unintended binaries to be installed.

This patch updates debian/rules to follow the same scenario name derivation
rules as the build system is using.

Tracked-On: #8301
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-10 10:43:14 +08:00
Helmut Buchsbaum 9941c44bee debian/rules: Dynamically generate acrn-hypervisor.install
To be able to to conditionally add a launch script directory for
acrn-hypervisor package, the debian/acrn-hypervisor.install file must be
created dynamically. If there are only configurations (e.g. partitioned
scenarios) that do not need any launch scripts, we have to omit the
launch script directory entry in debian/acrn-hypervisor.install.

Tracked-On: #8263
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-02 14:24:49 +08:00
szhen11 41feb1053e 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>
2022-11-01 14:41:59 +08:00
Helmut Buchsbaum f4e931c762 debian: Fix cleanup for 'debuild clean'
Tracked-On: #8246
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-10-24 15:07:06 +08:00
Helmut Buchsbaum f26640e6f1 debian: fixup board and scenario detection
Using e.g.

debuild -eACRN_BOARDLIST= -eACRN_SCENARIOLIST= -eCONFIGDIRS=<custom config path> -- binary

builds all board/scenario combinations provided in <custom config path>.

Tracked-On: #8246
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-10-24 15:07:06 +08:00
Helmut Buchsbaum a0f84a7992 debian: make ACRN_BOARDLIST and ACRN_SCENARIOLIST optional
To be able to set ACRN_BOARDLIST and ACRN_SCENARIOLIST via environment
variable when using debuild, both variables must be overridable.

Tracked-On: #8246
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-10-24 15:07:06 +08:00
szhen11 96e1b6704f config_tools: fix the issue for debuild on tgl-rvp with hybrid scenario
The debian build rule of calculating method for post launch vm ids
when generating launch scripts should not be reading //vm/@id in
scenario xmls directly but reading //vm/@id in scenario xml and
then plus vm id for service vm.
Since the objective here is to generate the launch scripts for all
VMs, change the debian rule to invoking the launch_cfg_gen.py script
without parameter user_vmid when there are post launch vms to achieve
the objective.

Tracked-On: #8245

Signed-off-by: szhen11 <shuang.zheng@intel.com>
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-24 14:37:06 +08:00
Helmut Buchsbaum 3bd6030e08 debian/configs: Remove proprietary configs, just provide a hook directory
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 5f1ee365d9 debian/rules: Generate launch scripts
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum fe85273ae4 debian: Separate build config items to acrn-hypervisor.conf.mk
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum f0b3adc501 debian: Add default configuration for acrnlog
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 4c37d72bdc debian/rules: Add simatic-ipc227g
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 46416f9fc4 debian: acrn-hypervisor: Refactor debconf
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum e49f18f1f3 debian: acrn-tools: Add helper scripts
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 8aa77e6464 debian/rules: Do not start services on install
Do not start services at install automatically, since they are most likely
installed on a non-ACRN system.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum d7f51489db debian/rules: override_dh_strip: Fix wrong parameter
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum b72d20563f debian: Install acrnprobe.xml
Needed to start acrnprobe successfully.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 78b64c21b3 debian: Use original acrnd.service
Part of fix for
https://github.com/tttech-industrial-buchsbaum/acrn-hypervisor/issues/6

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum bcb4c83ffa debian/rules: Store board and scenario xml
Since we have to adapt various data, e.g. bootparams, at install time,
preserve the respective XML configuration to get the required data from there.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum f792336c1c debian: Fixup ACRN lifemngr package build
Part of fix for
https://github.com/tttech-industrial-buchsbaum/acrn-hypervisor/issues/6

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum f74b09f8c2 debian: Add kontron-COMe-mAL10/shared+initrd
Just add an example for ApolloLake base board.
The share+initrd scenario enables ramdisk_mod attribute as needed for
grub-acrn package to work an be able to install e.f. on a standard Debian
system.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum dbd4987163 debian: Add nuc7i7dnh/shared+initrd
This has been added for test purposes and as an example for how to add a
configuration outside the config_tools/data section.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 7805a9c966 d/rules: Update regarding config detection
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 300a8b259d Add debianization support
Add support to generate Debian packages.
For details see debian/README.

debian/changelog is manually intialized, ready to be updated by gbp dch
command.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00