Commit Graph

147 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
77921725fb lib: run shellfmt; remove commented-out; no actual changes 2023-03-31 09:12:44 +02:00
Ricardo Pardini
d868d76182 artifacts: bsp-cli, bsp-desktop, desktop: rework, with @igorpec
- bsp-cli: does not require aggregation
- bsp-desktop / desktop: requires aggregation
- 'desktop' packaged moved out of 'bsp' folder, it is NOT a bsp
- make consistent naming/folders
- extract .sh generation workflow into 'declare -f' magic functions
- `SHOW_DEBIAN=yes` to bump most of `DEBIAN/xxx` stuff to screen
- artifact armbian-bsp-desktop: use aggregation, require certain vars, CLI forces `BUILD_DESKTOP=yes`; requires BOARD
- artifact armbian-desktop: use aggregation, require certain vars, CLI forces `BUILD_DESKTOP=yes`, not require `BOARD` anymore
- cli: commands: fix artifact aliases, reorder
- desktop/bsp-desktop: add `config_dump` method; fix `artifact_map_debs` ref subdir and name
- artifact bsps: require aggregation to build, not to list what needs to be built
- distro-agnostic: fix install of `armbian-bsp-cli` (not `armbian-bsp`)
- armbian-bsp-cli: add `_config_dump` method, use configuration with aggregation, add required vars check
- distro-specific: fix installation of `fake-ubuntu-advantage-tools`
2023-03-31 09:12:44 +02:00
Ricardo Pardini
02c561ce0e bat-cat: introduce tooling support for bat (colorized/smart cat), including DEBIAN/xxx syntaxes; cached in Docker image 2023-03-31 09:12:44 +02:00
Igor
00f849ac71 [AR-1620 + AR-1639 squashed]:: @igorpec's armbian-config/zsh/bsp/desktop/ubuntu-advantage artifacts 2023-03-31 09:12:44 +02:00
hzy
76ce4c3a3d Fix uImage build 2023-03-30 03:41:28 +08:00
Ricardo Pardini
c146fdf28b kernel-headers: don't try to build objtool if not amd64 target (for real this time) 2023-03-18 21:45:49 +01:00
Ricardo Pardini
994b80a1a1 kernel: postinst: use --nofsroot option to findmnt when finding /boot's filesystem type
- otherwise we might get `/dev/mmcblk2p1[/boot]` when `/boot` is bind-mounted
- `--nofsroot: don't print [/dir] for bind or btrfs mounts`
2023-03-18 07:09:40 -03:00
Ricardo Pardini
4509e3fcf2 kernel-headers: don't try to build objtool if not amd64 target 2023-03-17 08:32:11 +01:00
Ricardo Pardini
ff657fcf90 artifacts (all): require prefixing of artifact_version with artifact_prefix_version (which is ${REVISION}--) 2023-03-17 08:32:11 +01:00
Igor Pečovnik
669d00a6ab
Repository was removed. Lets pin to new one with new commit id. (#4944)
Signed-off-by: Igor <igor@armbian.com>
2023-03-13 21:38:29 +01:00
Ricardo Pardini
bdec7c7c23 compilation: uboot: manage shopt nullglob same way as IFS, so UBOOT_TARGET_MAP's with * somewhere are not skipped [fixed]
- add some debugs
- don't fail for no good reason (shopt -p has some crazy exit code logic)
2023-03-10 10:49:45 -03: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
Paolo Sabatino
83ebf7dd76 include rtl8723cs driver call in drivers-harness.sh 2023-03-08 11:54:31 +01:00
Paolo Sabatino
6132e2c0fd consolidation of rtl8723cs staging driver for kernel 6.1 onwards
* main source for driver and patches are sunxi64 megous patches
* move into patch/misc/wireless-rtl8723cs directory
* integrate with minor patches from rk322x/rockchip64 families
* update drivers_network.sh to apply patches in same order as before
* remove references from patches.megous and series.conf in sunxi64
* remove patches from rk322x and rockchip64 family patches
* do not touch kernel archives older than 6.1
2023-03-08 11:54:31 +01:00
Jianfeng Liu
6c758e68b4
remove files in /boot at preinst when bootfs is vfat (#4886)
* remove files in /boot at preinst when bootfs is vfat

* use findmnt to get /boot source device
2023-03-01 20:42:09 +08: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
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
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
ca6bf9046b
armbian-next: remove all traces of Vagrant and FEL boot 2023-02-18 07:46:00 -03:00
Ricardo Pardini
46b14d28c9
armbian-next: armbian-kernel: force CONFIG_LOCALVERSION_AUTO=n and DEBUG_INFO=n 2023-02-18 07:45:57 -03:00
Ricardo Pardini
56d32602d3
armbian-next: kernel: pkg: dtb: show 2 levels of dtbs in tree 2023-02-18 07:45:55 -03:00
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