Commit Graph

443 Commits

Author SHA1 Message Date
Ricardo Pardini
1e9bd386c5
armbian-next: SYNC_CLOCK: don't attempt if ntpd is running; don't fail if ntpdate fails for any reason 2023-02-18 07:42:04 -03:00
Ricardo Pardini
b380ba4d86
armbian-next: further split of config-prepare() and do_main_configuration() into do_extra_configuration() - fixes interactive desktop 2023-02-18 07:42:03 -03:00
Ricardo Pardini
e084991abc
armbian-next: copy modified config + defconfig back from where it came from when KERNEL_CONFIGURE=yes 2023-02-18 07:41:57 -03:00
Ricardo Pardini
d152574ea8
armbian-next: move aggregation to after prepare_host(), and thus out of config, and with correct Python deps 2023-02-18 07:41:53 -03:00
Ricardo Pardini
8d55a3258b
armbian-next: [focal-host] don't use git's --initial-branch which is not supported on focal's git 2023-02-18 07:41:52 -03:00
Ricardo Pardini
ac81b410e0
armbian-next: [focal-host] don't use git format-patch's --no-encode-email-headers which is not supported on focal's git 2023-02-18 07:41:51 -03:00
Ricardo Pardini
2b54793899
armbian-next: [focal-host] run pip3 under the python3_binary_path (so coerce it to use 3.9 under focal) 2023-02-18 07:41:50 -03:00
Ricardo Pardini
eda272045d
armbian-next: [focal-host] remove usages of declare -I, not supported under focal's bash
- this is bad/terrible and will cause a lot of shellcheck errors... but such is life
2023-02-18 07:41:49 -03:00
Ricardo Pardini
6dda660fb6
armbian-next: [focal-host] try to support focal-like host OS's again, by avoiding git's --no-auto-maintenance 2023-02-18 07:41:48 -03:00
Ricardo Pardini
6cb12a3397
armbian-next: [focal-host] try to support focal-like host OS's again, via python3.9 (and drop buster completely)
- completely remove support for building under `buster` -- that's way too old, sorry.
- de-hardcode `python3` invocations, instead use `python3_binary_path` set by `prepare_python3_binary_for_python_tools()`
- juggle `$HOSTRELEASE`: read from actual host, or determined from Docker image name (during Dockerfile build)
- TL;DR: include and use `python3.9` for focal-like host OS's
2023-02-18 07:41:47 -03:00
Ricardo Pardini
f167864f2c
armbian-next: split of config-prepare into multiple functions, allowing for logging of all non-interactive sections
- introduce `do_with_conditional_logging()` which only starts logging sections if `do_logging=no`
- with this we should get complete logs (ofc except for the interactive sections)
2023-02-18 07:41:46 -03:00
Ricardo Pardini
61d4691e09
armbian-next: drivers-harness: make sure cached patch is valid; write it first to tmp file; redirect inside subshell
- otherwise if format-patch failed, it would still create the (invalid) file which would be used next time
2023-02-18 07:41:45 -03:00
Ricardo Pardini
92a4296a62
armbian-next: drivers-harness: pass HOME/PATH explicitly to git commit/format-patch 2023-02-18 07:41:44 -03:00
Ricardo Pardini
0e8bddd1e8
armbian-next: cli: config-dump: can now run on any bash/coreutils-enabled machine; remove some useless vars from dump 2023-02-18 07:41:42 -03:00
Ricardo Pardini
c33b59d61b
armbian-next: config: reduce bash scope & remove some vars un-needed outside of config 2023-02-18 07:41:40 -03:00
Ricardo Pardini
166a34da86
armbian-next: avoid linux-version during configuration; declare -g instead of export
- config might run on a non-Linux, bash-capable, GNU coreutils enabled machine, so avoid `linux-version`
- use `declare -g` instead of `export` for most of `prepare_and_config_main_build_single()`
2023-02-18 07:41:40 -03:00
Ricardo Pardini
f252138693
armbian-next: call hook post_aggregate_packages() only after actually aggregating 2023-02-18 07:41:38 -03:00
Ricardo Pardini
6c027ba552
armbian-next: delete old aggregation code from config 2023-02-18 07:41:37 -03:00
Ricardo Pardini
67108e31c0
armbian-next: move var HOSTRELEASE from config to prepare_host() 2023-02-18 07:41:36 -03:00
Ricardo Pardini
6797016cfb
armbian-next: move compilation vars (chtreads, ccache stuff) from config to compile 2023-02-18 07:41:35 -03:00
Ricardo Pardini
60fb19b48d
Obsolete: kernel-headers via full source + make modules_prepare for 4.19 kernels. [later removed] 2023-02-18 07:41:34 -03:00
Ricardo Pardini
68fafebf9f
Obsolete: try for working armhf kernel-headers. leading nowhere. move to kernel-source / make modules_prepare later. [later re-done] 2023-02-18 07:41:33 -03:00
Ricardo Pardini
59278d1869
armbian-next: remove spurious debug logging with no useful info "Error-related files found" 2023-02-18 07:41:32 -03:00
Ricardo Pardini
b8e595aef4
armbian-next: drivers-harness: include the revert-IPX patch as a "driver" before all others 2023-02-18 07:41:28 -03:00
Ricardo Pardini
c18357fe56
armbian-next: drivers-harness: remove commit-date, do proper logging & escaping for git add/commit/format-patch
- seems like I indulged in the same mistakes I've been correcting for years ("&> /dev/null") - d'oh
2023-02-18 07:41:27 -03:00
Ricardo Pardini
ec2e6c42be
armbian-next: happy new year, bump Igor's copyright 2023-02-18 07:41:25 -03:00
Ricardo Pardini
43f268fdcb
armbian-next: remove very old extlinux killswitch 2023-02-18 07:41:24 -03:00
Ricardo Pardini
c61b985417
armbian-next: better logging in distro-agnostic.sh
- still _a lot_ to fix
2023-02-18 07:41:23 -03:00
Ricardo Pardini
8f3fd355eb
armbian-next: tune logging in multiple places, there was a lot of redundant/un-needed info's 2023-02-18 07:41:22 -03:00
Ricardo Pardini
7987dad34d
armbian-next: Python tools (aggregation/patching): use separate pycache dir in ./cache; use unbuffered stdout/stderr 2023-02-18 07:41:21 -03:00
Ricardo Pardini
59031be6b3
armbian-next: only put systemd-resolved's symlink in place if _not_ using NetworkManager
- why is it even installed? dunno, but fix anyway.
2023-02-18 07:41:20 -03:00
Ricardo Pardini
f8b141cdf0
armbian-next: fix: only aggregate packages if building images (AR-1471) 2023-02-18 07:41:19 -03:00
Ricardo Pardini
690ca4df7c
armbian-next: add (trap) cleanup handler to reset ./tmp and ./output to original pre-sudo UID before exiting, even with failure/abort 2023-02-18 07:41:17 -03:00
Ricardo Pardini
9973010972
armbian-next: Python patching: pass $HOME/$PATH to Python, so git can find .gitconfig and Python can find git
- add sanity check before handling the Git repo in Python (call `status()` to make sure access is OK)
2023-02-18 07:41:16 -03:00
Ricardo Pardini
12b31afa51
armbian-next: git: mark submodule's dirs as safe before recursive fetch_from_repo() 2023-02-18 07:41:15 -03:00
Ricardo Pardini
3bc8afd593
armbian-next: refactor losetup -d ... into free_loop_device_insistent() which retries 10 times 2023-02-18 07:41:14 -03:00
Ricardo Pardini
f679b81b10
armbian-next: git: use --recurse-submodules=no for fetch; fetch_from_repo() handles submodules separately
- also remove `du` working copy size debugging
2023-02-18 07:41:13 -03:00
Ricardo Pardini
65da2a697f
armbian-next: remove @TODO for stuff already done 2023-02-18 07:41:12 -03:00
Ricardo Pardini
ddbb91653f
armbian-next: reset_uid_owner for the markdown log file too 2023-02-18 07:41:11 -03:00
Ricardo Pardini
2f9a4470c7
armbian-next: validate cmdline params against malformed
- eg: `./compile.sh $ERROR=here` is caught now
2023-02-18 07:41:10 -03:00
Ricardo Pardini
093e60d111
armbian-next: exec into sudo when relaunching (AR-1452)
- with `exec`, `sudo` replaces the current shell, and thus never returns
2023-02-18 07:41:09 -03:00
Ricardo Pardini
9370c19a44
armbian-next: drop old code for patching & fasthash
- split the modification time stuff to general
2023-02-18 07:41:05 -03:00
Ricardo Pardini
143ba996ca
armbian-next: git: setup the worktree first before trying to ensure safe 2023-02-18 07:41:04 -03:00
Ricardo Pardini
5384a7dcbc
armbian-next: ignore git errors due to missing 'origin' remote and/or revisions of ${SRC}/.git during main-config 2023-02-18 07:41:03 -03:00
Ricardo Pardini
85009a6431
armbian-next: git worktree: forcefully fix the worktree's reference to the bare repo, and vice-versa 2023-02-18 07:41:02 -03:00
Ricardo Pardini
e607e9e54e
armbian-next: remove spurious output.log redirections in downloads.sh; warn that download_and_verify() is unhandled in armbian-next 2023-02-18 07:41:01 -03:00
Ricardo Pardini
bd04f71a05
armbian-next: Revert "Fix issues 4589 (#4614)" (installing HEADERS dependencies manually)
- This reverts commit 36d9420d
- this makes no sense
- we don't do adhoc installs in armbian-next
2023-02-18 07:41:00 -03:00
Ricardo Pardini
9200a2ce0c
armbian-next: bring find_toolchain() back from the dead; force SKIP_EXTERNAL_TOOLCHAINS=no to force use external toolchains
- handle a lot of corner cases, some toolchains are i386-only and won't run on modern x64 systems
2023-02-18 07:40:58 -03:00
Ricardo Pardini
39ac9e00b1
armbian-next: docker: don't try to double init when recovering from failed pull 2023-02-18 07:40:57 -03:00
Ricardo Pardini
7842113c1d
armbian-next: make sure at least one board config file is sourced, otherwise misspell BOARD= is hard to find 2023-02-18 07:40:56 -03:00
Ricardo Pardini
770d508ca0
armbian-next: Python patching delusion pt 5 + EXTRAWIFI patch generator/harness + consistent patch mtime targets
- Python patching: tune some logging all-around
- Python patching: *FINALLY* set the dates on the patched files to `max(patch_date, root_makefile_date)` thus making lighting-fast rebuilds again
- new EXTRAWIFI patch generator harness; Python patching EXTRA_PATCH_FILES_FIRST
- Python patching: use temp file for patching rejects; clean it up
- new EXTRAWIFI patch generator harness; Python: mark drivers as autogen, don't split or parse them, read as bytes, apply bytes directly
- new EXTRAWIFI patch generator harness; somewhat-works, but patches are per-family
- Python patching: add the `cache/patch` as a mountpoint
  - Darwin Docker performance is 20x with namedvolume; the cached patches are very large
2023-02-18 07:40:55 -03:00
Ricardo Pardini
97f6836705
armbian-next: Python patching delusion, pt4: series & better markdown
- Python patching: hopefully better Markdown: split series dir; detect more status/problems; arche only for missing Subject
  - Python patching: archeology only for missing Subject:, not description; clarify CLI pushing
  - Python patching: use `{file_base_name}.patch` for archeology as `file_name` might include a dir
- Python patching: fix: don't skip board/target patches for no reason
- Python patching: fix for series.conf patches (sunxi/sunxi64): don't sort; mark as series and show on summary
- Python patching: don't fail if archeology found no commits (but add warning)
- Python patching: CLI command `kernel-patches-to-git` with archeology summary, and git pushing of results & summary
  - Python patching: patches-to-git small fixes, auto-push if it's rpardini
  - Python patching: add `patch-kernel` CLI command
- Python patching: commit README.md & gh-pages workflow when apply_patches_to_git
  - Python patching: hopefully better markdown
- Python patching: `git add` everything all at once, for speed
2023-02-18 07:40:54 -03:00
Ricardo Pardini
2c0e9182ed
armbian-next: introduce ORAS-based kernel git bare tree seeding/bundles
- armbian-next: fixes to ORAS-related logging
- armbian-next: actually enable ORAS-based kernel git bare tree seeding/bundles; enable cleaning of bundle articfacts after confirmed working
- armbian-next: introduce ORAS-based kernel git bare tree seeding/bundles (although it is a .tar, not a bundle); this is 20x faster than cloning
- armbian-next: introduce `ORAS` tooling; pull and push functions & downloader/launcher
2023-02-18 07:40:53 -03:00
Ricardo Pardini
76e276c6a9
armbian-next: Python patching delusion, pt1 & pt2 & pt3
- WiP: Python patching delusion, pt 1: finding & parsing patches; apply & git commit with pygit2; Markdown summaries (also for aggregation); git-to-patches tool
  - Python: Markdown aggregation and patching summaries; collapsible; SummarizedMarkdownWriter
  - Python: Markdown aggregation and patching summaries
  - Python: reorg a bit into common/armbian_utils; define the `ASSET_LOG_BASE` in preparation for Markdown delusion
  - Python patching: initial apply patches & initial commit patches to git (using pygit2)
  - Python patching: add basic `series.conf` support
  - Python patching: force use of utf-8; better error handling; use realpath of dirs
  - Python patching: `git-to-patches` initial hack. not proud. half-reused some of the patches-to-git
  - Python patching: "tag" the git commits with info for extracting later; introduce REWRITE_PATCHES/rewrite_patches_in_place
  - Python patching: commented-out, recover-bad-patches hacks
  - Python patching: shorten the signature
  - Python patching: allow BASE_GIT_TAG as well as BASE_GIT_REVISION
  - Python patching: git-archeology for patches missing descriptions; avoid UTF-8 in header/desc (not diff)
  - Python patching: use modern-er email.utils.parsedate_to_datetime to parse commit date
  - Python patching: unify PatchInPatchFile; better git-commiting; re-exporting patches from Git (directly)
  - Python patching: switch to GitPython
    - GitPython is like 100x slower than pygit2, but actually allows for date & committer
    - also allows to remove untracked files before starting
  - Python aggregation: fix missing `AGGREGATED_APT_SOURCES_DICT`
  - Python patching: add `unidecode` dependency to pip3 install
  - Python patching: don't try archeology if SRC is not a Git Repo (eg, in Docker)
  - Python patching: don't try archeology if not applying patches to git
- WiP: Python patching delusion, pt2: actually use for u-boot & kernel patching
  - Python patching: much better problem handling/logging; lenient with recreations (kernel)
  - Python patching: don't force SHOW_LOG for u-boot patching
  - Python patching: don't bomb for no reason when there are no patches to apply
  - Python patching: fully (?) switch kernel patching to Python
  - Python patching: more logging fixups
  - Python patching: capture `kernel_git_revision` from `fetch_from_repo()`'s `checked_out_revision`
  - Python patching: fully switch u-boot patching to Python
  - Python aggregation/patching: colored logging; patching: always reset to git revision
  - Python aggregation/patching: better logging; introduce u-boot Python patching
- Python patching pt3: recovers and better Markdown
  - Python patching: detect, and rescue, `wrong_strip_level` problem; don't try to export patches that didn't apply, bitch instead
  - Python patching: Markdown patching summary table, complete with emoji
  - Python patching: include the problem breakdown in Markdown summary
  - Python patching: sanity check against half-bare, half-mbox patches
  - Python patching: try to recover from 1) bad utf-8 encoded patches; 2) bad unidiff patches; add a few sanity checks
  - Python patching: try, and fail, to apply badly utf-8 encoded patches directly as bytes [reverted]
  - Python patching: try to recover from patch *parse* failures; show summary; better logging
      - set `GIT_ARCHEOLOGY=yes` to do archeology, default not

- armbian-next: Python `pip` dependencies handling, similar to `hostdeps`
  - same scheme for Dockerfile caching
  - @TODO: still using global/shared environment; should move to a dir under `cache` or some kinda venv
- WiP: add `python3-pip` to hostdeps; remove `python-setuptools`
  - remove `python-setuptools` (Python2, no longer exists in Sid) from hostdeps
  - add `python3-pip` to hostdeps; part of virtualenv saga
- WiP: split `kernel.sh` a bit, into `kernel-patching.sh`, `kernel-config.sh` and `kernel-make.sh`
  - `advanced_patch()`: rename vars for clarity; no real changes
- Python patching: introduce FAST_ARCHEOLOGY; still trying for Markdown links
2023-02-18 07:40:52 -03:00
Ricardo Pardini
c251073b78
armbian-next: introduce internal base tmp dir; check it early for sanity ref noexec and nodev mount options 2023-02-18 07:40:51 -03:00
Ricardo Pardini
0c5b10a77b
armbian-next: introduce SKIP_ARMBIAN_ROOTFS_CACHE which is =yes by default
- that is in addition to `SKIP_ARMBIAN_REPO` which is not set by default
2023-02-18 07:40:50 -03:00
Ricardo Pardini
b4da0c869c
armbian-next: a few fixes (shortcircuits...) and enhancements for the GUI building; thanks NicoD 2023-02-18 07:40:49 -03:00
Ricardo Pardini
b606ae9715
armbian-next: docker: fix when using buildx, always pass --load so produced image is actually available to Docker proper 2023-02-18 07:40:48 -03:00
Ricardo Pardini
2d563312bd
armbian-next: fixes for interactive config; change wording of stuff and sort the list of boards in "expert" mode 2023-02-18 07:40:47 -03:00
Ricardo Pardini
66747a12e1
armbian-next: disable cpufrequtils by default; to enable set CPUFREQUTILS_ENABLE=true [HIGHLY CONTENTIOUS CHANGE] 2023-02-18 07:40:46 -03:00
Ricardo Pardini
c2af130a94
armbian-next: fix all shellcheck errors in lib/ 2023-02-18 07:40:44 -03:00
Ricardo Pardini
fd043d707a
armbian-next: squash some warn loggings that were undue; remove $SUDO_USER handling in prepare-host.sh
- squash warning about `NO_APT_CACHER` when in Docker
2023-02-18 07:40:43 -03:00
Ricardo Pardini
b386e4615e
armbian-next: introduce INSTALL_HOST_TOOLS=no to skip rkbin, fips, etc. for fast(er) development 2023-02-18 07:40:42 -03:00
Ricardo Pardini
50b6b232d9
armbian-next: git: fetch_from_repo(): determine, use for checkout, and set the SHA1 rev in checked_out_revision var 2023-02-18 07:40:41 -03:00
Ricardo Pardini
52d89e132b
armbian-next: logging: add Markdown logging output
- armbian-next: logging: add Markdown logging output; collapsible
2023-02-18 07:40:40 -03:00
Ricardo Pardini
074857ede3
armbian-next: u-boot: use git worktree for u-boot; full mainline clone for bare
- share a single `.git` for all u-boots
- all fetches are done against it, maximizing cache hit ratio drastically
- also reduces the size of each working copy by more than 70%
- split uboot's git stuff into uboot-git.sh
- split `uboot_prepare_git()` from `compile_uboot()`
2023-02-18 07:40:39 -03:00
Ricardo Pardini
84c0bf0f7d
armbian-next: kernel: use git worktree & kernel.org clone bundles for kernel working copies
- now we've a single `.git` for all kernels with all branches; a "master" cache
- back to full stable git bundle usage from kernel.org
- bye bye, "gitballs"
- split kernel-related git stuff into `kernel-git.sh`
- introduce `ARMBIAN_MOUNTPOINTS_DEPRECATED` @TODO actually use for cleaning non-Docker
- add `axel` hostdep for multi-conn download of bundle, which comes from a CDN.
- deprecate old mountpoints for gitballs and linux-kernel
- move cleaning of old sources/kernel to mountpoints code
2023-02-18 07:40:38 -03:00
Ricardo Pardini
a51448a1da
armbian-next: non-Docker cleaning of deprecated mountpoints (before general_cleaning) 2023-02-18 07:40:37 -03:00
Ricardo Pardini
568f6aecd0
armbian-next: logging: helpers for handling special logging if stdout is a terminal (user-interactive)
- introduce `if_user_on_terminal_and_not_logging_add()`;
- also the opposite, `if_user_not_on_terminal_or_is_logging_add()`
- unset `CURRENT_LOGGING_SECTION` when exiting a logging section
- introduce `do_with_logging_unless_user_terminal()`
2023-02-18 07:40:36 -03:00
Ricardo Pardini
9657ceac9b
armbian-next: docker: implement docker-purge and docker-shell cli commands; deprecated mountpoints 2023-02-18 07:40:35 -03:00
Ricardo Pardini
277ce40e6f
armbian-next: fix for grub's DISTRO_GENERIC_KERNEL on Debian (not Ubuntu) during update-initramfs
- `initrd`: when kernel not found, list the installed kernels
- armbian-next: small fix for `grub` extension naming
2023-02-18 07:40:34 -03:00
Ricardo Pardini
4a9529dd34
armbian-next: qemu-uboot-arm64 and qemu-uboot-x86 new boards
- sharing most UEFI code, will replace the `virtual` one soon
- x86: patch uboot defconfig to use the `q35` machine type, not `i440fx`
  - separate x86 bootscript, due to non-uInitrd-ness of it
  - hack ramdisk load address both in u-boot source and bootscript
  - use 32-bit u-boot, not 64-bit
- grub: introduce `UEFI_GRUB=skip`, does not deploy GRUB (but does the kernel packages, etc)
- auto-enable qcow2 output for these
- works with both distro's and Armbian's kernels
2023-02-18 07:40:33 -03:00
Ricardo Pardini
b951f7b873
armbian-next: u-boot: introduce hook pre_config_uboot_target()
- useful for hacking at Python versions and other compilation-time hacks
2023-02-18 07:40:32 -03:00
Ricardo Pardini
42e26e9ade
armbian-next: hostdeps: python2/3: add setuptools (required by some u-boot configs) 2023-02-18 07:40:31 -03:00
Ricardo Pardini
a752ac8899
armbian-next: REVERT: remove the BUILD_ONLY build-tasks.sh which makes no sense in armbian-next 2023-02-18 07:40:29 -03:00
Ricardo Pardini
64e298f78f
armbian-next: git: add origin remote if it is empty 2023-02-18 07:40:28 -03:00
Ricardo Pardini
68b86a7d32
armbian-next: introduce PREFER_DOCKER, which acts the same as not-being-root: uses docker always 2023-02-18 07:40:27 -03:00
Ricardo Pardini
adce39d3b7
armbian-next: aggregation.py rewrite; introduce package-lists.sh; usage in core lib 2023-02-18 07:40:22 -03:00
Ricardo Pardini
996aa14f77
armbian-next: include packages.external and apt sources only in DESKTOP builds (pre-aggregation.py)
- cli builds won't have PPAs and other external repos
- packages from such repos should be listed in `packages.external` now, so they're not mismatched
- `PACKAGE_LIST_EXTERNAL` (packages.external) only in DESKTOP builds
- this logic may change later, example:
  - we might _also_ want pure-Ubuntu desktops, without external repos
  - we might _instead_ want external repos in the cli builds
  - this way is easy to change, since everything is kept separate and we can change in a single place.
2023-02-18 07:40:21 -03:00
Ricardo Pardini
578b21922e
armbian-next: call trace analyzer and call-graph generator 2023-02-18 07:40:20 -03:00
Ricardo Pardini
b2d02071bd
armbian-next: better ccache logs/stats/Docker-support/use in u-boot/kernel
- introduce `SHOW_CCACHE=yes` for detailed ccache statistics and logging
- fix: kernel build is done under "env -i", so pass CCACHE_DIR down to Make if CCACHE_DIR is set...
- split from kernel.sh, show stats also for u-boot targets; show compile time
- add volume definition (under `${SRC}/cache/ccache`); auto-use that in Docker builds via `CCACHE_DIR`
- better logging for `do_with_ccache_statistics()`
- there's some CCACHE_DIR code from before; unify @TODO
2023-02-18 07:40:19 -03:00
Ricardo Pardini
093336e914
armbian-next: cli: distccd launcher for build farm
- relaunched under docker
- possibly much nicer if zeroconf enabled?
- this thing is ignoring signals. can't ctrl-c out of it. why? @TODO
- pt 1, subpt 3: distccd - distcc-pump - avahi
- pt 1, subpt 3: distccd + distcc-pump
- pt 1, subpt 2: distccd + avahi
- pt 1, subpt 1: distccd
2023-02-18 07:40:18 -03:00
Ricardo Pardini
da0b3080a0
armbian-next: distcc: optionally using distcc for kernel build 2023-02-18 07:40:17 -03:00
Ricardo Pardini
81376df4b7
armbian-next: u-boot: use scripts/config instead of seding into the .config (BOOTDELAY, CONFIG_LOGLEVEL=6, etc); v2022.10+ only 2023-02-18 07:40:16 -03:00
Ricardo Pardini
7939257592
armbian-next: git: do not delete working copies on remote origin mismatch; accept empty origins as valid 2023-02-18 07:40:15 -03:00
Ricardo Pardini
cc62d4932a
armbian-next: introduce ARMBIAN_FIRMWARE_GIT_SOURCE and _BRANCH to allow custom firmware repository coordinates 2023-02-18 07:40:14 -03:00
Ricardo Pardini
93f0545519
armbian-next: the great aggregation rewrite: pt 0: SHOW_AGGREGATION debug logging 2023-02-18 07:40:13 -03:00
Ricardo Pardini
9fbbe897cd
armbian-next: docker: disable showing Docker volume usage; fix syntax in test for ARMBIAN_RUNNING_IN_CONTAINER 2023-02-18 07:40:12 -03:00
Ricardo Pardini
b703eb6da3
armbian-next: docker: locale-gen + enable all existing extensions before calculating docker hostdeps
- that way all extensions' hostdeps are included in Dockerfile
- also run locale-gen in Dockerfile
2023-02-18 07:40:11 -03:00
Ricardo Pardini
94d451b812
armbian-next: introduce hook post_family_config_branch_<branch>() as convenience after post_family_config() hook 2023-02-18 07:40:10 -03:00
Ricardo Pardini
a9e88f58e5
armbian-next: json-info command, wrapping up the Python tooling; running in Docker; fix config dump 2023-02-18 07:40:09 -03:00
Ricardo Pardini
291b02577a
armbian-next: rename compile_plymouth-theme-armbian() to compile_plymouth_theme_armbian() for consistency 2023-02-18 07:40:08 -03:00
Ricardo Pardini
75de1c2d82
armbian-next: remove usage of REQUIREMENTS_DEFS_ONLY; initialize extensions for requirements cli command & docker pre-game deps 2023-02-18 07:40:07 -03:00
Ricardo Pardini
bc7d388b49
armbian-next: cli: a bit more untangling of re-launching; introduce ARMBIAN_CLI_RELAUNCH_COMMAND and cli_standard_relaunch_docker_or_sudo()
- `configdump` cli: force root/docker
2023-02-18 07:40:06 -03:00
Ricardo Pardini
497a3a80ab
armbian-next: cli: de-hardcode build and docker's interdependence, via DOCKER_CLI_CMD
- `undecided` now directly sends to `build`, which might send to `docker`, which relaunches `build` in Docker;
- the _sending to Docker_ part probably needs refactor
2023-02-18 07:40:05 -03:00
Ricardo Pardini
d502402c1a
armbian-next: show more complete gcc versions in logs 2023-02-18 07:40:04 -03:00
Ricardo Pardini
329e249df1
armbian-next: avoid git cramps when deciding to init repos 2023-02-18 07:40:03 -03:00
Ricardo Pardini
749fc349ee
armbian-next: better handling for binfmt_misc woes; don't require it when native build & only complain if it really fails 2023-02-18 07:40:02 -03:00
Ricardo Pardini
884276cf7f
armbian-next: correctly test for systemd is-system-running --quiet 2023-02-18 07:40:01 -03:00
Ricardo Pardini
f061c9e83b
armbian-next: docker: correctly show all Armbian Docker volumes; use bind, not volume, for output/debs 2023-02-18 07:40:00 -03:00
Ricardo Pardini
4ea6519be2
armbian-next: don't uuidgen twice for no reason 2023-02-18 07:39:59 -03:00
Ricardo Pardini
606e82bcfc
armbian-next: docker: handle the case where we can't pull, and don't otherwise have, the base image; in this case use original debian/ubuntu image 2023-02-18 07:39:58 -03:00
Ricardo Pardini
fc3286a3f9
armbian-next: initial post-kinetic resolved debacle, for now just WARN don't break; missing resolved package in kinetic? 2023-02-18 07:39:57 -03:00
Ricardo Pardini
aaa59261bb
armbian-next: mountpoints.sh with all bind/volume directories definitions and looping func; use it to determine best bind/volume combination for each host OS in Docker 2023-02-18 07:39:56 -03:00
Ricardo Pardini
252f96967e
armbian-next: cleanup logging in distro-agnostic.sh; don't use install.log or such 2023-02-18 07:39:55 -03:00
Ricardo Pardini
c4eaf49f3d
armbian-next: cleanup extensions logging, using display_alert new levels extensions (SHOW_EXTENSIONS=yes) and extensionstrace (SHOW_EXTENSIONS_TRACE=yes)
- DEBUG_EXTENSION_CALLS is gone. use SHOW_EXTENSIONS instead.
- LOG_ALL_HOOK_TRACES is gone. use SHOW_EXTENSIONS_TRACE instead
- LOG_ENABLE_EXTENSION is gone. use SHOW_DEBUG=yes instead
2023-02-18 07:39:54 -03:00
Ricardo Pardini
72bc1b09d8
armbian-next: docker: don't even try to to prepare Docker, if it's not available 2023-02-18 07:39:53 -03:00
Ricardo Pardini
3e9c123dd8
armbian-next: docker: try support Rancher Desktop (in dockerd mode), experimental.
- Changes how Docker Desktop works too, there's a `case` for switching back if needed.
- Now the linux-only CONTAINER_COMPAT hacks are used also for Darwin (`DOCKER_SERVER_REQUIRES_LOOP_HACKS=yes`)
  - `/dev/loop*` is spelled out since they don't exist on Darwin (`DOCKER_SERVER_USE_STATIC_LOOPS=yes`)
2023-02-18 07:39:52 -03:00
Ricardo Pardini
3719a059a9
armbian-next: don't force SHOW_LOG=yes during Dockerfile build; we're verbose enough without it 2023-02-18 07:39:51 -03:00
Ricardo Pardini
19e15b8b35
armbian-next: back to including 'cli' sources/apt sources when building non-desktops (eg, nala etc) 2023-02-18 07:39:48 -03:00
Ricardo Pardini
a612a03678
armbian-next: retry 3 times for loop device's size, then give up; introduce RETRY_RUNS in do_with_retries() 2023-02-18 07:39:47 -03:00
Ricardo Pardini
b9daf6d708
armbian-next: extras/buildpkg.sh code is out [deprecated, later completely dropped] 2023-02-18 07:39:46 -03:00
Ricardo Pardini
a54e7b2fae
armbian-next: add gcc-riscv64-linux-gnu to hostdeps (crossbuild-essential-riscv64 is Ubuntu-only) 2023-02-18 07:39:45 -03:00
Ricardo Pardini
bb0e89f017
armbian-next: always include libc6-amd64-cross in hostdeps; qemu is a dummy package now, remove 2023-02-18 07:39:44 -03:00
Ricardo Pardini
d24d3327a8
armbian-next: the great cli entrypoint (+docker) rewrite; introduce USE_LOCAL_APT_DEB_CACHE replacing apt-cacher-ng
- armbian-next: introduce `USE_LOCAL_APT_DEB_CACHE` (default `=yes`) as alternative/in addition to `apt-cacher-ng` (eg, in Docker)
  - this uses `cache/aptcache/${RELEASE}-${ARCH}` (in the host) for
      - apt cache, by bind-mounting it to `${SDCARD}/var/cache/apt` in the `chroot_sdcard_apt_get()` runner and its usages
      - debootstrap, by passing it `--cache-dir`
  - utility function to help understand what is happening to cache during usage
  - apt itself mantains this cache, removing old packages when new ones are installed. apt does this _by default_
      - introduce `DONT_MAINTAIN_APT_CACHE=yes` to skip out of automatic apt maintenance of apt cache, eg, during `remove`s
      - don't do `apt clean` and such if using local cache, that would clean the cache, not the chroot
  - clean up `install_deb_chroot()` a little, find an unrelated bug there
- WiP: the great cli entrypoint (+docker) rewrite, Phase 6: relaunching structure; re-pass ARMBIAN_BUILD_UUID; use ARMBIAN_COMMAND for log filename; fix for output/logs dir perms
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 4/x; better logging, check & force `DEST_LANG`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 3/x; don't write to stderr in generated Dockerfile
  - it's `drastic red` on non-buildx dockers
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 2/x, logging
- WiP: the great cli entrypoint (+docker) rewrite, Phase 5: cleanups 1/x
  - source configs in a logging section.
  - Docker: silent, fast retries to make sure `docker system df` works
  - shut-up `chown` (no `-v`) output related to  `SET_OWNER_TO_UID`
  - ask user to wait while `DESTIMG` is rsync'ed to `FINALDEST` -- it's potentially very slow
  - use green apple for Mac logging, instead of red apple which might imply error...
- WiP: the great cli entrypoint (+docker) rewrite, Phase 4: run as non-root, maybe-with-Docker
  - introduce `is_docker_ready_to_go()`; if it is, and we're not root, use Docker instead of sudo. <- GOOD IDEA? BAD IDEA? lol
  - introduce `SET_OWNER_TO_UID` var to be passed to Docker/sudo so written files are owned by the launching user, not root.
    - introduce `mkdir_recursive_and_set_uid_owner()` and `reset_uid_owner()` to reset owner based on `SET_OWNER_TO_UID`
    - use it for userpatches files created, logs, and output files, including images and debs.
  - @TODOs ref. `$SUDO_USER` which I think the old version of this?
  - add a lot of @TODOs, ref being able to relaunch something that's not `build` inside Docker, also add/change params and configs and command.
    - initially add `ARMBIAN_DOCKER_RELAUNCH_EXTRA_ARGS`
- WiP: the great cli entrypoint (+docker) rewrite, Phase 3: rpardini is demented, v3
- WiP: the great cli entrypoint (+docker) rewrite, Phase 2: rpardini is demented
- WiP: the great cli entrypoint (+docker) rewrite, Phase 1
- armbian-next: WiP: Docker: actually use the GHA-image as base; pull it every 24hs.
  - using image in my private repo.
  - this has significant speedup to "start building time" on the 1st run
  - move some Linux specific stuff to its own if
  - add comments and todo
- armbian-next: WiP: Docker, high-WiP, beginnings of Armbian mount dict, with linux/darwin preferences
- armbian-next: WiP: Docker, configure `BUILDKIT_COLORS`
- armbian-next: WiP: Docker, make docker image from Dockerfile more compact by flattening layers
- armbian-next: `logging`: add whale indicator if build running under Docker
- armbian-next: WiP: `docker`: working with `bookworm`, `sid`, and `jammy` on Darwin & Linux; works with `bullseye` on Linux only
- armbian-next: WiP: `docker`: force ARMBIAN_RUNNING_IN_CONTAINER both in Dockerfile and passed as `--env`; apt update and install in same layer; back to jammy
- armbian-next: introduce `armbian_is_running_in_container()` and `armbian_is_host_running_systemd()`, replacing `systemd-detect-virt` in multiple spots
- WiP: try with debian:bullseye -- can't detect docker at all
- armbian-next: WiP: 2nd stab at new Docker support; Darwin still works; Linux `docker.io` working
  - gen .dockerignore together with Dockerfile
  - split in funcs
  - hacks for Linux and `/dev/loop` stuff, CONTAINER_COMPAT=yes
  - mac still works, Linux stuff would break it but I if'fed
- armbian-next: the secrets of `CONTAINER_COMPAT` revealed; add size checking to check_loop_device() and avoid retry when `mknod`ing
  - this fails for the right reasons now, causing retries, which are then retried and work ;-)
  - this is related to building under Docker on Linux, using docker.io package (not docker-ce)
- armbian-next: remove `.dockerignore` and add it to `.gitignore`; it's going to be auto-generated
- armbian-next: `.dockerignore`: Docker context should only have minimal files and folders, to speed up Dockerfile build
  - IMPORTANT: `.dockerignore` is going to be generated from now on: so this is the last commit with changes before removal
-  armbian-next: WiP: initial stab at new Docker support; really run the passed cmdline; add Dockerfile to gitignore
-  armbian-next: WiP: initial stab at new Docker support; generate Dockerfile; introduce REQUIREMENTS_DEFS_ONLY
  - uses REQUIREMENTS_DEFS_ONLY
  - works on Docker Desktop on Mac;
  - linux TBA
- armbian-next: don't error out if `.git` not present; other small fixes
- armbian-next: general "work or at least don't misbehave when run on a very bare ubuntu:latest instance"
  - can't assume things, for example:
  - that `sudo` will be available; it might not, and might be already root, no reason to fail
  - that `/etc/timezone` will exist
  - that `systemd-detect-virt` will be available
  - that `git` will be available
  - that `locale-gen` will be available
2023-02-18 07:39:43 -03:00
Ricardo Pardini
2c6751f584
armbian-next: show mkfs ext2/ext4 output (remove -q), it's being run under the logging manager already 2023-02-18 07:39:42 -03:00
Ricardo Pardini
8f26db138a
armbian-next: traps: don't duplicate error message/stacktrace when error occurs in subshell; instead indicate clearly SUBSHELL 2023-02-18 07:39:41 -03:00
Ricardo Pardini
775cd6c619
armbian-next: logging: don't bomb due to lack of git or zstdmt
- logging might run super early when dependencies are not installed
- or say in a container, without git
2023-02-18 07:39:40 -03:00
Ricardo Pardini
5e55c61bfc
armbian-next: kernel: add hooks fetch_sources_for_kernel_driver and patch_kernel_for_driver to allow migrating EXTRAWIFI stuff to extensions 2023-02-18 07:39:39 -03:00
Ricardo Pardini
c4165abe4e
armbian-next: export CHOSEN_KERNEL_WITH_ARCH again, for reporting only 2023-02-18 07:39:38 -03:00
Lane Jennison
28c7645a14
armbian-next: fix old fuction name refrence cleaning to general_cleaning 2023-02-18 07:39:36 -03:00
Ricardo Pardini
cb38a8071b
armbian-next: umount_chroot_recursive: don't try to realpath unless it's a dir to begin with 2023-02-18 07:39:35 -03:00
Ricardo Pardini
4cebf28be4
armbian-next: move resolv.conf symlink to systemd to post_debootstrap_tweaks so customize phase has working DNS 2023-02-18 07:39:33 -03:00
Ricardo Pardini
3e0729b5da
armbian-next: normalize mount/umount $targets to have (or not) the trailing slash 2023-02-18 07:39:32 -03:00
Ricardo Pardini
72cf555bce
armbian-next: bye bye $FAST_CREATE_IMAGE: always use truncate for blank image 2023-02-18 07:39:31 -03:00
Ricardo Pardini
914348ba52
armbian-next: less verbose umount_chroot(), except after first try, so we can know what is left mounted 2023-02-18 07:39:30 -03:00
Ricardo Pardini
f921c8cd74
armbian-next: let all unmounting of ${MOUNT} be done by umount_chroot_recursive 2023-02-18 07:39:29 -03:00
Ricardo Pardini
d85bf2a155
armbian-next: many fixes after v29 rebase; mostly involving umount
- remove grub's --verbose, it's really too verbose
- trust in TMPDIR, do not use trap at all in compile_plymouth-theme-armbian - settings traps adhoc is forbidden in armbian-next as well
- be more verbose in umount_chroot(), do not try to unmount tmpfs-mounted dir itself, only xx/tmp
- try to be smarter about /tmp being mounted in rootfs-to-image -- in the end the recursive saves us
- run post_debootstrap_tweaks when the SDCARD is still mounted, not after
- don't try to download anything from any mirrors if SKIP_ARMBIAN_REPO==yes
2023-02-18 07:39:28 -03:00
Ricardo Pardini
833a7d9ab6
armbian-next: fix "create list of installed packages for debug" 2023-02-18 07:39:27 -03:00
Ricardo Pardini
b73e72721a
armbian-next: HACK: ROOTFSCACHE_VERSION is undefined and failing everytime 2023-02-18 07:39:26 -03:00
Ricardo Pardini
9137a9de3f
armbian-next: deploy bootscript even if BOOTCONFIG=none
- fact we're not BUILDING nor deploying uboot does not mean image does not need a bootscript.
2023-02-18 07:39:25 -03:00
Ricardo Pardini
f052196b6c
armbian-next: debugs about armbianEnv.txt overlays/fdtfile 2023-02-18 07:39:24 -03:00
Ricardo Pardini
7b47e79780
armbian-next: introduce ARMBIAN_LOGS_TO_JOURNAL and ARMBIAN_LOGS_JOURNAL_IDENTIFIER (logs display_alert to journald) 2023-02-18 07:39:23 -03:00
Ricardo Pardini
19938837b5
armbian-next: re-add dependency fdisk after juggling rebases 2023-02-18 07:39:22 -03:00
Ricardo Pardini
38e2e50328
armbian-next: split early_prepare_host_dependencies() (run early, during config, before aggregation) from prepare_host() (run after aggregation)
- add hook `host_dependencies_known` (different from `host_dependencies_ready` from before)
2023-02-18 07:39:21 -03:00
Ricardo Pardini
1fa825b58e
armbian-next: fix for tests of BOOTSCRIPT and BOOTCONFIG!=none 2023-02-18 07:39:20 -03:00
Ricardo Pardini
271fe3fcd0
armbian-next: retry apt update & apt install family packages in addition to board packages 2023-02-18 07:39:19 -03:00
Ricardo Pardini
45c2728851
armbian-next: prepare a bin dir inside WORKDIR with a python symlink to /usr/bin/python2 and add it to PATH 2023-02-18 07:39:18 -03:00
Ricardo Pardini
a1ff891b24
armbian-next: cleaning: don't complain about 'none' CLEAN_LEVEL 2023-02-18 07:39:16 -03:00
Ricardo Pardini
188ef0b1af
armbian-next: kernel: run kernel's make through unbuffer as well 2023-02-18 07:39:15 -03:00
Ricardo Pardini
98eae22665
armbian-next: uboot: use CFLAGS/KCFLAGS everywhere; run make through unbuffer (from expect package) for full color logging 2023-02-18 07:39:14 -03:00
Ricardo Pardini
2196e957f0
armbian-next: logs: avoid errors by cwd'ing to SRC 2023-02-18 07:39:13 -03:00
Ricardo Pardini
379b7d6f19
armbian-next: write_image_to_device: if SKIP_VERIFY=no, don't waste time checksumming the image, it won't be used 2023-02-18 07:39:12 -03:00
Ricardo Pardini
a02647862a
armbian-next: u-boot: add debug info when hacking CONFIG_ENV_IS_IN_EXT4 in u-boot .config 2023-02-18 07:39:11 -03:00
Ricardo Pardini
bfa5813c6e
armbian-next: u-boot: add fasthash to u-boot [deprecated, later removed]
- u-boot: fasthash: add `uboot_target_counter` to id and branch, lest `UBOOT_TARGET_MAP` > 2 fails
2023-02-18 07:39:10 -03:00
Ricardo Pardini
f07ec572d8
armbian-next: fix logging headers in HTML/ANSI log output 2023-02-18 07:39:09 -03:00
Ricardo Pardini
578020f42c
armbian-next: cleaning: fix shortcircuits, warn about unknown clean levels 2023-02-18 07:39:08 -03:00
Ricardo Pardini
b0cb5c270f
armbian-next: traps: cleanups: run cleanups in the reverse order they were added; allow running one single cleanup and removing from list 2023-02-18 07:39:07 -03:00
Ricardo Pardini
41e471aa1e
armbian-next: introduce KERNEL_EXTRA_DIR to suffix LINUXSOURCEDIR forcefully 2023-02-18 07:39:05 -03:00
Ricardo Pardini
7643c2901d
armbian-next: check_loop_device() now uses do_with_retries 5 ... to give the OS time
- prevents spurious fails I get sometimes...
2023-02-18 07:39:04 -03:00
Ricardo Pardini
3146421f8e
armbian-next: u-boot: extract into functions; add hooks - for more flexibility
- extract loop_over_uboot_targets_and_do(), and handle `target_make/target_files` parsing there, so `compile_uboot_target` needs no parsing magic
- extract deploy_built_uboot_bins_for_one_target_to_packaging_area() (meant to be called via loop_over_uboot_targets_and_do)
- add hook `post_uboot_custom_postprocess` -- literally run after `uboot_custom_postprocess`
- @TODO: possibly squash with a previous u-boot hook was added
2023-02-18 07:39:02 -03:00
Ricardo Pardini
8ce52db74e
armbian-next: back to ANSI logs by default; HTML logs only by EXPORT_HTML_LOG=yes 2023-02-18 07:39:01 -03:00
Ricardo Pardini
c7713ebb70
armbian-next: atf: add LOG_LEVEL=40 (up from default 20) and BUILD_STRING="armbian" to atf make invocation 2023-02-18 07:39:00 -03:00
Ricardo Pardini
8d912e59c4
armbian-next: u-boot: introduce UBOOT_DEBUGGING=yes which enables CONFIG_LOG=y and others
- also pass CFLAGS as well as KCFLAGS to make
2023-02-18 07:38:59 -03:00
Ricardo Pardini
6d2c00613c
armbian-next: try to parse Source: linux-5.x.y-rcZ correctly into VER=5.x.y-rcZ instead of VER=5.x.y
- `VER` gets used in the final *image* name produced, and it is very confusing to get `5.19.0` instead of `5.19.0-rc3` there.
- added debug's so we can find when we're bit, there's 2 variations
2023-02-18 07:38:57 -03:00
Ricardo Pardini
95e0b9d484
armbian-next: remove warm/cold bundles from fetch_from_repo, replace with 2 invocation-specific hooks and gitballs (.tar of .git)
- drop experiment 'caches/gitbundles' and its code; all lives now in separate repo
- change LINUXSOURCEDIR **again**, cleanup the old one
2023-02-18 07:38:56 -03:00
Ricardo Pardini
0aa57b5ef5
armbian-next: do not exclude 'CC' messages from kernel make 2023-02-18 07:38:55 -03:00
Ricardo Pardini
8511061d67
armbian-next: kernel build: always add container (series/patch-dir) mtime as minimum mtime for patch results
- this avoids snafu's when removing patches from the directory: the file won't exist, but the parent mtime will have been updated
2023-02-18 07:38:54 -03:00
Ricardo Pardini
b93965eca7
armbian-next: kernel: config: make olddefconfig (not oldconfig, which is interactive) when KERNEL_CONFIGURE=yes 2023-02-18 07:38:53 -03:00
Ricardo Pardini
a0ba3d4f37
armbian-next: fix for .bin/.elf copy from atf to uboot dir 2023-02-18 07:38:52 -03:00
Ricardo Pardini
1aa3ab23be
armbian-next: atf: downgrade gcc errors to warnings, so ATF 2.5, 2.2 and others can be built on modern toolchains
- also add colorful logs
2023-02-18 07:38:51 -03:00
Ricardo Pardini
3723cc1b7b
armbian-next: source arch common.conf before the actual arch configs in main-config.sh 2023-02-18 07:38:47 -03:00
Ricardo Pardini
b25b3cf499
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 882f995e21 and 31ac6383e1

armbian-next: manual merge (30) of family/board changes between 882f995e21 and 31ac6383e1

armbian-next: manual merge (29) of family/board changes between 3435c46367 and 882f995e21 (A LOT!)

armbian-next: manual merge (29) of lib changes between 3435c46367 and 882f995e21 (A LOT!)

armbian-next: manual merge (28) of lib changes between revisions af6ceee6c5 and 38df56fbf3

armbian-next: manual merge (28) of sources/families changes between revisions af6ceee6c5 and 38df56fbf3

armbian-next: manual merge (27) of `lib` changes between revisions 9c52562176 and af6ceee6c5

armbian-next: manual merge (27) of `sources/families` changes between revisions 9c52562176 and af6ceee6c5

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 20ee8c5450 and 9c52562176

armbian-next: manual merge (26) of lib changes between revisions 20ee8c5450 and 9c52562176

- @TODO NOT including the md5/debsums check, that needs further rewrite

armbian-next: manual merge (25) of lib changes between revisions fe972621c6 and 20ee8c5450

- @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 fe972621c6 and 20ee8c5450

armbian-next: manual merge (24) of families changes between revisions 9ca9120420 and 560531a635

armbian-next: manual merge (24) of lib changes between revisions 9ca9120420 and 560531a635

armbian-next: manual merge (23) of all changes between revisions 17b4fb913c and 9ca9120420

armbian-next: manual merge (22) of all changes between revisions 0eb8fe7497 and 1dddf78cd0

- @TODO EXCEPT the insanity about locales/eval/VERYSILENT in #3850, requires deep review

armbian-next: manual merge (21) of all changes between revisions e7d7dab1bb and 0eb8fe7497

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 6b72ae3c86 and 247c4c45fd

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 b23498b949 and e621d25adc

- 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 08cf31de73 and c8855aa08d

- 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 64410fb74b and 08cf31de73

- 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 be9b5156a4 and 2a8e1ecac1

- 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 0f7200c793 and 101eaec907

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 13469fd8a9 and 09e416e31c

- 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 34d4be6b7b and 5fe0f36aa8

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 ed589b248a

- this is _also_ getting out of hand... gotta merge soon

armbian-next: sync 'packages' dir from master revision ed589b248a

armbian-next: manual merge (11) of all lib/*.sh changes between revisions 3305d45b81 and ed589b248a

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 a4ae3a2270 and 3305d45b81 - 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 ff4346c468

armbian-next: manual merge (9) of all lib/*.sh changes between revisions 3b7f5b1f34 and ff4346c468

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 1d499d9ac2 and 3b7f5b1f34

armbian-next: manual merge (7) of all lib/*.sh changes between revisions d885bfc97d and 1d499d9ac2

armbian-next: manual merge (6) of all lib/*.sh changes between revisions c7f3c239fe and d885bfc97d

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 1b18df3c83 and e7962bb2b5

- 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 23afccf56e and e610f00bc7

- 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 1035905760 and e4e4ab0791

- 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 117633687e and 3083038855

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 f6143eff67 and f3388b9aee

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
2023-02-18 07:38:46 -03:00
Torndeco
66ceaf3b7e
Fix: Python2 Paths for Legacy Kernel v5.10 with Edge Release (#4818)
* Fix: Python2 Paths for Legacy Kernel v5.10 with Edge Release

* Move v5.10 python2 check to kernel-bootsplash-and-drivers.sh
2023-02-12 15:22:16 +01:00
Ivan Podogov
da91622cd0
Merge pull request #4811 from ginkage/master
Fix wireless modules indentation warnings
2023-02-07 22:17:14 +00:00
Ivan Podogov
75c7c031f9
Remove missing patch application
This patch was removed in https://github.com/armbian/build/pull/4775 and split into individual patches
2023-02-04 11:56:41 +00:00
Ivan Podogov
2a766ce0ad Fix wireless modules indentation warnings 2023-02-03 21:37:07 +00:00
M. Efe Çetin
5c487194e0
Split wireless VFS patches (#4775) 2023-02-03 10:03:11 +01:00
Paolo
e9fa7caa6c
sunxi64: fix uwe5622 compile on current 5.15 kernel (#4772) 2023-01-31 17:39:26 +01:00
Paolo
79019296d8
rockchip64: consolidation for uwe5622 driver, v6.1 kernel compatibility (#4766) 2023-01-30 17:28:37 +01:00
Vyacheslav
3e6188f5ed
[AR-1527] Remove unnecessary patches for rtl8822cs (#4768) 2023-01-30 17:28:23 +01:00
M. Efe Çetin
411b607e46
Add some Wireless modules to RK3588 legacy kernel (#4759)
* Add some Wireless modules to RK3588 legacy kernel

* Add some Wireless modules to RK3588 legacy kernel

* Add some Wireless modules to RK3588 legacy kernel
2023-01-27 23:19:08 +01:00
Igor Pečovnik
abd16c5b0f
Enable maxium compression on rootfs cache (#4752)
This will be changed in NEXT in any case, but in order to generate (probably last) roofs cache before switch, we need to bump compression to max or files will not go into GH releases.
2023-01-26 10:10:33 +01:00
Konstantin Litvinov
8398dd1116
Added Debian 12 Bookworm. (#4740)
* Added Debian 12 Bookworm.

* Link identical

* Make minimal truly minimal again

Move netplan.io to CLI image only

* Add netplan.io to Bullseye standard CLI

Co-authored-by: Konstantin Litvinov <klitvinov@piesoft.us>
Co-authored-by: Igor <igor@armbian.com>
2023-01-26 10:04:17 +01:00
Markus Hoffrogge
fba71fa703
Extend BUILD_ONLY value to single value "default" (#4519)
* Extend BUILD_ONLY value to single value "any"

- build-tasks.sh:
  - build_task_is_enabled():
    - handle value "any" adequate to logic for empty string
  - build_validate_buildOnly():
    - handle value "any" adequate to logic for empty string
    - add specific error message in case "any" appears in a list of task names
  - add function build_only_value_for_kernel_only_build():
    - provide a constant list of task names for kernel only package build
      supposed to be used unique at several places
  - backward_compatibility_build_only():
    - propagate KERNEL_ONLY="no" to BUILD_ONLY="any"
    - propagate KERNEL_ONLY="yes" to BUILD_ONLY="$(build_only_value_for_kernel_only_build)"
    - update log messages accordingly

- interactive.sh:
  - re-factor interactive_config_ask_kernel_only()
    -> interactive_config_ask_build_only()
  - interactive_config_ask_build_only():
    - provide three pre-defined choices:
      - "u-boot" - "U-boot package only"
      - "$(build_only_value_for_kernel_only_build)" - "U-boot and kernel packages"
      - "any" - "Full OS image for flashing"
  - un-comment call of interactive_config_ask_build_only
    in interactive_config_ask_kernel()

* Extend BUILD_ONLY value to single value "default"

- build-tasks.sh:
  - change BUILD_ONLY setting of "any" to "default"
    to be closer to parallel WIP of #4526

- interactive.sh:
  - interactive_config_ask_build_only():
    - improve menu selection texts for unique quick selection first characters:
      - "u-boot" - "U-boot package only"
      - "$(build_only_value_for_kernel_only_build)" - "Kernel and U-boot packages only"
      - "default" - "Full OS image for flashing"

* Update sequence of BUILD_ONLY selection

- start with default to "Kernel and U-Boot packages only"

Co-authored-by: Igor <igor@armbian.com>
2023-01-22 08:57:50 +01:00
Kirill
e1482b1e9a
Fix uninitialized cfg80211_chan_def for rtlwifi (#4714)
Co-authored-by: Igor Pečovnik <igorpecovnik@users.noreply.github.com>
2023-01-22 08:40:27 +01:00
Igor Pečovnik
6d38906c8d
Move UWE5622 from kernel patches to misc (#4723)
Todo: Compare and unify with the driver that floats in Rockchip patches
2023-01-22 08:40:12 +01:00
Kirill
4c5f202e50
rtlwifi: Fix p2p-go advertising (#4717) 2023-01-20 18:43:53 +01:00
henkiejan1
10e0971c7b
Adding Linux Mint Vera 21.1 as building host (#4699)
* Update prepare-host.sh

* Updated so it´s equal to prepare-host.sh

Made the file as advised equal to prepare-host.sh. There where also some other Ubuntu distributions not added to this file.
2023-01-16 10:33:11 +01:00
The-going
43ac0cc3fd CCACHE_TEMPDIR="/tmp/ccache-tmp" if /tmp is mounted as tmpfs 2023-01-16 10:59:06 +03:00
hzyitc
0b437bfd75
buildscript: Bugfix: handle over-mounted mountpoint (#4660)
Adjust the parameters when calculating the mount point
2023-01-12 13:52:01 +03:00
Ricardo Pardini
0936a4200b
Revert "extrawifi: Clean code (#4636)" (#4667)
This reverts commit 764214156e.

- This needs fixing. many failures
2023-01-08 11:10:21 +01:00
Kirill
ba48245f29
RTL8189FS: Fix P2P-GO advertising (#4661)
* RTL8189FS: fix P2P-GO adverising

* Add patch to drivers_network.sh

Co-authored-by: Igor Pečovnik <igorpecovnik@users.noreply.github.com>
2023-01-07 21:05:30 +01:00
hzyitc
764214156e
extrawifi: Clean code (#4636) 2023-01-07 21:00:29 +01:00
technikian
693ff96248
fixed "unrecognized symbol [[" (#4656)
* fixed "unrecognized symbol [["

the old way caused the compilation to abort with a syntax error.  idk why, but it did, this is how I got it to work.

* fixed syntax error

improvement to previous fix
2023-01-07 20:59:22 +01:00
Kirill
c8c6f91e78
RTL8189FS: Fix and enable secondary iface (wlan1) (#4662)
* RTL8189FS: Fix and enable wlan1

* fix paths in the patch
2023-01-07 20:58:43 +01:00
Igor Pečovnik
b120ddaed0
Enable AUFS on 6.1.y (#4632) 2022-12-31 15:08:38 +01:00
Igor Pečovnik
3ce4b66a3a
Adjust broken bootsplash patchset (#4630) 2022-12-31 15:00:31 +01:00
Igor Pečovnik
ff6c515e3f
Add next Ubuntu 23.04 / Lunar lobster (#4625) 2022-12-30 20:59:35 +01:00
The-going
36d9420d65
Fix issues 4589 (#4614)
* Fix: Install dependencies if we install kernel headers

* DEBUG builddeb for armhf

* Remove DEBUG echo
2022-12-26 21:12:34 +03:00
Igor Pečovnik
84ca39c83c
Moving repository handling from main script (#4600)
* Moving repository handling from main script

- cleaning
- working

TBD: handling of parameters

* Not needed anymore

* Paramter handling, edit config in mktemp

* Typo

* Improve string handling

* Cleanining

* Compacting

* Change to backslash compatible sed replacement

* Publish all, update selected to avoid having erros at update

* Add support for html index generation

* Bugfix

* More arch

* Don't run publish if there is nothing in the incoming

* Add repo sync control file creation

* Fix hardcoded value
2022-12-23 21:58:06 +01:00
Igor Pečovnik
b9b8912de0
Bump rockchip64 EDGE to 6.1 with disabling few drivers (#4570)
* Bump rockchip64 EDGE to 6.1 with disabling few drivers

Broken fsusb30, uwe5662, lps170, simple panel ...

* Fix Rpi4 from not generating DT
2022-12-14 16:44:53 +01:00
Igor Pečovnik
c0001d566b
Bump bcm, imx, mvebu64 and xu4 EDGE to 6.1.y (#4560)
* Bump bcm, imx, mvebu64, xu4 and rockchip to 6.1.y

* Add configs for imx6 and xu4

* Add broadcom kernel config

* Move XU4 edge to mainline kernel as hardkernel branch contain nothing for it

* Move Rockchip64 EDGE to 6.1

* Move rockchip (32 bit) edge to kernel 6.1

* Move rk322x edge kernel to 6.1

Co-authored-by: Paolo Sabatino <paolo.sabatino@gmail.com>
2022-12-14 01:43:31 +01:00
Igor Pečovnik
6e4ad5aa1f
Switch to better working rtl88x2bu wifi driver (#4552) 2022-12-14 01:43:00 +01:00
Igor Pečovnik
a3a5d44c8e
Adjust 3rd party drivers for kernel 6.1.y (#4558)
* Disable kernel bootsplash. We don't use it anymore and its time to go rest

* Switch to more recent commits

* Fix remaining drivers and fix shellcheck errors
2022-12-13 14:43:54 +01:00
The-going
6146943c83
The choice for kernel headers if the version is more than 5.19. (#4518)
* The choice for kernel headers if the version is more than 5.19.

* Depends: Add linux-base for build kernel
2022-12-12 21:21:07 +03:00
Igor Pečovnik
568ff6c011
When adding PPA, we need to run apt update before installing dependencies (#4527) 2022-12-06 09:47:45 +01:00
Igor Pečovnik
424ac69206
Change text on interactive menu (#4522)
* Change text on interactive menu
2022-12-05 20:20:07 +01:00
swordow
d023849528
mod: separate some network driver patchs (#4498) 2022-11-29 19:48:15 +01:00
Ash
408bc67619
Add shebangs for shellcheck (#4493)
* Add shebangs for shellcheck

See #AR-1406

* Add shebangs for shellcheck

Also for `extensions` scripts
2022-11-27 21:44:50 +01:00
Markus Hoffrogge
950c659a4a
Add option BUILD_ONLY to the build compile scripts (#4455)
* Rename default-build.sh -> build-tasks.sh

This commit is just a file rename without any
further code change before this script will be
refactored to improve build task structure
for partial building.

Refers to #4421

* Prepare build-tasks.sh for moving each build step to a dedicated function

This commit is an intermediate update to reflect
NO functional code changes of the particular
build steps before moving the unmodified code
into the appropriate function by copy/paste.
Only build_get_boot_sources() has slightly changed
to an appropriate if / fi structure.
Note: This .sh file is bash syntactically not correct.
The purpose of this commit is to leverage code review.

Refers to #4421

* Update build-tasks.sh function do_default() for filtered function calls

Function do_default():
  - Add $1 function parameter for filtering build tasks
    and assign this to local variable $_buildOnly
  - move "pseudo inline"-functions to the beginning of the script
  - replace the "inline functions" by filtered function calls
  - add BUILD_ONLY variable to the build epilog print

Refers to #4421

* Complete refactoring of build-tasks.sh for BUILD_ONLY support

- update indentation of functions build_get_boot_sources()
  and build_get_kernel_sources() to meet code style
- rename original function do_default() -> build_main()
- create new do_default() for backward compatibility and
  comment this one as deprecated
- call build_main "" from this deprecated do_default()
- cli-entrypoint.sh:
  - update call of do_default by build_main "${BUILD_ONLY}"

closes #4421

* Print final runtime as min:seconds

As with filtered build runtimes
may get below a minute, we would like
to get the runtime printed with seconds.

* Delete duplicate messages

* Fix the confusion of the choice of building the kernel

* Fix a typo in comment on do_default()

* Backward compatibility of KERNEL_ONLY and new BUILD_ONLY keys.

* interactive_config: replace KERNEL_ONLY on BUILD_ONLY

* Fix: Correct verification when an image is created

* Abort with error if BUILD_ONLY contains invalid build task names

- add function build_validate_buildOnly()
- call this function from build_main
- fix position of KERNEL_ONLY / BUILD_ONLY contradiction message
  (did log empty _buildOnly content all time)
- improve local variable names

* Improve final error message to list valid BUILD_ONLY task names

* Improve error message logging

- collect multiple invalid BUILD_ONLY task names in a single error message
- log final message for valid BUILD_ONLY task names on ext level
- simple exit with exit code 1 in case of error

* The RELEASE variable cannot be empty.

Additional conditions for checking RELEASE are unacceptable.

* Fix build_main() to use BUILD_ONLY inside instead of local var set from parameter $1

- build-tasks.sh:
  - build_main():
    - don't take parameter $1
    - replace usage of $_buildOnly by $BUILD_ONLY
    - added info messages on KERNEL_ONLY cases in case BUILD_ONLY was propagated
  - build_validate_buildOnly():
    - remove parameter $2
    - assign _buildOnly from global BUILD_ONLY accordingly
- cli-entrypoint.sh:
  - call build_main without parameter

* Choosing interactive_config if the goal is bootstrap

* fix: order of selection backward_compatibility_build_only

* Update function comments to match current state

- removed obsolete parameter of build_main call do_default()
- replaced :space: by :comma: in _kernel_buildOnly
  to leverage copy / paste for final repeatable command line
  printed after build

* Improve logic coding to filter build tasks

- build-tasks.sh:
  - added functions:
    - build_task_is_enabled()
    - build_task_one_of_is_enabled()
    - build_task_each_of_is_enabled()
  - updated existing build task filter logic
    to use function build_task_is_enabled
- config-prepare.sh, prepare-host.sh:
  - replaced existing build task filter logic
    to use function build_task_is_enabled

* Remove unused functions

- remove function build_task_one_of_is_enabled()
  and build_task_each_of_is_enabled()
  according to code review

Co-authored-by: The-going <48602507+The-going@users.noreply.github.com>
2022-11-27 00:05:46 +01:00
Igor Pečovnik
332a558228
When using PPA sources we need to run install_ppa_prerequisites (#4464) 2022-11-19 08:08:14 +01:00
David Kebler
6225c2004a
fix - improve display alert for installing basic packages on host to indicate the installation occurs on host not in container. (#4410)
Co-authored-by: kebler.net <kebler.net@gmail.com>
2022-11-11 11:48:26 +01:00
Oleg
cb9348c6dc
fix build rtl8723ds for kernel 6.0 (#4407) 2022-11-10 13:24:18 +01:00
Igor Pečovnik
c09e6bcab6
Error triggered when changing BSP package (#4394) 2022-11-08 12:38:11 +01:00
Igor Pečovnik
3e701a857a
Add initial RiscV support (#4387)
* Add initial RISCV support

* Add UEFI edge and current kernel configs

* Cleanup and adjust packages

* Those files were in wrong path

* Fix locations

* Ubuntu images built

* Remove Debian support as its too fragile

* Remove Pinta as it doesn't work under riscv

* Limitation is only for building images

* Remove obsolete switch

* Cleanup major arch config files

* Support for Docker building
2022-11-06 20:33:11 +01:00
hzyitc
b96ed3e313
Bugfix about debsums (#4363) 2022-10-29 17:51:12 +02:00
David Manouchehri
b5ba3c493f
Rename SERIAL_AUTOLOGIN to CONSOLE_AUTOLOGIN. 2022-10-26 11:47:19 -05:00
David Manouchehri
f037b773b9
Enable auto-login by default. 2022-10-26 11:39:06 -05:00
David Manouchehri
09f31750bb
Only enable serial logins if enabled. 2022-10-26 11:25:35 -05:00
Vyacheslav
e13d750814
Re-enable RTL8822CS in meson64-edge and for kernel 6.0+ (#4350) 2022-10-26 13:48:13 +02:00
The-going
bd72c996b7
Bump sunxi to 6.0.y (#4282)
* sunxi-6.0: initial state: add megous patches to series

* sunxi-6.0: Switch to v6.0.1

* wifi: Limit the version 6.0 for Realtek 88x2cs chipsets

* Adjust kernel configs

* Remove not needed patches

* Adjust broken patches

Co-authored-by: Igor <igor@armbian.com>
2022-10-25 20:39:08 +02:00
Oleg
d41125a5fd
move Jetson Nano EFI\Grub (#4284)
* move Jetson Nano EFI\Grub

* fix dtb for efi

* remove list module initrd curren\edge for Jetson Nano

* rename to  grub-sbc-media
2022-10-25 11:28:23 +02:00
Igor Pečovnik
6765f734cc
Bump rockchip64 edge to 6.0.y (#4337)
* Bump rockchip64 edge to 6.0.y

Build test passing

* Update kernel config, enable aufs, disable broken wireless, remove deprecated patch
2022-10-25 11:26:51 +02:00
Igor Pečovnik
df7a603553
Resolv check was done for host while it should be done for chroot (#4325) 2022-10-24 09:09:12 +02:00
Igor Pečovnik
5d7744c880
Add Ubuntu 22.10 Kinetic (#4326)
* Add Ubuntu Kinetic
* Remove missing package
* Keep only working desktops in kinetic
* Optimisation
* Cleanup
2022-10-24 09:07:51 +02:00
Igor Pečovnik
21b8626e4c
Disable hostapd service as it might not always be configured (#4327) 2022-10-24 09:05:23 +02:00
Igor Pečovnik
4ca346d82c
Replace Ubuntu PRO advertisement (#4303) 2022-10-22 17:35:25 +02:00
The-going
d58c839c04
fix: chroot buid: Selecting value "user-built" for proper operation (#4280)
The else condition will never be met.
The chroot_build_packages function collects all packages everything
for all operating systems and the user is drowning in the amount
of code being executed.
2022-10-22 17:32:47 +02:00
hzyitc
ee38fedbc7
Let mkfs.ext4 decide inode number (#4301) 2022-10-18 20:46:30 +02:00
hzyitc
cc87567334
Reenable Github API to fetch rootfs-cache version (#4295) 2022-10-17 18:15:35 +02:00
Oleg
bf985575b7
fix remove boot-scr to SRC_EXTLINUX=yes (#4298) 2022-10-17 18:11:38 +02:00
hzyitc
cec9cf4d55
Remove machine-id (#4288) 2022-10-15 10:45:09 +02:00
hzy
163fd54290 Rename for typo 2022-10-12 11:20:33 +02:00
hzy
a2c86a2706 Split /lib/functions/cli/cli-entrypoint.sh from /compile.sh 2022-10-12 11:20:33 +02:00
hzy
19fa4d2391 Split /lib/functions/cli/utils-cli.sh from /compile.sh 2022-10-12 11:20:33 +02:00
hzy
91412214e4 Split interactive_desktop_main_configuration from /lib/main.sh 2022-10-12 11:20:33 +02:00
hzy
0c72faf421 Split out functions from /lib/main.sh 2022-10-12 11:20:33 +02:00
hzy
58051b04b7 Split interactive_config_ask_* from /lib/main.sh 2022-10-12 11:20:33 +02:00
hzy
e8ab9e73d0 Wrap /lib/fel-load.sh as function 2022-10-12 11:20:33 +02:00
hzy
a4a4cc385f Wrap /lib/configuration.sh as function 2022-10-12 11:20:33 +02:00
hzy
da15acb0c3 Split interactive_desktop_main_configuration from /lib/configuration.sh 2022-10-12 11:20:33 +02:00
hzy
cda53306a6 Split out functions from /lib/configuration.sh 2022-10-12 11:20:33 +02:00
Ricardo Pardini
85c8cbf15d run shellfmt on all of lib 2022-10-08 14:37:22 +02:00
hzy
ca106aac33 Split /lib/compilation-prepare.sh 2022-10-08 14:37:21 +02:00
hzy
56971b1530 Split /lib/chroot-buildpackages.sh 2022-10-08 14:37:21 +02:00
hzy
7761049c65 Split /lib/makeboarddeb.sh 2022-10-08 14:37:21 +02:00
hzy
445f2ddcb3 Split /lib/compilation.sh 2022-10-08 14:37:21 +02:00
hzy
6d0c97d6ec Split /lib/desktop.sh 2022-10-08 14:37:21 +02:00
hzy
1f65d9d890 Split /lib/distributions.sh 2022-10-08 14:37:21 +02:00
hzy
c46d182159 Split lib/image-helpers.sh 2022-10-08 14:37:21 +02:00
hzy
13eecd8240 Split lib/debootstrap.sh 2022-10-08 14:37:21 +02:00
hzy
d4c8dff4f0 Split lib/general.sh 2022-10-08 14:37:21 +02:00