Commit Graph

233 Commits

Author SHA1 Message Date
Sven-Ola Tuecke
e527a1783f OrangePi-RV2: add support for RISCV64 compile-to-binaries.
Required to compile BCM bluetooth firmware hacking tool.

Signed-off-by: Sven-Ola Tuecke <sven-ola@gmx.de>
2026-02-19 22:10:34 -05:00
Igor Pecovnik
4c963e2930 docker: improve auto-pull cronjob with opt-in flag and cleanup
- Add ARMBIAN_DOCKER_AUTO_PULL environment variable (opt-in, must be explicitly set to "yes")
- Move auto-pull cronjob setup from requirements to docker CLI
- Add automatic cleanup of cronjob files when flag is disabled/removed
- Remove verbose "unchanged" messages for cleaner output
- Simplify control flow in docker_ensure_auto_pull_cronjob()
2026-02-01 00:22:54 +01:00
Igor Pecovnik
882d7e3dfd docker: add automatic image pull cronjob and cleanup system
- Add docker_cleanup_old_images() to remove dangling images and keep only 2 most recent per tag
- Add docker_pull_with_marker() to pull images and update marker files tracking last pull time
- Add docker_setup_auto_pull_cronjob() to create/update system cronjob and wrapper script via hash-based detection
- Add docker_ensure_auto_pull_cronjob() to ensure cronjob is installed and up-to-date
- Create self-contained wrapper script at /usr/local/bin/armbian-docker-pull for cron execution
- Store configuration hash in /var/lib/armbian/docker-pull.hash for smart update detection
- Install cronjob at /etc/cron.d/armbian-docker-pull to pull images every 12 hours
- Move cronjob setup from docker_cli_prepare() to requirements command
- Cronjob is now only installed when users explicitly run ./compile.sh requirements
- Prevents "12 hours since last pull, pulling again" delay during builds

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-02-01 00:22:54 +01:00
Ricardo Pardini
acfd9c8dcb "get completely rid of dead code toolchain stuff", pt2
- this stuff has been laying around, unused, for years
2026-01-14 20:08:21 +01:00
Ricardo Pardini
6889c8c0a4 drop find_toolchains, SKIP_EXTERNAL_TOOLCHAINS and all $toolchain PATH injections
- we've had SKIP_EXTERNAL_TOOLCHAINS=yes for ~5 years now
- drop all usages, mostly through `find_toolchains()`
- drop all manual PATH env injections (we've centralized if ever needed)
2026-01-14 20:08:21 +01:00
Ricardo Pardini
001c65df07 u-boot: run binwalk on all the produced u-boot bins (always)
- optionally, if UBOOT_BINS_TO_OUTPUT=yes, copy them out to output/
- this might reveal differences in binwalk itself more than u-boot
- but better than nothing
2026-01-12 23:37:03 +01:00
Ricardo Pardini
574abb9cad host-release: allow to build on resolute 2026-01-08 19:28:26 +01:00
Igor Velkov
9922402de8 !fixup cleanup 2026-01-08 12:24:18 +01:00
Igor Velkov
3e71438048 Fix locale warnings during chroot operations
Build process generated numerous locale warnings like:
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
perl: warning: Setting locale failed

This happened because the Docker container and host environment were
configured to use `en_US.UTF-8`, but the rootfs cache may not contain
this locale (only `C.utf8` and whatever `DEST_LANG` specifies,
e.g. `en_GB.utf8`).

When `chroot_sdcard` runs commands inside the rootfs, environment variables
are inherited from the host/Docker, causing locale lookup failures.

Then use `C.UTF-8` locale for the build environment instead of `en_US.UTF-8`.
This locale is always available in rootfs immediately after mmdebstrap,
requiring no generation.

Changes
`lib/functions/host/docker.sh`: Remove `en_US.UTF-8` locale generation,
set `LANG=C.UTF-8` in container environment
`lib/functions/host/prepare-host.sh`: Change locale exports
from `en_US.UTF-8` to `C.UTF-8`
2026-01-08 12:24:18 +01:00
Jianfeng Liu
f01745cfa9 allow build on forky host 2026-01-01 11:06:13 +01:00
Igor Pecovnik
4d60ce08f2 chore: update copyright years to 2026
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)
2025-12-25 12:03:34 +01:00
Jesse R Codling
d1fc474d50 Typo fix from @tabrisnet
Co-authored-by: tabrisnet <96966042+tabrisnet@users.noreply.github.com>
2025-12-07 08:49:22 +01:00
Jesse R Codling
9f164a21ce Use docker --version for podman detection 2025-12-07 08:49:22 +01:00
Jesse R Codling
3fb2606d00 Conditionally add volume flags for building with Podman
Use $DOCKER_INFO to check for podman vs dockerd, and conditionally
`exec` and `dev` volume options, which are needed on podman but not
allowed on dockerd.
2025-12-07 08:49:22 +01:00
Jesse R Codling
3aea2de999 Add needed volume mount opts for Docker/Podman
It hasn't been an issue for Docker because their defaults didn't
conflict, but Podman mounts volumes with nodev (and formerly noexec) by
default, which would break the build. Adding `dev` and `exec` to the
volume mount options ensures the needed setting whatever the defaults.
2025-12-07 08:49:22 +01:00
Tom Urlings
abcb6c947b Enable bootscript templating
- 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.
2025-11-17 10:15:23 +01:00
Mecid
9a8ecb8e6e
Add wget to prepare-host.sh (#8779)
Needed for debootstrap with trixie host
2025-10-18 18:52:07 +02:00
tabris
d824596c62 remove wget from build-host basic-deps 2025-10-17 19:33:20 +02:00
Mecid Urganci
8f977f5b7c Dependency: e2fsprogs for mkfs.ext4 (in trixie) 2025-08-30 01:05:04 +08:00
Rolf Leggewie
eda88e848b lib / prepare-host: debian-archive-keyring is not a host-dependency for RISCv64
This was introduced in 2a8cb5793f as a relaxation to the previous
state when RISCv64 was not yet officially supported by Debian and
lived in Debian Ports.
2025-08-13 18:39:59 +08:00
Jianfeng Liu
ca5e61f777 fix build dep gcc-loongarch64-linux-gnu introduced by new arch loong64 2025-08-05 11:33:56 +08:00
Jianfeng Liu
fb363e8829 add initial loong64 support 2025-08-04 17:34:24 +08:00
Rolf Leggewie
bda921595b minor spelling mistakes 2025-08-02 19:23:38 +08:00
Rolf Leggewie
c2a9fff520 lib / prepare-host: fix quoting inconsistency 2025-07-23 10:53:09 +02:00
Rolf Leggewie
f72bd55b12 lib / prepare-host: make installation of gcc-arm-linux-gnueabi conditional
* do not install gcc-arm-linux-gnueabi unless targetting arm64 arch
  suggested by coderabbitAI (https://github.com/armbian/build/pull/8260#discussion_r2118608963)
  reviewed and implemented by leggewie
2025-07-23 10:53:09 +02:00
Werner
15407330c6
Preparation for http proxy caching (#8281)
* 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
2025-06-13 10:31:24 +02:00
djurny
0f4303651f Rework after review prepare-host.sh
Use all parameters to display_alert()
```
[🐳|🌱] Running in container [ Adding provisions for container building ]
[🐳|🌱] Adding package to 'host_dependencies' [ python3-setuptools ]
[🐳|🌱] Python2 not available on host release 'noble' [ ancient u-boot versions might/will fail to build ]
```
2025-06-03 09:56:09 +02:00
Tom Urlings
826309f7bc rockchip64/rk3328: U-Boot v2022.04/07 add setexpr
- aimed at nanopi-r2s and nanopineo3
- impacts:
  - boards (re)using 'nanopi-r2s-rk3328_defconfig' (rk3328)
  and:
  - boards using U-Boot v2022.04 or
  - boards using U-Boot v2022.07
- added explicit dependency on python3-setuptools as (at least) U-Boot
  v2022.04 and v2022.07 fail building due to missing 'distutils' for
  boards that use U-Boot v2022.04 or v2022.07
2025-06-03 09:56:09 +02:00
Ricardo Pardini
03c47689cb docker: 50%+ faster during "enabling all extensions looking for Docker dependencies"
- 7s+ -> 3s
- by using `enable_extensions_with_hostdeps_builtin_and_user "add_host_dependencies" "host_dependencies_known"` instead of `enable_all_extensions_builtin_and_user`
2025-05-29 17:58:28 +02:00
Igor Pecovnik
4dc9b00fb0 Framework: switch Docker default image to Noble 2025-05-14 11:59:12 +02:00
Ricardo Squassina Lee
c897044aeb Update prepare-host.sh
migrate to ntpsec-ntpdate as a more secure implementation of ntpdate and available in Debian and Ubunbtu
2025-05-12 16:54:24 +02:00
Werner
1c0e3c9b0d Update prepare-host.sh
I don't know. This doesn't feel right. The package exists in Jammy, Noble and Bookworm in both amd64 and arm64 variants so should be good...though it is probably not needed in all constellations. 
Still it is part of the toolchain and not generic packages. If this gets merged as it is this should be revisited.
2025-04-19 13:18:55 +02:00
EvilOlaf
f365339980 add new host build dependency for noble 2025-04-19 13:18:55 +02:00
Werner
11c285872e
Fix ORAS tooling download due to absense of wget (#8104)
* move `wget` to basic deps
* fix spaces
2025-04-19 13:17:31 +02:00
Werner
554580ae34 copy example config at first start 2025-04-16 23:32:14 +02:00
Mecid
a322285cfb Replace bsdmainutils with bsdextrautils 2025-03-28 12:38:01 +01:00
Mecid
322f86ff69 Add bsdmainutils to host dependencies in prepare-host.sh
for mac80211 in 6.14 which failed requiring hexdump
2025-03-28 12:38:01 +01:00
Rolf Leggewie
09267e3b5d nitpick: spell check s/neeeded/needed/ 2025-03-19 22:24:48 +01:00
Ricardo Pardini
370f85b067 python3: do not rely on hostdeps python3-pip nor python3-dev; deploy pip via get-pip.py
- python3-pip implies a very old setuptools (which is system-wide and takes precedence)
- python3-dev implies python3-distutils (which is long deprecated)
- get-pip.py allows us to version pip in requirements.txt just like everything else
- in the end this fixes the conundrum with pylibfdt / dtschema on Jammy
- and, finally, the setuptools we specify in requirements.txt will be actually used
2025-02-24 09:21:53 +01:00
Ricardo Pardini
6755e9190a don't ship qemu binary in rootfs cache + armhf image/rootfs building on non-armhf-capable-arm64 hosts (Apple M1+)
- 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"
2024-12-31 11:52:12 +01:00
Ricardo Pardini
ea028fbcba prepare-host: trixie and sid don't carry python3-distutils anymore 2024-09-03 22:04:33 +02:00
JohnTheCoolingFan
bed3f85213 Run docker via run_host_command_logged 2024-08-18 10:40:32 +02:00
JohnTheCoolingFan
1045fda3d4 Check for loop devices and a temp container run 2024-08-18 10:40:32 +02:00
Evgenii Zheltonozhskii
0aa2371db5 Support kernel compilation with Clang/LLVM 2024-08-15 13:20:01 +02:00
Kevin Schmidt
08ef1a960f Fix armbian-firmware-full package build.
Include symlinks from linux-firmware.
2024-08-12 10:45:27 +02:00
schwar3kat
58b0a55351 Add Linux Mint Virginia and Wilma to supported hosts
Add virginia and wilma in host-release.sh

Add wilma in prepare-host.sh
2024-08-05 09:39:01 +02:00
Viacheslav Bocharov
7875fce1e9 Allow to pass docker login credentials to oras-cli for and CI environment
Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
2024-07-04 21:35:26 +02:00
ColorfulRhino
0441d2ee1f Remove old torrents which aren't referenced anywhere
- Also remove 10+ years old compilers from `external_toolchains.sh`
2024-06-30 10:12:04 +00:00
ColorfulRhino
d75b1816ff cli: Improve formatting on dts-check scripts with shellfmt.sh 2024-06-25 18:11:43 +02:00
ColorfulRhino
24816c1831 cli: prepare-host: Invert host-release checking for python2
Instead of having to add every new release to the list that does not support python2, inverse this if statement and only check if the build host is Debian bullseye or ubuntu jammy. Every release newer than those do not have python2. Older build hosts are unsupported.
2024-06-25 18:11:43 +02:00