> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tsukineos.top/llms.txt
> Use this file to discover all available pages before exploring further.

# TsukineOS 建構環境：相依性與交叉編譯設定

> 建構主機相依性與交叉編譯說明

# 建構環境

## 主機需求

* 任意現代 Linux 發行版（推薦 x86\_64）
* 約 20 GB 可用磁碟空間
* 連網（拉取核心/BusyBox 原始碼）

## 相依性（Debian/Ubuntu）

```bash theme={null}
sudo apt install build-essential bc flex bison libssl-dev libelf-dev \
  wget cpio gzip xz-utils
```

## 相依性（Arch）

```bash theme={null}
sudo pacman -S base-devel openssl elfutils wget cpio gzip xz
```

## 靜態編譯 BusyBox

```bash theme={null}
make menuconfig   # 在 Settings 中開啟 "Build static binary"
make -j$(nproc)
```

## 交叉編譯（x86\_64 主機建構 ARM64）

```bash theme={null}
sudo apt install gcc-aarch64-linux-gnu
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
# 核心、BusyBox、自研工具均在此環境下編譯
```

## 提示

* 推薦在 TsukineOS 或乾淨的容器/虛擬機中建構，避免宿主函式庫汙染。
* 各元件的具體編譯參數以倉庫 `TsukineOS` 當前原始碼為準。

<Note>
  本頁內容由 AI 翻譯，可能不完全準確。以簡體中文原文為準。
</Note>

***

© 2024-2026 TsutokiTeo/JunweiZhang. All rights reserved.
