Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platforms: allow setting extra flags to be passed to build #310

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion seL4-platforms/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def get_mode(self) -> Optional[int]:

def settings_args(self):
"""Return the build settings as an argument list [-Dkey=val]"""
return [f"-D{key}={val}" for (key, val) in self.settings.items()]
all_settings = {**self.settings, **self.get_platform().settings}
return [f"-D{key}={val}" for (key, val) in all_settings.items()]

def set_verification(self):
"""Make this a verification build"""
Expand Down
5 changes: 5 additions & 0 deletions seL4-platforms/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(self, name: str, entries: dict):
self.req = None
self.no_hw_test = False
self.no_hw_build = False
self.settings = {}
self.__dict__.update(**entries)
if not self.validate():
raise ValidationException(f"Platform {name} validation")
Expand Down Expand Up @@ -109,6 +110,7 @@ def __repr__(self):
f" req: {self.req}",
f" no_hw_test: {self.no_hw_test}",
f" no_hw_build: {self.no_hw_build}",
f" settings: {self.settings}",
" }"
]])
return result.getvalue()
Expand Down Expand Up @@ -158,6 +160,9 @@ def toolchain_arch_str(self) -> str:
def cmake_toolchain_setting(self, mode: int) -> str:
return self.toolchain_arch_str() + str(mode)

def settings(self) -> str:
return self.settings

def get_image_platform(self, mode: int) -> str:
return self.image_platform or self.get_platform(mode)

Expand Down
8 changes: 8 additions & 0 deletions seL4-platforms/platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ platforms:
req: [maaxboard1]
march: armv8a
no_hw_build: true
# The MaaxBoard in machine queue expects a binary image
settings:
Sel4testAllowSettingsOverride: true
ElfloaderImage: "binary"

IMX8MM_EVK:
arch: arm
Expand Down Expand Up @@ -220,6 +224,10 @@ platforms:
platform: zynqmp
req: [zcu102_2]
march: armv8a
# The ZCU102 in machine queue expects a binary image
settings:
Sel4testAllowSettingsOverride: true
ElfloaderImage: "binary"

ZYNQMP106:
arch: arm
Expand Down