Commit Graph

12215 Commits

Author SHA1 Message Date
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
bd5a577e40 pipeline: streamline output-debs-to-repo-json to pass down info and avoid parsing paths completely 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
a876d0f882 pipeline: output-debs-to-repo-json.py: adapt to new reversioned JSON info 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
0251d65b7a repo-reprepro.py: set -e & pipefail 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
Igor
13ed5c0d62 Update repo 2023-08-10 22:43:22 +02:00
Igor
e492d3eeed Improve repository management
Signed-off-by: Igor <igor@armbian.com>
2023-08-10 22:43:22 +02:00
Gunjan Gupta
35feddc350 meson-s4t7: Use partitiontype=generic instead of initrd hack
Also added viraniac as maintainer for vim1s
2023-08-09 11:20:28 +02:00
Ricardo Pardini
eb9dc7ea5c khadas-vim4/khadas-vim1s: some fixes; VIM4/VIM4N now boots; workaround eMMC/oowow partition trouble for now
- vim1s/vim4: remove uEnv.txt and default extlinux args, use simple arguments instead
- meson-s4t7.conf: hack: rereadpt (re-read partition table) in initrd local-top (for eMMC boot of oowow'ed image)
- meson-s4t7.conf: include both `u-boot.bin.sd.bin.signed` and `u-boot.bin.signed` in uboot package
- meson-s4t7: patch kernel for different dt "model" across VIM4 and "New VIM4"
- meson-s4t7.conf: set `EXTLINUX_SPECIFIC_FDT=no`, so u-boot auto-determines which DTB to use
    - don't specify DTB; this way both the "original VIM4" and the "new VIM4" can boot with the same image
2023-08-09 11:20:28 +02:00
Ricardo Pardini
7a61093df4 khadas-vim4/khadas-vim1s: very early wip; meson-s4t7/legacy 5.4 Amlogic kernel
- only "boot from SD" supported right now
- building uboot with xPack riscv-none-embed-gcc **external** toolchain setup in hooks
- kvim4: very high kernel logging + systemd debug logging to console
- kvim4/kvim1s: add uEnv.txt and ROOT_FS_LABEL="ROOTFS" and Khadas-esque extlinux
- meson-s4t7: unify khadas-vim1s and khadas-vim4 u-boot building
- kernel .config:
  - s4t7: original Khadas vendor config
  - s4t7: CONFIG_BINFMT_MISC=y
  - s4t7: make NFS/sunrpc stuff =y
  - s4t7: enable USB wifi drivers from Armbian network_drivers
- firmware: at https://github.com/armbian/firmware/pull/56
- extlinux tricks require https://github.com/armbian/build/pull/5462
- status:
  - kvim1s: boots from SD and works as server/CLI
  - kvim4: kernel panic during systemd-udevd
2023-08-09 11:20:28 +02:00
Ricardo Pardini
c44ed98005 u-boot-menu: allow skipping U_BOOT_FDT even with BOOT_FDT_FILE set, by specifying EXTLINUX_SPECIFIC_FDT=no 2023-08-09 11:20:28 +02:00
Ricardo Pardini
ed02ac2447 initrd: fix undeclared variable update_initramfs_cmd 2023-08-09 11:20:28 +02:00
Igor
b0669d19e0 internal Changing test targets for various boards 2023-08-09 08:40:17 +02:00
Patrick Yavitz
d668e4a43e u-boot: v2023.07.02: meson-sm1-bananapi: m2pro and m5
Move the BPI-M2PRO off the BPI-M5 U-Boot.

The BananaPi M5 supports the RTL8822CS Mezzanine, so let us
provide the proper bluetooth firmware.

NOTE: Boot needs verifying.

Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
2023-08-07 17:13:03 +02:00
Ricardo Pardini
4901193774 thinkpad-x13s: use steev's 6.3.y for working audio; fix Bluetooth; fix core temperature sensors; add modules & fw to initrd; pin & keep x13s PPA (fixes #5550)
- x13s: initialize bluetooth's public-addr, thus allowing BT to work
- linux-arm64-sc8280xp.config: enable per-core temperature sensors
- x13s: disable snapd.seeded service so boot won't hang if clock's < 2017
- x13s: back to steev's 6.3.y, since 6.4.y's audio drivers don't match alsa-ucm-conf
2023-08-07 12:22:41 +02:00
Igor
856ec9dcd0 Change test targets on Rockpi S and BTT Cb1 2023-08-05 19:02:53 +02:00
Paolo Sabatino
1219f8decc rk3399: adjust opi4lts thermal trip points 2023-08-05 11:43:48 +02:00
Igor
955e8705bc
Change test targets on Rockpi4b (#5560) 2023-08-05 11:29:39 +02:00
Andrew F. Davis
a190d11d7b
K3: Make FAT filesystem fill whole partition (#5543)
The default will align the data structures with the cluster size,
which causes the size to not be set to the full partition size. This
causes issues with some board ROMs. Use the -a flag to ignore the
alignment and fill the available space.

Co-authored-by: Igor <igor@armbian.com>
2023-08-04 12:24:04 +02:00
c0rnelius
3261469268
arm64: dts: amlogic: meson-sm1-bananapi-m2-pro: add uart_A (#5558)
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
Co-authored-by: Patrick Yavitz <pyavitz@xxxxx.com>
2023-08-04 12:23:31 +02:00
Igor
24dd3d667a
Update report (#5557)
Co-authored-by: igorpecovnik <igorpecovnik@users.noreply.github.com>
2023-08-04 12:20:40 +02:00
Igor
9ca8f9c403 Revert "config: rockchip64_common: fix wrong M0 toolchain prefix"
This reverts commit 78aa57982e.
2023-08-04 11:46:41 +02:00
Paolo
c27739943d
rockchip64: bump rockchip64-edge kernel to 6.4 (#5552)
undefined
2023-08-04 10:39:13 +02:00
Igor
1febbc6c90 Adjust patch in order to compile succesfully 2023-08-04 10:37:49 +02:00
Igor
933c1c6526 Revert speed
Signed-off-by: Igor <igor@armbian.com>
2023-08-04 10:35:41 +02:00
Igor
98f1d660bc Adjust test targets 2023-08-04 10:35:41 +02:00
Igor
e42b7b9355 Remove rockchip legacy targets 2023-08-04 10:35:41 +02:00
Igor
fcbb99c7ed Introduce new varible used for testings
Signed-off-by: Igor <igor@armbian.com>
2023-08-04 10:35:41 +02:00
Igor
3088229352 rock disable legacy 2023-08-04 10:35:41 +02:00
Igor
6b6645b55a Upoda 2023-08-04 10:35:41 +02:00
Igor
498da81e20 Optimisations 2023-08-04 10:35:41 +02:00
Igor
7952921ab8 Disable legacy for OPIz2 as we can't switch on automated testing 2023-08-04 10:35:41 +02:00
Igor
a8802bb08c Lower CPU speed for boards that are unstable in automated kernel switching
Signed-off-by: Igor <igor@armbian.com>
2023-08-04 10:35:41 +02:00
Joseph Turner
da0d169f9a Update armbianmonitor 2023-08-04 10:33:04 +02:00
Gunjan Gupta
9ae926fe17 Allwinner: bump legacy, current and edge kernels
Legacy - 5.15.123 -> 5.15.124
Current - 6.1.42 -> 6.1.43
Edge - 6.4.7 -> 6.4.8

Toggled CONFIG_RCU_TRACE in linux-sunxi-current.config to fix booting
on 32-bit kernel
2023-08-04 09:53:45 +02:00