Skip to content

Commit

Permalink
Jenkins: Copy CheriBSD kernels to the output root
Browse files Browse the repository at this point in the history
This ensures that all the alternative kernel configs also end up being
archived (without having to modify the Jenkinsfile).
  • Loading branch information
arichardson committed Jul 31, 2023
1 parent 818ca72 commit 121bc5c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,15 @@ def get_kernel_configs(self, platform: "Optional[ConfigPlatform]") -> "list[str]
assert config is not None, "Invalid configuration name"
return [c.kernconf for c in filter_kernel_configs([config], platform=platform, kernel_abi=None)]

def prepare_install_dir_for_archiving(self):
assert is_jenkins_build(), "Should only be called for jenkins builds"
for config in self.get_kernel_configs(None):
kernel_elf = self.get_kernel_install_path(config)
self.install_file(kernel_elf, self.config.output_root / f"kernel.{config}")
kernel_elf_with_dbg = kernel_elf.with_suffix(".full")
if kernel_elf_with_dbg.exists():
self.install_file(kernel_elf_with_dbg, self.config.output_root / f"kernel.{config}.full")


# Build FreeBSD with the default options (build the bundled clang instead of using the SDK one)
# also don't add any of the default -DWITHOUT/DWITH_FOO options
Expand Down Expand Up @@ -1804,7 +1813,7 @@ def _build_and_install_kernel_binaries(self, kernconfs: "list[str]", image: Path
if conf == kernconfs[0]:
source_path = Path(td, "boot/kernel/kernel")
else:
# All other kernels are installed with a suffixex name:
# All other kernels are installed with a suffixed name:
source_path = Path(td, "boot/kernel." + conf, "kernel")
self.install_file(source_path, kernel_install_path, force=True, print_verbose_only=False)
dbg_info_kernel = source_path.with_suffix(".full")
Expand Down

0 comments on commit 121bc5c

Please sign in to comment.