Commit Graph

833 Commits

Author SHA1 Message Date
Gunjan Gupta
ef3f252d49 allwinner: bring back uwe5622 back on legacy kernel 2023-09-04 14:37:10 +02:00
Gunjan Gupta
46e756540e xradio: fix compilation for 6.1+
Also added some cleanup fixes to silence some of the compiler warnings,
fixes for issues during inserting and removing xradio module and fixes
for possible data corruption on vmmaped stack.

All of these fixes were taken from https://github.com/fifteenhex/xradio
2023-09-04 14:37:10 +02:00
c0rnelius
dbe8ea49b0 patch: misc: rtw88: wireless-next: 2023-08-25 (#5653)
* patch: misc: rtw88: wireless-next: 2023-08-25

Updated: 6.1 / 6.4
Added: 6.5

For doc sake, this update makes 6.1 slightly differrent than 6.4 and
6.5 in one particular area of main.c.

As shown here:
7746e2fa87

6.1 requires we use del_timer_sync, where the above releases use
timer_delete_sync.

Tested-on: ODROID-C4 X96-AIR BPI-CM4 (linux 6.x.y)
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>

* driver_rtw88: `linux-version compare "${version}" ge 6.1`

Suggested-by: @viraniac
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>

---------

Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
Co-authored-by: Patrick Yavitz <pyavitz@xxxxx.com>
2023-08-29 13:15:59 -04:00
Ricardo Pardini
ee565514c9 bsp-cli: allow hooks to cleanly add code to the bsp-cli postinst; fix helios4 to match
- bsp-cli: `postinst` is now generated _after_ the hooks are run
  - hooks are allowed to append to `postinst_functions` array
  - hooks are _not_ allowed to modify `DEBIAN/postinst` directly anymore (it won't even be there)
- rewrite the postinst stuff in `helios4`'s `family_tweaks_bsp()` to use new way
- introduce `add_file_from_stdin_to_bsp_destination()`, a helper for easy heredoc-based adding of files to bsp-cli
  - First and only argument is the destination path, relative to the root of the package -- do NOT include $destination -- it is already included.
  - Containing directory, if any, is created automatically (no more "mkdir -p x; cp y x/z")
  - The full path (including $destination) is set in $file_added_to_bsp_destination, declare in outer scope to get it if needed.
2023-08-24 11:45:45 +02:00
Ricardo Pardini
688e415832 pipeline: add userspace inventory capabilities
- digs into config/distributions and config/desktops for info
- this produces `output/info/all_userspace_inventory.json`
  - this is now passed down to the `targets-compositor` in `cli-jsoninfo`
- `targets-compositor` now accepts `userspace:` as `items-from-inventory`
- extra: add `targets-composed` CLI command, to stop after targets-compositor
2023-08-23 21:35:02 +02:00
Ricardo Pardini
a9d5969f21 config_post_main: sanity checks for RELEASE (vs ARCH) and RELEASE+DESKTOP_ENVIRONMENT (vs ARCH)
- the interactive menus didn't allow interactive users to select invalid combinations...
- ... but if specified directly on cmdline, no checks were done at all.
- introduce `exit_with_target_not_supported_error()`, which is just `exit_with_error` (code 43) but with code 44
  - this way the targets pipeline can just warn instead of break;
  - sometimes it's easier multiplying matrixes and skipping the few that can't be built
2023-08-23 21:35:02 +02:00
amazingfate
1eaf25ad3d add mainline kernel mirror support 2023-08-23 21:34:48 +02:00
Igor Pecovnik
27df94e924 Timezone select is too closed on status of the countries 2023-08-23 21:34:15 +02:00
Gunjan Gupta
36f0425358 rtl8811CU, rtl8723cs: Fix module build failure on 6.5 kernel 2023-08-23 20:52:25 +02:00
Ricardo Pardini
11df81403d config/lib/exts: run shellfmt
- `bash lib/tools/shellfmt.sh`
- mostly spacing changes that accumulated over time
2023-08-22 14:28:14 +02:00
Gunjan Gupta
1d6a779ed1 Drop HOST OS that doesnot support crust compilation 2023-08-22 13:03:51 +02:00
Ricardo Pardini
7008b14cd5 RFC: partitioning: stop disabling 64bit and metadata_csum for mkfs.ext4
- this has been a contention point for many years
2023-08-22 08:16:24 +02:00
Ricardo Pardini
5112156a57 rootfs-image: don't fail synaptic/xapian index creation if update-apt-xapian-index is not there (#5620)
- allows us to `remove_package apt-xapian-index synaptic` in userpatches
2023-08-22 08:15:40 +02:00
Ricardo Pardini
64b5220853 debian: add Trixie (Debian 13, testing) csc target & build host (#5621)
- Trixie, like Bookworm and Sid, does not have python2 anymore
2023-08-22 08:14:55 +02:00
WinDos6.22
bd339fca3a Add new Linux Mint release support in host-release.sh (#5540) 2023-08-21 22:48:52 +12:00
Igor Pecovnik
fb4774e2f4 Add two popular MT7921U devices to the driver pid so they work OOB
Signed-off-by: Igor <igor@armbian.com>
2023-08-20 19:19:44 +02:00
Kreyren
09fe68cd59 Address https://github.com/armbian/build/pull/5597#issuecomment-1679089917 2023-08-17 22:09:33 +02:00
Kreyren
d9c10acb07 Better output
Address https://github.com/armbian/build/pull/5597#issuecomment-1679030905

@viraniac plz review
2023-08-17 22:09:33 +02:00
Kreyren
40bfcfe0f1 utils-dpkgdeb: Add alert for compressing
The command takes long time to continue and it makes it seem like the build halted, so this adds an alert to mitigate this
2023-08-17 22:09:33 +02:00
Igor
2a8cb5793f Removing exceptions needed to support riscv64 withing Debian
Signed-off-by: Igor <igor@armbian.com>
2023-08-17 22:09:05 +02:00
Ricardo Pardini
24ee25e0c9 trap-logging: don't export markdown logs and GHA summary unless GHA_EXPORT_MD_SUMMARY=yes (try to make unicorns go away) 2023-08-12 12:04:22 +02:00
Ricardo Pardini
69b212a7d7 artifact-{bsp-cli,kernel,uboot}: fix missing vars_config_hash "variables hash" in artifact_version_reason 2023-08-12 09:58:32 +02:00
Ricardo Pardini
83eff4aa3c kernel: fix: when KERNEL_SKIP_MAKEFILE_VERSION=yes, use 1- prefix for artifact_version (eg odroidxu4) 2023-08-12 09:58:32 +02:00
Ricardo Pardini
9de2ccdbdf start-end: undo unintentional damage done to python/python2 compatibility symlinks inside the BIN_WORK_DIR 2023-08-12 09:58:32 +02:00
Ricardo Pardini
df34679533 store dict of artifacts actually installed in image; use it to freeze (BSPFREEZE=yes) and check hashes without spurious errors
- eg: `linux-headers` might, or might not, be installed; same with bsp-cli transitional
- accidentally fixes [AR-1802]
2023-08-12 09:58:32 +02:00
Ricardo Pardini
622ef30f3c adapt obtain_complete_artifact() and friends to new reversioned scheme; introduce UPLOAD_TO_OCI_ONLY=yes for deploying to remote cache
> tl-dr: only deploys to remote OCI if `UPLOAD_TO_OCI_ONLY=yes`; stop leaving junk behind in local cache in many situations

- simplify CLI artifact building parameters and behaviour
    - `ARTIFACT_USE_CACHE` is now deprecated, and its behaviour is the default
    - for _any_ uploading to OCI to occur, `UPLOAD_TO_OCI_ONLY=yes` **must** be present; in this case, reversioning is not done
    - `FORCE_ARTIFACTS_DOWNLOAD` is completely removed (use `download-artifact` instead)
    - `cli_obtain_complete_artifact()`'s and `build_artifact_for_image()`'s reversioning is now moved to common `obtain_complete_artifact()`
- `standard_artifact_reversion_for_deployment()`:
    - check for hashed deb existence only if reversioned does not exist
    - touch the reversioned file if it already exists; helps to clean up junk later
    - delete hashed version after reversioning, so we don't leave trash behind
        - unless in `download-artifact` mode, which `touch`es the hashed version
        - we can later delete old files from packages-hashed to keep junk under control
- refactor `obtain_complete_artifact()`
    - extract function `artifact_dump_json_info()` since obtain is large enough already
    - when deploying to remote, always ignore all local and remote caches
    - introduce `artifact_is_available_in_revisioned_local_cache()`
        - if not deploying to remote, and revisioned cache exists, use it directly
        - if deploying to remote, reversioned is not checked and not created
    - if deploying to remote, force `DEB_COMPRESS=xz`
    - if deploying to remote, completely remove the local cache base dir after upload is done (no more junk leftover)
2023-08-12 09:58:32 +02:00
Ricardo Pardini
413212ab24 artifacts: obtain: back to using flat output/debs structure, include revisioned and hashed in filename, but no subdirectories
- handle the `global` artifact_deb_repo case specially (they go in the root, not subdir)
2023-08-12 09:58:32 +02:00
Ricardo Pardini
4624b581da pipeline: force compositor to include REVISION= just like it already did for BETA=
- this way the prepare step's REVISION (possibly passed via CLI parameter) is always sovereign
2023-08-12 09:58:32 +02:00
Ricardo Pardini
be11e171a8 main-config: allow using REVISION from env or command-line param; ensure it begins with digit 2023-08-12 09:58:32 +02:00
Ricardo Pardini
2142f73b97 hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure

- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
  - `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
  - `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
  - `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
  - `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
  - `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
  - artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
  - artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
  - automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
  - calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
    - with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
    - in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
    - exports a lot more information to JSON, including the new subdirectory paths
  - comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
  - for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
  - this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
  - this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
  - also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
  - by default, it changes `control` file only:
    - replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
    - add a custom field `Armbian-Original-Hash:` with the original hash-version
  - `artifact_reversion_for_deployment()` is called by
    - new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
    - `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
  - add some custom fields to `DEBIAN/control`:
    - `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
  - declutter the `Description:` field, moving long description out of the first line
  - obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
  - declutter the `Description:` field, moving long description out of the first line
  - use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
  - use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-12 09:58:32 +02:00
Ricardo Pardini
7129f7ac28 uboot: drop CHOSEN_UBOOT, change deployment directory, remove uboot_name as temp_dir prefix
- change deployment dir to not include REVISION or ARCH
- get rid uboot's CHOSEN_UBOOT, REVISION and ARCH in the directory name.
- no two u-boot debs can be installed in the same machine anyway
2023-08-12 09:58:32 +02:00
Ricardo Pardini
1241e2c4cb kernel/tmpfs: remove usage of the kernel-specific tmpfs for temporary kernel .deb's, now build directly to packages-hashed dir 2023-08-12 09:58:32 +02:00
Ricardo Pardini
a592ab763c hashed-OCI-revisioned-debs: build debs in PACKAGES_HASHED_STORAGE, not DEB_STORAGE (temp commit, will be rewritten by a later commit)
- fakeroot_dpkg_deb_build() now only takes a single argument, the unpacked package dir
2023-08-12 09:58:32 +02:00
Ricardo Pardini
ec0a87efb5 hashed-OCI-revisioned-debs: get completely rid of artifact_prefix_version 2023-08-12 09:58:32 +02:00
Ricardo Pardini
6e5b8ffba0 artifacts: don't keep deb-tar's .tar after uploading to OCI
- they won't ever be used after this, and just accumulate trash for no reason
2023-08-12 09:58:32 +02:00
Ricardo Pardini
c347e83fce debs: all produced debs now get a placeholder DEBIAN/changelog and a usr/share/doc .gz changelog with hash 2023-08-12 09:58:32 +02:00
Ricardo Pardini
9d2f8f1b26 kernel-debs: avoid showing tree of kernel modules if they've not been built
- for example `EXT=nomod` causes no modules to be built
2023-08-12 09:58:32 +02:00
Ricardo Pardini
c17a041637 prepare_host: handle PRE_PREPARED_HOST inside prepare_host_init() so WORKDIR etc is always available 2023-08-12 09:58:32 +02:00
Ricardo Pardini
624ac450e3 trap-logging: just discard logs dir when ANSI_COLOR=none 2023-08-12 09:58:32 +02:00
amazingfate
ecac08cc8e kernel image files use standard flavor 2023-08-11 17:06:38 +08:00
Ricardo Pardini
ed02ac2447 initrd: fix undeclared variable update_initramfs_cmd 2023-08-09 11:20:28 +02:00
Paolo
c27739943d rockchip64: bump rockchip64-edge kernel to 6.4 (#5552)
undefined
2023-08-04 10:39:13 +02:00
Gunjan Gupta
154fdb83f9 Fix cryptroot setup with flash-kernel and ssh unlock on newer dropbear versions 2023-08-02 08:30:27 +02:00
Julian Sikorski
3d7e67431f Fix compiling rtl8189es, rtl8189fs and rtl8192eu 2023-07-29 15:47:24 +02:00
Ricardo Pardini
5db0066650 kernel / drivers-harness: use the kernel git SHA1 ($KERNEL_GIT_SHA1) instead of $KERNEL_MAJOR_MINOR for drivers cache key
- this should avoid (late) patching errors that might happen during a point release bump like `6.4.5` -> `6.4.6` cos we'd be using the wrong cached drivers patch
- using the SHA1 will instead (possibly) trigger the "real patching failure", during drivers-harness when building a new driver patch cache
- also try to cleanup old caches in the old format so we've not many leftovers -- each patch is ~150mb
2023-07-27 21:32:42 +02:00
Ricardo Pardini
953b9eb823 display-alert: strip newlines as well as ANSI colors if ANSI_COLOR=none
- `ANSI_COLOR=none` is used when we're driving compile.sh from Python
- some debugging messages had newlines in them, thus making Python mark those as `[LEAKED]`
2023-07-27 21:32:30 +02:00
Ricardo Pardini
ee3059eb2f pipeline: debs-to-repo-download is now done in parallel; default cores*2 limited to 16 or PARALLEL_DOWNLOADS_WORKERS
- also avoid log archiving during individual download jobs via SKIP_LOG_ARCHIVE=yes
- I've tested with PARALLEL_DOWNLOADS_WORKERS=16 and it saturates my gigabit link, ghcr.io is great at reads
- more than ~16-ish might be too much though
2023-07-27 21:32:19 +02:00
Ricardo Pardini
b92575381a pipeline: inventory all board vars; add not-eos-with-video; introduce TARGETS_FILTER_INCLUDE
> How to use:
>
> `./compile.sh inventory` - does just the board inventory; look for output in `output/info`
>
> `./compile.sh targets-dashboard` - does inventory, targets compositing, and images info; look for output in `output/info`, read the instructions output by the command if you want to load the OpenSearch dashboards.
>
> `./compile.sh targets` - does the full targets compositing and artifacts, look for output in `output/info`
>
> If you don't have a `userpatches/targets.yaml`, _one will be provided for you_ defaulting to Jammy minimal CLI
> and Jammy xfce desktop, for all boards in all branches. You can pass filters via `TARGETS_FILTER_INCLUDE=...` to narrow.
>

- board JSON inventory:
  - more generic regex parsing of variables from board files:
    - all top-level (non-indented) variables are parsed and included in the JSON board inventory
    - this allows us to add new variables to the board files without having to update the parser
    - variables can be bare, `export` or `declare -g`, but **_must_ be quoted** (single or double) and UPPER_CASE
  - some special treatment for certain variables:
    - `KERNEL_TARGET` is parsed as a _comma-separated_ list of valid BRANCH'es
    - `BOARD_MAINTAINER` is parsed as _space-separated_ list of valid maintainer GH usernames as `BOARD_MAINTAINERS: [...]` in the JSON
      - script complains if `BOARD_MAINTAINER` is not set in core boards. Empty is still allowed.
    - `HAS_VIDEO_OUTPUT="no"` causes `BOARD_HAS_VIDEO: false` in the JSON (for desktop-only inventorying, see below)
- introduce `not-eos-with-video` in `items-from-inventory` at the targets compositor
  - the same as `not-eos`, but with added `BOARD_HAS_VIDEO: true` filter, see above
- introduce `TARGETS_FILTER_INCLUDE` for targets compositor
  - this filters the targets _after_ compositing (but before getting image info), based on the board inventory data
  - it's a comma-separated list of `key:value` pairs, which are OR-ed together
  - new virtual info `BOARD_SLASH_BRANCH` post-compositing inventory for filtering of a specific BOARD/BRANCH combo (e.g. `odroidhc4/edge`)
  - some interesting possible filters:
    - `TARGETS_FILTER_INCLUDE="BOARD:odroidhc4"`: _only_ build a single board, all branches. JIRA [AR-1806]
    - `TARGETS_FILTER_INCLUDE="BOARD_SLASH_BRANCH:odroidhc4/current"`: _only_ build a single board/branch combo
    - `TARGETS_FILTER_INCLUDE="BOARD:odroidhc4,BOARD:odroidn2"`: _only_ build _two_ boards, all branches.
    - `TARGETS_FILTER_INCLUDE="BOARD_MAINTAINERS:rpardini"`: build all boards and branches where rpardini is a maintainer
    - `TARGETS_FILTER_INCLUDE="BOARDFAMILY:rockchip64"`: build all boards and branches in the rockchip64 family
  - image-info-only variables like `LINUXFAMILY` is **not** available for filtering at this stage
- rename `config/templates` `targets-all-cli.yaml` to `targets-default.yaml`
    - this is used when no `userpatches/targets.yaml` is found
    - new default includes all boards vs branches for non-EOS boards
        - also desktop for all boards that _don't_ have `HAS_VIDEO_OUTPUT='no``
- introduce simplified `targets-dashboard` CLI:
  - does only inventory, compositing, and image info, but not artifact reducing, etc.
  - ignore desktop builds in the OpenSearch indexer
  - update the OpenSearch Dashboards, including new information now available
- invert the logic used for `CLEAN_INFO` and `CLEAN_MATRIX`
    - defaults to `yes` now, so new users/CI don't get hit by stale caches by default
    - repo pipeline CLI stuff is usually run on saved/restored artifacts for `output/info`, so don't clean by default via the CLI
2023-07-26 15:15:02 +02:00
Ricardo Pardini
eab306b279 tmpfs: introduce USE_TMPFS=no to disable tmpfs usage for WORKDIR and package-specific working dirs; actually use $temp_dir_id for mktemp; see #5502
- `USE_TMPFS=no` disables usage of generic tmpfs mechanism (still possibly used for rootfs/image building, which is unrelated), for last-resort cases
- use better/more descriptive `temp_dir_id`'s for kernel build than `k` (now `kernel_dest_install_dir`) and `kd` (now `kernel_debs_temp_dir`)
  - specific image/dtb/headers packaging already had decent names, same for other .deb's
- replace `mktemp -d` with `mktemp -d --tmpdir "${temp_dir_id}-XXXXX"` in `prepare_temp_dir_in_workdir_and_schedule_cleanup()`, so we know what's using what in tmpfs
2023-07-24 23:19:15 +02:00
Patrick Yavitz
88a19f5d82 drivers: net: wireless: realtek: rtw88: upstream-wireless
This commit is cosmetic; git format-patch

Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
2023-07-23 17:00:03 +02:00