- it's more and more common that the (bare) DT files in our `dt` folders have landed upstream
- this adds warnings and marks the patching table red when some bare-dt file overwrites what's already in git
- without this it's very easy to forget them there during bumps
Framework stores our base-files in rootfs cache with version that comes from trunk and when we make stable images for current or previous release, build fails with error E: Packages were downgraded and -y was used without --allow-downgrades.
* tools: shellfmt: Beautify and add board configs to formatting list
* Format the whole code using `lib/tools/shellfmt.sh`
---------
Co-authored-by: Igor <igor@armbian.com>
This temporary workaround was only needed for tinkerboard and xt-q8l-v10 version 2022.04 U-Boot. The version has since bumped to 2024.07 and builds fine without this.
- both artifacts use functions in the bsp/utils-bsp.sh file, which wasn't being hashed
- bsp-cli hashed non-existent 'packages/bsp-cli' directory, remove
- bsp-cli: be verbose when rsync'ing `packages/bsp/common`
- force sync in a few strategic spots
- utils-bsp.sh: be verbose when copying files (incl `config/optional` stuff)
This fixes detection of the config option for SpacemiT K1 which is `CONFIG_SOC_SPACEMIT_K1X`.
Otherwise it would not find it because it includes a '1'.
- this avoids trouble building certain older versions with binman
- as it tries to `os.path.join(os.getenv('HOME'), 'bin')` and gets a `None` and dies
- naming names: `tinkerboard` & `xt-q8l-v10` (BOARDFAMILY=rockchip), which _actually use_ binman & 22.04 combo
- otherwise:
```
fsck.ext4 -a -C0 /dev/mmcblk0p1
/dev/mmcblk0p1 has unsupported feature(s): FEATURE_C12
e2fsck: Get a newer version of e2fsck!
```
- `orphan_file` can only be disabled on recent-enough e2fsprogs, thus check version and compare
Instead of having to add every new release to the list that does not support python2, inverse this if statement and only check if the build host is Debian bullseye or ubuntu jammy. Every release newer than those do not have python2. Older build hosts are unsupported.
Different build hosts have vastly different versions of setuptools and pyelftools depending on the host OS, e.g. Ubuntu 22.04 has setuptools v59 while the latest version at the time of this commit is setuptools v71.
Using Pip instead of APT to download these packages assures that all build hosts use the same version, removing some points of failures and inconsistencies.
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.
Will show warnings/errors if patches patch in some functionalities to a devicetree file without patching in the dt-bindings .yaml at the same time.
- `NETWORKING_STACK` can be set to `none` (in config phase, pre-extensions) to not-add any networking extensions
- keep defaulting to systemd-networkd if BUILD_MINIMAL and NetworkManager otherwise
- fix typo in extension name
- add `NETWORKING_STACK` to change-tracking
- Use resolved no matter what manages the network (networkd or NetworkManager)
- Use resolved.conf.d/ directory to set DNS as recommended by resolved itself
- In armbian-firstrun, remove config specific to mvebu64|mt7623 since this is now done by default
- 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.