Commit Graph

170 Commits

Author SHA1 Message Date
Ricardo Pardini 9943e9ee66 artifacts(debs): include `DEBIAN/md5sums` and a correct `Installed-Size:` field in `DEBIAN/control` (for _all_ debs) 2023-05-16 20:09:47 +02:00
Ricardo Pardini 52fffdda75 kernel-debs: include "Priority: optional" in all kernel debs (all other packages have it...)
- also for `fake_ubuntu_advantage_tools`
  - also include "Section: " missing for advantage
2023-05-16 20:09:47 +02:00
Ricardo Pardini 99e065381a squash more warnings:
- `odroidxu4`'s firmware hook for vendor kernel. such is life, no use warning.
- `sun50iw9`: vendor kernel with extension, proven working, stop warning
- old kernels don't have working headers, it's a fact of life, remove warning
2023-05-15 17:43:25 +02:00
Ricardo Pardini e49d91ec40 popular demand: bring back `KERNEL_CONFIGURE=yes` *during image build*
- partially revert 6ef394d95d (thus bring back the TUI/dialog for selecting KERNEL_CONFIGURE=yes/no)
- partially revert d890b418c7 (thus bring back the capacity to config & build image in one go)
- stop after configuring kernel, but only if command is `kernel-config`, not regular image-build KERNEL_CONFIGURE=yes
2023-05-09 10:05:09 +02:00
amazingfate 0b5dc0c921 fix uwe5622 for kernel v6.3 2023-05-06 12:55:10 +02:00
Vyacheslav Bocharov 64f434ab33 Revert "fix rtl88x2cs compilation for kernel 6.3" as fixed in rtl88x2cs repository.
This reverts commit dc9f751012.
2023-05-02 12:04:51 +03:00
Ricardo Pardini d890b418c7 `kernel`/`uboot`/`atf`: introduce `kernel-patch`, `uboot-patch`, `atf-patch`, `uboot-config`, `kernel-config` CLI commands; enhanced manual patching; block deprecated ways
- all interactive commands now **don't build the artifact** anymore; just patches/.configs are produced and then build ends
  - user is required to put the produced patches in the right place and build again, for full consistency
- split ATF and U-BOOT manual patching process; use CLI command `atf-patch` to patch ATF, and `uboot-patch` to patch u-boot
- non-interactive artifact builds are now 100% sans-stdin
- introduce `uboot-config` CLI command; still experimental, only produces a defconfig and not a patch
- reworked `userpatch_create()` to be (hopefully) more useful:
  - detects a previous patch and offers to apply it before continuing
  - enters a loop showing the diff, and only proceeds when user indicates he's happy with the patch
  - produces `mbox`-formatted patches via `format-patch` and standard Armbian parameters
  - uses MAINTAINER and MAINTAINERMAIL instead of git configuration (so it works in containers)
- don't allow image builds with any patching or configuring _at all_ (it has been deprecated with a warning for months already, and results are inconsistent)
2023-05-01 22:46:55 +02:00
Ricardo Pardini f77edd0591 rtl8822bs: fix: remove binaries (firmware?) being added to kernel driver source and breaking patching; related to #5117 2023-05-01 22:46:43 +02:00
Ricardo Pardini e74ab59f48 kernel-make: introduce `KERNEL_EXTRA_CFLAGS`; fill it to add to what's passed to KCFLAGS; related to #5117 2023-05-01 22:46:43 +02:00
Ricardo Pardini 369eb80f9c driver_uwe5622_allwinner: only apply "pre-6.1" park-link patch if kernel >= 5 (eg: not for rockchip64-legacy); possibly fixes #5120 2023-05-01 22:46:43 +02:00
Ricardo Pardini c692676da7 kernel-debs: postinst/etc: fix: unify `is_boot_dev_vfat()` function; make work during image build too via env var
- determinining if `/boot` is vfat is more complex than it looks;
  - use a common function to unify across all scripts
- during image build, the kernel install is always done with a non-fat, non-mounted /boot
  - use a special variable passed through the env so unified function can know ahead of time
  - introduce `extra_apt_envs` param to `chroot_sdcard_apt_get()`; array with extra environment vars
- if vfat /boot:
  - `linux-update-symlinks` is not called (Debian would just choke on this)
  - don't even try to symlink Armbian stuff, move instead
- more/better logging board-side (unfortunately mixed in all the set -x debugs)
2023-05-01 22:46:43 +02:00
Ricardo Pardini 3143db5df4 kernel-debs: call `linux-update-symlinks` in postinst; expected of Debian-compatible kernels
- this handles /vmlinuz etc symlinks (doesn't know about uInitrd, etc)
2023-04-28 21:32:52 +02:00
Ricardo Pardini dc9f751012 fix rtl88x2cs compilation for kernel 6.3 2023-04-28 21:32:29 +02:00
Paolo Sabatino 0d5fe62403 fix rtl8723cs compilation for kernel 6.3 2023-04-27 21:29:42 +02:00
Paolo Sabatino 8c4a35bfb0 fix rtl88x2bu compilation on kernel 6.3 2023-04-27 21:29:22 +02:00
Paolo Sabatino f2d9756bb0 fix rtl8812au compilation for kernel 6.3 2023-04-27 21:29:02 +02:00
Paolo Sabatino be0ecb1f16 fix rtl8723du compilation on kernel 6.3 2023-04-27 21:28:10 +02:00
Paolo Sabatino 3e28c86a05 fix rtl8811cu compilation for kernel 6.3 2023-04-27 21:27:49 +02:00
amazingfate 115cb80a04 add dockerproxy to accelerate ghcr.io 2023-04-18 09:28:25 +02:00
Ricardo Pardini 321a0cd257 revert: run kernel make through `pipetty` for _moar colors_ (breaks `make menuconfig`) 2023-04-18 09:27:38 +02:00
Ricardo Pardini 9218401cd8 kernel: fix for 6.3+ linux-headers pkg due to upstream dir change
- extra: run kernel make through `pipetty` for _moar colors_
2023-04-15 22:44:43 +02:00
Ricardo Pardini 90c5a2743a kernel: introduce new hook `pre_package_kernel_image`; show vmlinuz file magic before/after hook; add `-HK` hook hash to kernel artifact version 2023-04-08 14:33:39 +02:00
Ricardo Pardini 6b1055dc9d uboot: WiP: introduce `UBOOT_CONFIGURE=yes` -- saves defconfig to `output/` folder, nothing else (no patches, etc) 2023-04-03 21:21:03 +02:00
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