Commit Graph

125 Commits

Author SHA1 Message Date
Ricardo Pardini
03dd0d623b
armbian-next: debs: introduce shellcheck for DEBIAN/postinst and others, before dpkg build 2023-02-18 07:45:50 -03:00
Ricardo Pardini
3236f76a6a
armbian-next: armbian-kernel: default .config options set for all kernels 2023-02-18 07:45:43 -03:00
Ricardo Pardini
184380f01b
armbian-next: u-boot: fix: check gcc version before trying to downgrade certain errors to warnings 2023-02-18 07:45:41 -03:00
Ricardo Pardini
6262f0ac8f
armbian-next: u-boot: mark bare repo as safe before using it (@TODO git_ensure_safe_directory() stuff, again) 2023-02-18 07:45:36 -03:00
Ricardo Pardini
388c76c91b
armbian-next: shellcheck: squash more shellcheck warnings; some long-lost variables being used; some unset's that are better reset's, etc 2023-02-18 07:45:33 -03:00
Ricardo Pardini
6258ea566a
armbian-next: shellcheck: squash a bunch of 'critical' warnings 2023-02-18 07:45:29 -03:00
Ricardo Pardini
ed98d21040
armbian-next: u-boot: downgrade more errors to warnings, so we can build some legacy u-boot's 2023-02-18 07:45:24 -03:00
Ricardo Pardini
bef7f8fee4
armbian-next: artifacts: introduce kernel/u-boot artifacts; git ref2info; "memoizer"; some hashing
- artifacts: u-boot/kernel - pt7 - adapt legacy/artifact versions; use common `capture_rename_legacy_debs_into_artifacts()`
- artifacts: u-boot - pt6: add artifact for u-boot
  - use artifact version / reason in actual u-boot .deb if present
- artifacts: kernel - pt5: tune kernel version, refactor
- artifacts: kernel - pt4: squash unrelated bugs that show up; move `prepare_compilation_vars()` to default build
- artifacts: kernel - pt3: drivers+patches+.config hashing
  - split file hashing function from drivers-harness; fix it so filenames are relative and sorted; sort from ${SRC}, always
  - aplit prepare_kernel_config_core_or_userpatches() from `kernel_config_initialize()`
- artifacts: kernel - pt2:  memoizing git ref2info
- artifacts: kernel - pt1:  versioning
2023-02-18 07:45:20 -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
9dc24840c3
armbian-next: firmware-deb: reworked: Provides/Conflicts instead of Replaces; cp -> git archive; new firmware CLI; FULL version .deb out of tmpfs 2023-02-18 07:45:04 -03:00
Ricardo Pardini
1291c6cc3a
armbian-next: fix: kernel-git-oras: make sure cache_git_bare_dir exists before trying to decide which media it's on 2023-02-18 07:45:00 -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
ed3416dc7d
armbian-next: kernel-debs: squash some warnings; add KERNEL_SRC_ARCH to arch configs; don't warn about NAME_KERNEL 2023-02-18 07:44:37 -03:00
Ricardo Pardini
d4f70008b5
armbian-next: kernel-debs: force arch/arm/boot/zImage as vmlinuz for armhf
- we want a "Linux kernel ARM boot executable zImage (little-endian)" vmlinuz for armhf
- such is not deployed by default by kernel's "make install"
2023-02-18 07:44:36 -03:00
Ricardo Pardini
766d17726c
armbian-next: extrawifi: include all patch/misc/wireless*.patch and patch/misc/*wifi*.patch in drivers hash calculation
- calculate hash of hash at once, not for each file
2023-02-18 07:44:35 -03:00
Ricardo Pardini
80410f50c7
armbian-next: extrawifi: include driver_uwe5622_allwinner() in harness 2023-02-18 07:44:34 -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
a9a3c3fe0b
armbian-next: kernel-debs: re-enable postinst debugging; fix bad builddeb port for zImage armhf (image_name == NAME_KERNEL) 2023-02-18 07:44:32 -03:00
Ricardo Pardini
f43732a8e9
armbian-next: use unified methods for tmp dir handling all around (except ATF, which is special) 2023-02-18 07:44:29 -03:00
Ricardo Pardini
8fedd749aa
armbian-next: kernel/logging: stop lying about LD/AR/INSTALL/SIGN/XZ make output 2023-02-18 07:44:14 -03:00
Ricardo Pardini
092f9ad3b2
armbian-next: firmware-deb.sh: prefix temp dir so it's "deb-firmware" 2023-02-18 07:44:04 -03:00
Ricardo Pardini
dcaadac152
armbian-next: git: disallow forcing impossible shallow/full; warn if it's the case
- you gotta wipe the worktree before you change it from full to shallow or vice-versa
2023-02-18 07:43:59 -03:00
Ricardo Pardini
51f9f59084
armbian-next: back to cleaning downloaded bundles/gitballs after they've converted to bare tree & proven working 2023-02-18 07:43:57 -03:00
Ricardo Pardini
88ff66ae11
armbian-next: adaptive shallow/full Kernel git bare git (3gb -> 300mb download)
- allows using pre-shallow-ed bare trees, specific to the KERNEL_MAJOR_MINOR
- uses shallow by default if storage is "slow" (mmc), or free disk space < 32g (@TODO tweak this)
- if full tree already there keeps using it
- allow forcing decision with `KERNEL_GIT=full` or `KERNEL_GIT=shallow`
- countdown to confirm if decision based on storage type/free space and user is interactive
  - this has some of the worst copy ever written
- @TODO refactor the device type / free space code, reuse across codebase (3-4 other spots detect free space)
- @TODO GHA self-hosted (full) vs hosted (shallow) runners decision
- sprinkle with `wait_for_disk_sync()` around clean/download/extract
- sprinkle git with debugs, and an info between fetch and checkout (otherwise it seems "fetch" takes a long time)
2023-02-18 07:43:54 -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
4d43c05f7b
armbian-next: kernel: git: remove dead code, GIT_PRE_FETCH_HOOK / checked_out_revision_mtime 2023-02-18 07:43:52 -03:00
Ricardo Pardini
3eacae68c7
armbian-next: kernel: git: split via-ORAS and via-Bundle tangle 2023-02-18 07:43:51 -03:00
Ricardo Pardini
d8016c49b6
armbian-next: fix ATF build under binutils 2.39+ via TF_LDFLAGS=--no-warn-rwx-segment 2023-02-18 07:43:48 -03:00
Ricardo Pardini
4dd278f07d
armbian-next: compile_firmware(): use new temp dir helpers (saves 2Gb+ in WORKDIR), fix typos 2023-02-18 07:43:32 -03:00
Ricardo Pardini
92d902c883
armbian-next: drop dead/duplicated code for bootsplash and mark kernel-drivers.sh (which includes bootsplash) as dead code 2023-02-18 07:43:23 -03:00
Ricardo Pardini
2455c55dac
armbian-next: firmware: don't build -full firmware if not on CI/noninteractive and board's not going to use it
- move `fakeroot_dpkg_deb_build()` from runners.sh to new utils-dpkgdeb.sh
  - and make it debug show the size of the source
- clean off `.git` directory earlier for full build
- @TODO: get rid of the "hardlinks" funky biz in there and not-copy `.git` to begin with
2023-02-18 07:43:18 -03:00
Ricardo Pardini
f2bd68afde
armbian-next: kernel: cleanup bundle after patching succeeded, not after build success
- for extra gigabytes of space, earlier
2023-02-18 07:43:17 -03:00
Ricardo Pardini
2d9f9216eb
armbian-next: introduce tmpfs-utils.sh; put LOGDIR and WORKDIR under tmpfs; set CCACHE_TEMPDIR under WORKDIR
- introduce generic `prepare_tmpfs_for()`, which manages it's own cleanup/dir removal
- use it for `WORKDIR` (which is `TMPDIR`) and `LOGDIR`
  - adapt previous cleanup handlers for those, so they delete their contents but not the dir itself (which might be mounted)
- also: make `ARMBIAN_LOG_CLI_ID` readonly together with other superglobals
- set `XDG_RUNTIME_DIR` & `XDG_RUNTIME_DIR` together with `TMPDIR`
- kernel-make.sh: pass `CCACHE_TEMPDIR` down to Kernel make (thanks @the-Going)
2023-02-18 07:43:09 -03:00
Ricardo Pardini
7f21e7d5f3
armbian-next: ccache: show more in ccache debugging 2023-02-18 07:43:07 -03:00
Ricardo Pardini
78fd35a1e3
armbian-next: better logging for kernel_prepare_bare_repo_from_oras_gitball(); remove dead code
- remove dead code used to fetch tags, back from pre-bundle days
2023-02-18 07:42:51 -03:00
Ricardo Pardini
7beeae6219
armbian-next: Python tooling: use consolidated+hashed+cached pip base/pycache; don't pip during Dockerfile build, nor cli-requirements
- consolidate at `prepare_python_and_pip()`
- sanity check for Python version 3.9+ regardless of HOSTRELEASE
- TODO: pip vs sudo/root: need pip 22.2+ to curb warning, not doing it
2023-02-18 07:42:44 -03:00
Ricardo Pardini
53266feff8
armbian-next: kernel: deterministic .config mtime handling; kernel build logging sections reorg
- .config is now compared with previous one byte-wise, diff shown, and mtime preserved directly via `cp -p`
- this does away with the previous mtime-based BS I had written during the fasthash era (and thus remove file-mtime.sh, regen lib)
- split some functions, to better control the interactive piece in the _middle_ of kernel config process
- no more `kernel_config_maybe_interactive()`, now `kernel_config()` that controls its own logging sections
- extract `kernel_determine_toolchain()` out of config into make
- introduce internal hook `armbian_kernel_config()` that runs before custom version (for .config defaults, coming soon)
2023-02-18 07:42:39 -03:00
Ricardo Pardini
c99e06a84b
armbian-oleg: logging: disable debugging (set -x) of generated postinst/etc kernel scripts (board-side, but also chroot logging) 2023-02-18 07:42:38 -03:00
Ricardo Pardini
6b09e97b4f
armbian-oleg: logging: drastically curb / make more useful kernel packaging logging 2023-02-18 07:42:37 -03:00
Ricardo Pardini
00e1dec8a2
armbian-next: odroidxu4 vs kernel: move firmware hack to family using extension hook
- @TODO: is this even needed/used anymore?
2023-02-18 07:42:36 -03:00
Ricardo Pardini
62bc394738
armbian-oleg: curb logging from building armbian-plymouth-theme; do it in a logging section, like the others 2023-02-18 07:42:33 -03:00
Ricardo Pardini
e8306a8712
armbian-oleg: curb logging from building armbian-firmware 2023-02-18 07:42:32 -03:00
Ricardo Pardini
d979c73c1d
armbian-next: split compilation/debs.sh; compile_xilinx_bootgen() moved to family 2023-02-18 07:42:31 -03:00
Ricardo Pardini
2c0c968645
armbian-oleg: curb Python launcher logs 2023-02-18 07:42:24 -03:00
Ricardo Pardini
47af820f5d
armbian-oleg: junk: drastically reduce host-side dependencies / "remove junk"
- remove a lot of hopefully / hardly confirmed, unused dependencies
- don't use crossbuild-essential-xxx; avoid the c++ compiler that comes with it, install gcc-only instead
- hostdeps: use `libc6-dev make dpkg-dev gcc` (without `g++`) instead of `build-essential`
- drop `btrfs-progs` and `f2fs-tools`  (@TODO add in extension when/whereused)
- more: drop `cryptsetup` (@TODO add in extension when/whereused)
- don't be too quiet when doing apt-update for hostdeps
2023-02-18 07:42:14 -03:00
Ricardo Pardini
e6b1c4d875
armbian-next: CLEAN_LEVEL=make-kernel now does git clean -xfd instead, faster and 100% clean 2023-02-18 07:42:07 -03:00
Ricardo Pardini
4f743caab8
armbian-next: drivers-harness: force -c commit.gpgsign=false during git commit 2023-02-18 07:42:06 -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
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
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