Commit Graph

46 Commits

Author SHA1 Message Date
Michael Bestas 68f2960a70 kernel: Always build dtb targets before dtbo.img
Fixes:
error: unable to open output file
'arch/arm64/boot/dts/google/devices/bluejay/google-base/.gs101-b0.dtb.dts.tmp':
'No such file or directory'

Change-Id: I457062e46062fb3553421d196b432de7d06a49ad
2024-09-07 15:45:38 +02:00
Michael Bestas 350e6effbb kernel: Add support for vendor_boot image header version 4
vendor_boot v4 supports packaging multiple "fragmented" vendor ramdisks.
A secondary can be used to store the kernel modules instead of storing
them in the "normal" vendor_ramdisk.

Test: Create a vendor_boot with source built kernel/modules,
      gs101 still boots.
Change-Id: Ic295ccf201c2593e08b9559ae28f80c70a7eb341
2024-09-07 15:45:38 +02:00
Neel Chauhan f5a42b67f9 kernel.mk: Allow building external kernel modules
Here, we introduce the TARGET_EXTERNAL_KERNEL_MODULES variable
for the list of external modules.

Change-Id: I1f8b7a48e66bb0c9efbc396692e5a7159f0b835c
2024-09-07 15:45:38 +02:00
Michael Bestas 80bd054cf2 kernel: Allow overriding dtb target
On some devices we might want to build just the *.dtb files
that we actually need instead of the every dtb that exists.

Change-Id: Id7a152499d4ee1dd08f79d34cc34bfe959313515
2024-09-07 15:45:38 +02:00
Michael Bestas be10f65fc4 kernel: Allow overriding dtbo target name
gs101 kernel uses google/dtbo.img target for dtbo.img

Change-Id: Ib03f35c0035f56d303771de9399bcce3d02c0775
2024-09-07 15:45:38 +02:00
Alexander Koskovich fdf7a64db0 kernel: Move TARGET_KERNEL_ADDITIONAL_FLAGS to kernel task
* Currently, because DTC_EXT make flag is in the
   kernel task the only way to override it is to
   have TARGET_KERNEL_ADDITIONAL_FLAGS come after.

Change-Id: If62ed979581dc07eafd4628ce2b2d799388d3704
2024-09-07 15:45:38 +02:00
Alexander Koskovich b31c846f51 kernel: Switch to AOSP DTC instead of using scripts/dtc
Change-Id: I8faf295dfb84ab7481b80d5b7d2add8ed8ddf6d9
2024-09-07 15:45:38 +02:00
Michael Bestas ef5ddc9220 Revert "kernel: Remove unneeded MKDTIMG dependency"
This reverts commit caa3bddf00129c06f35923e43d5e770645da6b99.

Reason for revert: Breaks pixel dtbo.img build, since kernel depends on
mkdtimg. Add it back so it gets compiled and kernel can pick it up.

Change-Id: I2b9fd0b2b35e0cf2f908516b10f65399780d5c30
2024-09-07 15:45:38 +02:00
Michael Bestas 246aae819d kernel: Remove unneeded MKDTIMG dependency
Change-Id: Icc1923e922adb50b02252883aa6814101837adfc
2024-09-07 15:45:38 +02:00
dianlujitao db348597ca kernel: Ensure dtb(o) always get rebuilt
* AOSP build system is not aware of dtb(o) source update, and thus
   won't rebuild the images, results in outdated artifact.
 * Convert DTB(O)_OUT to make targets and make the images depend on them
   to address the issue. This makes AOSP build system be aware of
   their timestamp changes and re-execute recipes depending on them.
   Finally, it's up to kernel's build system to decide actions to take.

Test: m dtb(o)image and observe dtb(o).img get rebuilt
Change-Id: I197e7d2d3e013ded0e555fc22bb6a1200d40df9c
2024-09-07 15:45:38 +02:00
dianlujitao b3ec81fe9f kernel: Avoid unnecessary savedefconfig
Change-Id: I5400e549a6574208d67c5d107ca56eee402fa7f2
2024-09-07 15:45:38 +02:00
dianlujitao afbd0df8d3 kernel: Clean up kernel copy recipes
ACP and ALL_PREBUILT are dropped years ago and thus have become no-ops.

Change-Id: Ic317cb4a4fa406cce0dc86555fb8da34d21fb2bf
2024-09-07 15:45:38 +02:00
Alexander Koskovich c0130e0358 lineage: build: Wipe DTB/O OBJs before build
* They can linger and cause problems, e.g. mismatching
   kernel and DTBs.

Change-Id: I4adafe140093ff675fc3f55e3233a754d44d5656
2024-09-07 15:45:38 +02:00
Bruno Martins 4436121e3e kernel: Document TARGET_KERNEL_RECOVERY_CONFIG usage
Change-Id: Idefd38dae5e8beac7d7de797f3f792fea25dacef
2024-09-07 15:45:38 +02:00
Bruno Martins 6e990acb91 kernel: Fix building recovery images
Commit 8ac7d31 introduced this issue.

Test: run `m recoveryimage` and verify that recovery
image is now built.

Change-Id: Iffdd8112db2ba1baff28db7ee4c340dbb5ebd917
2024-09-07 15:45:38 +02:00
Bruno Martins c9cdb563ff kernel: Fix kernel rebuilding
Commit 8ac7d31 introduced this issue.

Test: run `m installclean && m bootimage` and observe that
kernel image is built.

Change-Id: I41eb7cd2e5108bae8f4c40c0f9a300a8a3cc95a7
2024-09-07 15:45:38 +02:00
Sebastiano Barezzi d7dd18649a build: tasks: kernel: Rework kernel fragments handling
* Since some time you can specify multiple configs when you prepare .config and they'll get merged to main one
* To use it inline:
TARGET_KERNEL_CONFIG := main_defconfig fragment1.config fragment2.config ...
* TARGET_KERNEL_ADDITIONAL_CONFIG has been nuked since it's superseed by this new logic
* kernelsavedefconfig will only use the base defconfig

Change-Id: I479c762a9235ed0ef6fcdc79b53e084d5e2d78a6
2024-09-07 15:45:38 +02:00
marcost2 903f535772 Add support for separate kernels for boot and recovery [1/2]
* Either as prebuilts, or with separate defconfigs

Change-Id: Iad877a5fbef095e3e5d792aebb240c230a829552
2024-09-07 15:45:38 +02:00
LuK1337 da4c725f81 kernel: Pass absolute path for KCONFIG_ALLCONFIG
It fails to read relative one, at least on QCOM 4.19 kernel base.

Change-Id: Iacbcadfabfcebb80a7f5934825123fdfa913c63c
2024-09-07 15:45:38 +02:00
Michael Bestas ca1004e860 build: Fix kernelsavedefconfig target
Change-Id: Ie3d9a187693f2435f2555658c833de666848e48e
2024-09-07 15:45:38 +02:00
LuK1337 6d374e48c1 kernel: Add clean headers script to workaround conflicts with bionic
After the "Avoid multiple definitions of sigaction." change in bionic,
we ought to modify our kernel headers to make sure that sigaction struct
is not present in uapi headers.

Change-Id: I15645480e013e79cbcafaac99253368b646b6b11
2024-09-07 15:45:36 +02:00
Arian 6200d85e2d soong: generator: Replace android.SourceDepTag usage with IsSourceDepTagWithOutputTag
Change-Id: Iad5d9a07d06a7efda233cc8d3387e8db5c3b0ab5
(cherry picked from commit 994d8647f5519f6ce107de1e98b0f9130ae47aa2)
2023-12-15 00:15:02 +00:00
Col_or 6bc31ffe48 vendor: soong: Accept back a value for TARGET_RECOVERY_OVERSCAN_PERCENT
* If the cflags doesn't have value, it may lead to an incomplete display.

Test:
    Before fixed: I:Scaling theme width 0.981481x and height 1.169271x, offsets x: 0 y: 107 w: 0 h: -107
    After fixed:  I:Scaling theme width 1.000000x and height 1.194271x, offsets x: 0 y: 107 w: 0 h: -107
Change-Id: I267290748f2896662696c781a83e141b771e3e2e
Signed-off-by: Col_or <color597@outlook.com>
2023-11-26 13:36:31 +08:00
nebrassy ac1dfae958 TWRP: move TWRP makevars to BoardConfigSoong 1/2
Change-Id: I8665c1f3b77efd1c91831e46b7ecdb170fe353ba
2023-11-14 02:08:28 +00:00
Captain Throwback e9182617df envsetup: export TOP
In build systems where OUT_DIR_COMMON_BASE is used,
TOP cannot be identified if the directory is changed.
Exporting TOP when envsetup is run ensures that it
will always be set and croot will work as expected.

Change-Id: I6944ac7d3513ba9504e03baa5f9910bddb126d7c
2023-10-10 13:50:33 -04:00
Tim Schumacher 0e721b6a4e kernel: Fix the check for official builds
The check for official builds now only affects the case where a prebuilt
kernel was actually used, not the case where a device builds a kernel
from source as normal.

The check has also been turned around so that it only fails the build if
it's actually an official build, not an unofficial one.

Change-Id: I1280b16b90589742c2abe7f3f6f5975a3aaeea03
2022-07-30 14:25:10 +00:00
Sebastiano Barezzi 9d4bb8e43c kernel: Add TARGET_FORCE_PREBUILT_KERNEL flag
* TARGET_FORCE_PREBUILT_KERNEL should be useful when you don't have ready kernel sources (OEM releasing broken sources or releasing them lately)
* It lets you use kernel sources for userspace generated headers (generated_kernel_headers) while keeping using prebuilt kernel
* Keep in mind that generated kernel headers may not align with the ABI of kernel you're including
* This commit also partially revert commit a836d79, where TARGET_KERNEL_SOURCE would have been unset if TARGET_PREBUILT_KERNEL was defined (we already check in kernel.mk if kernel sources are present anyway)

Change-Id: I84acae890dabb5b9dbd48143ad58f6420c0cef75
2022-07-30 14:24:30 +00:00
Alessandro Astone c84395eada Revert "Revert "kernel: fix KERNEL_TOOLCHAIN_PATH_gcc and usage""
The fix was correct...

This reverts commit 168fd231b65f3bd575529984f552354f4c5e3e8b.

Change-Id: If550fd44f32b801553b8ac23cb2a91d3f29df557
2022-07-30 14:24:09 +00:00
Alexander Koskovich ea442ffb45 lineage: config: Make LLVM kernel compile the default
* GCC was deprecated awhile ago, the large majority
   of devices should now be using this. Clang should
   be opt out as opposed to opt in.

Change-Id: Ie388aff8eca189663f2f615f7d059e47eaf2dce3
2022-07-30 14:23:42 +00:00
me-cafebabe 4900ceb008 envsetup: Import cout() function from LineageOS
From commit 3952f6cb0d701223f0b60a52c9f10554a898e564 "Import CM build additions"

Change-Id: I0aaa1fde311fe7e477dde7e139ea37548429e5bb
2022-07-29 20:55:32 +08:00
Nolen Johnson 0e23dae5b8 soong: Add TARGET_LEGACY_HW_DISK_ENCRYPTION conditional
[cafebabe: Move to TWRP soong config namespace]

Change-Id: I2c67fe632d415353273839493a86cdd75bd93b23
2022-06-21 23:19:08 +00:00
me-cafebabe bf884c9089 soong: Allow to specify device specific cryptfs_hw module
Change-Id: Ia0a00afd6952caadfcf0f276277569510faba7b6
2022-06-21 23:18:27 +00:00
me-cafebabe b86f764f97 soong: Import HW FDE configurations from LineageOS
Part of this commit https://github.com/LineageOS/android_vendor_lineage/commit/a98d12f8e328334c4db0796f289d8ce95d36eb59

Change-Id: Ie894712a7ccf290120c2e90e0502b5952b093e63
Co-authored-by: Pig <pig.priv@gmail.com>
2022-06-12 20:29:29 +08:00
Captain Throwback 5a109b76f3 twrp-depmod: only run when TW_LOAD_VENDOR_MODULES is set (2/2)
Change-Id: Id9519c8fb38c7033eb1b34b70f97051e04cb5647
2022-05-28 17:47:57 +00:00
Captain Throwback 23d2be09f5 roomservice: update default branch to 12.1
Change-Id: I3431fa191de60889b810061618419a88f4c88ef9
2022-04-10 17:03:56 -04:00
nebrassy a4cdcd264a Update roomservice from PixelExperience
https: //github.com/PixelExperience/vendor_aosp/commits/eleven/build/tools/roomservice.py

adapt to TeamWin repo structure

Change-Id: I400987b5ce6e4042a0c799d95633c2beecde7dcf
2021-11-29 13:07:47 +01:00
XiNGRZ 56e71a1ca7 build: Add support of generating kernel includes for prebuilt kernels
For prebuilt kernels, point TARGET_KERNEL_HEADERS_SOURCE to the dummy
kernel source used to generate headers for HALs.

Change-Id: I95a1050a7e0650faac112724b7bd6a300cdb6e4a
2021-11-29 13:05:55 +01:00
SagarMakhar 98254896c9 Rework rule building in twrp_generator
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Co-authored-by: Arian <arian.kulmer@web.de>
Change-Id: I05c36b8660e51a18ac70a6712b2d03edfc561156
2021-11-14 15:14:00 +01:00
bigbiff 484390ec9c depmod: generate module information for prebuilt ramdisk modules
Change-Id: Id89ae77a3951fb6d05cf54b10a821f4744085aed
2021-09-29 20:46:45 +00:00
Captain Throwback 88ffc5784c Remove prebuilt kernel warning
We actually prefer it.

Change-Id: I9b3cbc04d8083e5c1041d3ca9bead14e42a6b7b9
2021-08-30 23:00:39 -04:00
DarthJabba9 b10c452940 Empty the vts makefile so that there is no need to run 'repo sync' twice
Change-Id: I1070d7cb93e48b458a1d719490d3c527c7c316f1
2021-08-02 18:37:20 +01:00
nebrassy a667d6f30e Kernel: allow outputting kernel modules to recovery
Change-Id: I6d23f2d21a4406f6838de5c951741bf673a5423d
2021-06-16 11:34:35 +02:00
nebrassy 869a43f5d5 add vendor_init
Change-Id: Ic8e2db11fc0dd18259a009c2d34c34a4d5c3f2e4
2021-06-09 17:04:35 +02:00
nebrassy e65576f8b9 fix and update roomservice
Change-Id: I1f3839751c212d5a96d99483e8fff36265c2f2f8
2021-06-05 18:36:59 +00:00
nebrassy 6babc5581e define twrp soong namespace
Change-Id: Ifd28b13f0ec831c3565e558be2223aac33e5b90e
2021-05-08 17:48:24 +02:00
Captain Throwback 6e472d3adc twrp: setup custom vendor for TWRP-only tree
- Based on vendor_omni, renamed & cleaned up

Change-Id: I4661f7cca770a4c55cfd428e60d29f994725033e
2021-05-01 18:06:03 +02:00