Skip to content
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
31 changes: 27 additions & 4 deletions build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,28 @@ class ConfigInfo:
kernel_options_arch: KERNEL_OPTIONS_ARCH


# There are some references to paths we need to make that are relative
# to the kernel source, since the kernel source is supplied by the user,
# we can't hard-code it.
# This is necessary for particular kernel options such as, KernelCustomDTS
# and KernelCustomDTSOverlay.
@dataclass
class KernelPath:
path: str


SUPPORTED_BOARDS = (
BoardInfo(
name="kria_k26",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x40000000,
kernel_options={
"KernelPlatform": "zynqmp",
"KernelARMPlatform": "zcu102",
"KernelCustomDTSOverlay": Path("custom_dts/overlay-zynqmp-kria-k26.dts"),
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
),
BoardInfo(
name="tqma8xqp1gb",
arch=KernelArch.AARCH64,
Expand Down Expand Up @@ -210,8 +231,8 @@ class ConfigInfo:
smp_cores=4,
kernel_options={
"KernelPlatform": "imx8mp-evk",
"KernelCustomDTS": "custom_dts/iot-gate.dts",
"KernelCustomDTSOverlay": "src/plat/imx8m-evk/overlay-imx8mp-evk.dts",
"KernelCustomDTS": Path("custom_dts/iot-gate.dts"),
"KernelCustomDTSOverlay": KernelPath(path="src/plat/imx8m-evk/overlay-imx8mp-evk.dts"),
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
),
BoardInfo(
Expand Down Expand Up @@ -577,8 +598,10 @@ def build_sel4(
for arg, val in sorted(config_args):
if isinstance(val, bool):
str_val = "ON" if val else "OFF"
elif arg == "KernelCustomDTSOverlay":
str_val = f"{sel4_dir.absolute()}/{val}"
elif isinstance(val, KernelPath):
str_val = f"{sel4_dir.absolute()}/{val.path}"
elif isinstance(val, Path):
str_val = Path(__file__).parent / val
else:
str_val = str(val)
s = f"-D{arg}={str_val}"
Expand Down
20 changes: 20 additions & 0 deletions custom_dts/overlay-zynqmp-kria-k26.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2026, Skykraft
*
* SPDX-License-Identifier: GPL-2.0-only
*/

/ {
memory@0 {
device_type = "memory";
reg = <0x00 0x00 0x00 0x7ff00000 0x08 0x00 0x00 0x80000000>;
};

chosen {
seL4,kernel-devices =
"serial1",
&{/amba_apu@0/interrupt-controller@f9010000},
&{/timer},
&{/amba/smmu@fd800000};
};
};
17 changes: 17 additions & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,7 @@ The currently supported platforms are:
* imx8mp_evk
* imx8mp_iotgate
* imx8mq_evk
* kria_k26
* maaxboard
* odroidc2
* odroidc4
Expand Down Expand Up @@ -1239,6 +1240,22 @@ Microkit will produce a raw binary file by default, so when using U-Boot run the

=> go 0x41000000

## Kria K26 {#kria_k26}

The [Kria K26](https://www.amd.com/en/products/system-on-modules/kria/k26.html) is highly similar
to the ZCU102, with slight differences in memory regions and the base UART controller.

To run the built image on the board, you have to use properly patched U-Boot - please see the [section for ZCU102](#zcu102), for the details.

You have to load the binary file into memory and run it:
```
ZynqMP> tftpboot 0x40000000 loader.img
...
ZynqMP> go 0x40000000
```

A QEMU emulator is not available for the Kria K26 at this stage.

## MaaXBoard {#maaxboard}

The MaaXBoard is a low-cost ARM SBC based on the NXP i.MX8MQ system-on-chip.
Expand Down
2 changes: 1 addition & 1 deletion loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ else ifeq ($(ARCH),riscv64)
endif

CFLAGS := -std=gnu11 -g -O3 -nostdlib -ffreestanding \
-MP -MD $(CFLAGS_ARCH) -I$(SEL4_SDK)/include \
-MP -MD $(CFLAGS_ARCH) -DBOARD_$(BOARD) -I$(SEL4_SDK)/include \
-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
-Wundef -Wno-nonnull -Wnested-externs

Expand Down
2 changes: 1 addition & 1 deletion loader/src/aarch64/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void arch_init(void)
}

// TODO: handle non-PSCI platforms better, see https://github.com/seL4/microkit/issues/401.
#if !defined(CONFIG_PLAT_BCM2711)
#if !defined(CONFIG_PLAT_BCM2711) && !defined(BOARD_kria_k26)
uint32_t ret = arm_smc32_call(PSCI_FUNCTION_VERSION, /* unused */ 0, 0, 0);
/* the return value has no error codes, but if we get it wrong this is what we will get */
if (ret == PSCI_RETURN_NOT_SUPPORTED) {
Expand Down
6 changes: 6 additions & 0 deletions loader/src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ void putc(uint8_t ch)
*UART_REG(TRANSMIT) = ch;
}
#elif defined(CONFIG_PLAT_ZYNQMP_ZCU102)

#if defined(BOARD_kria_k26)
#define UART_BASE 0xff010000
#else
#define UART_BASE 0xff000000
#endif

#define UART_CHANNEL_STS_TXEMPTY 0x8
#define UART_CHANNEL_STS 0x2C
#define UART_TX_RX_FIFO 0x30
Expand Down
3 changes: 3 additions & 0 deletions platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# This list is ordered based on the order in what the platforms were added
# in.
platforms:
- name: kria_k26
cmake_plat: zcu102
since: dev
- name: rock3b
cmake_plat: rk3568
since: dev
Expand Down
Loading