armbian-build/README.md

259 lines
13 KiB
Markdown
Raw Normal View History

<p align="center">
<a href="#build-framework">
<img src=".github/armbian-logo.png" alt="Armbian logo" width="144">
</a><br>
<strong>Armbian Linux Build Framework</strong><br>
<br>
<a href=https://github.com/armbian/build/graphs/contributors><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/armbian/build?logo=stackexchange&label=Contributors&style=for-the-badge&branch=main&logoColor=white"></a>
<a href=https://github.com/armbian/os><img alt="Artifacts generation" src="https://img.shields.io/github/actions/workflow/status/armbian/os/complete-artifact-matrix-all.yml?logo=dependabot&label=CI%20Build&style=for-the-badge&branch=main&logoColor=white"></a>
<a href=https://github.com/armbian/build/commits/main><img alt="GitHub last commit (branch)" src="https://img.shields.io/github/last-commit/armbian/build/main?logo=github&label=Last%20commit&style=for-the-badge&branch=main&logoColor=white"></a>
</p>
2023-05-29 19:52:56 +00:00
## What does this project do?
2023-11-20 15:38:50 +00:00
- Builds custom **kernel**, **image** or a **distribution** optimized for low-resource hardware,
- Include filesystem generation, low-level control software, kernel image and **bootloader** compilation,
- Provides a **consistent user experience** by keeping system standards across different platforms.
## Getting started
### Requirements for self hosted
2021-06-24 12:50:00 +00:00
- x86_64 / aarch64 / riscv64 machine
- at least 8GB (less for non-[BTF](https://docs.kernel.org/bpf/btf.html) builds) of memory and ~50GB of disk space for VM, container, or bare-metal installation
- **Armbian / Ubuntu Jammy 22.04.x** for native building or any Docker capable Linux for containerised
- **Windows 10/11 with WSL2 subsystem** running Armbian / Ubuntu Jammy 22.04.x
- Superuser rights (configured sudo or root access).
- Make sure your system is up-to-date! Outdated Docker binaries, for example, can cause trouble
For stable branch use `--branch=v25.05`
```bash
apt-get -y install git
git clone --depth=1 --branch=main https://github.com/armbian/build
2020-02-06 21:57:41 +00:00
cd build
./compile.sh
```
2020-02-06 21:57:41 +00:00
<a href="#how-to-build-an-image-or-a-kernel"><img src=".github/README.gif" alt="Armbian logo" width="100%"></a>
- Interactive graphical interface.
2023-05-29 19:52:56 +00:00
- Prepares the workspace by installing the necessary dependencies and sources.
- It guides the entire process and creates a kernel package or a ready-to-use SD card image.
2020-02-06 21:57:41 +00:00
### Build parameter examples
2020-02-06 21:57:41 +00:00
2023-05-29 19:52:56 +00:00
Show work-in-progress areas in interactive mode:
2020-02-06 21:57:41 +00:00
```bash
2020-02-06 21:57:41 +00:00
./compile.sh EXPERT="yes"
```
Build minimal CLI Armbian Jammy for Bananapi M5 with LTS kernel:
2020-02-06 21:57:41 +00:00
```bash
./compile.sh \
BOARD=bananapim5 \
BRANCH=current \
RELEASE=noble \
BUILD_MINIMAL=yes \
BUILD_DESKTOP=no \
KERNEL_CONFIGURE=no
```
Build with GitHub actions: ([advanced version](https://github.com/armbian/os/blob/main/.github/workflows/complete-artifact-one-by-one.yml))
```
name: "Build Armbian"
on:
workflow_dispatch:
jobs:
build-armbian:
runs-on: ubuntu-24.04-arm # use ubuntu-24.04 when building x86 or riscv64
steps:
- uses: armbian/build@main
with:
armbian_token: "${{ secrets.GITHUB_TOKEN }}" # GitHub token
armbian_release: "noble" # userspace
armbian_target: "build" # build=image, kernel=kernel
armbian_board: "bananapim5" # build target
2020-02-06 21:57:41 +00:00
```
Generated image will be uploaded to your repository release. Note: GitHub upload file limit is 2Gb.
2020-02-06 21:57:41 +00:00
## More information:
- [Building Armbian](https://docs.armbian.com/Developer-Guide_Build-Preparation/) (how to start)
- [Build commands](https://docs.armbian.com/Developer-Guide_Build-Commands/) and [switches](https://docs.armbian.com/Developer-Guide_Build-Switches/) (build options)
2023-12-18 18:47:39 +00:00
- [User configuration](https://docs.armbian.com/Developer-Guide_User-Configurations/) (how to add packages, patches, and override sources config)
- [System config](https://docs.armbian.com/User-Guide_Armbian-Config/) (menu driven utility to setup OS and HW features)
2020-02-06 21:57:41 +00:00
2023-12-18 18:47:39 +00:00
## Download prebuilt images releases
2023-12-18 18:47:39 +00:00
### Point
- [manually released **standard supported** builds](https://www.armbian.com/download/?device_support=Standard%20support) (quarterly)
### Rolling
- [automatically released **staging and standard supported** builds](https://github.com/armbian/os/releases/latest) (daily)
- [automatically released **community maintained** builds](https://github.com/armbian/community/releases/latest) (weekly)
2023-05-29 19:52:56 +00:00
## Compared with industry standards
2020-02-06 21:57:41 +00:00
2023-11-20 15:38:50 +00:00
<details><summary>Expand</summary>
2023-05-29 19:52:56 +00:00
Check similarities, advantages and disadvantages compared with leading industry standard build software.
2020-02-06 21:57:41 +00:00
Function | Armbian | Yocto | Buildroot |
|:--|:--|:--|:--|
2021-06-24 12:50:00 +00:00
| Target | general purpose | embedded | embedded / IOT |
2020-02-06 21:57:41 +00:00
| U-boot and kernel | compiled from sources | compiled from sources | compiled from sources |
2021-06-24 12:50:00 +00:00
| Board support maintenance &nbsp; | complete | outside | outside |
2020-02-06 21:57:41 +00:00
| Root file system | Debian or Ubuntu based| custom | custom |
| Package manager | APT | any | none |
| Configurability | limited | large | large |
| Initramfs support | yes | yes | yes |
| Getting started | quick | very slow | slow |
| Cross compilation | yes | yes | yes |
2023-11-20 15:38:50 +00:00
</details>
2017-01-14 21:48:36 +00:00
## Project structure
2020-02-06 21:57:41 +00:00
<details><summary>Expand</summary>
2020-02-06 21:57:41 +00:00
```text
├── 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
├── config-example.conf User: example user config file
├── customize-image.sh User: script will execute just before closing the image
   ├── atf User: ARM trusted firmware
   ├── extensions User: Extend build system with specific functionality
   ├── kernel User: Linux kernel per kernel family
   ├── misc User: various
   └── u-boot User: universal boot loader patches
2020-02-06 21:57:41 +00:00
```
</details>
2020-02-06 21:57:41 +00:00
2023-05-29 19:52:56 +00:00
## Contribution
2021-06-24 12:50:00 +00:00
2023-12-18 18:47:39 +00:00
### Want to help?
2023-12-18 18:47:39 +00:00
We always need those volunteering positions:
2020-02-06 21:57:41 +00:00
2023-12-18 18:47:39 +00:00
- [Code reviewer](https://forum.armbian.com/staffapplications/application/23-code-reviewer/)
- [Build framework maintainer](https://forum.armbian.com/staffapplications/application/9-build-framework-maintainer/)
- [Test Automation Engineer](https://forum.armbian.com/staffapplications/application/19-test-automation-engineer/)
2020-02-06 21:57:41 +00:00
2023-12-18 18:47:39 +00:00
Just apply and follow!
2020-02-06 21:57:41 +00:00
## Support
2020-02-06 21:57:41 +00:00
2023-05-29 19:52:56 +00:00
For commercial or prioritized assistance:
- Book an hour of [professional consultation](https://calendly.com/armbian/consultation)
2023-11-20 15:38:50 +00:00
- Consider becoming a [project partner](https://forum.armbian.com/subscriptions/)
- [Contact us](https://armbian.com/contact)!
2023-11-20 15:38:50 +00:00
Free support:
Find free support via [general project search engine](https://www.armbian.com/search), [documentation](https://docs.armbian.com), [community forums](https://forum.armbian.com/) or [IRC/Discord](https://docs.armbian.com/Community_IRC/). Remember that our awesome community members mainly provide this in a **best-effort** manner, so there are no guaranteed solutions.
2020-02-06 21:57:41 +00:00
## Contact
2020-02-06 21:57:41 +00:00
- [Forums](https://forum.armbian.com) for Participate in Armbian
2023-12-18 18:47:39 +00:00
- IRC: `#armbian` on Libera.chat / oftc.net
- Matrix: [https://forum.armbian.com/topic/40413-enter-the-matrix/](https://forum.armbian.com/topic/40413-enter-the-matrix/)
- Discord: [https://discord.gg/armbian](https://discord.gg/armbian)
- Follow [@armbian](https://twitter.com/armbian) on 𝕏 (formerly known as Twitter), <a rel="me" href="https://fosstodon.org/@armbian">Mastodon</a> or [LinkedIn](https://www.linkedin.com/company/armbian).
- Bugs: [issues](https://github.com/armbian/build/issues) / [JIRA](https://armbian.atlassian.net/jira/dashboards/10000)
- Office hours: [Wednesday, 12 midday, 18 afternoon, CET](https://calendly.com/armbian/office-hours)
2020-02-06 21:57:41 +00:00
## Contributors
2020-02-06 21:57:41 +00:00
2023-05-29 19:52:56 +00:00
Thank you to all the people who already contributed to Armbian!
2020-02-06 21:57:41 +00:00
<a href="https://github.com/armbian/build/graphs/contributors">
<img src="https://contrib.rocks/image?repo=armbian/build" />
</a>
2020-02-06 21:57:41 +00:00
### Also
2020-02-06 21:57:41 +00:00
- [Current and past contributors](https://github.com/armbian/build/graphs/contributors), our families and friends.
- [Support staff](https://forum.armbian.com/members/2-moderators/) that keeps forums usable.
- [Friends and individuals](https://armbian.com/authors) who support us with resources and their time.
2023-05-29 19:52:56 +00:00
- [The Armbian Community](https://forum.armbian.com/) helps with their ideas, reports and [donations](https://www.armbian.com/donate).
2020-02-06 21:57:41 +00:00
## Armbian Partners
2020-02-06 21:57:41 +00:00
Armbian's partnership program helps to support Armbian and the Armbian community! Please take a moment to familiarize yourself with our Partners:
- [Click here to visit our Partners page!](https://armbian.com/partners)
- [How can I become a Partner?](https://forum.armbian.com/subscriptions)
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=armbian/build&type=Date)](https://star-history.com/#armbian/build&Date)
## License
This software is published under the GPL-2.0 License license.