{
  "id": 6217844,
  "title": "How to bring up the Linux Kernel on a new platform",
  "url": "https://urgent.news/2026/09/07/how-to-bring-up-the-linux-kernel-on-a-new-platform",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-07T21:22:11.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://werwolv.net/posts/linux_bringup/"
  },
  "original_language": "en",
  "account": "Bringing up the Linux Kernel on a new platform can be a complex task, but it is essential for running embedded systems. The most critical requirement for Linux to run is the hardware, which in this case is a minimal, emulated RISC-V CPU. The implementation involves 2000 lines of C++ code, including a simple RAM peripheral, SBI interface for timers, and a UART peripheral based on the WD8250 chip.\n\nAlthough the process of creating the emulator is beyond the scope of this article, the full implementation can be found at WerWolv/riscv-emulator. In a real system, the emulator would not be necessary, as the hardware would already be present. Instead, the CPU's address space would be mapped with the peripheral devices, and the kernel, device tree, and initramfs would be loaded using a bootloader like u-boot.\n\nTo get Linux running, one must configure and compile the Linux Kernel for the target platform, populate the LinuxKernel, DeviceTreeBlob, and InitRamFs arrays with the appropriate data, and compile the toolchain. The toolchain is essential for building applications that run on the target platform. The crosstool-ng Project simplifies the process of creating a toolchain for 32-bit RISC-V Linux by handling all the necessary configurations and compilations.\n\nAfter compiling the toolchain, one can then compile the Linux Kernel using the crosstool-ng toolchain. The compilation process can take up to an hour or more, depending on the machine's performance. Once the compilation is complete, the arch/riscv/boot/Image file contains the compiled kernel, which can now be executed. Additionally, a simple init program can be compiled as a statically linked binary and included in the initramfs, which is an Initial RAM File System containing files and directories available after the system has booted.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}