28 Commits

Author SHA1 Message Date
Ayush Singh
c0da65087a compilation: armbian-kernel: Do not make built-in drivers modules
Some checks are pending
Forked Helper / 📢 Run repository dispatch on fork (push) Waiting to run
Announce PR merge to Discord / announcepush (push) Waiting to run
Scorecards Security Scan / Scorecards analysis (push) Waiting to run
The current script can overwrite drivers which are set as built-in in
the board-specific config. This is not desirable.

Add a check to ensure we do not convert built-in stuff into modules.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-06-08 18:08:33 +02:00
Igor Pecovnik
9c206d0175 Drop examples as they are not needed for hooks 2025-03-31 20:50:39 +02:00
coderabbitai[bot]
bd5bf38593 📝 Add docstrings to netkit
Docstrings generation was requested by @igorpecovnik.

* https://github.com/armbian/build/pull/8036#issuecomment-2766658224

The following files were modified:

* `lib/functions/compilation/armbian-kernel.sh`
2025-03-31 20:50:39 +02:00
Igor Pecovnik
f029ab11c4 Enable NETKIT feature for all armbian-kernels => 6.7 2025-03-31 20:50:39 +02:00
coderabbitai[bot]
e4c7d24229 📝 Add docstrings to armbiankernel
Docstrings generation was requested by @igorpecovnik.

* https://github.com/armbian/build/pull/8014#issuecomment-2755642576

The following files were modified:

* `lib/functions/compilation/armbian-kernel.sh`
2025-03-27 12:50:03 +01:00
Igor Pecovnik
eb62028fa0 Armbian kernel: add ZRAM and DOCKER configurations
Those two are present in all kernels
2025-03-27 12:50:03 +01:00
Ricardo Pardini
51b300ebdf armbian-kernel.sh: introduce KERNEL_BTF=no to opt-out of BTF/CO-RE type-info on low-RAM machines
Some checks are pending
Forked Helper / 📢 Run repository dispatch on fork (push) Waiting to run
Announce PR merge to Discord / announcepush (push) Waiting to run
Scorecards Security Scan / Scorecards analysis (push) Waiting to run
- turns out `pahole` for `vmlinux` can take multiple gigabytes of RAM to run successfully
- I can't simply decide based on available RAM, as that would make .config hashes mismatch
- thus, introduce:
  - default is to enable BTF; if on low-ram host, error out unless KERNEL_BTF=yes is passed
  - if KERNEL_BTF=no is passed, the BTF debug info is always disabled
  - if KERNEL_BTF=yes is passed, then a warning is produced, but BTF is still enabled
- the magic number "6451 MiB" was determined empirically (and is probably bs)
2025-02-09 15:55:28 +01:00
Ricardo Pardini
2f2c81744a kernel: call oldconfig _after_ kernel config hooks; add hook for CONFIG_CFG80211=m and CONFIG_MAC80211=m on 6.13+
- we need to run the hooks _before_ running oldconfig, otherwise it is too late
- drop `kernel_config_check_and_repair()` since it won't ever detect anything now
2025-01-21 13:25:11 +01:00
amazingfate
611746bfc2 Revert "armbian-kernel: skip enabling BTF for rk35xx vendor kernel"
This reverts commit b17e9e5db182745c6ba24d4dcb79947b6d2d5005.
2025-01-21 13:24:58 +01:00
amazingfate
b17e9e5db1 armbian-kernel: skip enabling BTF for rk35xx vendor kernel
fix minor typo by @EvilOlaf
2025-01-14 19:43:44 +08:00
Ricardo Pardini
12f9318373 armbian-kernel: enforce arm64 kernels use 48-bit PA/VA 2024-12-31 11:50:48 +01:00
Ricardo Pardini
cafdca0cc4 armbian-kernel: enable BTF (and CO-RE) for all kernels 2024-12-31 11:50:48 +01:00
Ricardo Pardini
bcc13132ad armbian-kernel: disable module signatures, harder 2024-12-31 11:50:48 +01:00
ColorfulRhino
82aa7b3963 compilation: armbian-kernel: Change forced uncompressed modules option for kernels >=v6.12
The kernel option `CONFIG_MODULE_COMPRESS_NONE`  was superseded by `CONFIG_MODULE_COMPRESS` in 6.12.
Adapt the kernel compilation script accordingly to force the correct kernel option.

Source: c7ff693fa2
2024-10-20 18:21:58 +02:00
Ricardo Pardini
fb17a2a84f armbian-kernel: drop DEBUG_KERNEL/DEBUG_INFO disables; force EXPERT=y and bring back CONFIG_GPIO_SYSFS=y for all kernels
- 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
2024-05-11 17:35:27 +01:00
ColorfulRhino
3b73b5fd81 kernel-config: Fix forced option IKCONFIG
Also rewrite some kernel configs to reflect this fix
2024-03-29 15:57:40 +00:00
ColorfulRhino
7ded1f7d7d kernel-config: Force-enable CONFIG_IKCONFIG_PROC=y
to make the kernel config available on the running machine via /proc/config.gz
2024-03-29 15:57:40 +00:00
ColorfulRhino
01be9ecbf9 kernel-config: Update forced kernel options with kernel version checks
This makes the process even more automatic, requiring less manual changes in the config in case of having to solve dependency chains.
2024-03-29 15:57:40 +00:00
ColorfulRhino
f8e7d33d69 kernel-config: Fix forced disabling of debug options
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
2024-03-29 15:57:40 +00:00
ColorfulRhino
4d744e8638 kernel-config: Only force disable kernel option if it was enabled
This prevents misconfigurations which would be automatically deleted in the next run of `kernel-config`
2024-03-29 15:57:40 +00:00
Ricardo Pardini
983d8258d9 armbian-kernel: don't force =n for DEBUG_INFO_DWARF5 and DEBUG_INFO_BTF
- 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._
2023-11-29 20:00:13 +01:00
Ricardo Pardini
7e2e557532 armbian-kernel: enforce CONFIG_LOCALVERSION in .config as empty 2023-11-25 13:38:01 +01:00
Ricardo Pardini
8e4ca7d36a armbian-kernel: was too hungry in disabling kernel debug, let DEBUG_MISC & SLUB_DEBUG alone 2023-06-26 21:34:43 +02:00
Ricardo Pardini
97dbec7717 armbian-kernel: further insist on disabling kernel debug, since DEBUG_INFO is auto-enabled by DEBUG_INFO_DWARF5 and others 2023-06-26 13:51:46 +02: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
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
46b14d28c9
armbian-next: armbian-kernel: force CONFIG_LOCALVERSION_AUTO=n and DEBUG_INFO=n 2023-02-18 07:45:57 -03:00
Ricardo Pardini
3236f76a6a
armbian-next: armbian-kernel: default .config options set for all kernels 2023-02-18 07:45:43 -03:00