- Rename extensions with "net-*" prefix
- Put the extensions into their own folder
- Split off time sync packages into their own extensions to be able to be used separately
- Put their config files into directories instead of using inline `cat <<- EOF >`
- Move some other NetworkManager related stuff into the extension
- Remove unneeded steps
- Install iproute2 by default on all images (for the `ip` command)
- 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
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.
- `git format-patch --zero-commit` doesn't affect `index xxx...yyy` lines, only `From: `
- so use the _classy_ "use a regex with a callback" solution as git format-patch doesn't offer one
- this will make _all_ patches change when rewritten, but hopefully _for the last time_ !
- we need to preserve `index 000000000000..xxx` as zeros, which indicate new file creation, thus:
- new file creations are rewritten as `index 000000000000..111111111111`
- non-creations are rewritten as `index 111111111111..222222222222`
- this is the final version of #6455
doas is not compatible with sudo flags. The codebase was checked for
sudo-specific uses of this function, but none were found, all cases were
in the form of `sudo <command>`. Replacing it with `doas <command>`
yields the same result.
doas is not compatible with sudo flags. The codebase was checked for
sudo-specific uses of this function, but none were found, all cases were
in the form of `sudo <command>`. Replacing it with `doas <command>`
yields the same result.
- in preparation for tightening the shellcheck severity level
- it needs to be able to follow all sources; dynamic ones are ignored, static ones need root-relative prefix
* 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
- we had `_DEBUG=n` forced, which conflicted with `_EXPERT=y`;
- some important SBC features (like _GPIO_SYSFS) depend on _EXPERT=y
- we've plans to enable BTF/CO-RE kernels soon, so removing the non-debug enforcement makes some sense
- also, .config's will be free to determine debug config, nothing's changing in those here
- remove the `_EMBEDDED` special case handling, we can do that as well now
- add a separate hook to renable `CONFIG_GPIO_SYSFS=y`; it was a victim of `EXPERT=n` in some kernels
- this does not include rewrites of all the .configs -- those should be done in a separate batch -- either way effect is the same, hooks will always override .config's
- during rewrites, a large number of new options will show up, since `_EXPERT=y` is used as dependency for many of Kernel's experimental-ish features
- armhf was disabled for some releases and now we get spurious failures building certain artifacts (firmware)
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
Validates the dts/dtb file for the selected board and outputs the validation logs to the user.
This can be used when adding a new board, developing or improving a dts file. Should lead to higher quality device trees and patches overall, if used.
- 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
* 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
Since `armbian_kernel_config` is "NOT for user consumption. Do NOT use this hook, this is internal to Armbian."
`custom_kernel_config` is able to overwrite previously set values.
Disable CONFIG_EXPERT as well since DEBUG_KERNEL=y is a dependency for EXPERT=y, meaning DEBUG_KERNEL would be re-enabled automatically if EXPERT is enabled
Manually forcing kernel options with 'call_extensions_kernel_config()' can introduce missing dependencies or misconfigurations. This commit introduces a function which checks the config, re-establishes its sanity if necessary and outputs any changes to the user.
This also makes `./compile.sh kernel-config` (exiting without changes) and `./compile.sh rewrite-kernel-config` ouput the same config file. Previously, this was not the case.
* Re-add functionality to create linux-libc-dev when building kernel packages.
* linux-libc-dev: append -${BRANCH}-${LINUXFAMILY} to package name and update control file
- This way we can safely include BOOT_SOC in /etc/armbian-release as done in the previous commit
- this will cause a rebuild of _all_ bsp-cli packages, even those for boards that don't define BOOT_SOC
- hopefully one day we will have BOOT_SOC ("What is the SoC?") defined for all boards
- for now, it will be empty for those that don't define it, which should be harmless
- RTW8723DS, RTW8723DU is unsupported/deprecated/obsolete by the author since kernel 6.7 in favor of RTW88, so deprecate it for kernel >=6.8
- RTL88x2cs specifically says in its repo: "USE RTW88 NOT THIS DRIVER", so deprecate in favor of RTW88, except for meson64 family
- move random RTL88x2cs hook specific for meson64 family in drivers_network.sh to their family config
Also add commit dates to make life prettier and easier
The following drivers have been updated with fixes for 6.8
- driver_rtl8811CU_rtl8821C
- driver_rtl88x2bu
- driver_rtl8811_rtl8812_rtl8814_rtl8821
The following drivers have been updated without specific 6.8 patches:
- driver_rtl8189ES (patches for 6.7, deleted two upstreamed patches)
- driver_rtl8189FS (patches for 6.7, deleted four upstreamed patches)
- it prepares git, applies patches to git, and re-writes them back from git
- same as kernel, it does git archeology for mbox-less patches, etc
- `uboot-patches-to-git` alias is also added, but my guess is rewrite is more useful
- refactor a common config function for both kernel and uboot
- example invocation: `./compile.sh BOARD=xxxx BRANCH=edge rewrite-uboot-patches`
- example: `./compile.sh BOARD=xxxxx BRANCH=edge kernel-dtb`
- outputs preprocessed DTS source for board in question to `output/`
- also outputs same preprocessed DTS source, ran through `dtc` with input and output DTS formats for "normalized" comparisions
- `inventory-boards-csv.py`: moar Python atrocities done to data; idea here is to output one line per board, with <<varies>> for fields that, well, vary (mainly across BRANCH'es)
- `inventory-boards` sets `TARGETS_FILE` to something that doesn't exist, so the `default-targets.yaml` is used (so same list for everyone, save for userpatched-boards)
- `DEBOOTSTRAP_DIR` must be set during the 1st stage, but NOT the second stage
- latest devel versions might be missing scripts for old releases; just symlink to the default one if so
- this hopefully should _end_ the debootstrap madness we've been handling, at least until we get around to mmdebstrap (Perl) one day
This fixes the readability of colorized output of compile.sh when
running on a terminal with a light background. It uses the COLORFGBG
environment variable similarly to how the ip(8) command does.
Signed-off-by: Darsey Litzenberger <dlitz@dlitz.net>
- without incremental: true:
- we replace the DT Makefile based on *.dts at the DT directory after all patching/copying is done
- overlay target is added if overlays present
- with incremental: true:
- we parse the Makefile, parse the DTs being built, and only add .dts's we have added from 'dt' directory
- overlays target are not added; we assume smth else already added them
The command added to check whether the directory is git or not was
having syntax error. Fixed the same. Also it seems adding safe-directory
with local doesn't really work which actually makes sense. hence
reverting to using global instead. Its still safer than before as
we are not adding * and are adding the actual path of the directory
* using the configured volume group name
* added LVM support
* ensuring /boot never on LVM volume, created hook to setup root device
* preparing root device via extension, not assuming any particular partition for root
* using tab spacing
* using global parameter to require a boot partition
* using boot require, moving cryptroot code to extension
* adds crypt image suffix
---------
Co-authored-by: rafael <rvalle@privaz.io>
* meson-s4t7: bump u-boot to khadas-vims-u-boot-2019.01-v1.6-release
* Use khadas default bootargs as much as possible
* Add new hook to allow copying code into kernel
* meson-s4t7: legacy: Switch to 5.15 kernel
* meson-s4t7: add kernel-config for 5.15 kernel
* device tree overlays for 5.15 kernel for vim1s and vim4
* restructure packaging of bsp files for vim1s/vim4
* silence vblank warning on boot
* Remove display workaround as it doesn't work with 5.15 kernel
* Remove 5.4 kernel patches
- common.conf delegating to new `mainline_kernel_decide_version` hooks
- special case handling for v6.7-rc7
- some examples
- late-stage "use rolling branch version"
* Set dpkg vendor to Armbian in all images
We already set to Armbian, but we didn't set default link. This fixes it for both, Debian and Ubuntu.
* Adjust post install scripts to set correct link on upgrade
* Disable flash kernel and rearrage functions inorder they are executed
* Add board config for raspberry pi 5
* Change config.txt and cmdline.txt to match official rpi version
* Install Rpi related packages from Armbian repository
* Remove ddk branch aka RASPI (Ubuntu) kernel
* We still have unsupported releases, but for different reason
* Lower kernel output at booting to meet our other builds. Default is too mouch for end user
* Add more info where we import packages
* Add testing targets
---------
Co-authored-by: Igor <igor@armbian.com>
Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
* Add git.ti.com to memoized_git_ref_to_info() as a generic cgit
Like kernel.org, git.ti.com uses cgit. We might want to change this logic to
accept the git hosting type (cgit, gitlab, github, etc..) and not match only
on known repo urls. For now just add this repo url to the known list.
* K3: Switch current to TI vendor kernel v6.1.y
* K3: Bump edge to kernel v6.6.y
- really can't remember why I added those, and they cause trouble for BTF
- See https://www.kernel.org/doc/html/next/bpf/btf.html
- `CONFIG_DEBUG_INFO_BTF: Generate BTF typeinfo`
- _Generate deduplicated BTF type information from DWARF debug info. Turning this on expects presence of pahole tool, which will convert DWARF type info into equivalent deduplicated BTF type info._
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
- this should make drivers hash consistent, at the expense of being moar tiresome
- _any_ changes at _any_ patches or drivers-related bash code will cause _all_ kernels to be rebuilt
- opposed to "some changes caused all kernels to be rebuilt"
- function defined in FETCH_FROM_REPO_CALLBACK_IF_REF_MUTABLE is called if reference is mutable
- which is anything that's not `commit:` or `tag:`
- and really there's no guarantee that `tag:` is immutable, but lets assume
- also, for extension style hook `post_uboot_custom_postprocess`, don't do it 3 times, just once
- this commit will cause rebuild of all u-boots
- and that's a good thing, many custom changes in family code (eg ddr change in rk322x) were being ignored
- thanks @paolosabatino
Improve naming confusion by changing build framework defaults. Set framework defaults VENDOR to Armbian-unofficial for self build images. Unsupported boards and unsupported distribution have framework defaults, except VENDOR and VENDORURL. We build images with predefined values.
There are many changes in this file and its impossible to cover this with a patch for now current and all kernels back
We are using same hack in UWE drivers.
- otherwise, when the lookup at "jammy-updates" fails (due to server instability), and "jammy" works, we end up with the wrong version
- non-LTS releases don't have the "-updates" repo, so don't even try, which should make everything faster
- TODO: yet-another opportunity to have a release metadata file, otherwise this is yet-another place where we list "jammy"
- host_release (wanted_release_tag) was being re-computed from DOCKER_ARMBIAN_BASE_IMAGE
- DOCKER_ARMBIAN_BASE_IMAGE might have been changed from "<os>:<release>" if DOCKERFILE_USE_ARMBIAN_IMAGE_AS_BASE != no
- that would cause host_release to be "armbian-ubuntu-lunar-latest", not "lunar"
- which would cause python2/python2-dev to be installed, which would cause Dockerfile build to fail
- OCI tags can't have "+" or "~" so replace those with "--" before using in OCI tag
- apt (repo) version will have whatever upstream has, including "+" and/or "~"
- `kernel-patches-to-git` wasn't providing the needed `KERNEL_GIT_SHA1` for kernel drivers
- refactor `obtain_kernel_git_info_and_makefile()` out of `artifact_kernel_prepare_version()` so we can reuse
- introduce `rewrite-kernel-patches`, which is just an alias to `kernel-patches-to-git` with `REWRITE_PATCHES=yes`
```
# For each item in chunk, check if it is going to run in a GH-hosted runner or self-hosted, and set some matrix variables
# accordingly; self_hosted: yes/no, and more specifically, fetch_depth, which is 0 for self-hosted, and 1 for GH-hosted.
# The reasoning for this is that git clones are much faster if not shallow on self-hosted, but much slower on GH-hosted.
```
- `self_hosted` -> `shosted` for brevity in JSON matrix
- `fetch_depth` -> `fdepth` for brevity in JSON matrix
The function dump_extension_method_sources_functions() dumps the content
of a single argument function. It is used in several spots were an array
is passed instead. We could fix all these call sites to iterate the call,
or we could change the called function to do the iteration. Do the latter.
This is just a cosmetic change. Patches have been consolidated
into one patch within each corresponding linux version directory.
Added: linux-6.6 (RC-1)
Removed: linux-6.2/6.3
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
Co-authored-by: Patrick Yavitz <pyavitz@xxxxx.com>
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
* 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>
- 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.
- split errors and warnings into multiple lines, so a bit easier to see in the logs what the real error was
- also turn down a few spurious warnings to debugs
- 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
- 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