Commit Graph

199 Commits

Author SHA1 Message Date
coderabbitai[bot]
afe362f484 📝 Add docstrings to main
Docstrings generation was requested by @leggewie.

* https://github.com/armbian/build/pull/8027#issuecomment-2763300084

The following files were modified:

* `lib/functions/host/prepare-host.sh`
2025-03-29 12:21:20 +00: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
ColorfulRhino
04f619dc06 python: Move python3-setuptools and python3-pyelftools to requirements.txt
Different build hosts have vastly different versions of setuptools and pyelftools depending on the host OS, e.g. Ubuntu 22.04 has setuptools v59 while the latest version at the time of this commit is setuptools v71.

Using Pip instead of APT to download these packages assures that all build hosts use the same version, removing some points of failures and inconsistencies.
2024-06-25 18:11:43 +02:00
Igor Pecovnik
024c0866ad DTS-check: Python librarires have troubles to build, disabling for now
- Add requirements.txt to Dockerfile generation
2024-06-25 08:53:22 +02:00
JohnTheCoolingFan
cf7923c21f Add doas support to is_root_or_sudo_prefix
doas is not compatible with sudo flags. The codebase was checked for
sudo-specific uses of this function, but none were found, all cases were
in the form of `sudo <command>`. Replacing it with `doas <command>`
yields the same result.
2024-05-21 20:27:03 +02:00
JohnTheCoolingFan
67147b88cb Revert "Add doas support to is_root_or_sudo_prefix"
This reverts commit 324647c039.
2024-05-20 15:58:51 +02:00
JohnTheCoolingFan
7da42c8a42 Revert "Added a call to losetup -f"
This reverts commit b3d9a17a57.
2024-05-20 15:58:51 +02:00
JohnTheCoolingFan
b3d9a17a57 Added a call to losetup -f
See https://github.com/armbian/build/issues/6568
2024-05-20 08:51:39 +02:00
JohnTheCoolingFan
324647c039 Add doas support to is_root_or_sudo_prefix
doas is not compatible with sudo flags. The codebase was checked for
sudo-specific uses of this function, but none were found, all cases were
in the form of `sudo <command>`. Replacing it with `doas <command>`
yields the same result.
2024-05-20 08:51:39 +02:00
Igor Pecovnik
f0fcb29465 Create output/info early in host prepare for storing JSON files and remove JSON 2024-05-10 13:24:18 +01:00
Ricardo Pardini
1d819c7b86 prepare-host.sh: deps: add libgnutls28-dev, needed for some u-boot builds 2024-04-29 02:26:38 +08:00
Ricardo Pardini
6a242ab149 prepare-host.sh: deps: Noble dropped python3-distutils; fixes #6527
- keep it for older releases
2024-04-29 02:26:38 +08:00
Ricardo Pardini
981b1939db prepare-host.sh: deps: replace liblz4-tool with lz4
- should fix sid and trixie, which dropped the metapackage
2024-04-29 02:26:38 +08:00
Igor Pecovnik
60250d17af After bumping rk3319-box u-boot to most recent versions, we need pure-python3 library for parsing ELF and DWARF
https://github.com/armbian/build/pull/6509
2024-04-23 01:50:49 +08:00
Ricardo Pardini
cd0820a0d5 prepare-host: add libffi-dev host dependency, needed for Python3 setuptools (when prebuilt wheel not found)
- fixes errors that show up only when building on non-arm64/amd64, when there's no prebuilt wheel (eg on riscv64)
2024-04-07 13:23:34 +02:00
Ricardo Pardini
5b978dc96d lib: drop old boot_logo code; keep png/gif as they're used for plymouth
- origins of what's being dropped: https://github.com/armbian/build/pull/2065
2024-03-06 08:28:31 +01:00
Ricardo Pardini
ceed97c57b prepare-host/host-release: enable noble for building; noble also doesn't have python2 anymore 2024-03-03 16:07:19 +01:00
Ricardo Pardini
b8de0983f0 wsl2: fix: don't pester user for UTF-8 terminal if stdin is not a terminal 2024-03-02 20:48:57 +01:00
Ricardo Pardini
6e0520f3da debootstrap: remove debootstrap from host dependencies 2024-03-02 20:46:58 +01:00
Darsey Litzenberger
ce33bddb58 Make the colorized build output readable on a light background
This fixes the readability of colorized output of compile.sh when
running on a terminal with a light background.  It uses the COLORFGBG
environment variable similarly to how the ip(8) command does.

Signed-off-by: Darsey Litzenberger <dlitz@dlitz.net>
2024-02-09 19:38:03 +01:00
Gunjan Gupta
7b81255a5f Fix compilation within docker-shell 2024-02-01 21:04:23 +05:30
Igor Pecovnik
ca2ecf556e Revert "Fix armbian-firmware-full package build."
This reverts commit 0396c65c30.
2023-12-17 13:24:45 +01:00
Kevin Schmidt
0396c65c30 Fix armbian-firmware-full package build.
Include symlinks from linux-firmware.
2023-12-17 10:32:42 +01:00
Ricardo Pardini
91a3607c0f wsl2: detect Armbian-built wsl2 kernel as well as Microsoft's default kernel
- previous commit introduces Armbian wsl2 kernels, might as well detect them
2023-11-27 11:14:01 +01:00
Ricardo Pardini
2b6a90484a docker launcher: don't lose track of the wanted host_release when setting using Armbian base image
- host_release (wanted_release_tag) was being re-computed from  DOCKER_ARMBIAN_BASE_IMAGE
- DOCKER_ARMBIAN_BASE_IMAGE might have been changed from "<os>:<release>" if DOCKERFILE_USE_ARMBIAN_IMAGE_AS_BASE != no
- that would cause host_release to be "armbian-ubuntu-lunar-latest", not "lunar"
  - which would cause python2/python2-dev to be installed, which would cause Dockerfile build to fail
2023-10-20 12:06:32 +00:00
Ricardo Pardini
f3c3fe8e82 ubuntu: add mantic (23.10), symlinks to lunar 2023-10-14 09:40:45 +00:00
Ricardo Pardini
5ed338fb60 dpkg-deb: don't use fakeroot, we're already root; don't add fakeroot dep either 2023-10-13 18:04:56 +02:00
Ricardo Pardini
19226a9c27 docker (launcher): fix DOCKER_PASS_GIT=yes to actually work
- it still sucks (very slow) but is a way to get ${SRC}/.git in Docker if needed
  - eg for patching archeology
2023-10-03 14:11:42 +02:00
Ricardo Pardini
cacd3c9b08 docker (launcher): fix un-needed grep escape \: (fixes "grep: warning: stray \ before :" on recent coreutils) 2023-10-03 14:11:42 +02:00
Ricardo Pardini
11df81403d config/lib/exts: run shellfmt
- `bash lib/tools/shellfmt.sh`
- mostly spacing changes that accumulated over time
2023-08-22 14:28:14 +02:00
Gunjan Gupta
1d6a779ed1 Drop HOST OS that doesnot support crust compilation 2023-08-22 13:03:51 +02:00
Ricardo Pardini
64b5220853 debian: add Trixie (Debian 13, testing) csc target & build host (#5621)
- Trixie, like Bookworm and Sid, does not have python2 anymore
2023-08-22 08:14:55 +02:00
WinDos6.22
bd339fca3a Add new Linux Mint release support in host-release.sh (#5540) 2023-08-21 22:48:52 +12:00
Igor
2a8cb5793f Removing exceptions needed to support riscv64 withing Debian
Signed-off-by: Igor <igor@armbian.com>
2023-08-17 22:09:05 +02:00
Ricardo Pardini
c17a041637 prepare_host: handle PRE_PREPARED_HOST inside prepare_host_init() so WORKDIR etc is always available 2023-08-12 09:58:32 +02:00
Ricardo Pardini
eab306b279 tmpfs: introduce USE_TMPFS=no to disable tmpfs usage for WORKDIR and package-specific working dirs; actually use $temp_dir_id for mktemp; see #5502
- `USE_TMPFS=no` disables usage of generic tmpfs mechanism (still possibly used for rootfs/image building, which is unrelated), for last-resort cases
- use better/more descriptive `temp_dir_id`'s for kernel build than `k` (now `kernel_dest_install_dir`) and `kd` (now `kernel_debs_temp_dir`)
  - specific image/dtb/headers packaging already had decent names, same for other .deb's
- replace `mktemp -d` with `mktemp -d --tmpdir "${temp_dir_id}-XXXXX"` in `prepare_temp_dir_in_workdir_and_schedule_cleanup()`, so we know what's using what in tmpfs
2023-07-24 23:19:15 +02:00