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

Fix style to adhere to new CI checks #55

Merged
merged 2 commits into from
Sep 13, 2023
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
27 changes: 14 additions & 13 deletions build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
KERNEL_CONFIG_TYPE = Union[bool, str]
KERNEL_OPTIONS = Dict[str, KERNEL_CONFIG_TYPE]


@dataclass
class BoardInfo:
name: str
Expand All @@ -53,39 +54,39 @@ class ConfigInfo:
name="tqma8xqp1gb",
gcc_cpu="cortex-a35",
loader_link_address=0x80280000,
kernel_options = {
kernel_options={
"KernelPlatform": "tqma8xqp1gb",
"KernelIsMCS": True,
"KernelArmExportPCNTUser": True,
},
examples = {
examples={
"ethernet": Path("example/tqma8xqp1gb/ethernet")
}
),
BoardInfo(
name="zcu102",
gcc_cpu="cortex-a53",
loader_link_address=0x40000000,
kernel_options = {
kernel_options={
"KernelPlatform": "zynqmp",
"KernelARMPlatform": "zcu102",
"KernelIsMCS": True,
"KernelArmExportPCNTUser": True,
},
examples = {
examples={
"hello": Path("example/zcu102/hello")
}
),
# BoardInfo(
# name="imx8mm",
# gcc_cpu="cortex-a53",
# loader_link_address=0x41000000,
# kernel_options = {
# kernel_options={
# "KernelPlatform": "imx8mm-evk",
# "KernelIsMCS": True,
# "KernelArmExportPCNTUser": True,
# },
# examples = {
# examples={
# "passive_server": Path("example/imx8mm/passive_server")
# }
# )
Expand All @@ -95,12 +96,12 @@ class ConfigInfo:
ConfigInfo(
name="release",
debug=False,
kernel_options = {},
kernel_options={},
),
ConfigInfo(
name="debug",
debug=True,
kernel_options = {
kernel_options={
"KernelDebugBuild": True,
"KernelPrinting": True,
"KernelVerificationBuild": False
Expand Down Expand Up @@ -139,6 +140,7 @@ def test_tool() -> None:
)
assert r == 0


def build_tool(tool_target: Path) -> None:
pyoxidizer = ENV_BIN_DIR / "pyoxidizer"
if not pyoxidizer.exists():
Expand Down Expand Up @@ -188,9 +190,9 @@ def build_sel4(

platform = board.name
cmd = (
f"cmake -GNinja -DCMAKE_INSTALL_PREFIX={sel4_install_dir.absolute()} "\
f" -DPYTHON3={executable} " \
f" -DKernelPlatform={platform} {config_str} " \
f"cmake -GNinja -DCMAKE_INSTALL_PREFIX={sel4_install_dir.absolute()} "
f" -DPYTHON3={executable} "
f" -DKernelPlatform={platform} {config_str} "
f"-S {sel4_dir.absolute()} -B {sel4_build_dir.absolute()}")

r = system(cmd)
Expand Down Expand Up @@ -299,7 +301,6 @@ def build_lib_component(
# Make output read-only
dest.chmod(0o444)


link_script = Path(component_name) / "microkit.ld"
dest = lib_dir / "microkit.ld"
dest.unlink(missing_ok=True)
Expand Down Expand Up @@ -335,7 +336,6 @@ def main() -> None:
if not sel4_dir.exists():
raise Exception(f"sel4_dir: {sel4_dir} does not exist")


root_dir = Path("release") / f"{NAME}-sdk-{VERSION}"
tar_file = Path("release") / f"{NAME}-sdk-{VERSION}.tar.gz"
source_tar_file = Path("release") / f"{NAME}-source-{VERSION}.tar.gz"
Expand Down Expand Up @@ -406,5 +406,6 @@ def main() -> None:
for filename in filenames:
tar.add(filename, arcname=source_prefix / filename, filter=tar_filter)


if __name__ == "__main__":
main()
8 changes: 3 additions & 5 deletions example/imx8mm/passive_server/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

#include <microkit.h>

#define SERVER_CH 0
#define SERVER_CH 0

void
init(void)
void init(void)
{
microkit_dbg_puts("client: client protection domain init function running\n");

Expand All @@ -18,8 +17,7 @@ init(void)
(void) microkit_ppcall(SERVER_CH, microkit_msginfo_new(1, 1));
}

void
notified(microkit_channel ch)
void notified(microkit_channel ch)
{
microkit_dbg_puts("client: recieved a notification on an unexpected channel\n");
}
19 changes: 8 additions & 11 deletions example/imx8mm/passive_server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,26 @@

#include <microkit.h>

microkit_msginfo
protected(microkit_channel ch, microkit_msginfo msginfo)
microkit_msginfo protected(microkit_channel ch, microkit_msginfo msginfo)
{
switch (microkit_msginfo_get_label(msginfo)) {
case 0:
microkit_dbg_puts("server: is running on clients scheduling context\n");
break;
default:
microkit_dbg_puts("server: received an unexpected message\n");
case 0:
microkit_dbg_puts("server: is running on clients scheduling context\n");
break;
default:
microkit_dbg_puts("server: received an unexpected message\n");
}

return seL4_MessageInfo_new(0, 0, 0, 0);
}

void
init(void)
void init(void)
{
microkit_dbg_puts("server: server protection domain init function running\n");
/* Nothing to initialise */
}

void
notified(microkit_channel ch)
void notified(microkit_channel ch)
{
microkit_dbg_puts("server: recieved a notification on an unexpected channel\n");
}