Skip to content

Commit

Permalink
cheribsd: Don't prioritise FETT kernel over non-FETT
Browse files Browse the repository at this point in the history
--cheribsd/build-fett-kernels should only add extra kernels, like other
options, rather than override the default one. Also we should order the
kernels in _get_config_variants by flag disabled before enabled, though
that doesn't really matter so long as the default is correct.
  • Loading branch information
jrtc27 committed Feb 14, 2024
1 parent 8f168a5 commit 4e1f838
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ def get_default_kernel_abi(self) -> KernelABI:

def _get_config_variants(self, platforms: "set[ConfigPlatform]", kernel_abis: "list[KernelABI]",
combine_flags: "list[str]", **filter_kwargs) -> "list[CheriBSDConfig]":
flag_values = itertools.product([True, False], repeat=len(combine_flags))
flag_values = itertools.product([False, True], repeat=len(combine_flags))
combine_tuples = list(itertools.product(platforms, kernel_abis, flag_values))
configs = []
for platform, kernel_abi, flag_tuple in combine_tuples:
Expand Down Expand Up @@ -1704,8 +1704,6 @@ def default_kernel_config(self, platform: "Optional[ConfigPlatform]" = None, **f
if platform is None:
platform = self.get_default_kernel_platform()
kernel_abi = filter_kwargs.pop("kernel_abi", self.get_default_kernel_abi())
if xtarget.is_riscv(include_purecap=True):
filter_kwargs.setdefault("fett", self.build_fett_kernels)
config = CheriBSDConfigTable.get_default(xtarget, platform, kernel_abi, **filter_kwargs)
return config.kernconf

Expand Down

0 comments on commit 4e1f838

Please sign in to comment.