armbian開發(fā)指北(一)
1. 什么是armbian
Armbian是一個基于Debian或Ubuntu的開源操作系統(tǒng),專門針對嵌入式ARM平臺進(jìn)行優(yōu)化和定制。Armbian可以運行在多種不同的嵌入式設(shè)備上,例如樹莓派、
、香蕉派等等。Armbian針對不同的嵌入式平臺,提供了相應(yīng)的硬件支持,可以讓用戶輕松地在這些平臺上搭建自己的嵌入式系統(tǒng)。
2. 為什么要使用armbian
Armbian提供了豐富的軟件庫和組件,包括Linux內(nèi)核、文件系統(tǒng)、應(yīng)用程序等,用戶可以根據(jù)自己的需要進(jìn)行選擇和安裝。Armbian還提供了一套完整的開發(fā)工具鏈,方便用戶進(jìn)行開發(fā)和調(diào)試工作。
總的來說,Armbian是一款功能強(qiáng)大、靈活性高、易于定制的嵌入式操作系統(tǒng),適用于各種不同的嵌入式設(shè)備和應(yīng)用場景。
3. 如何使用armbian
3.1 基本要求
x86_64 或 aarch64 計算機(jī),至少具有 2GB 內(nèi)存和 ~35GB 磁盤空間,用于虛擬機(jī)、WSL2、容器或裸機(jī)安裝
Ubuntu Jammy 22.04.x amd64 或 aarch64 用于本機(jī)構(gòu)建或任何支持 Docker 的 amd64 / aarch64 Linux 用于容器化。官方支持的編譯環(huán)境僅限 Ubuntu Jammy 22.04.x amd64 !
超級用戶權(quán)限(配置的 sudo 或 root 訪問權(quán)限)。
確保您的所有系統(tǒng)組件都是最新的。例如,過時的 Docker 二進(jìn)制文件可能會導(dǎo)致問題。
很多資源包下載都需要外網(wǎng),中國的用戶需要一個翻墻工具
3.2 開始構(gòu)建
$ apt-get -y install git
$ git clone --depth=1 --branch=main https://github.com/armbian/build
$ cd build
$ ./compile.sh
命令執(zhí)行后會進(jìn)行以下三個操作,具體的操作解釋,后續(xù)我會寫文章詳細(xì)解釋
交互式圖形界面。
通過安裝必要的依賴項和源來準(zhǔn)備工作區(qū)。
它指導(dǎo)整個過程并創(chuàng)建內(nèi)核包或即用型 SD 卡映像。
4. 項目結(jié)構(gòu)
├── cache ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Work / cache directory
│?? ├── aptcache ? ? ? ? ? ? ? ? ? ? ? ? Packages
│?? ├── ccache ? ? ? ? ? ? ? ? ? ? ? ? ? C/C++ compiler
│?? ├── docker ? ? ? ? ? ? ? ? ? ? ? ? ? Docker last pull
│?? ├── git-bare ? ? ? ? ? ? ? ? ? ? ? ? Minimal Git
│?? ├── git-bundles ? ? ? ? ? ? ? ? ? ? ?Full Git
│?? ├── initrd ? ? ? ? ? ? ? ? ? ? ? ? ? Ram disk
│?? ├── memoize ? ? ? ? ? ? ? ? ? ? ? ? ?Git status
│?? ├── patch ? ? ? ? ? ? ? ? ? ? ? ? ? ?Kernel drivers patch
│?? ├── pip ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Python
│?? ├── rootfs ? ? ? ? ? ? ? ? ? ? ? ? ? Compressed userspaces
│?? ├── sources ? ? ? ? ? ? ? ? ? ? ? ? ?Kernel, u-boot and other sources
│?? ├── tools ? ? ? ? ? ? ? ? ? ? ? ? ? ?Additional tools like ORAS
│?? └── utility
├── config ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Packages repository configurations
│?? ├── targets.conf ? ? ? ? ? ? ? ? ? ? Board build target configuration
│?? ├── boards ? ? ? ? ? ? ? ? ? ? ? ? ? Board configurations
│?? ├── bootenv ? ? ? ? ? ? ? ? ? ? ? ? ?Initial boot loaders environments per family
│?? ├── bootscripts ? ? ? ? ? ? ? ? ? ? ?Initial Boot loaders scripts per family
│?? ├── cli ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?CLI packages configurations per distribution
│?? ├── desktop ? ? ? ? ? ? ? ? ? ? ? ? ?Desktop packages configurations per distribution
│?? ├── distributions ? ? ? ? ? ? ? ? ? ?Distributions settings
│?? ├── kernel ? ? ? ? ? ? ? ? ? ? ? ? ? Kernel build configurations per family
│?? ├── sources ? ? ? ? ? ? ? ? ? ? ? ? ?Kernel and u-boot sources locations and scripts
│?? ├── templates ? ? ? ? ? ? ? ? ? ? ? ?User configuration templates which populate userpatches
│?? └── torrents ? ? ? ? ? ? ? ? ? ? ? ? External compiler and rootfs cache torrents
├── extensions ? ? ? ? ? ? ? ? ? ? ? ? ? Extend build system with specific functionality
├── lib ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Main build framework libraries
│?? ├── functions
│?? │?? ├── artifacts
│?? │?? ├── bsp
│?? │?? ├── cli
│?? │?? ├── compilation
│?? │?? ├── configuration
│?? │?? ├── general
│?? │?? ├── host
│?? │?? ├── image
│?? │?? ├── logging
│?? │?? ├── main
│?? │?? └── rootfs
│?? └── tools
├── output ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Build artifact
│?? └── deb ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Deb packages
│?? └── images ? ? ? ? ? ? ? ? ? ? ? ? ? Bootable images - RAW or compressed
│?? └── debug ? ? ? ? ? ? ? ? ? ? ? ? ? ?Patch and build logs
│?? └── config ? ? ? ? ? ? ? ? ? ? ? ? ? Kernel configuration export location
│?? └── patch ? ? ? ? ? ? ? ? ? ? ? ? ? ?Created patches location
├── packages ? ? ? ? ? ? ? ? ? ? ? ? ? ? Support scripts, binary blobs, packages
│?? ├── blobs ? ? ? ? ? ? ? ? ? ? ? ? ? ?Wallpapers, various configs, closed source bootloaders
│?? ├── bsp-cli ? ? ? ? ? ? ? ? ? ? ? ? ?Automatically added to armbian-bsp-cli package
│?? ├── bsp-desktop ? ? ? ? ? ? ? ? ? ? ?Automatically added to armbian-bsp-desktopo package
│?? ├── bsp ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Scripts and configs overlay for rootfs
│?? └── extras-buildpkgs ? ? ? ? ? ? ? ? Optional compilation and packaging engine
├── patch ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Collection of patches
│?? ├── atf ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ARM trusted firmware
│?? ├── kernel ? ? ? ? ? ? ? ? ? ? ? ? ? Linux kernel patches
| ? |?? └── family-branch ? ? ? ? ? ? ? ?Per kernel family and branch
│?? ├── misc ? ? ? ? ? ? ? ? ? ? ? ? ? ? Linux kernel packaging patches
│?? └── u-boot ? ? ? ? ? ? ? ? ? ? ? ? ? Universal boot loader patches
| ? ? ? ├── u-boot-board ? ? ? ? ? ? ? ? For specific board
| ? ??? └── u-boot-family ? ? ? ? ? ? ? ?For entire kernel family
├── tools ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Tools for dealing with kernel patches and configs
└── userpatches ? ? ? ? ? ? ? ? ? ? ? ? ?User: configuration patching area
? ?├── lib.config ? ? ? ? ? ? ? ? ? ? ? User: framework common config/override file
? ?├── config-default.conf ? ? ? ? ? ? ?User: default user config file
? ?├── customize-image.sh ? ? ? ? ? ? ? User: script will execute just before closing the image
?? ├── atf ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?User: ARM trusted firmware
?? ├── kernel ? ? ? ? ? ? ? ? ? ? ? ? ? User: Linux kernel per kernel family
?? ├── misc ? ? ? ? ? ? ? ? ? ? ? ? ? ? User: various
?? └── u-boot ? ? ? ? ? ? ? ? ? ? ? ? ? User: universal boot loader patches
CONTRIBUTING.md // We would love to have you join the Armbian
4. 感謝
此系列特別感謝
和 armbian中國開發(fā)者