armbian-build/extensions
Igor Velkov 1b74748622
Extension: ccache-remote — shared compilation cache via Redis/HTTP (#9369)
* add hook to allow customizing before kernel make env creation
* Hook runs in docker_cli_prepare_launch() just before DOCKER_EXTRA_ARGS
is processed, allowing extensions to add Docker arguments with a more
descriptive hook name than add_host_dependencies.
* Extension: ccache-remote

Enables ccache with remote Redis storage for sharing compilation cache across build hosts.

Features:
- Auto-discovery via Avahi/mDNS (ccache.local hostname)
- Explicit Redis server configuration via CCACHE_REMOTE_STORAGE
- Build statistics display at end of build (hit/miss/error rates)
- Support for both Docker and native builds
- Hooks for kernel and u-boot compilation environments

Documentation includes server setup instructions with security warnings,
client mDNS configuration, and cache sharing requirements.


* uboot: fix ccache environment and add extension hook

U-Boot build uses `env -i` which clears all environment variables.
CCACHE_DIR and CCACHE_TEMPDIR were not explicitly passed to make,
unlike kernel build (kernel-make.sh). This caused ccache to use
default directory instead of configured Armbian one, breaking
cache statistics and shared cache functionality.

Changes:
- Add CCACHE_DIR and CCACHE_TEMPDIR to uboot_make_envs
- Add uboot_make_config hook for extensions (similar to kernel_make_config),
  allowing modification of environment variables before compilation

* add long list of allowed ccache-related env vars
* set permissions to ccache files RW for everyone if cache not private
* ccache: add ccache_post_compilation hook for extensions
* ccache-remote: use ccache_post_compilation hook instead of cleanup handler

Show remote ccache stats after each compilation (kernel, uboot) via hook,
instead of once at the end via cleanup handler. Stats now shown even on
build failure.

* ccache: show stats with safe arithmetic
* ccache/uboot: improve code comments per review feedback

- uboot.sh: clarify ARMBIAN=foe workaround for dual-compiler scenario
- ccache-remote.sh: document that CCACHE_REDIS_CONNECT_TIMEOUT must be
  set before extension loads

* ccache-remote: mask storage URLs in logs

Mask CCACHE_REMOTE_STORAGE when emitting Docker env debug logs.

* ccache-remote: extract ccache_inject_envs() helper to deduplicate passthrough loops

Extract ccache_inject_envs() helper to deduplicate identical passthrough
loops in kernel and uboot make config hooks.

ccache-remote: rename functions to follow project naming conventions

Rename get_redis_stats and mask_storage_url to ccache_get_redis_stats
and ccache_mask_storage_url to follow project naming conventions.

ccache-remote: mask credentials in debug log output for passthrough loops

Mask CCACHE_REMOTE_STORAGE value through ccache_mask_storage_url() before
logging in both Docker env and make env passthrough loops to avoid leaking
credentials into build logs.

* ccache-remote: add HTTP/WebDAV backend and DNS discovery
* ccache-remote: move extension script into directory layout
* ccache-remote: add server setup docs and config files
* ccache-remote: validate Redis credentials in URLs
* ccache-remote: document Redis auth options and safe passwords

Add separate insecure config example for trusted networks.

Recommend URL-safe hex passwords and update setup docs.

* ccache-remote: improve Docker loopback handling and IPv6 host parsing
2026-03-01 01:18:35 +01:00
..
ccache-remote Extension: ccache-remote — shared compilation cache via Redis/HTTP (#9369) 2026-03-01 01:18:35 +01:00
cloud-init extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
initramfs-usb-gadget-ums bash: run shellfmt, no changes 2023-11-25 13:38:30 +01:00
network apt: bypass apt-helper wait-online on multi-NIC systems 2026-02-01 00:41:50 +01:00
allwinner-kernel-bump.sh Run shellfmt to complete code 2024-06-22 19:22:24 +02:00
amlogic-fip-blobs.sh extensions: add gxlimg and amlogic-fip-blobs 2025-09-15 21:10:38 +02:00
apa.sh extensions: standardize apt-get option placement & separate package arguments in APA 2025-08-16 17:44:40 +02:00
arm64-compat-vdso.sh extension: add arm64-compat-vdso for 32-bit vDSO support 2026-01-25 11:36:20 +01:00
armbian-config.sh Preparation for http proxy caching (#8281) 2025-06-13 10:31:24 +02:00
armbian-live-patch.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
bcmdhd-spacemit.sh OrangePi-RV2: wlan driver for edge 2026-02-19 22:10:34 -05:00
bcmdhd.sh extensions: fix outdated ghproxy mirror address 2025-02-10 07:51:22 +01:00
bluetooth-hciattach.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
c-plus-plus-compiler.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
cleanup-space-final-image.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
detect-unused-extensions.sh armbian-next: cleanup extensions logging, using display_alert new levels extensions (SHOW_EXTENSIONS=yes) and extensionstrace (SHOW_EXTENSIONS_TRACE=yes) 2023-02-18 07:39:54 -03:00
fake-vcgencmd.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
fs-btrfs-support.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
fs-cryptroot-support.sh add CRYPTROOT_AUTOUNLOCK option and fix CRYPTROOT for uefi builds 2025-11-02 20:15:19 +01:00
fs-f2fs-support.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
fs-nilfs2-support.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
fs-xfs-support.sh extensions: Add "Extension: ${EXTENSION}: " prefix to some extension logs 2024-07-18 12:30:11 +02:00
gen-sample-extension-docs.sh documentation extensions - fix link for documenting opt-out functionality 2026-01-08 12:07:56 +01:00
grub-riscv64.sh apply cryptroot fixes to grub-riscv64 too re. #6280 2025-11-02 20:15:19 +01:00
grub-with-dtb.sh grub-with-dtb: accept GRUB_FDT_FILE if BOOT_FDT_FILE is unset 2025-03-19 06:52:59 +01:00
grub.sh extension: grub: deploy qemu binary when doing cross build 2026-01-22 13:19:24 +01:00
gxlimg.sh extensions: gxlimg: Update repo URL 2025-11-16 20:29:04 +01:00
image-output-abl.sh feat: add extraargs from armbianEnv for mkbootimg 2026-02-05 01:04:38 +01:00
image-output-oowow.sh extensions: image-output-oowow: creates Khadas oowow compatible images 2023-08-15 18:53:55 +05:30
image-output-ovf.sh extensions: don't export, declare -g 2023-04-15 22:43:06 +02:00
image-output-qcow2.sh extensions: don't export, declare -g 2023-04-15 22:43:06 +02:00
image-output-utm.sh extensions/image-output-utm: fix serial console ttyAMA0 for arm64 (#8851) 2025-11-03 18:14:00 +01:00
image-output-vhd-azure.sh extensions: image-output-vhd renamed to image-output-vhd-azure 2024-01-14 19:40:33 +01:00
image-output-vhdx.sh extensions: image-output-vhdx: add output for dynamic .vhdx (in a zip file, to avoid sparseness errors) 2024-01-14 19:40:33 +01:00
jethub-burn.sh jethub-burn: add cleanup handlers and partition validation 2026-01-15 18:11:52 +03:00
kernel-rust.sh extensions: add kernel-rust extension for Rust support in kernel builds 2026-02-28 22:30:37 +01:00
kernel-version-toolchain.sh extension: kernel-version-toolchain for compiler in artifact version 2026-02-10 14:21:28 -05:00
lowmem.sh LowMem: Slim down initramfs and set /run size 2025-11-10 11:47:40 +01:00
lsmod.sh armbian-next: artifacts: firmware/rootfs and actual usage of artifacts during image build 2023-02-18 07:46:03 -03:00
lvm.sh improve(lvm,cryptroot): export private key with a structurally equal naming scheme; cleanup 2024-12-13 10:01:19 +01:00
marvell-tools.sh Add shebangs for shellcheck (#4493) 2022-11-27 21:44:50 +01:00
mesa-vpu.sh Refactor mesa-vpu extension: simplify and add arch-specific browser selection 2026-02-03 18:14:41 +01:00
mtkflash.sh extensions/mtkflash: mtk-flash --no-erase-mmc1 landed upstream as --preserve-boot1 2026-01-08 18:55:09 +01:00
nicod-armbian-gaming.sh armbian-gaming customize launcher for @NicoD-SBC (v2) 2023-06-12 10:47:15 +02:00
nomod.sh armbian-next: artifacts: firmware/rootfs and actual usage of artifacts during image build 2023-02-18 07:46:03 -03:00
nvidia.sh Extension: Bump Nvidia propriatery driver 2026-02-02 15:23:04 +01:00
preset-firstrun.sh Unifying style of variables 2024-03-03 16:08:04 +01:00
radxa-aic8800.sh extensions: radxa-aic8800: allow 6.19; skip DKMS only on >= 6.20 (#9397) 2026-02-14 06:30:00 +01:00
rkbin-tools.sh rkbin-tools: allow using custom rkbin RKBIN_GIT_BRANCH as well as RKBIN_GIT_URL 2023-07-01 14:49:49 +02:00
rkdevflash.sh rkdevflash: don't wait for "Loader" mode after sending spl_loader; show the loop counter 2023-07-01 14:50:20 +02:00
sunxi-tools.sh Drop HOST OS that doesnot support crust compilation 2023-08-22 13:03:51 +02:00
syterkit-allwinner.sh add support for allwinner T527 Avaota-A1 (#6495) 2024-04-26 09:22:17 +02:00
ti-debpkgs.sh Race conditions: installing packages before adding a repo 2026-02-12 22:06:22 +01:00
u-boot-menu.sh u-boot-menu: curb logging, no need to emit warn's here 2023-08-12 10:05:02 +02:00
uboot-btrfs.sh extensions: add uboot-btrfs extension to add btrfs support in u-boot 2025-12-01 04:37:20 +08:00
uefi-edk2-rk3588.sh extensions: uefi-edk2-rk3588: deploy edk2 (not u-boot) for rk3588 boards 2023-11-19 22:31:33 +01:00
ufs.sh extensions/ufs: don't check sfdisk version also when BUILDING_IMAGE!=yes 2026-01-06 23:19:08 +01:00
uwe5622-allwinner.sh Consolidate uwe5622 wireless settings into an extension 2023-12-21 06:34:59 +05:30
v4l2loopback-dkms.sh Extension V4L2: disable installation on minimal images 2025-02-24 11:54:08 +01:00
vmware-vm.sh armbian-next: vmware-vm core extension: enables image-output-ovf and adds some cli and desktop packages to image list 2023-02-18 07:40:25 -03:00
watchdog.sh Extension adds watchdog package and enable watchdog device (/dev/wachdog) 2025-12-11 04:06:24 +08:00
wayland-sessions-mask.sh Add board-level extension to mask Wayland desktop sessions 2026-01-21 19:25:26 +01:00
xorg-lima-serverflags.sh Run shellfmt to complete code 2024-06-22 19:22:24 +02:00
yt6801.sh add yt6801 dkms extension 2025-08-04 17:34:24 +08:00
zfs.sh extensions: don't export, declare -g 2023-04-15 22:43:06 +02:00