Skip to content

HIDEYUKI-KISHIDA/tkernel2-aarch64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

02b93ca · May 17, 2026

History

2 Commits
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026
May 17, 2026

Repository files navigation

tk2-aarch64

Community port of T-Kernel 2.0 to AArch64 (ARMv8-A).

Item Detail
Target (today) QEMU virt machine, GICv2, PL011 UART
Kernel link mode M5b — official tkernel_2 sources + this port’s sysdepend
Verified test QEMU virt only — dual-task mutex (ABABABABAB), tk_ext_tsk, init task return
Build only (no HW) Pi 4 / Pi 5 images (BOARD=rpi4 / rpi5) — not tested on real boards; maintainer has no Pi 5

This is not an official TRON Forum board support package (BSP).

Author: Hideyuki Kishida
Contact: kishida19002709@gmail.com
GitHub: @HIDEYUKI-KISHIDA

Licenses: LICENSE (MIT for port code) and NOTICE (T-Kernel 2.0 / T-License 2.2).


Quick start (M5b, recommended)

Host: Linux or WSL2 with gcc-aarch64-linux-gnu and qemu-system-aarch64.

1. Clone this repository

# GitHub リポジトリ名の例: tkernel2-aarch64(スペース不可。表示名は GitHub で「T-Kernel 2.0 - AArch64」にできる)
git clone https://github.com/HIDEYUKI-KISHIDA/tkernel2-aarch64.git
cd tkernel2-aarch64

2. Clone official T-Kernel 2.0 sources (required for M5b)

# Example: sibling directory
git clone https://github.com/tron-forum/tkernel_2.git ../tkernel_2

3. Build and run

sudo apt install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu qemu-system-arm
make clean
make M5B=1 TKERNEL2_ROOT=../tkernel_2
make M5B=1 run

Exit QEMU: Ctrl+A, then X.

Success markers: ABABABABAB, [M5] COMPLETE, [M5b] kernel idle (no runnable tasks).

Full log reference: tk2-aarch64-port-spec.md §13.6.


Build modes

Mode Command Description
M5b (recommended) make M5B=1 Links upstream tkernel_2 + port layer
M5a (legacy) make Cooperative tk_sched shim only (no official kernel)
make M5B=1 TKERNEL2_ROOT=/path/to/tkernel_2   # if not ../tkernel_2
make M5B=1 debug                             # QEMU waits for GDB
make M5B=1 BOARD=rpi5 handoff-rpi5           # Pi 5 ZIP for someone with hardware (docs/HANDOFF-rpi5.ja.md)
make M5B=1 DEBUG_TICK=1 run                  # show 1 Hz tick (debug only)

Without a Raspberry Pi: use QEMU only (make M5B=1 run). See docs/STATUS.ja.md.


Milestones

ID Status Notes
M0–M4 Done QEMU bring-up, MMU, context switch
M5b Done Official tkernel_2, tk_cre_tsk / mutex / tk_ext_tsk
M6 Build only BOARD=rpi4no Pi 4 hardware test
M7 Build only BOARD=rpi5no Pi 5 hardware test (docs/PI5.ja.md)

What this repository contains

Path Role
kernel/sysdepend/cpu/aarch64/ CPU port (dispatch, MMU, exceptions)
kernel/sysdepend/device/common/ Shared PL011, GICv2, timer, IRQ dispatch
kernel/sysdepend/device/virt_a64/ QEMU virt board glue
kernel/sysdepend/device/rpi4/ Pi 4 board glue (M6)
kernel/sysdepend/device/rpi5/ Pi 5 board glue (M7)
docs/STATUS.ja.md 検証状況(QEMU 済 / Pi 未実機)
docs/PI5-USER.ja.md Pi 5 実機向け使い方(Release ZIP 用)
docs/PI5.ja.md Pi 5 技術メモ(開発者向け)
docs/PI4.ja.md Pi 4(未実機)
kernel/tk/port/ M5b glue (tk_port_*, config.h, offset generation)
kernel/tk/m5_tk_task.c Sample dual-task test
tk2-aarch64-port-spec.md Design spec (Japanese)

Upstream tkernel_2 is not vendored — clone separately (NOTICE).


Documentation

Document Language Purpose
docs/STATUS.ja.md Japanese What is verified vs build-only
tk2-aarch64-port-spec.md Japanese Full design spec, QEMU verification logs
docs/BUILD.ja.md Japanese Build / troubleshooting
docs/PI5-USER.ja.md Japanese Pi 5 hardware — user guide (release tarball)
docs/PI5-USER.en.md English Pi 5 hardware — user guide
docs/PI5.ja.md Japanese Pi 5 technical notes (developers)
docs/PI4.ja.md Japanese Pi 4 notes (unverified)
docs/GITHUB.ja.md Japanese First-time GitHub upload
docs/RELEASE.md English Release notes (v0.1.0)
docs/COPYRIGHT_AND_PUBLISHING.en.md English TRON Forum, publication levels
docs/INTENT.ja-en.md JA / EN Research intent, non-military use

Development intent

English: Research and education. Not official TRON Forum support. Military or weapons-related use is not welcomed. Other peaceful use is welcome under LICENSE and NOTICE.

日本語: 研究開発・教育目的の非公式移植です。軍事用途は望みません。詳細は docs/INTENT.ja-en.md


Disclaimer

  • Provided without warranty; bring-up quality only.
  • Do not claim TRON Forum endorsement or Raspberry Pi hardware verification unless you publish reproducible logs (see docs/STATUS.ja.md, spec §0.6–§0.7).
  • QEMU virt M5b is verified; Pi 4/5 targets are source + build only as of this release.