Commit Graph

70 Commits

Author SHA1 Message Date
Igor
4e33412ec2 Refactor armbian-config into install as external package (#7716)
* Refactor armbian-config into install as external package

- https://github.armbian.com/configng repository is always present
- package can still be removed from the install list

Since this tool will have deeper integration with Armbian, we should probably drop possibility to remove the tool from the list.

* Enable armbian-config as extension
2025-01-20 14:23:28 +01:00
marcone
5ccc94dd56 fix typo 2025-01-04 15:36:06 +01:00
Ricardo Pardini
6d9a06bf72 shellfmt: lib/functions; no changes 2024-11-25 11:32:28 +01:00
Igor
6148907595 Improvements and bug fixes to Armbian user-space services (#6840)
* Add a list of BASH shell aliases and merge them with ohmyZSH aliases
* Add command armbian-upgrade to the BSP which executes update + upgrade
* Display armbian-upgrade only if there are upgrades
* Generate empty folder where will store data. This doesn't exists at early start
* Move armbian-install to /usr/bin and autoexecute sudo
2024-11-18 19:12:52 +01:00
Werner
0afd94a84b Deprecated WIREGUARD once and for all (#7452)
* remove wireguard

* remove wireguard

* remove wireguard

* Update armsom-sige1.csc

* Update hinlink-hnas.csc

* Update hinlink-h28k.csc

* Update hinlink-h66k.csc

* Update mangopi-m28k.csc

* Update hinlink-h68k.csc
2024-11-09 21:02:50 +01:00
Igor Pecovnik
48228f1e49 Userspace: Switch armbian-config to new generation. It has very small footprint, thus it will be installed by default 2024-11-05 16:35:36 +01:00
David Andreoletti
f145fc2af2 armbian-firstrun: Optionally skip OpenSSH host key regeneration 2024-09-15 11:42:29 +02:00
Igor Pecovnik
7aa89f350f Store VENDORPRETTYNAME to the image instead to the BSP. This is image property. 2024-09-08 16:22:02 +02:00
Igor Pecovnik
05ae71d8f2 Store EXTENSION list to the image instead to the BSP 2024-09-08 16:22:02 +02:00
Igor Pecovnik
f4b160abde Move Network Manager bits into extensions
- use Chrony with Network Manager
- use timesync with systemd-networkd
- use NetPlan with Network manager only
- move command-not-found to CLI image only
- improve firstlogin ip detection
2024-06-20 19:59:52 +02:00
ColorfulRhino
0bf3ba7607 cli: Fix DEFAULT_OVERLAYS array
Shellcheck errors/warnings were:
In lib/functions/rootfs/distro-agnostic.sh line 155:
	display_alert "Adding to extlinux.conf" "fdtoverlays=${DEFAULT_OVERLAYS[@]}" "debug"
                                                         ^--------------------^ SC2145 (error): Argument mixes string and array. Use * or separate argument.

In lib/functions/rootfs/distro-agnostic.sh line 156:
	echo "  fdtoverlays ${DEFAULT_OVERLAYS[@]}" >> "$SDCARD/boot/extlinux/extlinux.conf"
                        ^--------------------^ SC2145 (error): Argument mixes string and array. Use * or separate argument.

In lib/functions/rootfs/distro-agnostic.sh line 193:
	if [[ -n $DEFAULT_OVERLAYS && -f "${SDCARD}"/boot/armbianEnv.txt ]]; then
             ^---------------^ SC2128 (warning): Expanding an array without an index only gives the first element.
2024-06-16 11:23:15 +00:00
Muhammed Efe Cetin
f28bb4e5ae extlinux: add DEFAULT_OVERLAYS support 2024-06-14 20:51:46 +02:00
Alex
bb5fd2ab03 RFC: fix #6686: Debian: enable ssh.service and make it work reliably on armbian-firstrun (#6687)
* Revert commits 911c756083 and 30c47f6f6c

* tweak armbian-firstrun.service to run after ssh.service (for host keys generation purposes)
2024-06-05 15:20:34 +02:00
Alex
fe64f1f435 RFC: disable ssh.service - enable ssh.socket AND switch firstlogin reload ssh to restart (#6586)
* reload-or-restart ssh prevents botching if sshd is started by a systemd socket
* restart ssh prevents botching if sshd is started by a systemd socket
* move sshd activation from ssh.service to ssh.socket:
- more realiable, avoids possible race condition on first boot
- supplementary to PR#6586 - and commits ffee50a8a6 and 6725032191
* Add display_alert explaining the change in SSH activation
2024-05-17 15:30:13 +02:00
Ricardo Pardini
5e943dede7 main-config: fix: avoid errors when BRANCH contains a dash; convert to underscore 2024-04-02 21:10:06 +02:00
Ricardo Pardini
1074c969e8 Revert "rockchip-rk3588: it's vendor boogie panthor time (experimental) (#6459)"
This reverts commit 43cf339c6c.
2024-04-02 21:10:06 +02:00
Ricardo Pardini
43cf339c6c rockchip-rk3588: it's vendor boogie panthor time (experimental) (#6459)
* main-config: fix: avoid errors when BRANCH contains a dash; convert to underscore

* rockchip64_common: shellfmt, no changes

* rockchip64_common: move SERIALCON defaulting logic to a (verbose) hook for flexibility

* config: allow to build BRANCHes not listed in KERNEL_TARGET as long as the config is valid

- useful for `collabora` and other experimental kernels, we don't want to have to add it to each individual board's KERNEL_TARGES one by one
- but we don't want to allow typos in BRANCH to emit very strange unrelated errors

* extensions: mesa-oibaf extension by @monkaBlyat - mainline mesa PPA for Ubuntu

- does nothing on Debian

* extensions: (v3) amazingfated-rk35xx, now `rk-multimedia-amazingfate` - panfork-free

- simply skips if not on Jammy
- deploys Chromium + Widevine if desktop

* rockchip-rk3588: introduce `vendor-boogie-panthor` experimental BRANCH/kernel

- original: https://github.com/hbiyik/linux-rockchip.git (branch `rk-6.1-rkr1-panthor-v6`)
- I picked the commits on top of clean armbian/linux-rockchip `6.1-rkr1` as of 2024-04-01
  - At https://github.com/rpardini/armbian-linux-rockchip-rk3588/tree/armbian-rk-6.1-rkr1-plus-boogie-panthor-v6
  - Diff: https://github.com/armbian/linux-rockchip/compare/rk-6.1-rkr1...rpardini:armbian-linux-rockchip-rk3588:armbian-rk-6.1-rkr1-plus-boogie-panthor-v6

- rockchip-rk3588: introduce `boogie-bsp` BRANCH
- rockchip-rk3588: copy linux-rk35xx-vendor.config into linux-rk35xx-boogie-bsp.config
- rockchip-rk3588: update linux-rk35xx-boogie-bsp.config, no changes
- rockchip-rk3588: linux-rk35xx-boogie-bsp.config: `CONFIG_DRM_PANTHOR=m`
- rockchip-rk3588: linux-rk35xx-boogie-bsp.config: convert to defconfig
- rockchip-rk3588: rename to `BRANCH=vendor-boogie-panthor` for "clarity" (lol)
- rockchip-rk3588: vendor-boogie-panthor: force SERIALCON, full firmware (for blob needed for panthor) & mesa-oibaf extension
- rockchip-rk3588: vendor-boogie-panthor: enable amazingfated-rk35xx extension sans-panfork
2024-04-02 20:30:38 +02:00
Ricardo Pardini
5b978dc96d lib: drop old boot_logo code; keep png/gif as they're used for plymouth
- origins of what's being dropped: https://github.com/armbian/build/pull/2065
2024-03-06 08:28:31 +01:00
amazingfate
86865a446b move firstrun network config to firstlogin 2024-03-03 16:08:04 +01:00
Ricardo Pardini
c434c3613c core: semantic change, KERNELSOURCE must be explicitly 'none' to avoid kernel compilation (not unset) 2024-01-07 18:58:36 +01:00
Igor
c5c81a8b58 Move live patch to bsp extension and limit to startup patching (#6017)
* Move live patch to extension
* Move to the board support package and keep only startup patch
2023-12-14 10:36:44 +01:00
Igor
e95fbdcfad Add simple patch system as a standalone service (#5935)
Sometimes we need to fix minor issues like changing the key or fixing other small problem on live OS. We can ship this as a part of BSP package, but its handling should be made easy.

This downloads script from CDN, verify its signature and executes after apt upgrade starts installing packages.

* Record patch output to syslog
* Enable armbian-live-patch as additional service and run patch mechanism at startup
* Additional security check
2023-11-27 13:01:20 +01: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
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
Gunjan Gupta
909fa47b7e Fix caching of cryptroot packages. Also moved the crypt code to extension 2023-07-22 02:18:49 +05:30
Gunjan Gupta
95687ba057 Remove plymouth package if its not needed 2023-07-10 08:57:48 +02:00
Ricardo Pardini
8b0fb1537b meson-{sm1|g12a|g12b}: default, but don't override, ASOUND_STATE; this way board-specific asound.state's are honored
- add logging during actual deployment so we know what is happening
2023-06-27 11:39:36 +02:00
Ricardo Pardini
040158b004 distro-agnostic: don't assume armbian.list exists when seding for beta 2023-06-02 19:32:57 +02:00
Ricardo Pardini
1fd5d519d4 introduce armbian-base-files artifact, which downloads & repacks base-files from upstream distro
- bsp-cli: now depends on `base-files (>= ${REVISION})`, this way upgrading the bsp-cli causes our base-files to be installed
  - bsp-cli no longer does gymnastics with /etc/os-release et al, all done in armbian-base-files now
- general/apt-utils.sh: introduce `apt_find_upstream_package_version_and_download_url()`
- base-files: add release to version, in order to comply with repo restrictions (valid repos can't have two different debs with same name and version, md5 must match)
2023-05-18 20:49:06 +02:00
Ricardo Pardini
b18cd8aaf4 logging: curb some warnings into info's 2023-05-09 10:04:57 +02:00
Ricardo Pardini
d59271f903 config: refactor calculate_image_version() out of create_image_from_sdcard_rootfs(), make more flexible, predict IMAGE_FILE_ID during config
- default `IMAGE_INSTALLED_KERNEL_VERSION="generic"` instead of `"linux"`
2023-04-15 22:43:06 +02:00
Ricardo Pardini
0d276c93e9 bsp-cli/distro-agnostic: introduce KEEP_ORIGINAL_OS_RELEASE=yes so Debian/Ubuntu PRETTY_NAME is left unchanged in /etc/os-release
- useful when downstream software wants exact Debian OS
2023-04-15 22:43:06 +02:00
Igor Pečovnik
f51a99f1fa distro-agnostic.sh: fix, install armbian-zsh correctly (not armbian-config twice) 2023-03-31 09:12:44 +02:00
Igor Pecovnik
bf801d194b distro-agnostic.sh: bring back BSPFREEZE=yes which now works (somewhat) 2023-03-31 09:12:44 +02:00
Ricardo Pardini
f969a5e30f lib: completely remove CHOSEN_xxx, BSP_xxx_NAME, BSPFREEZE=yes 2023-03-31 09:12:44 +02:00
Ricardo Pardini
f12015954a distro-agnostic: emit 'info' message before setting root password, otherwise logs are confusing 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
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
Ricardo Pardini
91b7b35fa3 rootfs-to-image/distro-agnostic: introduce IMAGE_VERSION, can be used to override VERSION file ($REVISION) just for image filename/issue/os-release 2023-03-17 08:32:11 +01: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
Ricardo Pardini
d453c873fd distro-agnostic.sh: fix: check if chroot (not host!) has timesyncd.conf as condition to enable systemd-timesyncd.service (#4870) 2023-02-26 09:36:32 +01:00
Kreyren
b7d5ea2321 distro-agnostic: dropbear-initramfs: make sure directory exists [cherry-pick] 2023-02-18 07:46:37 -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
a6a5152695 armbian-next: chroot_sdcard_apt_get_update() to replace and better log chroot_sdcard_apt_get update
- also add retries where it was missing
- @TODO: desktop_postinstall() is a mess, needs aggregation work
2023-02-18 07:43:19 -03:00
Ricardo Pardini
6cf26e4c59 armbian-next: don't warn about using extlinux 2023-02-18 07:42:49 -03:00
Ricardo Pardini
4d17aa2a98 armbian-next: rootfs: bunch'o'fixes, introduce disable_systemd_service_sdcard() to stop repeating incantantion
- fix a bunch of quoting issues
- use runners for chroot stuff
- don't error out of failed disable
- makes building `sid` again possible
- add a bunch of TODO's
2023-02-18 07:42:48 -03:00
Ricardo Pardini
c61b985417 armbian-next: better logging in distro-agnostic.sh
- still _a lot_ to fix
2023-02-18 07:41:23 -03:00
Ricardo Pardini
59031be6b3 armbian-next: only put systemd-resolved's symlink in place if _not_ using NetworkManager
- why is it even installed? dunno, but fix anyway.
2023-02-18 07:41:20 -03:00
Ricardo Pardini
bd04f71a05 armbian-next: Revert "Fix issues 4589 (#4614)" (installing HEADERS dependencies manually)
- This reverts commit 36d9420d
- this makes no sense
- we don't do adhoc installs in armbian-next
2023-02-18 07:41:00 -03:00
Ricardo Pardini
66747a12e1 armbian-next: disable cpufrequtils by default; to enable set CPUFREQUTILS_ENABLE=true [HIGHLY CONTENTIOUS CHANGE] 2023-02-18 07:40:46 -03:00