2023-03-09 17:30:40 +00:00
#!/usr/bin/env bash
2022-10-08 17:20:12 +00:00
#
2023-03-09 17:30:40 +00:00
# SPDX-License-Identifier: GPL-2.0
2022-10-08 17:20:12 +00:00
#
2023-03-09 17:30:40 +00:00
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
2022-10-08 17:20:12 +00:00
#
2023-03-09 17:30:40 +00:00
# This file is a part of the Armbian Build Framework
2022-10-08 17:20:12 +00:00
# https://github.com/armbian/build/
2023-01-09 16:16:56 +00:00
### Attention: we can't use any interactive programs, read from stdin, nor use non-coreutils utilities here.
2022-10-08 17:20:12 +00:00
function do_main_configuration( ) {
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
display_alert "Starting main configuration" " ${ MOUNT_UUID } " "info"
2022-12-27 15:29:41 +00:00
2022-11-22 23:52:32 +00:00
# Obsolete stuff, make sure not defined, then make readonly
declare -g -r DEBOOTSTRAP_LIST
declare -g -r PACKAGE_LIST
declare -g -r PACKAGE_LIST_BOARD
declare -g -r PACKAGE_LIST_ADDITIONAL
declare -g -r PACKAGE_LIST_EXTERNAL
declare -g -r PACKAGE_LIST_DESKTOP
2022-10-08 17:20:12 +00:00
# common options
2023-08-04 15:55:29 +00:00
declare revision_from = "set in env or command-line parameter"
if [ [ " ${ REVISION } " = = "" ] ] ; then
if [ -f " ${ USERPATCHES_PATH } " /VERSION ] ; then
REVISION = $( cat " ${ USERPATCHES_PATH } " /VERSION)
revision_from = "userpatches VERSION file"
else
REVISION = $( cat " ${ SRC } " /VERSION)
revision_from = "main VERSION file"
fi
2022-10-08 17:20:12 +00:00
fi
2023-03-13 03:10:01 +00:00
declare -g -r REVISION = " ${ REVISION } "
2023-08-04 15:55:29 +00:00
display_alert "Using REVISION from" " ${ revision_from } : ' ${ REVISION } ' " "info"
if [ [ ! " ${ REVISION } " = ~ ^[ 0-9] ] ] ; then
exit_with_error " REVISION must begin with a digit, got ' ${ REVISION } ' "
fi
2023-03-13 03:10:01 +00:00
2023-11-15 21:00:21 +00:00
# Armbian image is set as unofficial if build manually or without declaring from outside
[ [ -z $VENDOR ] ] && VENDOR = "Armbian-unofficial"
# Use framework defaults for community Armbian images and unsupported distribution when building Armbian distribution
if [ [ ${ VENDOR } = = "Armbian" ] ] && [ [ ${ BOARD_TYPE } != "conf" || $( cat $SRC /config/distributions/$RELEASE /support) != "supported" ] ] ; then
VENDORURL = "https://www.armbian.com/"
unset VENDORSUPPORT,VENDORPRIVACY,VENDORBUGS,VENDORLOGO,ROOTPWD,MAINTAINER,MAINTAINERMAIL
fi
2025-03-28 11:02:13 +00:00
[ [ -z $VENDORCOLOR ] ] && VENDORCOLOR = "247;16;0" # RGB values for MOTD logo
2023-11-15 21:00:21 +00:00
[ [ -z $VENDORURL ] ] && VENDORURL = "https://duckduckgo.com/"
[ [ -z $VENDORSUPPORT ] ] && VENDORSUPPORT = "https://community.armbian.com/"
[ [ -z $VENDORPRIVACY ] ] && VENDORPRIVACY = "https://duckduckgo.com/"
[ [ -z $VENDORBUGS ] ] && VENDORBUGS = "https://armbian.atlassian.net/"
[ [ -z $VENDORDOCS ] ] && VENDORDOCS = "https://docs.armbian.com/"
2023-05-17 11:28:41 +00:00
[ [ -z $VENDORLOGO ] ] && VENDORLOGO = "armbian-logo"
2023-11-18 11:03:16 +00:00
[ [ -z $ROOTPWD ] ] && ROOTPWD = "1234" # Must be changed @first login
[ [ -z $MAINTAINER ] ] && MAINTAINER = "John Doe" # deb signature
[ [ -z $MAINTAINERMAIL ] ] && MAINTAINERMAIL = "john.doe@somewhere.on.planet" # deb signature
DEST_LANG = " ${ DEST_LANG :- "en_US.UTF-8" } " # en_US.UTF-8 is default locale for target
armbian-next: the great cli entrypoint (+docker) rewrite; introduce `USE_LOCAL_APT_DEB_CACHE` replacing `apt-cacher-ng`
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
- this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
- apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
- debootstrap, by passing it `--cache-dir`
- utility function to help understand what is happening to cache during usage
- apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
- introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
- don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
- clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
- it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
- source configs in a logging section.
- Docker: silent, fast retries to make sure `docker system df` works
- shut-up `chown` (no `-v`) output related to `SET_OWNER_TO_UID`
- ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
- use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
- introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
- introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
- introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
- use it for userpatches files created, logs, and output files, including images and debs.
- @TODOs ref. `$SUDO_USER` which I think the old version of this?
- add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
- initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
- using image in my private repo.
- this has significant speedup to "start building time" on the 1st run
- move some Linux specific stuff to its own if
- add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
- gen .dockerignore together with Dockerfile
- split in funcs
- hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
- mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
- this fails for the right reasons now, causing retries, which are then retried and work ;-)
- this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
- IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
- armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
- armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
- uses REQUIREMENTS_DEFS_ONLY
- works on Docker Desktop on Mac;
- linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
- can't assume things, for example:
- that `sudo` will be available; it might not, and might be already root, no reason to fail
- that `/etc/timezone` will exist
- that `systemd-detect-virt` will be available
- that `git` will be available
- that `locale-gen` will be available
2022-10-09 15:58:23 +00:00
display_alert "DEST_LANG..." " DEST_LANG: ${ DEST_LANG } " "debug"
2023-03-28 18:20:56 +00:00
declare -g SKIP_EXTERNAL_TOOLCHAINS = " ${ SKIP_EXTERNAL_TOOLCHAINS :- yes } " # don't use any external toolchains, by default.
2025-01-21 00:15:46 +00:00
declare -g USE_CCACHE = " ${ USE_CCACHE :- no } " # stop using ccache as our worktree is more effective
armbian-next: the great cli entrypoint (+docker) rewrite; introduce `USE_LOCAL_APT_DEB_CACHE` replacing `apt-cacher-ng`
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
- this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
- apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
- debootstrap, by passing it `--cache-dir`
- utility function to help understand what is happening to cache during usage
- apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
- introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
- don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
- clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
- it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
- source configs in a logging section.
- Docker: silent, fast retries to make sure `docker system df` works
- shut-up `chown` (no `-v`) output related to `SET_OWNER_TO_UID`
- ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
- use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
- introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
- introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
- introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
- use it for userpatches files created, logs, and output files, including images and debs.
- @TODOs ref. `$SUDO_USER` which I think the old version of this?
- add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
- initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
- using image in my private repo.
- this has significant speedup to "start building time" on the 1st run
- move some Linux specific stuff to its own if
- add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
- gen .dockerignore together with Dockerfile
- split in funcs
- hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
- mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
- this fails for the right reasons now, causing retries, which are then retried and work ;-)
- this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
- IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
- armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
- armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
- uses REQUIREMENTS_DEFS_ONLY
- works on Docker Desktop on Mac;
- linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
- can't assume things, for example:
- that `sudo` will be available; it might not, and might be already root, no reason to fail
- that `/etc/timezone` will exist
- that `systemd-detect-virt` will be available
- that `git` will be available
- that `locale-gen` will be available
2022-10-09 15:58:23 +00:00
2025-01-20 13:23:28 +00:00
# Armbian config is central tool used in all builds. As its build externally, we have moved it to extension. Enable it here.
enable_extension "armbian-config"
2024-06-23 07:17:01 +00:00
# Network stack to use, default to network-manager; configuration can override this.
2024-07-07 10:58:47 +00:00
# Will be made read-only further down.
2024-06-23 07:17:01 +00:00
declare -g NETWORKING_STACK = " ${ NETWORKING_STACK } "
2024-07-07 10:58:47 +00:00
2024-06-23 07:17:01 +00:00
# If empty, default depending on BUILD_MINIMAL; if yes, use systemd-networkd; if no, use network-manager.
if [ [ -z " ${ NETWORKING_STACK } " ] ] ; then
display_alert "NETWORKING_STACK not set" "Calculating defaults" "debug"
# Network-manager and Chrony for standard CLI and desktop, systemd-networkd and systemd-timesyncd for minimal
# systemd-timesyncd is slimmer and less resource intensive than Chrony, see https://unix.stackexchange.com/questions/504381/chrony-vs-systemd-timesyncd-what-are-the-differences-and-use-cases-as-ntp-cli
if [ [ " ${ BUILD_MINIMAL } " = = "yes" ] ] ; then
display_alert "BUILD_MINIMAL is set to yes" "Using systemd-networkd" "debug"
NETWORKING_STACK = "systemd-networkd"
else
display_alert "BUILD_MINIMAL not set to yes" "Using network-manager" "debug"
NETWORKING_STACK = "network-manager"
fi
2024-06-17 14:08:32 +00:00
else
2024-06-23 07:17:01 +00:00
display_alert "NETWORKING_STACK is preset during configuration" " NETWORKING_STACK: ${ NETWORKING_STACK } " "debug"
2024-06-17 14:08:32 +00:00
fi
armbian-next: the great cli entrypoint (+docker) rewrite; introduce `USE_LOCAL_APT_DEB_CACHE` replacing `apt-cacher-ng`
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
- this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
- apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
- debootstrap, by passing it `--cache-dir`
- utility function to help understand what is happening to cache during usage
- apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
- introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
- don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
- clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
- it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
- source configs in a logging section.
- Docker: silent, fast retries to make sure `docker system df` works
- shut-up `chown` (no `-v`) output related to `SET_OWNER_TO_UID`
- ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
- use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
- introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
- introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
- introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
- use it for userpatches files created, logs, and output files, including images and debs.
- @TODOs ref. `$SUDO_USER` which I think the old version of this?
- add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
- initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
- using image in my private repo.
- this has significant speedup to "start building time" on the 1st run
- move some Linux specific stuff to its own if
- add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
- gen .dockerignore together with Dockerfile
- split in funcs
- hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
- mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
- this fails for the right reasons now, causing retries, which are then retried and work ;-)
- this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
- IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
- armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
- armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
- uses REQUIREMENTS_DEFS_ONLY
- works on Docker Desktop on Mac;
- linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
- can't assume things, for example:
- that `sudo` will be available; it might not, and might be already root, no reason to fail
- that `/etc/timezone` will exist
- that `systemd-detect-virt` will be available
- that `git` will be available
- that `locale-gen` will be available
2022-10-09 15:58:23 +00:00
# Timezone
if [ [ -f /etc/timezone ] ] ; then # Timezone for target is taken from host, if it exists.
TZDATA = $( cat /etc/timezone)
display_alert "Using host's /etc/timezone for" " TZDATA: ${ TZDATA } " "debug"
else
display_alert "Host has no /etc/timezone" "Using Etc/UTC by default" "debug"
TZDATA = "Etc/UTC" # If not /etc/timezone at host, default to UTC.
fi
USEALLCORES = yes # Use all CPU cores for compiling
2023-01-03 21:11:28 +00:00
2022-10-08 17:20:12 +00:00
[ [ -z $EXIT_PATCHING_ERROR ] ] && EXIT_PATCHING_ERROR = "" # exit patching if failed
2024-09-06 06:12:17 +00:00
[ [ -z $HOST ] ] && HOST = " $BOARD "
2022-10-08 17:20:12 +00:00
cd " ${ SRC } " || exit
[ [ -z " ${ CHROOT_CACHE_VERSION } " ] ] && CHROOT_CACHE_VERSION = 7
armbian-next: the great cli entrypoint (+docker) rewrite; introduce `USE_LOCAL_APT_DEB_CACHE` replacing `apt-cacher-ng`
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
- this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
- apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
- debootstrap, by passing it `--cache-dir`
- utility function to help understand what is happening to cache during usage
- apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
- introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
- don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
- clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
- it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
- source configs in a logging section.
- Docker: silent, fast retries to make sure `docker system df` works
- shut-up `chown` (no `-v`) output related to `SET_OWNER_TO_UID`
- ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
- use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
- introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
- introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
- introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
- use it for userpatches files created, logs, and output files, including images and debs.
- @TODOs ref. `$SUDO_USER` which I think the old version of this?
- add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
- initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
- using image in my private repo.
- this has significant speedup to "start building time" on the 1st run
- move some Linux specific stuff to its own if
- add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
- gen .dockerignore together with Dockerfile
- split in funcs
- hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
- mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
- this fails for the right reasons now, causing retries, which are then retried and work ;-)
- this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
- IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
- armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
- armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
- uses REQUIREMENTS_DEFS_ONLY
- works on Docker Desktop on Mac;
- linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
- can't assume things, for example:
- that `sudo` will be available; it might not, and might be already root, no reason to fail
- that `/etc/timezone` will exist
- that `systemd-detect-virt` will be available
- that `git` will be available
- that `locale-gen` will be available
2022-10-09 15:58:23 +00:00
2023-01-15 04:00:59 +00:00
if [ [ -d " ${ SRC } /.git " && " ${ CONFIG_DEFS_ONLY } " != "yes" ] ] ; then # don't waste time if only gathering config defs
2023-05-24 14:32:31 +00:00
# The docker launcher will have passed these as environment variables. If not, try again here.
if [ [ -z " ${ BUILD_REPOSITORY_URL } " || -z " ${ BUILD_REPOSITORY_COMMIT } " ] ] ; then
set_git_build_repo_url_and_commit_vars "main configuration"
fi
armbian-next: the great cli entrypoint (+docker) rewrite; introduce `USE_LOCAL_APT_DEB_CACHE` replacing `apt-cacher-ng`
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
- this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
- apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
- debootstrap, by passing it `--cache-dir`
- utility function to help understand what is happening to cache during usage
- apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
- introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
- don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
- clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
- it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
- source configs in a logging section.
- Docker: silent, fast retries to make sure `docker system df` works
- shut-up `chown` (no `-v`) output related to `SET_OWNER_TO_UID`
- ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
- use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
- introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
- introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
- introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
- use it for userpatches files created, logs, and output files, including images and debs.
- @TODOs ref. `$SUDO_USER` which I think the old version of this?
- add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
- initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
- using image in my private repo.
- this has significant speedup to "start building time" on the 1st run
- move some Linux specific stuff to its own if
- add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
- gen .dockerignore together with Dockerfile
- split in funcs
- hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
- mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
- this fails for the right reasons now, causing retries, which are then retried and work ;-)
- this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
- IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
- armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
- armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
- uses REQUIREMENTS_DEFS_ONLY
- works on Docker Desktop on Mac;
- linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
- can't assume things, for example:
- that `sudo` will be available; it might not, and might be already root, no reason to fail
- that `/etc/timezone` will exist
- that `systemd-detect-virt` will be available
- that `git` will be available
- that `locale-gen` will be available
2022-10-09 15:58:23 +00:00
fi
2022-10-08 17:20:12 +00:00
ROOTFS_CACHE_MAX = 200 # max number of rootfs cache, older ones will be cleaned up
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
# .deb compression. xz is standard, but is slow, so if avoided by default if not running in CI. one day, zstd.
if [ [ -z ${ DEB_COMPRESS } ] ] ; then
DEB_COMPRESS = "none" # none is very fast bug produces big artifacts.
[ [ " ${ CI } " = = "true" ] ] && DEB_COMPRESS = "xz" # xz is small and slow
fi
display_alert ".deb compression" " DEB_COMPRESS= ${ DEB_COMPRESS } " "debug"
2023-07-28 10:37:34 +00:00
declare -g -r PACKAGES_HASHED_STORAGE = " ${ DEST } /packages-hashed "
2022-10-08 17:20:12 +00:00
if [ [ $BETA = = yes ] ] ; then
DEB_STORAGE = $DEST /debs-beta
else
DEB_STORAGE = $DEST /debs
fi
# image artefact destination with or without subfolder
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
FINALDEST = " ${ DEST } /images "
2022-10-08 17:20:12 +00:00
if [ [ -n " ${ MAKE_FOLDERS } " ] ] ; then
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
FINALDEST = " ${ DEST } " /images/" ${ BOARD } " /" ${ MAKE_FOLDERS } "
install -d " ${ FINALDEST } "
2022-10-08 17:20:12 +00:00
fi
2023-01-13 16:24:00 +00:00
# Prepare rootfs filesystem support
2022-10-08 17:20:12 +00:00
[ [ -z $ROOTFS_TYPE ] ] && ROOTFS_TYPE = ext4 # default rootfs type is ext4
2023-01-13 16:24:00 +00:00
case " $ROOTFS_TYPE " in
2023-02-09 14:47:31 +00:00
ext4) # nothing extra here
2023-01-13 16:24:00 +00:00
; ;
nfs)
FIXED_IMAGE_SIZE = 256 # small SD card with kernel, boot script and .dtb/.bin files
; ;
f2fs)
enable_extension "fs-f2fs-support"
# Fixed image size is in 1M dd blocks (MiB)
# to get size of block device /dev/sdX execute as root: echo $(( $(blockdev --getsize64 /dev/sdX) / 1024 / 1024 ))
[ [ -z $FIXED_IMAGE_SIZE ] ] && exit_with_error "Please define FIXED_IMAGE_SIZE for use with f2fs"
; ;
xfs)
enable_extension "fs-xfs-support"
; ;
btrfs)
enable_extension "fs-btrfs-support"
[ [ -z $BTRFS_COMPRESSION ] ] && BTRFS_COMPRESSION = zlib # default btrfs filesystem compression method is zlib
[ [ ! $BTRFS_COMPRESSION = ~ zlib| lzo| zstd| none ] ] && exit_with_error "Unknown btrfs compression method" " $BTRFS_COMPRESSION "
; ;
2023-05-14 23:17:00 +00:00
nilfs2)
enable_extension "fs-nilfs2-support"
; ;
2023-01-13 16:24:00 +00:00
*)
exit_with_error " Unknown rootfs type: ROOTFS_TYPE=' ${ ROOTFS_TYPE } ' "
; ;
esac
2022-10-08 17:20:12 +00:00
2024-03-10 12:29:14 +00:00
# Check if the filesystem type is supported by the build host
if [ [ $CONFIG_DEFS_ONLY != yes ] ] ; then # don't waste time if only gathering config defs
2024-03-13 20:01:07 +00:00
check_filesystem_compatibility_on_host
2024-03-10 12:29:14 +00:00
fi
2023-01-13 16:24:00 +00:00
# Support for LUKS / cryptroot
if [ [ $CRYPTROOT_ENABLE = = yes ] ] ; then
enable_extension "fs-cryptroot-support" # add the tooling needed, cryptsetup
if [ [ -z $CRYPTROOT_PASSPHRASE ] ] ; then # a passphrase is mandatory if rootfs encryption is enabled
exit_with_error "Root encryption is enabled but CRYPTROOT_PASSPHRASE is not set"
fi
2024-11-05 03:28:35 +00:00
[ [ -z $CRYPTROOT_MAPPER ] ] && CRYPTROOT_MAPPER = "armbian-root" # TODO: fixed name can't be used for parallel image building (rpardini: ?)
2023-01-13 16:24:00 +00:00
[ [ -z $CRYPTROOT_SSH_UNLOCK ] ] && CRYPTROOT_SSH_UNLOCK = yes
[ [ -z $CRYPTROOT_SSH_UNLOCK_PORT ] ] && CRYPTROOT_SSH_UNLOCK_PORT = 2022
# Default to pdkdf2, this used to be the default with cryptroot <= 2.0, however
# cryptroot 2.1 changed that to Argon2i. Argon2i is a memory intensive
# algorithm which doesn't play well with SBCs (need 1GiB RAM by default !)
# https://gitlab.com/cryptsetup/cryptsetup/-/issues/372
[ [ -z $CRYPTROOT_PARAMETERS ] ] && CRYPTROOT_PARAMETERS = "--pbkdf pbkdf2"
2022-10-08 17:20:12 +00:00
fi
# Since we are having too many options for mirror management,
# then here is yet another mirror related option.
# Respecting user's override in case a mirror is unreachable.
case $REGIONAL_MIRROR in
china)
[ [ -z $USE_MAINLINE_GOOGLE_MIRROR ] ] && [ [ -z $MAINLINE_MIRROR ] ] && MAINLINE_MIRROR = tuna
[ [ -z $USE_GITHUB_UBOOT_MIRROR ] ] && [ [ -z $UBOOT_MIRROR ] ] && UBOOT_MIRROR = gitee
2024-10-24 15:09:16 +00:00
[ [ -z $GITHUB_MIRROR ] ] && GITHUB_MIRROR = ghproxy
2022-10-08 17:20:12 +00:00
[ [ -z $DOWNLOAD_MIRROR ] ] && DOWNLOAD_MIRROR = china
2024-10-27 15:10:03 +00:00
[ [ -z $GHCR_MIRROR ] ] && GHCR_MIRROR = nju
2022-10-08 17:20:12 +00:00
; ;
*) ; ;
esac
2023-12-27 13:55:20 +00:00
# Defaults... # @TODO: why?
declare -g -r MAINLINE_UBOOT_DIR = 'u-boot'
2022-10-08 17:20:12 +00:00
2023-12-27 13:55:20 +00:00
# pre-calculate mirrors. important: this sets _SOURCE variants that might be used in common.conf to default things to mainline, but using mirror.
# @TODO: setting them here allows family/board code (and hooks) to read them and embed them into configuration, which is bad: it might end up without the mirror.
[ [ $USE_MAINLINE_GOOGLE_MIRROR = = yes ] ] && MAINLINE_MIRROR = google
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
2022-10-08 17:20:12 +00:00
case $MAINLINE_MIRROR in
google)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_KERNEL_SOURCE = 'https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
declare -g -r MAINLINE_FIRMWARE_SOURCE = 'https://kernel.googlesource.com/pub/scm/linux/kernel/git/firmware/linux-firmware.git'
2022-10-08 17:20:12 +00:00
; ;
tuna)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_KERNEL_SOURCE = 'https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git'
declare -g -r MAINLINE_FIRMWARE_SOURCE = 'https://mirrors.tuna.tsinghua.edu.cn/git/linux-firmware.git'
2022-10-08 17:20:12 +00:00
; ;
bfsu)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_KERNEL_SOURCE = 'https://mirrors.bfsu.edu.cn/git/linux-stable.git'
declare -g -r MAINLINE_FIRMWARE_SOURCE = 'https://mirrors.bfsu.edu.cn/git/linux-firmware.git'
2022-10-08 17:20:12 +00:00
; ;
*)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_KERNEL_SOURCE = 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git' # "linux-stable" was renamed to "linux"
declare -g -r MAINLINE_FIRMWARE_SOURCE = 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git'
2022-10-08 17:20:12 +00:00
; ;
esac
2023-12-27 13:55:20 +00:00
[ [ $USE_GITHUB_UBOOT_MIRROR = = yes ] ] && UBOOT_MIRROR = github # legacy compatibility?
2022-10-08 17:20:12 +00:00
case $UBOOT_MIRROR in
gitee)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_UBOOT_SOURCE = 'https://gitee.com/mirrors/u-boot.git'
2022-10-08 17:20:12 +00:00
; ;
2023-01-31 23:39:03 +00:00
denx)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_UBOOT_SOURCE = 'https://source.denx.de/u-boot/u-boot.git'
2022-10-08 17:20:12 +00:00
; ;
*)
2023-12-27 13:55:20 +00:00
declare -g -r MAINLINE_UBOOT_SOURCE = 'https://github.com/u-boot/u-boot'
2022-10-08 17:20:12 +00:00
; ;
esac
case $GITHUB_MIRROR in
fastgit)
2023-12-27 13:55:20 +00:00
declare -g -r GITHUB_SOURCE = 'https://hub.fastgit.xyz'
2022-10-08 17:20:12 +00:00
; ;
2023-04-17 02:02:53 +00:00
ghproxy)
2025-01-14 08:53:44 +00:00
[ [ -z $GHPROXY_ADDRESS ] ] && GHPROXY_ADDRESS = ghfast.top
2023-12-27 13:55:20 +00:00
declare -g -r GITHUB_SOURCE = " https:// ${ GHPROXY_ADDRESS } /https://github.com "
2023-04-17 02:02:53 +00:00
; ;
2022-10-08 17:20:12 +00:00
gitclone)
2023-12-27 13:55:20 +00:00
declare -g -r GITHUB_SOURCE = 'https://gitclone.com/github.com'
2022-10-08 17:20:12 +00:00
; ;
*)
2023-12-27 13:55:20 +00:00
declare -g -r GITHUB_SOURCE = 'https://github.com'
2022-10-08 17:20:12 +00:00
; ;
esac
2023-04-17 12:34:11 +00:00
case $GHCR_MIRROR in
dockerproxy)
2025-01-17 09:00:28 +00:00
GHCR_MIRROR_ADDRESS = " ${ GHCR_MIRROR_ADDRESS :- "ghcr.dockerproxy.net" } "
2024-07-16 02:27:43 +00:00
declare -g -r GHCR_SOURCE = $GHCR_MIRROR_ADDRESS
2023-04-17 12:34:11 +00:00
; ;
2024-10-27 15:10:03 +00:00
nju)
declare -g -r GHCR_SOURCE = 'ghcr.nju.edu.cn'
; ;
2023-04-17 12:34:11 +00:00
*)
2023-12-27 13:55:20 +00:00
declare -g -r GHCR_SOURCE = 'ghcr.io'
2023-04-17 12:34:11 +00:00
; ;
esac
2022-10-08 17:20:12 +00:00
# Let's set default data if not defined in board configuration above
[ [ -z $OFFSET ] ] && OFFSET = 4 # offset to 1st partition (we use 4MiB boundaries by default)
2024-05-10 20:33:39 +00:00
[ [ -z $ARCH ] ] && ARCH = arm64 # makes little sense to default to anything... # @TODO: remove, but check_config_userspace_release_and_desktop requires it
2023-12-27 13:55:55 +00:00
ATF_COMPILE = yes # @TODO: move to armhf/arm64
2022-10-08 17:20:12 +00:00
[ [ -z $EXTRAWIFI ] ] && EXTRAWIFI = "yes"
[ [ -z $PLYMOUTH ] ] && PLYMOUTH = "yes"
[ [ -z $AUFS ] ] && AUFS = "yes"
[ [ -z $IMAGE_PARTITION_TABLE ] ] && IMAGE_PARTITION_TABLE = "msdos"
[ [ -z $EXTRA_BSP_NAME ] ] && EXTRA_BSP_NAME = ""
[ [ -z $EXTRA_ROOTFS_MIB_SIZE ] ] && EXTRA_ROOTFS_MIB_SIZE = 0
2022-10-26 16:47:19 +00:00
[ [ -z $CONSOLE_AUTOLOGIN ] ] && CONSOLE_AUTOLOGIN = "yes"
2022-10-08 17:20:12 +00:00
# single ext4 partition is the default and preferred configuration
#BOOTFS_TYPE=''
2024-07-07 10:58:47 +00:00
###
### ------------------- Sourcing family config -------------------
###
2023-01-22 17:35:06 +00:00
source_family_config_and_arch
2023-02-09 14:47:31 +00:00
2022-10-08 17:20:12 +00:00
if [ [ " $HAS_VIDEO_OUTPUT " = = "no" ] ] ; then
PLYMOUTH = "no"
[ [ $BUILD_DESKTOP != "no" ] ] && exit_with_error "HAS_VIDEO_OUTPUT is set to no. So we shouldn't build desktop environment"
fi
2024-07-07 10:58:47 +00:00
# Make NETWORKING_STACK read-only, as further changes would make the whole thing inconsistent.
# But only after family config to allow family to change it (post-family hooks CANNOT change NETWORKING_STACK since the hook is running after this).
# Individual networking extensions should _check_ this to make there's no spurious enablement.
display_alert "Using NETWORKING_STACK" " NETWORKING_STACK: ${ NETWORKING_STACK } " "info"
declare -g -r NETWORKING_STACK = " ${ NETWORKING_STACK } "
# Now enable extensions according to the configuration.
case " ${ NETWORKING_STACK } " in
"network-manager" )
display_alert "Adding networking extensions" "net-network-manager, net-chrony" "info"
enable_extension "net-network-manager"
enable_extension "net-chrony"
; ;
"systemd-networkd" )
display_alert "Adding networking extensions" "net-systemd-networkd, net-systemd-timesyncd" "info"
enable_extension "net-systemd-networkd"
enable_extension "net-systemd-timesyncd"
; ;
"none" )
display_alert " NETWORKING_STACK= ${ NETWORKING_STACK } " "Not adding networking extensions" "info"
; ;
*)
display_alert " NETWORKING_STACK= ${ NETWORKING_STACK } " "Invalid value? Not adding networking extensions" "wrn"
; ;
esac
2022-10-08 17:20:12 +00:00
## Extensions: at this point we've sourced all the config files that will be used,
## and (hopefully) not yet invoked any extension methods. So this is the perfect
## place to initialize the extension manager. It will create functions
## like the 'post_family_config' that is invoked below.
initialize_extension_manager
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
call_extension_method "post_family_config" "config_tweaks_post_family_config" <<- 'POST_FAMILY_CONFIG'
*give the config a chance to override the family/arch defaults*
This hook is called after the family configuration ( ` sources/families/xxx.conf` ) is sourced.
Since the family can override values from the user configuration and the board configuration,
it is often used to in turn override those.
POST_FAMILY_CONFIG
2023-12-27 23:12:50 +00:00
track_general_config_variables "after post_family_config hooks"
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
2022-11-11 13:20:54 +00:00
# A secondary post_family_config hook, this time with the BRANCH in the name, lowercase.
call_extension_method " post_family_config_branch_ ${ BRANCH ,, } " <<- 'POST_FAMILY_CONFIG_P ER_BRANCH'
*give the config a chance to override the family/arch defaults, per branch*
This hook is called after the family configuration ( ` sources/families/xxx.conf` ) is sourced,
and after ` post_family_config( ) ` hook is already run.
2023-03-13 03:10:01 +00:00
The sole purpose of this is to avoid " case ... esac for $BRANCH " in the board configuration,
2022-11-11 13:20:54 +00:00
allowing separate functions for different branches. You' re welcome.
POST_FAMILY_CONFIG_PER_BRANCH
2023-12-27 23:12:50 +00:00
track_general_config_variables "after post_family_config_branch hooks"
2022-11-11 13:20:54 +00:00
2022-11-22 23:52:32 +00:00
# Lets make some variables readonly.
# We don't want anything changing them, it's exclusively for family config.
declare -g -r PACKAGE_LIST_FAMILY = " ${ PACKAGE_LIST_FAMILY } "
declare -g -r PACKAGE_LIST_FAMILY_REMOVE = " ${ PACKAGE_LIST_FAMILY_REMOVE } "
2022-11-11 13:20:54 +00:00
2023-01-09 16:16:56 +00:00
display_alert "Done with do_main_configuration" "do_main_configuration" "debug"
}
2022-10-08 17:20:12 +00:00
2023-01-09 16:16:56 +00:00
function do_extra_configuration( ) {
2022-10-08 17:20:12 +00:00
[ [ -n $ATFSOURCE && -z $ATF_USE_GCC ] ] && exit_with_error "Error in configuration: ATF_USE_GCC is unset"
[ [ -z $UBOOT_USE_GCC ] ] && exit_with_error "Error in configuration: UBOOT_USE_GCC is unset"
[ [ -z $KERNEL_USE_GCC ] ] && exit_with_error "Error in configuration: KERNEL_USE_GCC is unset"
2024-04-01 16:40:19 +00:00
declare BOOTCONFIG_VAR_NAME = " BOOTCONFIG_ ${ BRANCH ^^ } " # Branch name, uppercase
BOOTCONFIG_VAR_NAME = ${ BOOTCONFIG_VAR_NAME //-/_ } # Replace dashes with underscores
2022-10-08 17:20:12 +00:00
[ [ -n ${ !BOOTCONFIG_VAR_NAME } ] ] && BOOTCONFIG = ${ !BOOTCONFIG_VAR_NAME }
2023-12-27 13:55:55 +00:00
[ [ -z $BOOTPATCHDIR ] ] && BOOTPATCHDIR = " u-boot- $LINUXFAMILY " # @TODO move to hook
2022-10-08 17:20:12 +00:00
[ [ -z $ATFPATCHDIR ] ] && ATFPATCHDIR = " atf- $LINUXFAMILY "
2025-01-23 08:38:33 +00:00
if [ [ " $RELEASE " = ~ ^( focal| jammy| noble| oracular| plucky) $ ] ] ; then
2022-10-08 17:20:12 +00:00
DISTRIBUTION = "Ubuntu"
else
DISTRIBUTION = "Debian"
fi
DEBIAN_MIRROR = 'deb.debian.org/debian'
DEBIAN_SECURTY = 'security.debian.org/'
[ [ " ${ ARCH } " = = "amd64" ] ] &&
UBUNTU_MIRROR = 'archive.ubuntu.com/ubuntu/' ||
UBUNTU_MIRROR = 'ports.ubuntu.com/'
if [ [ $DOWNLOAD_MIRROR = = "china" ] ] ; then
DEBIAN_MIRROR = 'mirrors.tuna.tsinghua.edu.cn/debian'
DEBIAN_SECURTY = 'mirrors.tuna.tsinghua.edu.cn/debian-security'
[ [ " ${ ARCH } " = = "amd64" ] ] &&
UBUNTU_MIRROR = 'mirrors.tuna.tsinghua.edu.cn/ubuntu/' ||
UBUNTU_MIRROR = 'mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/'
fi
if [ [ $DOWNLOAD_MIRROR = = "bfsu" ] ] ; then
DEBIAN_MIRROR = 'mirrors.bfsu.edu.cn/debian'
DEBIAN_SECURTY = 'mirrors.bfsu.edu.cn/debian-security'
[ [ " ${ ARCH } " = = "amd64" ] ] &&
UBUNTU_MIRROR = 'mirrors.bfsu.edu.cn/ubuntu/' ||
UBUNTU_MIRROR = 'mirrors.bfsu.edu.cn/ubuntu-ports/'
fi
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
if [ [ " ${ ARCH } " = = "amd64" ] ] ; then
UBUNTU_MIRROR = 'archive.ubuntu.com/ubuntu' # ports are only for non-amd64, of course.
if [ [ -n ${ CUSTOM_UBUNTU_MIRROR } ] ] ; then # ubuntu redirector doesn't work well on amd64
UBUNTU_MIRROR = " ${ CUSTOM_UBUNTU_MIRROR } "
fi
fi
2023-04-19 09:00:57 +00:00
if [ [ " ${ ARCH } " != "i386" && " ${ ARCH } " != "amd64" ] ] ; then # ports are not present on all mirrors
if [ [ -n ${ CUSTOM_UBUNTU_MIRROR_PORTS } ] ] ; then
display_alert " Using custom ports/ ${ ARCH } mirror " " ${ CUSTOM_UBUNTU_MIRROR_PORTS } " "info"
UBUNTU_MIRROR = " ${ CUSTOM_UBUNTU_MIRROR_PORTS } "
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
fi
fi
# Control aria2c's usage of ipv6.
2022-10-08 17:20:12 +00:00
[ [ -z $DISABLE_IPV6 ] ] && DISABLE_IPV6 = "true"
2023-04-13 16:24:15 +00:00
# @TODO this is _very legacy_ and should be removed. Old-time users might have a lib.config lying around and it will mess up things.
2022-10-08 17:20:12 +00:00
# For (late) user override.
# Notice: it is too late to define hook functions or add extensions in lib.config, since the extension initialization already ran by now.
# in case the user tries to use them in lib.config, hopefully they'll be detected as "wishful hooking" and the user will be wrn'ed.
if [ [ -f $USERPATCHES_PATH /lib.config ] ] ; then
display_alert "Using user configuration override" " $USERPATCHES_PATH /lib.config " "info"
2024-05-18 18:41:18 +00:00
# shellcheck source=/dev/null
2022-10-08 17:20:12 +00:00
source " $USERPATCHES_PATH " /lib.config
2023-12-27 23:12:50 +00:00
track_general_config_variables "after sourcing lib.config"
2022-10-08 17:20:12 +00:00
fi
2023-04-13 16:24:15 +00:00
# Prepare array for extensions to fill in.
display_alert "Main config" "initting EXTRA_IMAGE_SUFFIXES" "debug"
declare -g -a EXTRA_IMAGE_SUFFIXES = ( )
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
call_extension_method "user_config" <<- 'USER_CONFIG'
*Invoke function with user override*
Allows for overriding configuration values set anywhere else .
It is called after sourcing the ` lib.config` file if it exists,
but before assembling any package lists.
USER_CONFIG
2023-12-27 23:12:50 +00:00
track_general_config_variables "after user_config hooks"
2022-10-08 17:20:12 +00:00
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
display_alert "Extensions: prepare configuration" "extension_prepare_config" "debug"
call_extension_method "extension_prepare_config" <<- 'EXTE NSION_PREPARE_CONFIG'
*allow extensions to prepare their own config, after user config is done *
Implementors should preserve variable values pre-set, but can default values an/or validate them.
This runs *after* user_config. Don' t change anything not coming from other variables or meant to be configured by the user.
EXTENSION_PREPARE_CONFIG
2023-12-27 23:12:50 +00:00
track_general_config_variables "after extension_prepare_config hooks"
2022-10-08 17:20:12 +00:00
2023-03-17 03:04:19 +00:00
error_if_lib_tag_set # make sure users are not thrown off by using old parameter which does nothing anymore
2022-10-08 17:20:12 +00:00
# apt-cacher-ng mirror configurarion
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
APT_MIRROR = $DEBIAN_MIRROR
2022-10-08 17:20:12 +00:00
if [ [ $DISTRIBUTION = = Ubuntu ] ] ; then
APT_MIRROR = $UBUNTU_MIRROR
fi
2023-01-11 14:08:16 +00:00
[ [ -n " ${ APT_PROXY_ADDR } " ] ] && display_alert "Using custom apt proxy address" " APT_PROXY_ADDR= ${ APT_PROXY_ADDR } " "info"
2022-10-08 17:20:12 +00:00
2023-01-06 00:33:52 +00:00
# @TODO: allow to run aggregation, for CONFIG_DEFS_ONLY? rootfs_aggregate_packages
2022-10-08 17:20:12 +00:00
# Give the option to configure DNS server used in the chroot during the build process
[ [ -z $NAMESERVER ] ] && NAMESERVER = "1.0.0.1" # default is cloudflare alternate
2023-04-13 16:24:15 +00:00
# Consolidate the extra image suffix. loop and add.
declare EXTRA_IMAGE_SUFFIX = ""
for suffix in " ${ EXTRA_IMAGE_SUFFIXES [@] } " ; do
display_alert "Adding extra image suffix" " ' ${ suffix } ' " "debug"
EXTRA_IMAGE_SUFFIX = " ${ EXTRA_IMAGE_SUFFIX } ${ suffix } "
done
declare -g -r EXTRA_IMAGE_SUFFIX = " ${ EXTRA_IMAGE_SUFFIX } "
display_alert "Extra image suffix" " ' ${ EXTRA_IMAGE_SUFFIX } ' " "debug"
unset EXTRA_IMAGE_SUFFIXES # get rid of this, no longer used
2023-04-13 21:00:42 +00:00
# Lets estimate the image name, based on the configuration. The real image name depends on _actual_ kernel version.
# Here we do a gross estimate with the KERNEL_MAJOR_MINOR + ".y" version, or "generic" if not set (ddks etc).
declare calculated_image_version = "undetermined"
declare predicted_kernel_version = "generic"
if [ [ -n " ${ KERNEL_MAJOR_MINOR } " ] ] ; then
predicted_kernel_version = " ${ KERNEL_MAJOR_MINOR } .y "
fi
IMAGE_INSTALLED_KERNEL_VERSION = " ${ predicted_kernel_version } " include_vendor_version = "no" calculate_image_version
declare -r -g IMAGE_FILE_ID = " ${ calculated_image_version } " # Global, readonly.
2023-01-09 16:16:56 +00:00
display_alert "Done with do_extra_configuration" "do_extra_configuration" "debug"
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
}
2022-10-08 17:20:12 +00:00
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
function write_config_summary_output_file( ) {
2023-01-13 03:37:37 +00:00
local debug_dpkg_arch debug_uname debug_virt debug_src_mount
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
debug_dpkg_arch = " $( dpkg --print-architecture) "
debug_uname = " $( uname -a) "
armbian-next: the great cli entrypoint (+docker) rewrite; introduce `USE_LOCAL_APT_DEB_CACHE` replacing `apt-cacher-ng`
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
- this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
- apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
- debootstrap, by passing it `--cache-dir`
- utility function to help understand what is happening to cache during usage
- apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
- introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
- don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
- clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
- it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
- source configs in a logging section.
- Docker: silent, fast retries to make sure `docker system df` works
- shut-up `chown` (no `-v`) output related to `SET_OWNER_TO_UID`
- ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
- use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
- introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
- introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
- introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
- use it for userpatches files created, logs, and output files, including images and debs.
- @TODOs ref. `$SUDO_USER` which I think the old version of this?
- add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
- initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
- using image in my private repo.
- this has significant speedup to "start building time" on the 1st run
- move some Linux specific stuff to its own if
- add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
- gen .dockerignore together with Dockerfile
- split in funcs
- hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
- mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
- this fails for the right reasons now, causing retries, which are then retried and work ;-)
- this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
- IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
- armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
- armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
- uses REQUIREMENTS_DEFS_ONLY
- works on Docker Desktop on Mac;
- linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
- can't assume things, for example:
- that `sudo` will be available; it might not, and might be already root, no reason to fail
- that `/etc/timezone` will exist
- that `systemd-detect-virt` will be available
- that `git` will be available
- that `locale-gen` will be available
2022-10-09 15:58:23 +00:00
# We might not have systemd-detect-virt, specially inside docker. Docker images have no systemd...
debug_virt = "unknown-nosystemd"
if [ [ -n " $( command -v systemd-detect-virt) " ] ] ; then
debug_virt = " $( systemd-detect-virt || true ) "
fi
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
debug_src_mount = " $( findmnt --output TARGET,SOURCE,FSTYPE,AVAIL --target " ${ SRC } " --uniq) "
display_alert "Writing build config summary to" "debug log" "debug"
2023-01-12 01:32:21 +00:00
LOG_ASSET = "build.summary.txt" do_with_log_asset cat <<- EOF
2022-10-08 17:20:12 +00:00
## BUILD SCRIPT ENVIRONMENT
Repository: $REPOSITORY_URL
Version: $REPOSITORY_COMMIT
Host OS: $HOSTRELEASE
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
Host arch: ${ debug_dpkg_arch }
Host system: ${ debug_uname }
Virtualization type: ${ debug_virt }
2022-10-08 17:20:12 +00:00
## Build script directories
Build directory is located on:
armbian-next: `lib` changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
- also compile.sh
- shellfmt lib
- split off shell and python tools under lib
- revert removal of stuff a-n no longer uses (ref. compilation): general packaging, mkdeb etc
- editoconfig split off
- extension changes split off
- sources and sources/families split off
- some undue stuff removed or split
armbian-next: manual merge (30) of lib changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (30) of family/board changes between 882f995e21f4791d773bc59efdfdb676494ee6ba and 31ac6383e1ac7ebddd0813abc0f1f9632a9c9c40
armbian-next: manual merge (29) of family/board changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (29) of lib changes between 3435c4636723e9553be0a9ce3666bddb0887069e and 882f995e21f4791d773bc59efdfdb676494ee6ba (A LOT!)
armbian-next: manual merge (28) of lib changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c55bd4726139fb8b1ad77641d385515a and 38df56fbf39739b48b31b5e393f15261d053b3cd
armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176390624d33c93634e63a8f91cc0815b and af6ceee6c55bd4726139fb8b1ad77641d385515a
armbian-next: move `ROOTFSCACHE_VERSION` resolution from GitHub from `main-config` down to `create-cache`
- this way config does not depend on remote...
armbian-next: move `ARMBIAN_MIRROR` selection (network) from `main-config` to `prepare-host`
- this way CONFIG_DEFS_ONLY can run without touching the network
armbian-next: manual merge (26) of MD5-checking via debsums (3955) re-imagined
- @TODO make sure
armbian-next: manual merge (26) of sources/families changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
armbian-next: manual merge (26) of lib changes between revisions 20ee8c54502f877bfa563e113d67709cb80dc6f9 and 9c52562176390624d33c93634e63a8f91cc0815b
- @TODO NOT including the md5/debsums check, that needs further rewrite
armbian-next: manual merge (25) of lib changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
- @TODO hmm Igor is now going out to the network for rootfs cache version during configuration phase!!! BAD BAD BAD
armbian-next: manual merge (25) of family changes between revisions fe972621c61f339c9b84aaf94fd851fa789882e8 and 20ee8c54502f877bfa563e113d67709cb80dc6f9
armbian-next: manual merge (24) of families changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (24) of lib changes between revisions 9ca9120420aa2a39b91ab7283a7dafe113de42e8 and 560531a63505eb610d269b26858689307a9483f5
armbian-next: manual merge (23) of all changes between revisions 17b4fb913c76233d1e2126cfd35ecb85acfa5a25 and 9ca9120420aa2a39b91ab7283a7dafe113de42e8
armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14 and 1dddf78cd0ed096edd6506241cfd9aa8cc27ba4e
- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review
armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb50c1172206629a44f983c1794f8359 and 0eb8fe7497aebf341bead2b3b0fb7309fd7bdc14
armbian-next: fix: patching CREATE_PATCHES=yes
- needed to create output dir
armbian-next: add `python2-dev` dep for old uboots
- cleanup some comments
armbian-next: manual merge (20) of all changes between revisions 6b72ae3c864fc020c6aadea473997ca033a0d8cc and 247c4c45fd18aa370575998443fc837466c02971
armbian-next: fix: pass `TERM` to kernel's make, so `make menuconfig` can work
armbian-next: fix: git: read commit UNIX timestamp/local date correctly
- `checked_out_revision_ts` was correct; git outputs `%ct` as a UNIX timestamp, UTC-based
- `checked_out_revision_mtime` was incorrect: git output it without converting to local time
- manually convert using `date @xx` so it has correct local time, whatever it is.
- add debugging to `get_file_modification_time()` too
armbian-next: abstract `$QEMU_BINARY` to `qemu-static.sh`: `deploy_qemu_binary_to_chroot()`/`undeploy_qemu_binary_from_chroot()`
- add hackish logic to avoid removing binary that would be needed if image actually contains `qemu-user-static` package
armbian-next: fix `uuidgen` basic dep check; use fake bash `$RANDOM` if uuidgen not available
- not good: we need uuidgen to begin logging, but it may not be installed yet. workaround.
armbian-next: retry 3 times download-only also for `PACKAGE_LIST_BOARD`
- acng is really not helping
armbian-next: allow customizing UBUNTU_MIRROR (ports mirror) with `CUSTOM_UBUNTU_MIRROR_ARM64=host/path`
armbian-next: WiP: kernel make via `env -i` for clean env; show produced /boot tree
armbian-next: manual merge (19) of all changes between revisions b23498b94909a855d8b0fda1a95ccfc0ab17c747 and e621d25adc8ee66b0d14c94605ef462a13464b85
- the ssh firstrun revert stuff mostly
armbian-next: *breaking change* remove `LIB_TAG` and `.ignore_changes` completely
- one day should be replaced with an "update checker" extension, or even "update-enforcer"
- for now this just causes chaos
armbian-next: `python2` is required for some u-boot builds
- would be "use `python-is-python2` so /usr/bin/python exists and points to Python 2.x" but Jammy does not have that anymore
- python2 is required for some u-boot builds.
- that said, python 2.x is deprecated for a while and needs work thus @TODO
armbian-next: bump Python info gatherer to RELEASE=jammy too
armbian-next: add `KERNEL_MAJOR_MINOR` info to `media` kernel (@balbes150)
- 5.18 is not yet released so might be a problem here
armbian-next: allow to skip submodules during `fetch_from_repo`; introduce hook `fetch_custom_uboot`
- via GIT_SKIP_SUBMODULES=yes, which disables all submodules everywhere
- via UBOOT_GIT_SKIP_SUBMODULES=yes, which disables fetching of submodules during uboot fetch (hidden rkbins anyone?)
- extension hook `fetch_custom_uboot` so we can fetch our own stuff if needed
armbian-next: `initrd` caching fixes (always enable hook; if cache hit, convert to uImage too)
armbian-next: introduce `initramfs`/`initrd` caching
- using hashes of (hopefully) all involved files
- cache hits are rewarded with sprinkly hearts.
- why? this proves we got a reproducible kernel modules build!
- also, you just saved yourself 2-10 minutes of pain
armbian-next: manual merge (18) of changes between revisions 08cf31de73de5f5ba1986348e4556b00d77af09f and c8855aa08dafaa02c939039e55e01967bad61c28
- heh; most bash code changes are for things already done in -next, or no longer used
- some version bumps, etc
armbian-next: cleanup entrypoint and shuffle `prepare_host_basic()` into logging section
armbian-next: *breaking change* add global extlinux killswitch `ALLOW_EXTLINUX`
- unless you set `ALLOW_EXTLINUX=yes`, then `SRC_EXTLINUX` will be disabled globally.
- add a bunch of logging regarding extlinux, armbianEnv and bootscripts for clarity during build
- this is due to nand-sata-install problems with extlinux
- some boards _only work_ with extlinux; we'll have to handle it later
armbian-next: extensions: `image-output-{qcow2|ovf}`: virtual output formats
- which use `qemu-utils` for `qemu-img` conversion of the .img
armbian-next: extension: `kernel-localmodconfig`: faster/slimmer kernel builds with `make localmodconfig`
armbian-next: extension: `cleanup-space-final-image`: zerofree, slim down firmware, show used space
armbian-next: introduce `do_with_ccache_statistics` and use it for kernel compile
- some TODOs
- better logging for .config copying
armbian-next: *breaking change* really disable apt sources for non-desktop builds
armbian-next: fix: don't manage apt-cacher-ng if told NOT to, not the other way around
armbian-next: `JUST_UBOOT=yes` + hooks `build_custom_uboot()`/`post_write_uboot_platform()`
- post_write_uboot_platform()
- only runs during build, for now (not on device)
- build_custom_uboot()
- allow fully custom, extension driven, building of u-boot
- also partial preparation of uboot source combined with default Armbian build
- HACK: u-boot: downgrade some errors to warnings via KCFLAGS
- fix copy of atf bins to uboot, don't do it if atf's not there
armbian-next: fix: no use testing the host for resolvconf if we're manipulating the SDCARD
armbian-next: sunxi_common: avoid shortcircuit error on family_tweaks_bsp when family_tweaks_bsp_s is not defined
armbian-next: fix: add `zstd` and `parallel` to hostdeps
armbian-next: manual merge (17) of all changes between revisions 64410fb74b44cca82e9affbdf93a59d5692862ff and 08cf31de73de5f5ba1986348e4556b00d77af09f
- changes about `git safe dir` ignored, I've done the same in a different way
- hash calculation changes ignored, fasthash is completely different
armbian-next: add `crossbuild-essential-armel` so `arm-linux-gnueabi-gcc` is available with system toolchains
- need to for some ATF builds, at least.
armbian-next: rockchip64_common: lotsa logging and debugging
- supposedly no practical changes
armbian-next: grub: better logging
armbian-next: fix for chaos caused by git's fix of CVE-2022-24765 otherwise "fatal: unsafe repository"
- might not be the best solution, but it's the only one I found
partitioning: fix: don't try fixing a bootscript that's not there
- this fixes a bug when "rootpart=2" without rootpart 1 being /boot
armbian-next: cleanups: umount tmpfs-based $SDCARD during cleanup too
armbian-next: indented heredoc, no functional changes
armbian-next: fix shortcircuit as last statement in case of extlinux
- yes, I wasted 3 hours on this tiny bit, so *you* don't have to!
- better logging for rootfs `mkfs` et al
- introduce `PRESERVE_SDCARD_MOUNT=yes` to preserve SDCARD, MOUNT, and LOOP for debugging
armbian-next: kernel-headers: less verbose, trimmed down tools a bit (perf and testing)
khadas-vim3l: add asound.state for Khadas VIM3L
armbian-next: introduce hook `extension_finish_config()` - late hook for ext configuration
- `extension_finish_config()` is the last thing done in config phase
- use it for determining stuff based on kernel version details, package names, etc
- also tune down some logging which was too verbose
- CI logs with no ANSI escape codes
armbian-next: shuffle around code and logic of `add_desktop_package_sources()`
- @TODO: still needs proper asset logging for sources.list(.d)
- @TODO: tunes down adding of sources/packages to CLI builds, check with Igor
armbian-next: 4.x can't build objtool in kernel-headers; allow for handling that later
- 4.x has a lot more obtuse dependencies
- introduce KERNEL_HAS_WORKING_HEADERS calculated based on KERNEL_MAJOR_MINOR
armbian-next: downgrade `error=misleading-indentation` to warning
- some 4.x kernels patches are really messy
- newer gcc's make that an error now
armbian-next: *allow cross compilation*, even the so-called "reverse cross-compile" (amd64 on arm64)
armbian-next: add `zfs` extension, which installs headers and builds ZFS via DKMS in chroot
- similar to how `nvidia` extension does it
armbian-next: x86: enable `nvidia` extension for all releases (only desktop)
armbian-next: `headers-debian-byteshift.patch` is dead; long-live cross-compiled source-only kernel-headers
- kernel-headers package now only includes _sources_
- postinst does the compilation and preparation for DKMS compatibility
- `tools` dir is included now, which includes the byteshift utilities
- handle special scripts/module.lds case after 5.10
- tested on a 6 combinations of `x86` / `arm64` / `armhf` (3x targets, 2x hosts)
- @TODO: we might be able to reduce the size of tools a bit (perf/tests/etc)
- @TODO: still missing ARCH vs ARCHITECTURE vs SRC_ARCH clarity elsewhere
armbian-next: allow `use_clean_environment=yes` for `chroot_sdcard_apt_get()` and descendants
- this causes command to be run under `env -i`, for a clean environment
armbian-next: manual merge (16) of all changes between revisions be9b5156a4bdcb3850fbe0e7ada0f4421acde174 and 2a8e1ecac1c4fdbf986034be9d6c05a8f1b6e6fb
- many `traps` ignored: we don't use them anymore
armbian-next: fix logging for apt sources/gpg keys
armbian-next: don't leak `if_error_xxx` vars across runner helper invocations; always clean then (even if no error)
- also: fix wireguard-tools install, had a double parameter there
bcm2711: rpi4b: add `pi-bluetooth` which provides working Bluetooth
armbian-next: fixes for (non-)logging when interactively configuring kernel (`KERNEL_CONFIGURE=yes`)
armbian-next: move `lz4` rootfs caches to `zstd`, multithreaded
armbian-next: customize.sh: error handling, do not mount overlay if it doesn't exist
armbian-next: extra info for runners; `if_error_detail_message` and `if_error_find_files_sdcard` globals
- those are unset after running any command
- if error occur, message and/or found files will be included in log, for clarity
armbian-next: manual merge (15) of all changes between revisions 0f7200c7932bb04a34601a25fe30dca0197fbc8b and 101eaec90750f23cae3075d6b5329a33b2bf4685
armbian-next: better logging for `rsync` calls everywhere
- make rsync verbose
armbian-next: downloads: skip download if no `ARMBIAN_MIRROR` nor `DOWNLOAD_MIRROR`; less logs
armbian-next: update rockchip.conf from master and use runners
armbian-next: update mvebu64.conf from master and use functions
armbian-next: git: fix `fetch_from_repo` with actual submodules usage
armbian-next: `armbian-next`ify the `nvidia` extension after rebase from master
- driver version is configurable via `NVIDIA_DRIVER_VERSION`
- use runner function to log/error-handle/use apt cache/etc
rpi4b: there's no legacy branch anymore, remove it from KERNEL_TARGET
armbian-next: `download_and_verify` non-error handled; logging is messy [WiP] [HACK]
armbian-next: logging: let ANSI colors pass to logfile; CALLER_PID instead of BASHPID in subshell
armbian-next: enable HTTPS CONNECT in Armbian-managed apt-cacher-ng configuration
- PPAs require it
armbian-next: don't loop forever if we can't obtain ARMBIAN_MIRROR from redirector
- also, don't even try to do it if `SKIP_ARMBIAN_REPO=yes`
armbian-next: manual merge (14) of all changes between revisions 13469fd8a9eda4a53f87b7dfee0f431dbab8db54 and 09e416e31cc01ece4533a65f02a470a4c21b90ea
- also editorconfig and compile.sh (root) changes
armbian-next: *much* improved logging to HTML; log archiving; consistency
- keep only current logfile
- log to LOGFILE also if SHOW_LOG=yes
- log cmd runtime and success/error directly in runner
armbian-next: *breaking change* use `MemAvailable` (not including swap) and up requirements for tmpfs
- of course add debugging logs
- rename vars
- should really only use this if we've really a lot of completely free RAM to spare
- otherwise OOM killer comes knocking
- or swapping to disk, that is counter-productive
armbian-next: *breaking change* `DEB_COMPRESS=none` by default if not running in CI/GHA
armbian-next: *breaking change* `CLEAN_LEVEL=make` is no more; new `make-kernel`, `make-atf`, `make-uboot`
- allows individual control of what to clean
- this effectively disables `make clean` by default
- rebuilds work and timestamping works for patching, so no reason to clean everytime by default.
armbian-next: refactor `prepare_host`, give `apt-cacher-ng` some much needed attention
- library dir for host-related stuff, pull it out of "general" finally
armbian-next: hostdeps: all toolchains via `crossbuild-essential-arm64`/`armhf`/`amd64`
- trying to sort out hostdeps for Jammy [WiP]
armbian-next: remove `eatmydata` usage, leftover from failed tries to make git faster
armbian-next: fix git origin check, recreate working copy if origin does not match
- fix cold bundle https download progress reporting
armbian-next: finally consolidating logs into output/logs; colorized HTML logs
armbian-next: introduce `do_with_retries()` and use it for apt remote operations during image build
armbian-next: another round of logging tuning/fixes; log assets; git logging
- introduce `do_with_log_asset()` and `LOG_ASSET=xxx`
- separate "git" logging level
- add `trap_handler_cleanup_destimg()` to cleanup DESTIMG
armbian-next: kernel: use parallel compressors; reproducible kernel builds
- also remove leftover mkdebian/builddeb parameters in make invocation
- add pbzip2 to hostdeps
armbian-next: tuning logging for timestamp/fasthash related stuff which is very verbose
- idea is to not completely overwhelm `SHOW_DEBUG=yes` case
- make patching quieter and use file instead of stdin
- set checked_out_revision_ts during git checkout (timestamp version of _mtime)
- timestamp | fasthash logging level (via `SHOW_FASTHASH=yes`)
armbian-next: completely remove mkdebian/builddeb/general-packaging kernel packaging stuff
armbian-next: manual merge (12) of all changes between revisions 34d4be6b7b346507af58133125cef0bc8ff5aef1 and 5fe0f36aa832ac64d1db05adc4eb09a4df4b5509
armbian-next: introduce `PRESERVE_WORKDIR=yes` for heavy debugging
armbian-next: packaging linux-headers again
- do NOT use any output from `make headers_install` - that's for libc headers
- grabs "headers" (and binary tools) directly from the kernel build tree, not install target
- does not produce headers if cross compiling, for now
- produces kernel-headers package for the architecture on which it was built
- doing a single make invocation with build and install for packaging
- using 'make all' in place of vmlinuz/bzImage/image/zImage
armbian-next: apt download-only retried 3 times before installing main packages
armbian-next: fix `VER=` read from kernel-image package, also add `linux` default
armbian-next: some logging for atf compilation
armbian-next: rewrite hostdeps as array, add armhf toolchains
armbian-next: distro-agnostic: cleanups
armbian-next: armbianEnv hooks/debugs (bsp / image)
armbian-next: rpi: completely remove dtb hacks, allowing flash-kernel to work again
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, upgrades untested
armbian-next: refactor new kernel packaging; extract hook helper, fix kernel symlink
armbian-next: refactor new kernel packaging; add linux-dtb package back in finally, all hooks untested
flash-kernel: fix short-circuits as last statement in functions
armbian-next: do not force `SHOW_LOG=yes` if `CI=true`; let's _trust_ logging and error handling works
armbian-next: back out of setting mtime to the revision time during git checkout.
- of course this causes huge recompiles when wanted revision moves forward
armbian-next: sync 'config' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
- this is _also_ getting out of hand... gotta merge soon
armbian-next: sync 'packages' dir from master revision ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 and ed589b248aef675cb5e845fcb55c12dfbcc5e925
armbian-next: more refactorings, general logging; fixes; split image stuff
- logging flowing correct to LOGDIR, still needs packaging
armbian-next: complete removal of usages of `LOG_SUBPATH`; 100% error handled
- loose ends, use new LOGDIR
- remove the last shortcircuit in extensions execution, now it's 100% error handled
- many logging fixes
- still missing: final log consolidation/cleanup
logging: blue groups if `SHOW_DEBUG=yes` or `SHOW_GROUPS=yes` (console equivalent of CI's avocado)
armbian-next: shut down some too-verbose logging: logo building and update-initramfs
armbian-next: git/patching, kernel: use date from git as mtime minimum for patched files
- use revision's date from git log as mtime for all fetch_from_repo
- fix patched files date at least checkout date, otherwise some patches never build
armbian-next: first attempt at kernel packaging rework; just linux-image pkg, no dtbs yet
- correctly predict KERNELRELEASE, put image-dtbs in the right spot for flash-kernel
- remove dpkg-gencontrol, do it all directly
armbian-next: rework kernel source packaging, now exporting from git, to .tar.zst
- compress with zstdmt (multi-thread zstd), remove pv indicator, it's much faster anyway
- export from git (soon will have all patches et al too)
- better logging, show pkg name
- much, much faster due to zstdmt and deb with none compression
armbian-next: a bit atrocious, nameref loaded, `get_list_of_all_buildable_boards()`
- in the process, add support for userpatches/config structure mirroring core, for easy upstreaming
armbian-next: make `SKIP_EXTERNAL_TOOLCHAINS=yes` default. lets see what breaks [WiP]
armbian-next: keeping stdout clean, use display_alert() for cleanup logging
armbian-next: library cleanups; remove `build-all.sh` for good; bring `patching.sh` back
armbian-next: `interactive_desktop_main_configuration()` and stderr'ed + error handl'ed dialog
- use redirection to fd 3 for dialog, now cleanly on stderr
- `show_menu()` -> `dialog_menu()` et al
- interactive configuration now works again!
armbian-next: logging: `SHOW_PIDS=yes`
armbian-next: refactor and error-handle most of desktop configuration, incl menus/dialog
- `dialog_if_terminal_set_vars()` in place of `dialog_if_terminal()`
[WiP] ddk stuff, allow if not in `$KERNEL_TARGET`
armbian-next: split `compile_kernel()` function into smaller functions (+logging)
- `do_with_logging()` galore, much better error reporting for kernel
- `do_with_hooks()` is for the future, just a placeholder for now
armbian-next: `do_with_hooks()` placeholder for future ideas
armbian-next: logging: small refactor and `do_with_logging` admit it does not do error control
armbian-next: fix: traps: `trap_manager_error_handled` is integer (`-i`) not array (`-a`)
armbian-next: sunxi-tools: fix logging for sunxi-tools compilation
armbian-next: runners now run bash with `-o pipefail` in addition to `-e`
- attention, only affects stuff run through the functions in runners.sh
armbian-next: kernel: reduce logging clutter (CC,LD,AR)
- hide fasthash_debug under `SHOW_FASTHASH`
armbian-next: `armhf` should make `zImage` -- or should it?
armbian-next: show logs through ccze; avoid ANSI escapes in file; `SHOW_xxx` control
- `SHOW_DEBUG` shows the debug level
- `SHOW_COMMAND` shows all invoked commands through the runners
- `SHOW_TRAPS` to show 'cleanup' and 'trap' level
- `SHOW_TIMING` to show $SECONDS but pretty
- replace hardcoded traps/cleanups logging
armbian-next: add `KERNEL_MAJOR_MINOR=x.z` to every family, manually from the `KERNELBRANCH`
armbian-next: cold/warm bundles import/download/export for fetch_from_repo
- warm remote, if present, can be exported shallow
- if warm remote bundle is present, can be imported shallow too
- fallback to cold bundle if warm not present
- export (from cold, if exists + warm) shallow bundle
- use temp clone and DATE (not rev or tag) for shallowing, WORKS!
- info JSON/CSV, include "config_ok" true/false, kernel/uboot info
- include logs for failed configs too
- core reports ARMBIAN_WILL_BUILD_KERNEL and ARMBIAN_WILL_BUILD_UBOOT now with package names
armbian-next: `KERNELDIR` is out, `KERNEL_MAJOR_MINOR` is in for all `meson64`, `rpi4b` and `uefi`
armbian-next: new kernel workdir layout: cache/sources/kernel/<ARCH>-<KERNEL_MAJOR_MINOR>-<LINUXFAMILY>
- `GIT_FIXED_WORKDIR` is used to ignore 2nd param and use a specific dir
- this now REQUIRES `KERNEL_MAJOR_MINOR` to be set.
- prepare some `WARM_REMOTE_NAME` and related, based on it
armbian-next: JUST_KERNEL=yes (opposed to KERNEL_ONLY=yes) is really just the kernel build
armbian-next: fetch_from_repos now done when actually compiling atf/uboot/kernel, not before
- lib regen after removing empty files (sources.sh and errors.sh are now gone)
armbian-next: linux: back to Torvalds bundle, no tags; reminder about export
armbian-next: full cached kernel build; refactor all make's in a single place, even for packaging
- 2nd+ runs build in less than a minute
- kernel: compile and package in a single step, more efficient?
- KERNEL_BUILD_DTBS yes/no to build or not dtbs, replaces KERNEL_EXTRA_TARGETS
- dtbs_install, modules_install and headers_install now called by Armbian, not packaging
- kernel with split, but identical, build and install makes for modules/headers/dtbs
- make mkdebian and builddeb idempotent as possible
- keep a lot more cache, specially 'debian' folder
- filtering logging of install stuff
- might be a few leftovers, revisit gains with packaging later
- keeping the arm64 makefile Image.gz vs Image hack
- fix order of packaging patch byteshift, but still there
- cleaning of scripts tools on cross compile removed (!)
armbian-next: minor stylistic changes that I end up doing while working on other stuff
- I am `OFFLINE_WORK`'ing, I don't wanna waste 3 seconds, thanks
- OCD-fix of double `local` declarations
[giga-wip] rework patching, introducing fasthash
[wip] git: experiment with stable kernel bundle, and all tags. nice, but for what?
- also: never delete working copy, exit with error instead.
[wip] disable make clean during packaging. I wanna rebuild fast, always [NO PR?]
armbian-next: export CHOSEN_KERNEL_WITH_ARCH for reporting info
- fix info gathering, parse all boards first, and stop if some failed
- fix KERNEL_TARGET regex by including optional "export "
- add export from info to CSV, very basic stuff, but works
[squash] remove ddk bullshit from KERNEL_TARGET
armbian-next: remove file logging of aggregation stuff. config phase can't touch disk anymore.
[WiP] git cold bundle; no: shallow clones/fetched; yes: locally packed repo
armbian-next: reorder functions in file, they have a ~logical call-tree order
armbian-next: move `fingerprint_image()` out of `git.sh` into its own file
logging: fix for double stderr redirect during `fakeroot_dpkg_deb_build`
logging: subdued "command" logging for debugging low level cmd invocations ("frog")
armbian-next: when showing log, emit all host-side invocations as `debug` too.
[WiP] trap handler abstraction, somewhat works!
armbian-next: manual merge (10) of all lib/*.sh changes between revisions a4ae3a22703a66f1e383a193d74655533ff96c3a and 3305d45b8175dbdd647dc1dc53fa6f0a522920c7 - but NOT the git unshallow stuff, that will be rewritten
armbian-next: trapmanager pt1, identifying spots for trap manager intervention
armbian-next: `install_pkg_deb` -> `install_host_side_packages` which is completely rewritten version
- much simplified; compare installed packages vs wanted, and only update if some missing
armbian-next: force u-boot and kernel's gcc to output colors to make easy to spot warnings and errors
docker: pass the `CI` env var through Docker invocation, for GitHub Actions
armbian-next: avoid warning if "file" utility not installed
- should not happen, but better safe than sorry
armbian-next: disable long_running `pv` progress bar for custom case too
- will rework later, for now pipe causes subshell and caos
armbian-next: if `CI=true` then `SHOW_LOG=yes` always
docker: add arm64 toolchain to Dockerfile; warn, but don't break, on modprobe failure
armbian-next: docker: use ubuntu:rolling, fix deps, use `$SRC/cache` as container's cache dir
armbian-next: logging fixes (padding, don't show error more than once, don't remove trap)
armbian-next: fixes for early error handling and logging
- split stacktrace-related functions into their own lib file
- simplify the traps
- some stacktrace formatting for readability
armbian-next: fix: don't `trap` `ERR` twice, it causes bash to go bananas regarding `caller`
armbian-next: `UPSTEM_VER` -> `UBOOT_REPO_VERSION` and related fixes
armbian-next: oops, fix some non-lib changes I missed, up to revision ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9 and ff4346c4682e260be3137a2301ac7a69b97c044d
armbian-next: more error handling fixes. avoid shortcircuits.
- store previous error message in `MSG_IF_ERROR` (still to be actually shown somewhere during error)
armbian-next: more error handling fixes. avoid subshells, shortcircuits, and pipes
- add `CFLAGS=-fdiagnostics-color=always` to kernel compile; would need also for u-boot soon
WiP: indexing JSON into OpenSearch, all-hardcoded version
rpi: add DTB symlink in Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks
- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families, although a new symlink will be created, nothing uses it.
rpi: fix: flash-kernel fix to ignore kernel 'flavour' for all raspi's
armbian-next: don't try to remove packages that are not installed to begin with
- much faster
- new chroot_sdcard_with_stdout() runner, without bash or any escaping.
armbian-next: don't try to enable systemd services for units that don't exist
- those might be removed by a bsp extension, so check for existence before trying to enable
armbian-next: don't error/warn on failure to enable bootsplash when systemd units missing
armbian-next: use indented HEREDOCS for all call_extension_method's
armbian-next: manual merge (8) of all lib/*.sh changes between revisions 1d499d9ac282d44d4fdb052e5f64fb902688c18f and 3b7f5b1f3418b7ad7a7c03f2af6d8da66f20bcb9
armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d908b09dddac06393c2987995704d0a and 1d499d9ac282d44d4fdb052e5f64fb902688c18f
armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe93f8fcfdd1b1edf6f11e143802e379 and d885bfc97d908b09dddac06393c2987995704d0a
armbian-next: avoid writing to disk during configuration; `ANSI_COLOR=none` logging; make CONFIG_DEFS_ONLY=yes runnable without sudo
- when `CONFIG_DEFS_ONLY=yes`, avoid writing the config summary output.log file.
- refactor that into a function as to be easy to if-out-of
- don't write to disk during aggregate_content() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during show_checklist_variables() if `CONFIG_DEFS_ONLY=yes`
- don't write to disk during write_deboostrap_list_debug_log() if `CONFIG_DEFS_ONLY=yes`
- don't compress and rotate logs if `CONFIG_DEFS_ONLY=yes`
- don't pretend to be handling errors we can't handle during var capture
- I foresee a world we can build all .debs without sudo
- and a some kind of split of codebase entrypoint due to that future feature
- some python info.py enhancements, not ready yet
armbian-next: shellfmt and regen library (after rebase from master n.5)
tools/shellfmt.sh: exclude "cache" and ".tmp" from formatting, for obvious reasons
tools/gen-library.sh: sort function files, so it does not keep changing between runs on different machines.
- order should not be important, since files only contain functions, but avoid git churn
armbian-next: manual merge (5) of all lib/*.sh changes between revisions 1b18df3c834c5c4166e99f731d53ec88d14caf7d and e7962bb2b555d3afdca0ff168982cc45235ca0a8
- most PKG_PREFIX work was already done
armbian-next: `TMPDIR` for all, many logging fixes, error handling: leave-no-garbage-behind without needing traps.
- set `MOUNT_UUID` and `WORKDIR`/`MOUNT`/`SDCARD`/`EXTENSION_MANAGER_TMP_DIR`/`DESTIMG` early in do_main_configuration()
- but, they're just _set_ there, dirs are not created early, but on demand later
- still @TODO: actually clean those during error trap. (unhappy path leaves garbage still)
- but does not leave garbage behind during "successful" runs at least (happy path works)
- actually export `TMPDIR` (== `WORKDIR`) during start of build (not config!), so all `mktemp` are subject to it
- `runners.sh` has helpers to avoid passing `TMPDIR` to chroot. Use the helpers! don't call `chroot` directly.
- don't trap/cleanup individual `mktemp` temp dirs during .deb packaging's, all is handled at once now.
- kernel packaging, for example, automatically picks up `TMPDIR` too. So now hosts `/tmp` is mostly left alone.
- fix some "infodumps" that are done into `.log` files directly.
- don't use sudo if `CONFIG_DEFS_ONLY=yes`; we'll only be collecting info, not doing anything.
- simpler logging for `rsync` operations (just dump to stdout, logging will handle it!)
- use padded counter for section logfiles, so we know which order things ran. exported as `CURRENT_LOGGING_COUNTER`
- no reason to use `apt-get` with `-yqq` anymore, since all logging is handled, so now `-y` by default
- desktop: using runners helpers for rootfs-desktop.sh, which should help a lot with acng caching and finding of problems
- extensions: correctly cleanup temp stuff, extensions has its own tmp/workdir now, and is always cleaned up at end of build.
armbian-next: bye `PKG_PREFIX`, hello `run_host_x86_binary_logged()` wrapper function; better error handling
- we've x86-only utilities that might need to be run on non-x86 build machines
- previously duplicated logic in PKG_PREFIX variable refactored into logged function
- added centralized debug logging
- replace all PKG_PREFIX usage with the new wrapper function, which already handles logging and errors.
- mostly FIP tooling invocations
- but also the boot_logo image builder
- wrapper function delegates to common `run_host_command_logged`
- wrap other FIP invocations with `run_host_command_logged` too, for tidy logging
- avoid using conditionals when invoking functions; that completely disables error handling inside the called function
- use explicit bash opts instead of shortcuts like `set -e`
- a _lot_ of debug logging added
armbian-next: always use UPPERCASE labels for FAT32 UEFI filesystems (rpi4b, uefi-*)
armbian-next: shellfmt after rebase onto master
armbian-next: manual merge (4) of all lib/*.sh changes between revisions 23afccf56e295610340188dc2613143d5323659e and e610f00bc7fdcab5ba4c648fa21148518b4b767b
- plus ooops
atf: fix for `set -e` mode; fix CROSS_COMPILE quoting
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: predict the future location of .img file
- otherwise it's really unhelpful
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
uefi: alias `BRANCH=ddk` to `current`'s `DISTRO_GENERIC_KERNEL=yes`
- no real change, just to match rpi4b's BRANCH=style
- opens space for Armbian-built `current` soon
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
rpi: `legacy`->`ddk` (distro default kernel), remove overclock
- common vars in bcm2711.conf moved to top
- removed overclock/overvolt that was leftover my old setup
- confirmed: works with rpi3b too, should work with CM4/CM3 and others
- use valid UPPERCASE FAT label for RPICFG (in place of `rpicfg`)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: shellfmt again after rebase
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: manual merge (3) of all lib/*.sh changes between revisions 1035905760884fbea567717684c38faae3ef28a4 and e4e4ab0791e60e1e7a204dd0409fa29a1cf7a376
- missed non lib change on Several improvements for RPi builds (#3391)
- I just realized I will have to drop all non lib changes
rockship: fixes for `set -e` mode in rockship armhf family and bsp tweaks
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armhf: enable building armhf targets on amd64 using system toolchains
- SKIP_EXTERNAL_TOOLCHAINS=yes on amd64 should use the same system toolchains as an arm64 build
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: better logging about family_tweaks and family_tweaks_bsp
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
kernel: unblock cross compilation, warn about headers package
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fixes for sunxi/megous stuff with `set -e`
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: fix shellcheck references generation
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge (2) of all lib/*.sh changes between revisions 117633687e9942ade647a8b7d3f80f01e3145193 and 30830388555e463402161a6e0d6993dd6fb0544e
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: renaming function files a bit more consistently
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: removing leftover empty file after all the moving around
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: really insist on set -e during library loading
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: shellfmt again after rebasing master
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: manual merge of all lib/*.sh changes between revisions f6143eff670d435cc8d15b52335b1b70ccb91e1c and f3388b9aee0d1564a28fbc661c6e7b0415a6dfd0
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: generic do_capturing_defs wrapper; Python parser
- enabled by passing CONFIG_DEFS_ONLY=yes; in this case does not build anything
- [WiP] Python3 info reader / matrix expander
- multithreaded version
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: move some interactive parts of config into its own functions
- mostly from config-prepare;
- there is still a lot of others in main-config
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use chroot_custom for grub and flash-kernel extension logging
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: use line buffering, fix runner output color for GHA
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: wrap dpkg-deb; set TMPDIR (not in chroot); refactor kernel make
- And a huge amount of @TODO's added
- Add "debug" and "deprecation" `display_alert()` levels
- insist that `install_common` is now `install_distribution_agnostic`
- unrelated: realtek 8822CS is EXTRAWIFI=yes only now, sorry.
- many debug statements for desktop
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: don't bail out on patching error
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: bunch of fixes; no-stdin; traps; better stacks
- mostly no-stdin dialog handling (desktop et al)
- let ERR trap run together with unmount trap (EXIT etc)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
logging: trap ERR very early, pass-in caller info
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
armbian-next: huge refactor, shellfmt, codesplit, logging/error handling
- *this commit changes most/all the lines of bash code in armbian/build*
- *author is set to IgorPec for historical reasons, rpardini is to blame for the actual changes*
- logging: refactorings, pt.4: autogen lib, shellfmt tool, extract cli
- shellfmt: auto-downloader and runner of shellfmt
- darwin/linux
- amd64/arm64
- find ~correct files to format
- run formatting
- check formatting soon
- refactor compile's CLI stuff out into function/cli
- gen, and use genned library with tool
- logging: refactoring pt3: HUGE split of everything into everything else
- plus rebasing fixes
- logging: refactorings, pt. 2: error handling
- fix: no errors during umount_chroot()
- no progress for CI=true builds
- WiP disable kernel hashing. too crazy.
- a few builds now working with "set -e"
- wtf. or something
- kernel logging and long_running stuff - a mess - needs moving around in files
- rewrite uboot compile loop without using subshells. remove ALL traps. refactor host command
- better logging for u-boot
- more fixes, u-boot
- more fixes for logging et al
- git stuff
- many (many) fixes
- new color scheme
- a monster. make sure unmounted at the end. remove set -e's, to-be-readded.
- remove set -e "for safety reasons"
- more alerts. we gotta know whats failing
- some more logging stuff and fixes for error checking
- more logging and error handling stuff
- fixes; some set -e's
- more logging stuff
- logging: refactoring codebase, pt.1: functions-only
- Refactor the hell out of everything into functions
- rename build-all-ng to build-multi; other fixes, extensions init
- slight nudge
- some were already good, like this one.
- syntax fixes
- some need a little nudge
- another clean one
- some just need a better name (and splitting later)
- syntax fixes
- some were already good, like this desktop one
- some were already good, like this other one
- some were already good, like this one.
- debootstrap is gone.
- extract functions from compile.sh
- add logging to main_default_build
- more stuff
- cleanups and refactors of main.sh
- logging: first steps
- logging: pt. 0: shellfmt everything
- add riscv64 do SRC_ARCH/ARCH/ARCHITECTURE mess; add warn
2022-10-09 10:37:11 +00:00
${ debug_src_mount }
2022-10-08 17:20:12 +00:00
## BUILD CONFIGURATION
Build target:
Board: $BOARD
Branch: $BRANCH
Minimal: $BUILD_MINIMAL
Desktop: $BUILD_DESKTOP
Desktop Environment: $DESKTOP_ENVIRONMENT
Software groups: $DESKTOP_APPGROUPS_SELECTED
Kernel configuration:
Repository: $KERNELSOURCE
Branch: $KERNELBRANCH
Config file: $LINUXCONFIG
U-boot configuration:
Repository: $BOOTSOURCE
Branch: $BOOTBRANCH
Config file: $BOOTCONFIG
Partitioning configuration: $IMAGE_PARTITION_TABLE offset: $OFFSET
Boot partition type: ${ BOOTFS_TYPE :- (none) } ${ BOOTSIZE : + " ( ${ BOOTSIZE } MB) " }
Root partition type: $ROOTFS_TYPE ${ FIXED_IMAGE_SIZE : + " ( ${ FIXED_IMAGE_SIZE } MB) " }
CPU configuration: $CPUMIN - $CPUMAX with $GOVERNOR
EOF
}
2023-01-22 17:35:06 +00:00
function source_family_config_and_arch( ) {
declare -a family_source_paths = ( " ${ SRC } /config/sources/families/ ${ LINUXFAMILY } .conf " " ${ USERPATCHES_PATH } /config/sources/families/ ${ LINUXFAMILY } .conf " )
declare -i family_sourced_ok = 0
2023-03-27 09:42:38 +00:00
declare family_source_path
2023-01-22 17:35:06 +00:00
for family_source_path in " ${ family_source_paths [@] } " ; do
[ [ ! -f " ${ family_source_path } " ] ] && continue
display_alert "Sourcing family configuration" " ${ family_source_path } " "info"
# shellcheck source=/dev/null
source " ${ family_source_path } "
# @TODO: reset error handling, go figure what they do in there.
family_sourced_ok = $(( family_sourced_ok + 1 ))
done
# If no families sourced (and not allowed by ext var), bail out
if [ [ ${ family_sourced_ok } -lt 1 ] ] ; then
if [ [ " ${ allow_no_family :- "no" } " != "yes" ] ] ; then
exit_with_error "Sources configuration not found" " tried ${ family_source_paths [*] } "
fi
fi
2023-12-27 23:12:50 +00:00
track_general_config_variables "after sourcing family config"
2023-01-22 17:35:06 +00:00
# load "all-around common arch defaults" common.conf
display_alert "Sourcing common arch configuration" "common.conf" "debug"
# shellcheck source=config/sources/common.conf
source " ${ SRC } /config/sources/common.conf "
2023-12-27 23:12:50 +00:00
track_general_config_variables "after sourcing common arch"
2023-01-22 17:35:06 +00:00
# load architecture defaults
display_alert "Sourcing arch configuration" " ${ ARCH } .conf " "info"
# shellcheck source=/dev/null
source " ${ SRC } /config/sources/ ${ ARCH } .conf "
2023-12-27 23:12:50 +00:00
track_general_config_variables " after sourcing ${ ARCH } arch "
2023-02-09 14:47:31 +00:00
2023-01-21 23:46:38 +00:00
return 0
2023-01-22 17:35:06 +00:00
}
2023-05-24 14:32:31 +00:00
function set_git_build_repo_url_and_commit_vars( ) {
display_alert " Getting git info for repo, during ${ 1 } ... " " ${ SRC } " "debug"
declare -g BUILD_REPOSITORY_URL BUILD_REPOSITORY_COMMIT
BUILD_REPOSITORY_URL = " $( git -C " ${ SRC } " remote get-url " $( git -C " ${ SRC } " remote | grep origin || true ) " || true ) " # ignore all errors
BUILD_REPOSITORY_COMMIT = " $( git -C " ${ SRC } " describe --match= d_e_a_d_b_e_e_f --always --dirty || true ) " # ignore error
display_alert " BUILD_REPOSITORY_URL set during ${ 1 } " " ${ BUILD_REPOSITORY_URL } " "debug"
display_alert " BUILD_REPOSITORY_COMMIT set during ${ 1 } " " ${ BUILD_REPOSITORY_COMMIT } " "debug"
return 0
}
2024-03-13 20:01:07 +00:00
function check_filesystem_compatibility_on_host( ) {
if [ [ -f "/proc/filesystems" ] ] ; then
2024-06-24 18:56:06 +00:00
# Check if the filesystem is listed in /proc/filesystems
if ! grep -q " \< $ROOTFS_TYPE \> " /proc/filesystems; then # ensure exact match with \<...\>
2024-03-13 20:01:07 +00:00
# Try modprobing the fs module since it doesn't show up in /proc/filesystems if it's an unloaded module versus built-in
if ! modprobe " $ROOTFS_TYPE " ; then
exit_with_error "Filesystem type unsupported by build host:" " $ROOTFS_TYPE "
else
display_alert "Sucessfully loaded kernel module for filesystem" " $ROOTFS_TYPE " ""
fi
fi
# For f2fs, check if support for extended attributes is enabled in kernel config (otherwise will fail later when using rsync)
if [ " $ROOTFS_TYPE " = "f2fs" ] ; then
local build_host_kernel_config = ""
# Try to find kernel config in different places
if [ -f " /boot/config- $( uname -r) " ] ; then
build_host_kernel_config = " /boot/config- $( uname -r) "
elif [ -f "/proc/config.gz" ] ; then
# Try to extract kernel config from /proc/config.gz
if command -v gzip & > /dev/null; then
gzip -dc /proc/config.gz > /tmp/build_host_kernel_config
build_host_kernel_config = "/tmp/build_host_kernel_config"
else
display_alert "Could extract kernel config from build host, please install 'gzip'." " Build might fail in case of missing kernel configs for ' ${ ROOTFS_TYPE } ' " "wrn"
fi
else
display_alert "Could not find kernel config of build host." " Build might fail in case of missing kernel configs for ' ${ ROOTFS_TYPE } '. " "wrn"
fi
# Check if required configurations are set
if [ -n " $build_host_kernel_config " ] ; then
2024-06-24 18:56:06 +00:00
if ! grep -q '^CONFIG_F2FS_FS_XATTR=y$' " $build_host_kernel_config " ||
! grep -q '^CONFIG_F2FS_FS_SECURITY=y$' " $build_host_kernel_config " ; then
2024-03-13 20:01:07 +00:00
exit_with_error "Required kernel configurations for f2fs filesystem not enabled." "Please enable CONFIG_F2FS_FS_XATTR and CONFIG_F2FS_FS_SECURITY in your kernel configuration." "err"
fi
fi
fi
else
display_alert "Could not check filesystem support via /proc/filesystems on build host." "Build might fail in case of unsupported rootfs type." "wrn"
fi
return 0
}
2024-06-09 14:00:18 +00:00
2024-06-24 18:56:06 +00:00
function pre_install_distribution_specific__disable_cnf_apt_hook( ) {
2024-06-09 14:00:18 +00:00
if [ [ $( dpkg --print-architecture) != " ${ ARCH } " && -f " ${ SDCARD } " /etc/apt/apt.conf.d/50command-not-found ] ] ; then #disable command-not-found (60% build-time saved under qemu)
2024-06-24 18:56:06 +00:00
display_alert "Disabling command-not-found during build-time to speed up image creation" " ${ BOARD } : ${ RELEASE } - ${ BRANCH } " "info"
run_host_command_logged mv " ${ SDCARD } " /etc/apt/apt.conf.d/50command-not-found " ${ SDCARD } " /etc/apt/apt.conf.d/50command-not-found.disabled
fi
2024-06-09 14:00:18 +00:00
}
2024-06-24 18:56:06 +00:00
function post_post_debootstrap_tweaks__restore_cnf_apt_hook( ) {
2024-06-09 14:00:18 +00:00
if [ -f " ${ SDCARD } " /etc/apt/apt.conf.d/50command-not-found.disabled ] ; then # (re-enable command-not-found after building rootfs if it's been disabled)
2024-06-24 18:56:06 +00:00
display_alert "Enabling command-not-found after build-time " " ${ BOARD } : ${ RELEASE } - ${ BRANCH } " "info"
run_host_command_logged mv " ${ SDCARD } " /etc/apt/apt.conf.d/50command-not-found.disabled " ${ SDCARD } " /etc/apt/apt.conf.d/50command-not-found
2024-06-09 14:00:18 +00:00
fi
}