Commit Graph

18 Commits

Author SHA1 Message Date
Naini Singh
9fa997948e ANDROID: build: Remove default value passed to earlycon cmdline option
Early boot kernel logs are enabled with earlycon cmdline option.
If earlycon device is passed to earlycon as a parameter with "=dev",
it is considered, otherwise kernel relies on stdout-path for the device.
Since this device can be different for different chipsets, sharing the
same compiled binary, the value passed to earlycon parameter can
be wrong for some of the chipsets, which is leading to issues like
invalid address access or garbled logs in some cases.

To fix this, add earlycon without any value so that the right
device can be picked from stdout-path. For chipsets not having
stdout-path defined, keep passing earlycon value if it is explicitly
defined in target bazel file.

Also, remove default earlycon param value for Pineapple family of
chipsets to avoid adding wrong address for Cliffs, Volcano SoCs.

Change-Id: If40d23a3916f1f148e26033d67408279dfca5493
Signed-off-by: Naini Singh <quic_nainsing@quicinc.com>
Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
2024-04-30 12:36:52 +05:30
qctecmdr
c937a8901f Merge "build: msm_kernel_le: Add rule to generate super.img" 2023-08-10 13:43:32 -07:00
qctecmdr
3881c58a58 Merge "ANDROID: build: Replace genrules with write_file where possible" 2023-08-10 13:43:30 -07:00
John Moon
1312198e53 ANDROID: build: Replace genrules with write_file where possible
Currently, there are a few places where we use Bazel's native genrule
rule to generate files that consist of simple strings (usually with
cat << EOF or echo "str" >> "$@" semantics). It was recently pointed
out to us that the Skylib library (already available from Kleaf) has
a "write_file" rule which is better than our genrule method for
creating files from strings.

It's better because it has a simpler interface, does not rely on any
Starlark-external tools (i.e. bash), and does not require all of the
strings to be formatted in one operation which makes the rule
slightly more readable.

Replace file-creating genrules where it makes sense to do so. This
change has no impact on actual build logic as the output files are
logically identical.

Change-Id: I2cef369e299d42b2677ddea833c43d9c80eff32c
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-08-01 09:41:05 -07:00
John Moon
463dfbb7e8 ANDROID: build: Remove test_mapping definitions
Kleaf test_mapping rules are no longer used upstream and were being
skipped in our builds anyway.

Remove the test_mapping rules.

Change-Id: If8689f4572b1d1dce2c8ba03075444fa3af7d86b
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-07-27 09:25:18 -07:00
Gokul krishna Krishnakumar
d709149956 build: msm_kernel_le: Add rule to generate super.img
Handle the super.img generation cleanly from the build. super image
generated has no dependency on vendor and system dlkms as the allyes
variant has no ko's generated. We need to generate a proper super image
as we validate the super image before flashing.

Change-Id: I74991610ec64564663983a3ca98e3d16bd4039f5
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-07-20 15:14:44 -07:00
Gokul krishna Krishnakumar
c0dc05ca64 ANDROID: build: msm_kernel_le: Move the avb target from the dist target
avb signing was done in the dist target with commit (9a13ebd43a
"ANDROID: build: msm_kernel_le: Make boot image a chained partition").
Move this from the dist target so that the signing is done correct.

Change-Id: I51a48baaa3ad07773f6a696e75ee4899f9c10277
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-07-17 10:15:40 -07:00
Gokul krishna Krishnakumar
9a13ebd43a ANDROID: build: msm_kernel_le: Make boot image a chained partition
Convert the final boot image generated into a "chained partition" [1],
which is accomplished by calling `avbtool add_hash_footer` on it.
[1]: https://android.googlesource.com/platform/external/avb/+/master/README.md

Change-Id: I91c7f85791edc5c8584ef7237eea012810e5ed75
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-07-07 09:57:08 -07:00
Gokul krishna Krishnakumar
3ee50cce60 bazel: allyes: Generate dummy images
Generate dummy images for allyes variant, dummies generated are-
vendor_boot.img, init_boot.img, super.img.

Change-Id: I2897d6c16c4199d766404613cee669eba6336ee4
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-04-06 15:52:10 -07:00
qctecmdr
0e821530c3 Merge "build: Change target name to pineapple-allyes" 2023-03-28 16:39:00 -07:00
John Moon
2af4ddcc3c Revert "ANDROID: build: Setting strip_modules in kernel build"
This reverts commit 7d9197e99b.

Reverting to avoid removing debug information from modules.

Change-Id: I01be6f1b616ebde8578c40fc63f67a5d3170cf27
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-03-23 18:14:17 -07:00
Gokul krishna Krishnakumar
e765e6515c build: Change target name to pineapple-allyes
Change name of the target to pineapple-allyes from pineapple.allyes.

Change-Id: I84525dda8efe64b9a031dda9e261c0a563cd979e
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-03-22 07:28:24 -07:00
John Moon
a9a0a0120b ANDROID: build: Remove define_compile_commands argument
Currently, a kernel_compile_commands rule can be defined if the user
passes define_compile_commands = True to the definition macros. This
was to avoid enabling the interceptor on the kernel_build when it was
not necessary.

With a recent change upstream, the interceptor is no longer needed to
use compile_commands. Therefore, let's remove the argument and always
define the rule. That way, users can always generate the
compile_commands.json file if they wish.

Change-Id: I723756b31a2ec4582fee804386406194f5ce77d8
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-03-08 15:12:39 -08:00
qctecmdr
914841b37c Merge "bazel: Add new rule to generate dummy files" 2023-02-28 19:15:35 -08:00
John Moon
7d9197e99b ANDROID: build: Setting strip_modules in kernel build
Currently, DO_NOT_STRIP_MODULES is used to signal when and when not
to strip kernel modules. A recent upstream change removes this config
option by unsetting it during the Bazel build in Kleaf.

Instead of using the deprecated build.config method, use the
kernel_build attribute "strip_modules". Set to True in our builds.

Change-Id: I918758ce8758234bcc13a683c2b39fc639678229
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-02-23 20:12:33 -08:00
Gokul krishna Krishnakumar
1d95ffb586 bazel: Add new rule to generate dummy files
Add dummy file generating rule to the list of targets to be run.

Change-Id: I62717451f87ed476306b687e8751e605fcab6bb1
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-02-21 15:01:09 -08:00
Gokul krishna Krishnakumar
cf5b0c1b72 build: Change le out directory to /out/target-variant
Changing dist directory from target.le-variant to target-variant.
This change is to keep out folder structure the same.

Change-Id: I8463065a0f2e683b2df3c311dc0a62ce19105bbf
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-02-21 15:00:03 -08:00
Vamsi Krishna Lanka
fb6545c2b1 build: Add Bazel Support for pineapple allyes config build
Currently, only legacy build.sh support exists for Pineapple allyes config.
Add Bazel support for these builds.

Change-Id: I6ee869762f9061c433383fe720769e0dd874facf
Signed-off-by: Vamsi Krishna Lanka <quic_vamslank@quicinc.com>
2023-02-06 11:18:52 -08:00