2022-11-27 20:44:50 +00:00
#!/usr/bin/env bash
2023-03-09 17:30:40 +00:00
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
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
# This is a re-imagining of mkdebian and builddeb from the kernel tree.
# We wanna produce Debian/Ubuntu compatible packages so we're able to use their standard tools, like
2023-12-27 13:33:12 +00:00
# `u-boot-menu`, `grub2`, and others, so we gotta stick to their conventions.
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
# The main difference is that this is NOT invoked from KBUILD's Makefile, but instead
# directly by Armbian, with references to the dirs where KBUILD's
# `make install dtbs_install modules_install headers_install` have already successfully been run.
# This will create a SET of packages. It should always create these:
# image package: vmlinuz and such, config, modules, and dtbs (if exist) in /usr/lib/xxx
2022-04-28 06:55:47 +00:00
# linux-headers package: "just" the kernel headers, for building out-of-tree modules, dkms, etc.
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
# linux-dtbs package: only dtbs, if they exist. in /boot/
# So this will handle
# - Creating .deb package skeleton dir (mktemp)
# - Moving/copying around of KBUILD installed stuff for Debian/Ubuntu/Armbian standard locations, in the correct packages
# - Fixing the symlinks to stuff so they fit a target system.
# - building the .debs.
is_enabled( ) {
grep -q " ^ $1 =y " include/config/auto.conf
}
if_enabled_echo( ) {
if is_enabled " $1 " ; then
echo -n " $2 "
elif [ $# -ge 3 ] ; then
echo -n " $3 "
fi
}
function prepare_kernel_packaging_debs( ) {
2023-02-03 14:36:28 +00:00
: " ${ artifact_version : ?artifact_version is not set } "
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
declare kernel_work_dir = " ${ 1 } "
declare kernel_dest_install_dir = " ${ 2 } "
declare kernel_version = " ${ 3 } "
declare -n tmp_kernel_install_dirs = " ${ 4 } " # nameref to declare -n kernel_install_dirs dictionary
declare debs_target_dir = " ${ kernel_work_dir } /.. "
# Some variables and settings used throughout the script
2023-08-09 08:05:04 +00:00
declare kernel_version_family = " ${ kernel_version } - ${ BRANCH } - ${ LINUXFAMILY } "
2023-01-29 11:47:40 +00:00
# Package version. Affects users upgrading from repo!
2023-02-03 14:36:28 +00:00
display_alert "Kernel .deb package version" " ${ artifact_version } " "info"
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
# show incoming tree
#display_alert "Kernel install dir" "incoming from KBUILD make" "debug"
#run_host_command_logged tree -C --du -h "${kernel_dest_install_dir}" "| grep --line-buffered -v -e '\.ko' -e '\.h' "
# display_alert "tmp_kernel_install_dirs INSTALL_PATH:" "${tmp_kernel_install_dirs[INSTALL_PATH]}" "debug"
# display_alert "tmp_kernel_install_dirs INSTALL_MOD_PATH:" "${tmp_kernel_install_dirs[INSTALL_MOD_PATH]}" "debug"
# display_alert "tmp_kernel_install_dirs INSTALL_HDR_PATH:" "${tmp_kernel_install_dirs[INSTALL_HDR_PATH]}" "debug"
# display_alert "tmp_kernel_install_dirs INSTALL_DTBS_PATH:" "${tmp_kernel_install_dirs[INSTALL_DTBS_PATH]}" "debug"
2023-03-02 14:04:24 +00:00
# Due to we call `make install` twice, we will get some `.old` files
run_host_command_logged rm -rf " ${ tmp_kernel_install_dirs [INSTALL_PATH] } /*.old " || true
2023-01-23 12:35:20 +00:00
2024-03-03 14:37:07 +00:00
if [ [ " ${ KERNEL_DTB_ONLY } " != "yes" ] ] ; then
# package the linux-image (image, modules, dtbs (if present))
display_alert "Packaging linux-image" " ${ LINUXFAMILY } ${ LINUXCONFIG } " "info"
create_kernel_deb " linux-image- ${ BRANCH } - ${ LINUXFAMILY } " " ${ debs_target_dir } " kernel_package_callback_linux_image "linux-image"
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 dtbs present, package those too separately, for u-boot usage.
if [ [ -d " ${ tmp_kernel_install_dirs [INSTALL_DTBS_PATH] } " ] ] ; then
2023-01-13 03:09:54 +00:00
display_alert "Packaging linux-dtb" " ${ LINUXFAMILY } ${ LINUXCONFIG } " "info"
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
create_kernel_deb " linux-dtb- ${ BRANCH } - ${ LINUXFAMILY } " " ${ debs_target_dir } " kernel_package_callback_linux_dtb "linux-dtb"
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
2024-03-03 14:37:07 +00:00
if [ [ " ${ KERNEL_DTB_ONLY } " != "yes" ] ] ; then
if [ [ " ${ KERNEL_HAS_WORKING_HEADERS } " = = "yes" ] ] ; then
display_alert "Packaging linux-headers" " ${ LINUXFAMILY } ${ LINUXCONFIG } " "info"
create_kernel_deb " linux-headers- ${ BRANCH } - ${ LINUXFAMILY } " " ${ debs_target_dir } " kernel_package_callback_linux_headers "linux-headers"
else
display_alert "Skipping linux-headers package" " for ${ KERNEL_MAJOR_MINOR } kernel version " "info"
fi
2024-03-30 20:12:03 +00:00
display_alert "Packaging linux-libc-dev" " ${ LINUXFAMILY } ${ LINUXCONFIG } " "info"
create_kernel_deb " linux-libc-dev- ${ BRANCH } - ${ LINUXFAMILY } " " ${ debs_target_dir } " kernel_package_callback_linux_libc_dev "linux-libc-dev"
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
2024-03-25 17:04:26 +00:00
2024-03-30 20:12:03 +00:00
return 0
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 create_kernel_deb( ) {
declare package_name = " ${ 1 } "
declare deb_output_dir = " ${ 2 } "
declare callback_function = " ${ 3 } "
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
declare artifact_deb_id = " ${ 4 } "
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
2023-01-22 22:19:40 +00:00
declare cleanup_id = "" package_directory = ""
prepare_temp_dir_in_workdir_and_schedule_cleanup " deb-k- ${ package_name } " cleanup_id package_directory # namerefs
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
declare package_DEBIAN_dir = " ${ package_directory } /DEBIAN " # DEBIAN dir
mkdir -p " ${ package_DEBIAN_dir } " # maintainer scripts et al
# Generate copyright file
mkdir -p " ${ package_directory } /usr/share/doc/ ${ package_name } "
cat <<- COPYRIGHT > " ${ package_directory } /usr/share/doc/ ${ package_name } /copyright "
This is a packaged Armbian patched version of the Linux kernel.
The sources may be found at most Linux archive sites, including:
https://www.kernel.org/pub/linux/kernel
Copyright: 1991 - 2018 Linus Torvalds and others.
The git repository for mainline kernel development is at:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.
On Debian GNU/Linux systems, the complete text of the GNU General Public
License version 2 can be found in \` /usr/share/common-licenses/GPL-2' .
COPYRIGHT
# Run the callback.
# display_alert "Running callback" "callback: ${callback_function}" "debug"
" ${ callback_function } " " ${ @ } "
run_host_command_logged chown -R root:root " ${ package_directory } " # Fix ownership and permissions
run_host_command_logged chmod -R go-w " ${ package_directory } " # Fix ownership and permissions
run_host_command_logged chmod -R a+rX " ${ package_directory } " # in case we are in a restrictive umask environment like 0077
run_host_command_logged chmod -R ug-s " ${ package_directory } " # in case we build in a setuid/setgid directory
cd " ${ package_directory } " || exit_with_error " major failure 774 for ${ package_name } "
# create md5sums file
# sh -c "cd '${package_directory}'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums"
declare unpacked_size
unpacked_size = " $( du -h -s " ${ package_directory } " | awk '{print $1}' ) "
display_alert " Unpacked ${ package_name } tree " " ${ unpacked_size } " "debug"
# Show it
#display_alert "Package dir" "for package ${package_name}" "debug"
#run_host_command_logged tree -C -h -d --du "${package_directory}"
2023-10-08 13:10:52 +00:00
dpkg_deb_build " ${ package_directory } " " ${ artifact_deb_id } "
2023-01-22 22:19:40 +00:00
done_with_temp_dir " ${ cleanup_id } " # changes cwd to "${SRC}" and fires the cleanup function early
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 kernel_package_hook_helper( ) {
declare script = " ${ 1 } "
declare contents = " ${ 2 } "
cat >> " ${ package_DEBIAN_dir } / ${ script } " <<- EOT
#!/bin/bash
echo " Armbian ' ${ package_name } ' for ' ${ kernel_version_family } ': ' ${ script } ' starting. "
set -e # Error control
2023-04-29 10:41:51 +00:00
function is_boot_dev_vfat( ) {
# When installing these packages during image build, /boot is not mounted, and will most definitely not be vfat.
# Use an environment variable to signal that it _will_ be a fat32, so symlinks are not created.
# This is passed by install_deb_chroot() explicitly via the runners.
if [ [ "\${ARMBIAN_IMAGE_BUILD_BOOTFS_TYPE:-" unknown"}" = = "fat" ] ] ; then
echo "Armbian: ARMBIAN_IMAGE_BUILD_BOOTFS_TYPE: '\${ARMBIAN_IMAGE_BUILD_BOOTFS_TYPE:-" not set"}'"
return 0
fi
if ! mountpoint -q /boot; then
return 1
fi
local boot_partition bootfstype
boot_partition = \$ ( findmnt --nofsroot -n -o SOURCE /boot)
bootfstype = \$ ( blkid -s TYPE -o value \$ boot_partition)
if [ [ "\$bootfstype" = = "vfat" ] ] ; then
return 0
fi
return 1
}
2023-05-20 15:02:09 +00:00
#set -x # Debugging
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
$( cat " ${ contents } " )
2023-01-23 00:26:43 +00:00
set +x # Disable debugging
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
echo " Armbian ' ${ package_name } ' for ' ${ kernel_version_family } ': ' ${ script } ' finishing. "
true
EOT
chmod 775 " ${ package_DEBIAN_dir } / ${ script } "
# produce log asset for script
LOG_ASSET = " deb- ${ package_name } - ${ script } .sh " do_with_log_asset run_host_command_logged cat " ${ package_DEBIAN_dir } / ${ script } "
}
function kernel_package_callback_linux_image( ) {
display_alert "linux-image deb packaging" " ${ package_directory } " "debug"
2023-04-08 11:15:17 +00:00
# @TODO: we expect _all_ kernels to produce this, which is... not true.
declare kernel_pre_package_path = " ${ tmp_kernel_install_dirs [INSTALL_PATH] } "
declare kernel_image_pre_package_path = " ${ kernel_pre_package_path } /vmlinuz- ${ kernel_version_family } "
declare installed_image_path = " boot/vmlinuz- ${ kernel_version_family } " # using old mkdebian terminology here for compatibility
display_alert "Showing contents of Kbuild produced /boot" "linux-image" "debug"
run_host_command_logged tree -C --du -h " ${ tmp_kernel_install_dirs [INSTALL_PATH] } "
display_alert "Kernel-built image filetype" " vmlinuz- ${ kernel_version_family } : $( file --brief " ${ kernel_image_pre_package_path } " ) " "info"
declare image_name = "Image" # "Image" for arm64. or, "zImage" for arm, or "vmlinuz" for others. 'image_name' is for easy mkdebian compat
2023-01-23 00:26:43 +00:00
# If NAME_KERNEL is set (usually in arch config file), warn and use that instead.
if [ [ -n " ${ NAME_KERNEL } " ] ] ; then
2023-01-23 12:50:30 +00:00
display_alert "NAME_KERNEL is set" " using ' ${ NAME_KERNEL } ' instead of ' ${ image_name } ' " "debug"
2023-01-23 00:26:43 +00:00
image_name = " ${ NAME_KERNEL } "
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
2023-04-08 11:15:17 +00:00
# allow hook to do stuff here. Some (legacy/vendor/weird) kernels spit out a vmlinuz that needs manual conversion to uImage, etc.
run_host_command_logged ls -la " ${ kernel_pre_package_path } " " ${ kernel_image_pre_package_path } "
call_extension_method "pre_package_kernel_image" <<- 'PRE_P ACKAGE_KERNEL_IMAGE'
*fix Image/uImage/zImage before packaging kernel*
Some ( legacy/vendor) kernels need preprocessing of the produced Image/uImage/zImage before packaging.
Use this hook to do that, by modifying the file in place, in ` ${ kernel_pre_package_path } ` directory.
The final file that will be used is stored in ` ${ kernel_image_pre_package_path } ` -- which you shouldn' t change.
PRE_PACKAGE_KERNEL_IMAGE
display_alert "Kernel image filetype after pre_package_kernel_image" " vmlinuz- ${ kernel_version_family } : $( file --brief " ${ kernel_image_pre_package_path } " ) " "info"
unset kernel_pre_package_path # be done with var after hook
unset kernel_image_pre_package_path # be done with var after hook
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
run_host_command_logged cp -rp " ${ tmp_kernel_install_dirs [INSTALL_PATH] } " " ${ package_directory } / " # /boot stuff
run_host_command_logged cp -rp " ${ tmp_kernel_install_dirs [INSTALL_MOD_PATH] } /lib " " ${ package_directory } / " # so "lib" stuff sits at the root
# Clean up symlinks in lib/modules/${kernel_version_family}/build and lib/modules/${kernel_version_family}/source; will be in the headers package
run_host_command_logged rm -v -f " ${ package_directory } /lib/modules/ ${ kernel_version_family } /build " " ${ package_directory } /lib/modules/ ${ kernel_version_family } /source "
2023-07-31 16:42:04 +00:00
if [ [ -d " ${ package_directory } /lib/modules/ ${ kernel_version_family } /kernel " ] ] ; then
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
display_alert "Showing contents of Kbuild produced modules" "linux-image" "debug"
2023-07-31 16:42:04 +00:00
run_host_command_logged tree -C --du -h -d -L 1 " ${ package_directory } /lib/modules/ ${ kernel_version_family } /kernel " "|| true" # do not fail
fi
2023-01-13 03:09:54 +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
if [ [ -d " ${ tmp_kernel_install_dirs [INSTALL_DTBS_PATH] } " ] ] ; then
2023-12-27 13:33:12 +00:00
# /usr/lib/linux-image-${kernel_version_family} is wanted by u-boot-menu, and other standard Debian/Ubuntu utilities
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 "DTBs present on kernel output" " DTBs ${ package_name } : /usr/lib/linux-image- ${ kernel_version_family } " "debug"
mkdir -p " ${ package_directory } /usr/lib "
run_host_command_logged cp -rp " ${ tmp_kernel_install_dirs [INSTALL_DTBS_PATH] } " " ${ package_directory } /usr/lib/linux-image- ${ kernel_version_family } "
fi
# Generate a control file
cat <<- CONTROL_FILE > " ${ package_DEBIAN_dir } /control "
Package: ${ package_name }
2023-02-03 14:36:28 +00:00
Version: ${ artifact_version }
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
Source: linux-${ kernel_version }
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
Armbian-Kernel-Version: ${ kernel_version }
Armbian-Kernel-Version-Family: ${ kernel_version_family }
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
Architecture: ${ ARCH }
Maintainer: ${ MAINTAINER } <${ MAINTAINERMAIL } >
2022-10-08 11:17:30 +00:00
Section: kernel
2023-05-09 20:46:00 +00:00
Priority: optional
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
Provides: linux-image, linux-image-armbian, armbian-$BRANCH
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
Description: Armbian Linux $BRANCH kernel image $kernel_version_family
This package contains the Linux kernel, modules and corresponding other files.
${ artifact_version_reason :- " ${ kernel_version_family } " }
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
CONTROL_FILE
# Install the maintainer scripts
# Note: hook scripts under /etc/kernel are also executed by official Debian
# kernel packages, as well as kernel packages built using make-kpkg.
# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
# so do we; recent versions of dracut and initramfs-tools will obey this.
declare debian_kernel_hook_dir = "/etc/kernel"
for script in "postinst" "postrm" "preinst" "prerm" ; do
mkdir -p " ${ package_directory } ${ debian_kernel_hook_dir } / ${ script } .d " # create kernel hook dir, make sure.
kernel_package_hook_helper " ${ script } " <(
2023-04-29 10:41:51 +00:00
# Common for all of postinst/postrm/preinst/prerm
2023-04-27 22:35:16 +00:00
cat <<- KERNEL_HOOK _DELEGATION # Reference: linux-image-6.1.0-7-amd64.postinst from Debian
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
export DEB_MAINT_PARAMS = "\$*" # Pass maintainer script parameters to hook scripts
export INITRD = $( if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No) # Tell initramfs builder whether it's wanted
# Run the same hooks Debian/Ubuntu would for their kernel packages.
test -d ${ debian_kernel_hook_dir } /${ script } .d && run-parts --arg= " ${ kernel_version_family } " --arg= " / ${ installed_image_path } " ${ debian_kernel_hook_dir } /${ script } .d
KERNEL_HOOK_DELEGATION
2023-03-01 12:42:09 +00:00
if [ [ " ${ script } " = = "preinst" ] ] ; then
cat <<- HOOK_FOR_REMOVE_VFAT_BOOT_FILES
2023-04-29 10:41:51 +00:00
if is_boot_dev_vfat; then
rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage
fi
2023-03-01 12:42:09 +00:00
HOOK_FOR_REMOVE_VFAT_BOOT_FILES
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
# @TODO: only if u-boot, only for postinst. Gotta find a hook scheme for these...
if [ [ " ${ script } " = = "postinst" ] ] ; then
2023-04-27 22:35:16 +00:00
cat <<- HOOK_FOR_LINK_TO_LAST_INSTALLED_KERNEL # image_name="${NAME_KERNEL}", above
2023-01-30 16:49:20 +00:00
touch /boot/.next
2023-04-29 10:41:51 +00:00
if is_boot_dev_vfat; then
echo " Armbian: FAT32 /boot: move last-installed kernel to ' $image_name '... "
mv -v /${ installed_image_path } /boot/${ image_name }
else
echo " Armbian: update last-installed kernel symlink to ' $image_name '... "
ln -sfv $( basename " ${ installed_image_path } " ) /boot/$image_name
fi
2023-01-30 16:49:20 +00:00
HOOK_FOR_LINK_TO_LAST_INSTALLED_KERNEL
2023-04-27 22:35:16 +00:00
# Reference: linux-image-6.1.0-7-amd64.postinst from Debian
cat <<- HOOK_FOR_DEBIAN_COMPAT_SYMLINK
# call debian helper, for compatibility. this symlinks things according to /etc/kernel-img.conf
# "install" or "upgrade" are decided in a very contrived way by Debian (".fresh-install" file)
2023-04-29 10:41:51 +00:00
# do NOT do this if /boot is a vfat, though.
if ! is_boot_dev_vfat; then
echo " Armbian: Debian compat: linux-update-symlinks install ${ kernel_version_family } ${ installed_image_path } "
linux-update-symlinks install " ${ kernel_version_family } " " ${ installed_image_path } " || true
fi
2023-04-27 22:35:16 +00:00
HOOK_FOR_DEBIAN_COMPAT_SYMLINK
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
)
done
}
function kernel_package_callback_linux_dtb( ) {
display_alert "linux-dtb packaging" " ${ package_directory } " "debug"
2023-01-13 03:09:54 +00:00
display_alert "Showing tree of Kbuild produced DTBs" "linux-dtb" "debug"
2024-09-14 09:44:08 +00:00
run_host_command_logged tree -C --du -h -L 3 " ${ tmp_kernel_install_dirs [INSTALL_DTBS_PATH] } "
2023-01-13 03:09:54 +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
mkdir -p " ${ package_directory } /boot/ "
run_host_command_logged cp -rp " ${ tmp_kernel_install_dirs [INSTALL_DTBS_PATH] } " " ${ package_directory } /boot/dtb- ${ kernel_version_family } "
# Generate a control file
cat <<- CONTROL_FILE > " ${ package_DEBIAN_dir } /control "
2023-02-03 14:36:28 +00:00
Version: ${ artifact_version }
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
Maintainer: ${ MAINTAINER } <${ MAINTAINERMAIL } >
Section: kernel
Package: ${ package_name }
Architecture: ${ ARCH }
2023-05-09 20:46:00 +00:00
Priority: optional
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
Provides: linux-dtb, linux-dtb-armbian, armbian-$BRANCH
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
Description: Armbian Linux $BRANCH DTBs in /boot/dtb-${ kernel_version_family }
This package contains device tree blobs from the Linux kernel, version ${ kernel_version_family }
${ artifact_version_reason :- " ${ kernel_version_family } " }
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
CONTROL_FILE
kernel_package_hook_helper "preinst" <(
cat <<- EOT
rm -rf /boot/dtb
rm -rf /boot/dtb-${ kernel_version_family }
EOT
)
kernel_package_hook_helper "postinst" <(
cat <<- EOT
cd /boot
2023-04-29 10:41:51 +00:00
if ! is_boot_dev_vfat; then
echo " Armbian: DTB: symlinking /boot/dtb to /boot/dtb- ${ kernel_version_family } ... "
ln -sfTv " dtb- ${ kernel_version_family } " dtb
else
echo " Armbian: DTB: FAT32: moving /boot/dtb- ${ kernel_version_family } to /boot/dtb ... "
mv -v " dtb- ${ kernel_version_family } " dtb
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
EOT
)
}
function kernel_package_callback_linux_headers( ) {
display_alert "linux-headers packaging" " ${ package_directory } " "debug"
# targets.
local headers_target_dir = " ${ package_directory } /usr/src/linux-headers- ${ kernel_version_family } " # headers/tools etc
local modules_target_dir = " ${ package_directory } /lib/modules/ ${ kernel_version_family } " # symlink to above later
mkdir -p " ${ headers_target_dir } " " ${ modules_target_dir } " # create both dirs
run_host_command_logged ln -v -s " /usr/src/linux-headers- ${ kernel_version_family } " " ${ modules_target_dir } /build " # Symlink in modules so builds find the headers
run_host_command_logged cp -vp " ${ kernel_work_dir } " /.config " ${ headers_target_dir } " /.config # copy .config manually to be where it's expected to be
# gather stuff from the linux source tree: ${kernel_work_dir} (NOT the make install destination)
# those can be source files or object (binary/compiled) stuff
# how to get SRCARCH? only from the makefile itself. ARCH=amd64 then SRCARCH=x86. How to we know? @TODO
local SRC_ARCH = " ${ ARCH } "
[ [ " ${ SRC_ARCH } " = = "amd64" ] ] && SRC_ARCH = "x86"
[ [ " ${ SRC_ARCH } " = = "armhf" ] ] && SRC_ARCH = "arm"
[ [ " ${ SRC_ARCH } " = = "riscv64" ] ] && SRC_ARCH = "riscv"
2025-07-24 01:39:42 +00:00
[ [ " ${ SRC_ARCH } " = = "loong64" ] ] && SRC_ARCH = "loongarch"
2023-01-23 12:50:30 +00:00
# @TODO: added KERNEL_SRC_ARCH to each arch'es .config file; let's make sure they're sane. Just use KERNEL_SRC_ARCH after confirmed.
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
# Lets check and warn if it isn't. If warns don't popup over time we remove and just use ARCHITECTURE later.
2023-01-23 12:50:30 +00:00
if [ [ " ${ SRC_ARCH } " != " ${ KERNEL_SRC_ARCH } " ] ] ; then
display_alert "WARNING: KERNEL_SRC_ARCH and SRC_ARCH don't match during kernel build." " KERNEL_SRC_ARCH= ${ ARCHITECTURE } SRC_ARCH= ${ SRC_ARCH } " "wrn"
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
# Create a list of files to include, path-relative to the kernel tree
local temp_file_list = " ${ WORKDIR } /tmp_file_list_ ${ kernel_version_family } .kernel.headers "
# Find the files we want to include in the package. Those will be later cleaned, etc.
(
cd " ${ kernel_work_dir } " || exit 2
find . -name Makefile\* -o -name Kconfig\* -o -name \* .pl
2022-04-20 10:32:42 +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
find arch/*/include include scripts -type f -o -type l
2022-04-20 10:32:42 +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
find security/*/include -type f
[ [ -d " arch/ ${ SRC_ARCH } " ] ] && {
find " arch/ ${ SRC_ARCH } " -name module.lds -o -name Kbuild.platforms -o -name Platform
# shellcheck disable=SC2046 # I need to expand. Thanks.
find $( find " arch/ ${ SRC_ARCH } " -name include -o -name scripts -type d) -type f
2022-04-20 10:32:42 +00:00
find arch/${ SRC_ARCH } /include -type f
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-04-20 10:32:42 +00:00
find Module.symvers include scripts -type f
find . -name "bitsperlong.h" -type f
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
# tools/include/tools has the byteshift utilities shared between kernel proper and the build scripts/tools.
# This replaces 'headers-debian-byteshift.patch' which was used for years in Armbian.
find tools -type f # all tools; will trim a bit later
find arch/x86/lib/insn.c # required by objtool stuff...
if is_enabled CONFIG_GCC_PLUGINS; then
find scripts/gcc-plugins -name gcc-common.h # @TODO something else here too?
fi
) > " ${ temp_file_list } "
# Now include/copy those, using tar as intermediary. Just like builddeb does it.
tar -c -f - -C " ${ kernel_work_dir } " -T " ${ temp_file_list } " | tar -xf - -C " ${ headers_target_dir } "
# ${temp_file_list} is left at WORKDIR for later debugging, will be removed by WORKDIR cleanup trap
2023-04-15 16:16:56 +00:00
# Small detour: in v6.3-rc1, in commit https://github.com/torvalds/linux/commit/799fb82aa132fa3a3886b7872997a5a84e820062,
# the tools/vm dir was renamed to tools/mm. Unfortunately tools/Makefile still expects it to exist,
# and "make clean" in the "/tools" dir fails. Drop in a fake Makefile there to work around this.
if [ [ ! -f " ${ headers_target_dir } /tools/vm/Makefile " ] ] ; then
2023-04-29 10:41:51 +00:00
display_alert "Creating fake tools/vm/Makefile" "6.3+ hackfix" "debug"
2023-07-10 12:48:40 +00:00
run_host_command_logged mkdir -p " ${ headers_target_dir } /tools/vm "
2023-04-15 16:16:56 +00:00
echo -e "clean:\n\techo fake clean for tools/vm" > " ${ headers_target_dir } /tools/vm/Makefile "
fi
2025-02-20 10:06:56 +00:00
# Small detour: in v6.14-rc1, in commit https://github.com/torvalds/linux/commit/e19bde2269ca,
# the tools/pci dir was renamed to tools/testing/selftests/pci_endpoint.
# Unfortunately tools/Makefile still expects it to exist,
# and "make clean" in the "/tools" dir fails. Drop in a fake Makefile there to work around this.
if [ [ ! -f " ${ headers_target_dir } /tools/pci/Makefile " ] ] && [ [ " ${ KERNEL_MAJOR_MINOR } " = = "6.14" ] ] ; then
display_alert "Creating fake tools/pci/Makefile" "6.14 hackfix" "debug"
run_host_command_logged mkdir -p " ${ headers_target_dir } /tools/pci "
echo -e "clean:\n\techo fake clean for tools/pci" > " ${ headers_target_dir } /tools/pci/Makefile "
fi
2023-07-10 12:48:40 +00:00
# Hack for 6.5-rc1: create include/linux dir so the 'clean' step below doesn't fail. I've reported upstream...
display_alert "Creating fake counter/include/linux" "6.5-rc1 hackfix" "debug"
run_host_command_logged mkdir -p " ${ headers_target_dir } /tools/counter/include/linux "
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
# Now, make the script dirs clean.
2023-01-13 03:09:54 +00:00
# This is run in our _target_ dir, NOT the source tree, so we're free to make clean as we wish without invalidating the next build's cache.
# Understand: I'm sending the logs of this to the bitbucket ON PURPOSE: "clean" tries to use clang, ALSA, etc, which are not available.
# The logs produced during this step throw off developers casually looking at the logs.
# Important: if the steps _fail_ here, you'll have to enable DEBUG=yes to see what's going on.
2024-12-22 17:53:52 +00:00
#
# In order for the cleanup to be correct for tools, we need to pass the VMLINUX_BTF variable,
# which contains the real path to the newly compiled vmlinux file.
2023-01-13 03:09:54 +00:00
declare make_bitbucket = "&> /dev/null"
2025-03-25 03:31:27 +00:00
run_host_command_logged cd " ${ headers_target_dir } " "&&" make " ARCH= ${ SRC_ARCH } " "M=scripts" clean " ${ make_bitbucket } " "||" make " ARCH= ${ SRC_ARCH } " "M=scripts" clean
run_host_command_logged cd " ${ headers_target_dir } /tools " "&&" make " ARCH= ${ SRC_ARCH } " " VMLINUX_BTF= ${ kernel_work_dir } /vmlinux " clean " ${ make_bitbucket } " "||" make " ARCH= ${ SRC_ARCH } " " VMLINUX_BTF= ${ kernel_work_dir } /vmlinux " clean
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
# Trim down on the tools dir a bit after cleaning.
rm -rf " ${ headers_target_dir } /tools/perf " " ${ headers_target_dir } /tools/testing "
# Hack: after cleaning, copy over the scripts/module.lds file from the source tree. It will only exist on 5.10+
# See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1906131
[ [ -f " ${ kernel_work_dir } /scripts/module.lds " ] ] &&
run_host_command_logged cp -v " ${ kernel_work_dir } /scripts/module.lds " " ${ headers_target_dir } /scripts/module.lds "
2023-01-13 03:09:54 +00:00
if [ [ " ${ DEBUG } " = = "yes" ] ] ; then
# Check that no binaries are included by now. Expensive... @TODO: remove after me make sure.
display_alert "Checking for binaries in kernel headers" " ${ headers_target_dir } " "debug"
(
cd " ${ headers_target_dir } " || exit 33
find . -type f | grep -v -e "include/config/" -e " \.h $" -e " .c $" -e " Makefile $" -e " Kconfig $" -e " Kbuild $" -e " \.cocci $" | xargs file | grep -v -e "ASCII" -e "script text" -e "empty" -e "Unicode text" -e "symbolic link" -e "CSV text" -e "SAS 7+" || 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
2024-02-20 10:00:54 +00:00
call_extension_method "pre_package_kernel_headers" <<- 'PRE_P ACKAGE_KERNEL_HEADERS'
*fix kernel headers before packaging*
Some ( legacy/vendor) kernels need preprocessing of the produced kernel headers before packaging.
Use this hook to do that, by modifying the file in place, in ` ${ headers_target_dir } ` directory.
The kernel sources can be found in ` ${ kernel_work_dir } ` .
PRE_PACKAGE_KERNEL_HEADERS
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
# Generate a control file
2023-01-13 03:09:54 +00:00
# TODO: libssl-dev is only required if we're signing modules, which is a kernel .config option.
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
cat <<- CONTROL_FILE > " ${ package_DEBIAN_dir } /control "
2023-02-03 14:36:28 +00:00
Version: ${ artifact_version }
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
Maintainer: ${ MAINTAINER } <${ MAINTAINERMAIL } >
Section: devel
Package: ${ package_name }
Architecture: ${ ARCH }
2023-05-09 20:46:00 +00:00
Priority: optional
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
Provides: linux-headers, linux-headers-armbian, armbian-$BRANCH
Depends: make, gcc, libc6-dev, bison, flex, libssl-dev, libelf-dev
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
Description: Armbian Linux $BRANCH headers ${ kernel_version_family }
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
This package provides kernel header files for ${ kernel_version_family }
.
This is useful for DKMS and building of external modules.
hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure
- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
- `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
- `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
- `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
- `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
- `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
- artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
- artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
- automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
- calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
- with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
- in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
- exports a lot more information to JSON, including the new subdirectory paths
- comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
- for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
- this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
- this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
- also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
- by default, it changes `control` file only:
- replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
- add a custom field `Armbian-Original-Hash:` with the original hash-version
- `artifact_reversion_for_deployment()` is called by
- new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
- `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
- add some custom fields to `DEBIAN/control`:
- `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
- declutter the `Description:` field, moving long description out of the first line
- obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
- declutter the `Description:` field, moving long description out of the first line
- use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
- use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-02 14:45:16 +00:00
${ artifact_version_reason :- " ${ kernel_version_family } " }
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
CONTROL_FILE
# Make sure the target dir is clean/not-existing before installing.
kernel_package_hook_helper "preinst" <(
cat <<- EOT_PRE INST
if [ [ -d " /usr/src/linux-headers- ${ kernel_version_family } " ] ] ; then
echo " Cleaning pre-existing directory /usr/src/linux-headers- ${ kernel_version_family } ... "
rm -rf " /usr/src/linux-headers- ${ kernel_version_family } "
fi
EOT_PREINST
)
# Make sure the target dir is removed before removing the package; that way we don't leave eventual compilation artifacts over there.
kernel_package_hook_helper "prerm" <(
cat <<- EOT_PRE RM
if [ [ -d " /usr/src/linux-headers- ${ kernel_version_family } " ] ] ; then
echo " Cleaning directory /usr/src/linux-headers- ${ kernel_version_family } ... "
rm -rf " /usr/src/linux-headers- ${ kernel_version_family } "
fi
EOT_PRERM
)
kernel_package_hook_helper "postinst" <(
cat <<- EOT_POSTINST
cd " /usr/src/linux-headers- ${ kernel_version_family } "
NCPU = \$ ( grep -c 'processor' /proc/cpuinfo)
2025-01-04 14:26:05 +00:00
echo " Configuring kernel-headers ( ${ kernel_version_family } ) - please wait ... "
make ARCH = " ${ SRC_ARCH } " olddefconfig
echo " Compiling kernel-headers scripts ( ${ kernel_version_family } ) using \$NCPU CPUs - please wait ... "
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
make ARCH = " ${ SRC_ARCH } " -j\$ NCPU scripts
2025-01-04 14:26:05 +00:00
echo " Compiling kernel-headers scripts/mod ( ${ kernel_version_family } ) using \$NCPU CPUs - please wait ... "
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
make ARCH = " ${ SRC_ARCH } " -j\$ NCPU M = scripts/mod/
2025-01-04 14:26:05 +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
# make ARCH="${SRC_ARCH}" -j\$NCPU modules_prepare # depends on too much other stuff.
2025-01-04 14:26:05 +00:00
echo " Done compiling kernel-headers ( ${ kernel_version_family } ). "
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
EOT_POSTINST
2023-03-17 03:45:00 +00:00
if [ [ " ${ ARCH } " = = "amd64" ] ] ; then # This really only works on x86/amd64; @TODO revisit later
cat <<- EOT_POSTINST_OBJTOOL
echo " Compiling kernel-header objtool ( ${ kernel_version_family } ). "
make ARCH = " ${ SRC_ARCH } " -j\$ NCPU tools/objtool
echo " Done compiling kernel-header objtool ( ${ kernel_version_family } ). "
EOT_POSTINST_OBJTOOL
fi
cat <<- EOT_POSTINST_FINISH
echo " Done compiling kernel-headers tools ( ${ kernel_version_family } ). "
EOT_POSTINST_FINISH
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-03 03:31:04 +00:00
}
2024-03-25 17:04:26 +00:00
function kernel_package_callback_linux_libc_dev( ) {
display_alert "linux-libc-dev packaging" " ${ package_directory } " "debug"
mkdir -p " ${ package_directory } /usr "
run_host_command_logged cp -rp " ${ tmp_kernel_install_dirs [INSTALL_HDR_PATH] } /include " " ${ package_directory } /usr "
HOST_ARCH = $( dpkg-architecture -a${ ARCH } -q"DEB_HOST_MULTIARCH" )
run_host_command_logged mkdir " ${ package_directory } /usr/include/ ${ HOST_ARCH } "
run_host_command_logged mv " ${ package_directory } /usr/include/asm " " ${ package_directory } /usr/include/ ${ HOST_ARCH } "
2024-03-30 20:12:03 +00:00
# Generate a control file
2024-03-25 17:04:26 +00:00
cat <<- CONTROL_FILE > " ${ package_DEBIAN_dir } /control "
Version: ${ artifact_version }
Maintainer: ${ MAINTAINER } <${ MAINTAINERMAIL } >
Package: ${ package_name }
Section: devel
Priority: optional
Provides: linux-libc-dev
2024-04-04 21:12:53 +00:00
Conflicts: linux-libc-dev
2024-03-25 17:04:26 +00:00
Architecture: ${ ARCH }
Description: Armbian Linux support headers for userspace development
This package provides userspaces headers from the Linux kernel. These headers
are used by the installed headers for GNU glibc and other system libraries.
Multi-Arch: same
CONTROL_FILE
}