Replace two chained POSIX `[ ]` with a single bash `[[ ]]` using `&&`
inside the double brackets.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace POSIX `[ ]` with bash `[[ ]]` on four conditionals: file/path
existence checks and an array length comparison.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add loong64 to the list of architectures prepared by prepare_host_binfmt_qemu_cross().
This allows automatic registration and use of qemu-user emulation for LoongArch64
guests, enabling rootfs bootstrap and CI workflows targeting loong64.
This aligns Armbian with Debian’s upcoming native loong64 support (Forky) and allows
testing already via debian-ports and qemu-system-loongarch64.
Signed-off-by: Igor Pecovnik <igor@armbian.com>
The `DEST_LANG` variable affects rootfs cache content (locale is generated via
`locale-gen "${DEST_LANG}"` before cache is packaged), but it was not included in the
cache hash calculation.
This meant that changing `DEST_LANG` would not invalidate the existing cache,
potentially resulting in images with incorrect locale.
Include `DEST_LANG` in the `hash_hooks` calculation in `calculate_rootfs_cache_id()`.
Changes
- `lib/functions/rootfs/create-cache.sh`: Add `LANG=${DEST_LANG}` to the hash input
Result
Changing `DEST_LANG` now properly invalidates rootfs cache, ensuring the correct locale
is generated.
* fix(rootfs): pass GIT_FIXED_WORKDIR inline to fetch_from_repo
Instead of using 'export GIT_FIXED_WORKDIR' and then 'unset' after,
pass the variable inline to the fetch_from_repo call. This ensures
the variable only exists in the context of that specific command
and doesn't leak into subsequent calls.
This follows the same pattern used in uboot-git.sh and kernel-git.sh.
---------
Co-authored-by: Viacheslav Bocharov <adeep@lexina.in>
Update all copyright notices in shell scripts from 2025 to 2026.
## Changes
- **Igor Pecovnik**: 2013-2025 → 2013-2026 (129 files)
- **Ricardo Pardini**: 2023-2025 → 2023-2026, 2020-2025 → 2020-2026 (5 files)
## Additional Improvements
Also updated the backtitle in `lib/functions/configuration/interactive.sh`:
- Changed title from "Armbian building script" to "Armbian Linux build framework"
- Removed docs link for cleaner display
- Uses dynamic year calculation with separate declaration (fixes shellcheck SC2155)
- Enable bootscript templating using `envsubst`.
- Add generic bootscript.
- Fix: `test` does not support `==`, but deceptively returns `true` in case you use it.
- De-duplicate kernel commandline console options.
* always use http for apt repos
* pass possible proxy arguments to docker
* populate lower-case env variables with upper-case ones if not set otherwise
- Replace `armbian.list` with `armbian.sources`. This holds the same
information in a newer format, deb822.
- Replace HTTP with HTTPS for Armbian repositories.
- Replace creation of `armbian-config.list` with
`armbian-config.sources`. This holds the same information in a newer
format, deb822. This does not affect `armbian.list`.
See also: https://github.com/armbian/configng/pull/407
* Refactor armbian-config into install as external package
- https://github.armbian.com/configng repository is always present
- package can still be removed from the install list
Since this tool will have deeper integration with Armbian, we should probably drop possibility to remove the tool from the list.
* Enable armbian-config as extension
- `post_repo_customize_image`: runs after repos have been enabled
- `post_armbian_repo_customize_image`: same, but only if Armbian repo is enabled
- both run after apt update, so packages can be directly installed from repos
- refactor `prepare_host_binfmt_qemu()` out of `prepare_host_noninteractive()` and into `rootfs/qemu-static.sh`
- further split into more functions and return early to avoid deep nesting
- implement force import and load of qemu-arm for non-armhf capable arm64 hosts (incl magic numbers)
- enhance `deploy_qemu_binary_to_chroot()` & `undeploy_qemu_binary_from_chroot()`;
- add 2nd param "caller" for better logging/tracking
- does sanity-check and preserve existing binary if it exists
- explicitly deploy/undeploy for the 3 cases:
- image: moved undeploy from `post_debootstrap_tweaks()` into image build proper for consistency
- rootfs: was leaving trash behind (since post_debootstrap_tweaks never ran for rootfs), now properly undeploys
- initrd: was already fine, just added caller info
- added `arch-test` host dependency
- ensure `arch-test ${ARCH}` works during prepare-host
- > tl,dr: "can build 32-bit armv7 armhf using Apple silicon; can use rootfs cache cross-arch reliably"