Commit Graph

127 Commits

Author SHA1 Message Date
Ricardo Pardini
ed0b406265 lib: fix: replace undue export statements with declare -g 2023-03-31 09:12:44 +02:00
Ricardo Pardini
fe7a24885b docker: introduce DOCKER_SKIP_UPDATE=yes to skip updating prebuilt Docker image, only when using 2023-03-31 09:12:44 +02:00
Ricardo Pardini
40c5df55ab docker: introduce ${DOCKER_ARMBIAN_BASE_COORDINATE_PREFIX:-"ghcr.io/armbian/docker-armbian-build:armbian-"} for easy override 2023-03-31 09:12:44 +02:00
Ricardo Pardini
6b965c605c completely remove any traces of KERNEL_ONLY and exit with error if set 2023-03-17 08:32:11 +01:00
Ricardo Pardini
9931350483 docker: fix: pass down OCI_TARGET_BASE to Docker instance automatically 2023-03-17 08:32:11 +01:00
Michael Beck
1223b22ffd
WSL2: Ensure the Windows Terminal is detected under WSL2 docker build. (#4915)
- by passing the WT_SESSION environment variable into the docker container  if it is set
2023-03-09 19:19:30 +01:00
Igor Pečovnik
b7b8eb7b72
Add / modify (c) in bash scripts (#4922)
* Add / modify (c) in bash scripts

Signed-off-by: Igor <igor@armbian.com>

* Add (c) to the source config files

---------

Signed-off-by: Igor <igor@armbian.com>
2023-03-09 18:30:40 +01:00
Ricardo Pardini
2f7423d0e4
shellfmt/.editorconfig: enable trim whitespaces, run shellfmt, no actual code changes (#4849)
- shellfmt: bump to 3.6.0 (run with `bash lib/tools/shellfmt.sh`)
- .editorconfig: rationalize, remove duplicated logic
2023-02-23 09:24:41 +01:00
Ricardo Pardini
aa70ad570b
armbian-next: use new/definitive pkg/image coordinates for Docker image, on Armbian org 2023-02-18 12:13:42 -03:00
Ricardo Pardini
20de5dd2c6
armbian-next: switch to using Armbian-org GH hosted git shallow trees and Docker images 2023-02-18 07:46:46 -03:00
Ricardo Pardini
a2304f28b0
armbian-next: post_build_image: run hook first, then write to CARD_DEVICE, then compress, in that order
- compress *all* present output images, not only .img
- remove 7zip compression & hostdep
- squash a few shortcircuits (yeah, this late in the game...)
2023-02-18 07:46:12 -03:00
Ricardo Pardini
e697f2e67c
armbian-next: docker: curb logging about OCI_TARGET_BASE 2023-02-18 07:46:10 -03:00
Ricardo Pardini
c73d60368a
armbian-next: remove references to stuff that doesn't exist or isn't hit by default anymore 2023-02-18 07:46:09 -03:00
Ricardo Pardini
9bffa5e749
armbian-next: artifacts: firmware/rootfs and actual usage of artifacts during image build
- artifacts: introduce `ARTIFACT_IGNORE_CACHE=yes`
- artifacts: introduce `DONT_BUILD_ARTIFACTS`, list of artifacts that if not found cached, fail the build
- kernel_package_source() is no more
- a long dissertation about kernels, families, and the universe
- artifacts: actually use rootfs artifact for image build
- artifacts: detangle via artifact_base_dir
- artifacts: rootfs: use folders in artifact_name; include cache_type
- artifacts: some cleanups / validations
- rootfs artifact; drop old rootfs cli
- artifacts: new CLI shortcuts; remove old firmware CLI
- artifacts: full firmware & usage
- use firmware artifacts in image build and install its debs
- kernel artifact sans legacy; use tmpdir for .deb target for all packages
- legacy artifact versions is no more; pack/unpack now in common obtain;
- artifacts: uboot: cleanup legacy renaming, use artifact version directly
- artifacts: add firmware (small) artifact
- deploy uboot to loop from artifact; allow tty to artifact; todos for cleaning
- fixes, kernel dtb/headers conditional; remove `.git` from Makefile url; use mapfile for finding files to hash
  - completely remove KERNEL_HAS_WORKING_HEADERS_FULL_SOURCE and `kernel_package_callback_linux_headers_full_source()`
  - don't use realpath for artifact_file_relative
  - curb some warnings
  - fix: only install headers & dtbs if such exist
- kernel .config hook modification hash versioning
- OCI_TARGET_BASE vs per-artifact defaults; only deploy to remote from CLI with OTB
- artifact revolver & installing into image
  - add artifact_map_packages and artifact_map_debs dicts
  - revolver accumulates all info
  - REPOSITORY_INSTALL is no more (for uboot/kernel, later others)
  - rename `VER` to `IMAGE_INSTALLED_KERNEL_VERSION`
2023-02-18 07:46:03 -03:00
Ricardo Pardini
a75e58c320
armbian-next: docker: show $SECONDS in Docker dash logs 2023-02-18 07:46:01 -03:00
Ricardo Pardini
ca6bf9046b
armbian-next: remove all traces of Vagrant and FEL boot 2023-02-18 07:46:00 -03:00
Ricardo Pardini
843449597a
armbian-next: binfmts: suppress error message when trying to emulate armhf on arm64 2023-02-18 07:45:53 -03:00
Ricardo Pardini
399d9964dd
armbian-next: python/pip: include pip pkgs in Dockerfile; use them if available instead of downloading 2023-02-18 07:45:51 -03:00
Ricardo Pardini
bf53bd2988
armbian-next: tmpfs: use size=99% for all tmpfs's; (rootfs/WORKDIR/chroot); thanks Igor for suggestion 2023-02-18 07:45:42 -03:00
Ricardo Pardini
0e480e685e
armbian-next: docker: pass down git info via env var, since Docker doesn't get ${SRC}/.git, yet we need that info in the Docker logs 2023-02-18 07:45:40 -03:00
Ricardo Pardini
7431984025
armbian-next: docker: pass CARD_DEVICE to Docker via --device 2023-02-18 07:45:35 -03:00
Ricardo Pardini
6258ea566a
armbian-next: shellcheck: squash a bunch of 'critical' warnings 2023-02-18 07:45:29 -03:00
Ricardo Pardini
19aa7e95cf
armbian-next: introduce assert_prepared_host() and assert before using any Python, to un-mask any further fallacies 2023-02-18 07:45:19 -03:00
Ricardo Pardini
956ef9ac7d
armbian-next: fix: for the 1000th time had broken KERNEL_ONLY=yes; curb some warnings 2023-02-18 07:45:18 -03:00
Ricardo Pardini
281e3f0828
armbian-next: cli: try (and fail, probably...) to be helpful with half-working Docker installs 2023-02-18 07:45:16 -03:00
Ricardo Pardini
8329b2e970
armbian-next: docker: split docker_cli_build_dockerfile() into docker_cli_prepare_dockerfile(); introduce FAST_DOCKER
- armbian-next: docker: fix hostrelease crazy
2023-02-18 07:45:11 -03:00
Ricardo Pardini
fa666aa3d4
armbian-next: interactive: review -t 0 instead of -t 1; move non-interactive check_basic_host() from prepare-host to config-prepare, for consistency 2023-02-18 07:45:09 -03:00
Ricardo Pardini
41d7d0155e
armbian-next: docker: fix: not all find's are made equal, back to -mtime +1 (full 24-hour period needed for match) 2023-02-18 07:45:08 -03:00
Ricardo Pardini
b91d752aa6
armbian-next: prepare-host: don't manage ACNG in prepare if not asked to 2023-02-18 07:45:07 -03:00
Ricardo Pardini
941bc81868
armbian-next: docker: pass ARMBIAN_ENABLE_CALL_TRACING=yes via env, and only if DOCKER_ARMBIAN_ENABLE_CALL_TRACING=yes 2023-02-18 07:44:56 -03:00
Ricardo Pardini
962ae65a45
armbian-next: docker: include ${SRC}/.git static via Dockerfile, for kernel-patches-to-git / archeology; use fast archeology
- include FAST_ARCHEOLOGY in call to Python, default yes; sync kernel & u-boot call
2023-02-18 07:44:54 -03:00
Ricardo Pardini
6e267f5cd1
armbian-next: docker: passthrough of the SSH agent, via Docker magic on Darwin; enable for docker-shell and kernel-patches-to-git
- don't check/verify/update SSH-related hostkey etc for git tree push
2023-02-18 07:44:53 -03:00
Ricardo Pardini
bd0a7936da
armbian-next: docker/gha: pass down a bunch of GHA specific vars (list unconfirmed)
- docker: curb logging about stdin
2023-02-18 07:44:46 -03:00
Ricardo Pardini
6177b94268
armbian-next: logging: pure ASCII .log; included in Markdown for GHA 2023-02-18 07:44:45 -03:00
Ricardo Pardini
1cec42392e
armbian-next: GHA & rootfs adventures, pt 1
- rootfs: create readonly global `rootfs_cache_id` (type+hash+date/version)
- add "oras-upload" CLI command (dumb, no retries, single target/single source)
- docker: mount-bind for & re-pass envs `GITHUB_OUTPUT` and `GITHUB_STEP_SUMMARY` down to Docker
- introduce `github-actions.sh::github_actions_add_output()`
- during logs cleanup, dump the Markdown log into GITHUB_STEP_SUMMARY if it is available
2023-02-18 07:44:41 -03:00
Ricardo Pardini
7f74b2e83f
armbian-next: docker: don't spew errors about sharing cache if cache doesn't even exist 2023-02-18 07:44:40 -03:00
Ricardo Pardini
041297c563
armbian-next: binfmt: make sure we have all binfmt's setup & enabled for rootfs build (v2) 2023-02-18 07:44:39 -03:00
Ricardo Pardini
b82badd214
armbian-next: wait_for_disk_sync(): warn only if more than 30s fsync 2023-02-18 07:44:38 -03:00
Ricardo Pardini
78dcf01c92
armbian-next: cleanup, kill and add to-do's, remove dead code, turn down logging, squash future shortcircuit bugs
- killed `[[ $ROOTFS_TYPE != ext4 ]] && display_alert "Assuming ${BOARD} ${BRANCH} kernel supports ${ROOTFS_TYPE}" "" "wrn"`
  - which definitely didn't belong in rootfs
- disable usage of run_host_command_logged_long_running for kernel-make
- stop lying about long_running stuff being any different from non-long_running versions
- stop lying about 'set -e' when there's still a bunch of pipes for "pv" and stuff all around
2023-02-18 07:44:33 -03:00
Ricardo Pardini
3cac8f44a4
armbian-next: we don't really need target RELEASE defined to install host deps (for now), don't freak out about it 2023-02-18 07:44:31 -03:00
Ricardo Pardini
44ae761927
armbian-next: apt: expand local caching to include package lists, as well as .deb's
- `/var/cache/apt` in chroot was already cached;
- add `/var/lib/apt/lists`
- remove usage of namerefs, replace with global dict
2023-02-18 07:44:19 -03:00
Ricardo Pardini
1a7877bb2e
armbian-next: docker: warn & countdown if we can't write to cache/docker; continue by using .tmp/docker if not aborted. 2023-02-18 07:44:10 -03:00
Ricardo Pardini
8d2be2c694
armbian-next: python/pip: solve crazy with /usr/bin/pip3 by not using it (instead, python3 -m pip); don't mask errors
- "| cut" masked errors in multiple places
- include real pip3 version in python deps hash, all will be invalidated
- be less happy about hitting hash/cache, should happen often
2023-02-18 07:44:09 -03:00
Ricardo Pardini
2453722962
armbian-next: docker: pass CI env down to Docker (for GHA etc) 2023-02-18 07:44:08 -03:00
Ricardo Pardini
d4f969c67d
armbian-next: docker: don't bomb if stdin is not a terminal (eg, in CI) 2023-02-18 07:44:07 -03:00
Ricardo Pardini
25d5fe5926
armbian-next: darwin: try to get rid of .DS_Store sneaky bastards before launching Docker 2023-02-18 07:43:56 -03:00
Ricardo Pardini
84e0bc1423
armbian-next: fix, don't try to get pid descendants on non-Linux (fixes Darwin cleanups) 2023-02-18 07:43:55 -03:00
Ricardo Pardini
72c61f2f68
armbian-next: replace bare sync invocations by introducing wait_for_disk_sync(); sync early at start of build
- wait 10s for sync call; otherwise warn user to be patient
- wait_for_sync "reason for sync" everywhere
- add @TODO for /run/user/0 etc and XDG_RUNTIME_DIR in chroot
2023-02-18 07:43:53 -03:00
Ricardo Pardini
2c9582f9ba
armbian-next: add Debian Ports keyring hostdep to strap Debian riscv64 from ports
- rpardini: actually use ports keyring for Debian Risc-V
- `risc-v`: correctly include `debian-ports-archive-keyring` in Risc-V CLI packages
  - include in debootstrap list, via `config/optional/architectures/riscv64/_config/cli/_all_distributions/main/packages`
  - can't have two `--include` in debootstrap call
- riscv64: move `debian-ports-archive-keyring` from main to debootstrap; also only for `sid`
2023-02-18 07:43:49 -03:00
Ricardo Pardini
da1cf2b475
armbian-next: rename too-long main function to prep_conf_main_build_single()
- this commit is proof of OCD (old name didn't fit stacktrace space)
2023-02-18 07:43:42 -03:00