{"id":13511476,"url":"https://github.com/littlekernel/lk","last_synced_at":"2025-05-14T14:07:33.005Z","repository":{"id":2116289,"uuid":"3058456","full_name":"littlekernel/lk","owner":"littlekernel","description":"LK embedded kernel","archived":false,"fork":false,"pushed_at":"2025-05-07T06:55:41.000Z","size":29172,"stargazers_count":3338,"open_issues_count":102,"forks_count":663,"subscribers_count":252,"default_branch":"master","last_synced_at":"2025-05-07T07:39:55.852Z","etag":null,"topics":["operating-system","rtos"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/littlekernel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-12-27T19:19:36.000Z","updated_at":"2025-05-07T06:55:45.000Z","dependencies_parsed_at":"2023-02-12T11:31:24.286Z","dependency_job_id":"ebcf5d71-e7dd-4f34-959c-8b56dc60547c","html_url":"https://github.com/littlekernel/lk","commit_stats":{"total_commits":2403,"total_committers":103,"mean_commits":23.33009708737864,"dds":0.4968789013732834,"last_synced_commit":"a1eb850079f4059ee0c22a7da07c473a423ec1c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littlekernel%2Flk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littlekernel%2Flk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littlekernel%2Flk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littlekernel%2Flk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/littlekernel","download_url":"https://codeload.github.com/littlekernel/lk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159194,"owners_count":22024558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["operating-system","rtos"],"created_at":"2024-08-01T03:00:51.121Z","updated_at":"2025-05-14T14:07:32.986Z","avatar_url":"https://github.com/littlekernel.png","language":"C","funding_links":[],"categories":["Projects","C","C (61)","Library","OS"],"sub_categories":["Low Level","Random Number Generation"],"readme":"# The Little Kernel Embedded Operating System\n\nThe LK kernel is an SMP-aware kernel designed for small systems ported to a variety of platforms and cpu architectures.\n\nSee https://github.com/littlekernel/lk for the latest version.\n\n### High Level Features\n\n- Fully-reentrant multi-threaded preemptive kernel\n- Portable to many 32 and 64 bit architectures\n- Support for wide variety of embedded and larger platforms\n- Powerful modular build system\n- Large number of utility components selectable at build time\n\n### Supported architectures\n\n- ARM32\n  - Cortex-M class cores (armv6m - armv8m)\n  - ARMv7+ Cortex-A class cores\n- ARM64\n  - ARMv8 and ARMv9 cores\n- RISC-V 32 and 64bit bit in machine and supervisor mode\n- x86-32 and x86-64\n- Motorola 68000\n- Microblaze\n- MIPS\n- OpenRISC 1000\n- VAX (experimental)\n\n### [TODO](docs/todo.md)\n\n### To build and test for ARM64 on linux\n\n1. install or build qemu. v2.4 and above is recommended.\n2. install gcc for arm64 (see note 1)\n3. run scripts/do-qemuarm -6  (from the lk directory)\n4. you should see 'welcome to lk/MP'\n\nThis will get you a interactive prompt into LK which is running in qemu\narm64 machine 'virt' emulation. type 'help' for commands.\n\nNote: for ubuntu x86-64\nsudo apt-get install gcc-aarch64-linux-gnu\nor fetch a prebuilt toolchain from\nhttps://newos.org/toolchains/aarch64-elf-14.1.0-Linux-x86_64.tar.xz\n\n\n### Building with LLVM-based toolchains\n\nTo build LK with a LLVM-based toolchain you will have to manually specify the compiler and linker in the environemnt.\nUnlike GCC clang is a cross-compiler by default, so the target needs to be specified as part of the CC/CXX/CPP variables.\nFor example, assuming LLVM is in `/opt/llvm/bin/`, the following command will work to build for 64-bit RISC-V:\n\n```\ngmake qemu-virt-riscv64-test 'CC=/opt/llvm/bin/clang --target=riscv64-unknown-elf' 'CPP=/opt/llvm/bin/clang-cpp --target=riscv64-unknown-elf' 'CXX=/opt/llvm/bin/clang++ --target=riscv64-unknown-elf' 'LD=/opt/llvm/bin/ld.lld' TOOLCHAIN_PREFIX=/opt/llvm/bin/llvm- CPPFILT=/opt/llvm/bin/llvm-cxxfilt\n```\nTOOLCHAIN_PREFIX can be set to use the LLVM binutils, but due to the different naming of `llvm-cxxfilt` vs `c++filt` it needs to be set explicitly.\n\nTo build for AArch64 the command looks similar, just with a different `--target=` flag.\n```\ngmake qemu-virt-arm64-test 'CC=/opt/llvm/bin/clang --target=aarch64-unknown-elf' 'CPP=/opt/llvm/bin/clang-cpp --target=aarch64-unknown-elf' 'CXX=/opt/llvm/bin/clang++ --target=aarch64-unknown-elf' 'LD=/opt/llvm/bin/ld.lld' TOOLCHAIN_PREFIX=/opt/llvm/bin/llvm- CPPFILT=/opt/llvm/bin/llvm-cxxfilt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittlekernel%2Flk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittlekernel%2Flk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittlekernel%2Flk/lists"}