Commit Graph

11335 Commits

Author SHA1 Message Date
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
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
8825a99845 armbian-next: extensions: nomod: for when you really don't care about modules 2023-02-18 07:44:30 -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
d17157885c armbian-next: rootfs: converge rootfs-cache and rootfs together; exchange BOARD for ARCH 2023-02-18 07:44:28 -03:00
Ricardo Pardini
695bfb387b armbian-next: rootfs: reset UID of produced rootfs tarball; announce what is doing and what has done 2023-02-18 07:44:27 -03:00
Ricardo Pardini
6077d40f9b armbian-next: rootfs: build rootfs from CLI, sans-BOARD, sans-FAMILY, etc -- rootfs are meant to be shared
- require ARCH/RELEASE for rootfs cli
- disallow BOARD/LINUXFAMILY/BOARDFAMILY being set for rootfs cli
- split `prep_conf_main_only_rootfs()` instead of `prep_conf_main_build_single()` for rootfs-only stuff
- run both conf and build without stdin for rootfs CLI (no interactive allowed)
- don't blindly set `ARCH=armhf` for no reason in main-config
- allow skipping family stuff in main-config, via `allow_no_family=yes` (used only in `prep_conf_main_only_rootfs()`)
- kill double loading of userpatches family, not needed/old code
- allow skipping kernel stuff via `skip_kernel=yes` in `config_pre_main()`  (used only in `prep_conf_main_only_rootfs()`)
2023-02-18 07:44:26 -03:00
Ricardo Pardini
872463f2f0 armbian-next: aggregation: dont' require or consider BOARD or LINUXFAMILY for aggregation anymore
- it was only used for "bsp-aggregation" of `rk3318-box` which I will come up with something extensions/hooks based later
2023-02-18 07:44:25 -03:00
Ricardo Pardini
091ae1d27f armbian-next: rootfs: adapt to new reality after huge refactor
- make `tmpfs_estimated_size` and `available_physical_memory_mib` readonly and global and only ever set once
- remove subshell from `get_rootfs_cache_list()`, new version `get_rootfs_cache_list_into_array_variable()` for sanity
- warns if `ROOT_FS_CREATE_ONLY=yes` is set during cached build path
- add a `wait_for_disk_sync()` after restoring rootfs cache
- fix logging sections for `build_rootfs_only()` and `prepare_rootfs_build_params_and_trap()` in `build_rootfs_and_image()`
- remove the logging section from `get_or_create_rootfs_cache_chroot_sdcard()` call in `build_rootfs_only()` (which is now itself logged)
- @TODO: `deploy_qemu_binary_to_chroot()` is leaking a qemu bin in rootfs cache!
2023-02-18 07:44:24 -03:00
Ricardo Pardini
28d89e2c91 armbian-next: rootfs: new CLI command for rootfs cache building; further refactorings
- _told ya it would all make sense eventually..._
- introduce new, real, non-alias `rootfs` command in `cli-rootfs` -- this _only_ builds rootfs, nothing else
- no more `main_default_build_single()`; instead `full_build_packages_rootfs_and_image()`
- introduce `do_with_default_build()` wrapper, for things that need host prepared + aggregation to run
- CLI-specific parts of `main_default_build_single()` moved to cli-build
- put prepare/cleanup pair of `prepare_rootfs_build_params_and_trap()` and `trap_handler_cleanup_rootfs_and_image()` into new `trap-rootfs.sh` (this needs further splitting for the image part)
- refactor `get_or_create_rootfs_cache_chroot_sdcard()` into `build_rootfs_only()`, `calculate_rootfs_cache_id()`
- update library with new files
2023-02-18 07:44:22 -03:00
Ricardo Pardini
6176dc3702 armbian-next: rootfs: split create-cache into rootfs-create
- bear with me, this will make sense in the end
- a `mount_chroot()` was ejected out of rootfs building code into main, for reuse's sake
2023-02-18 07:44:21 -03:00
Ricardo Pardini
2d30a44831 armbian-next: main: split default-build into build-packages, start-end
- bear with me, this will make sense in the end
2023-02-18 07:44:20 -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
805085ff45 armbian-next: logging: validate where not already in a logging section when trying to start a new one
- with a small exception for 'entrypoint' ;-)
2023-02-18 07:44:18 -03:00
Ricardo Pardini
8a63a0ae20 armbian-next: downloads.sh: some cleanup and add debugging to get_urls() 2023-02-18 07:44:17 -03:00
Ricardo Pardini
3f0c480e9d armbian-next: mark remove_all_trap_handlers() deprecated, it never did anything 2023-02-18 07:44:16 -03:00
Ricardo Pardini
f71e6f4865 armbian-next: patching: accept b4's magic marker git@z Thu Jan 1 00:00:00 1970 for mbox validations 2023-02-18 07:44:15 -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
780fe26ea4 armbian-next: logging: (very, very early beta) for uploading/sharing of ANSI log file online 2023-02-18 07:44:13 -03:00
Ricardo Pardini
7f16064c23 armbian-next: interactive: info msg before (slow) gathering of all boards 2023-02-18 07:44:12 -03:00
Ricardo Pardini
18c9946a4d armbian-next: countdown: if to test -t 0 (0: stdin, 1:stdout) for interactive-ness; also test in if-not-aborted version 2023-02-18 07:44:11 -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
d95478281b armbian-next: fix ANSI logs, use reset at strategic places 2023-02-18 07:44:06 -03:00
Ricardo Pardini
eb30aac310 armbian-next: extensions: move 'extensions.sh' into library; replace manual source with init function
- wraps globals in `extension_manager_declare_globals()` -- and make them actually global
- whoever wrote this original code is insane, add copyright
2023-02-18 07:44:05 -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
486ba2953c armbian-next: bsp: use prepare_temp_dir_in_workdir_and_schedule_cleanup(); bring back PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS 2023-02-18 07:44:03 -03:00
Igor
90c46e0215 armbian-next: cli: add CLI alias command rootfs-cache for creating rootfs cache 2023-02-18 07:44:02 -03:00
Ricardo Pardini
22074a0cde armbian-next: logging: new log file / summary nomenclature 2023-02-18 07:44:01 -03:00
Ricardo Pardini
a6182bbd89 armbian-next: docker: archive logfiles again; warn & greet testers when archiving many old logfiles 2023-02-18 07:44:00 -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
da77aad1dd armbian-next: git: detect, and stop, when git bare trees vs worktrees have been shuffled around and can't be recovered
- hopefully this will never happen ;-)
2023-02-18 07:43:58 -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
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
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
8af14d4f8c armbian-next: countdown: split off file for countdown functions (countdown-to-abort and countdown-to-continue)
- introduce `countdown.sh`, move `traps.sh::exit_if_countdown_not_aborted()` there, introduce `exit_if_countdown_not_aborted()`
2023-02-18 07:43:50 -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
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
3e012306c4 armbian-next: patching: less horrible patching log, pt 38: downgrade utf-8 mbox to log warning, mark as problem 2023-02-18 07:43:47 -03:00
Ricardo Pardini
549ae08061 armbian-next: git: show "fetch completed" info, lest user thinks fetch is hanging while checking out 2023-02-18 07:43:46 -03:00