Skip to content

Commit 6b4c980

Browse files
committed
systems: add support for Armbian
Added support for detecting if running on a Armbian built system. Armbian is built on Debian/Ubuntu, so we're not changing the OS release/name. * Added support for Armbian's Linux kernel package naming, in order to be able to install the kernel headers. * Removed the ZRAM config from our own menu, Since Armbian has its own configuration tool (`armbian-config`) that handles it. ZRAM is configured and enabled y default on Armbian images.
1 parent 7a2a205 commit 6b4c980

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

scriptmodules/helpers.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ function _mapPackage() {
261261
isPlatform "rpi5" && pkg="linux-headers-rpi-2712"
262262
fi
263263
fi
264+
elif isPlatform "armbian"; then
265+
local branch="$(grep -oP "BRANCH=\K.*" /etc/armbian-release)"
266+
local family="$(grep -oP "LINUXFAMILY=\K.*" /etc/armbian-release)"
267+
pkg="linux-headers-${branch}-${family}"
264268
elif [[ -z "$__os_ubuntu_ver" ]]; then
265269
pkg="linux-headers-$(uname -r)"
266270
else

scriptmodules/supplementary/raspbiantools.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ function gui_raspbiantools() {
164164
3 "Remove some unneeded packages (pulseaudio / cups / wolfram)"
165165
4 "Disable screen blanker"
166166
5 "Enable needed kernel module uinput"
167-
6 "$zram_status compressed memory (ZRAM)"
168167
)
168+
# exclude ZRAM config for Armbian, it is handled by `armbian-config`
169+
! isPlatform "armbian" && options+=(6 "$zram_status compressed memory (ZRAM)")
170+
169171
local choice=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
170172
if [[ -n "$choice" ]]; then
171173
case "$choice" in

scriptmodules/system.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ function get_os_version() {
311311

312312
[[ -n "$error" ]] && fatalError "$error\n\n$(lsb_release -idrc)"
313313

314+
# check for Armbian, which can be built on Debian/Ubuntu
315+
if [[ -f /etc/armbian-release ]]; then
316+
__platform_flags+=("armbian")
317+
fi
318+
314319
# configure Raspberry Pi graphics stack
315320
isPlatform "rpi" && get_rpi_video
316321
}

0 commit comments

Comments
 (0)