@@ -7,7 +7,7 @@ Android is built around a Linux kernel. By default, Android's
77
88.. code-block :: text
99
10- ${YOUR_PATH}/ti-aosp-15 /device/ti/am62x-kernel/kernel/6.6
10+ ${YOUR_PATH}/ti-aosp-16 /device/ti/am62x-kernel/kernel/6.12
1111
1212 This guide describes how to rebuild and customize a Linux kernel for
1313Android.
@@ -23,7 +23,7 @@ Fetch the code using ``repo``:
2323.. code-block :: console
2424
2525 $ mkdir ${YOUR_PATH}/ti-kernel-aosp/ && cd $_
26- $ repo init -u https://git.ti.com/git/android/manifest.git -b android15 -release -m releases/RLS_10_01_01_Kernel .xml
26+ $ repo init -u https://git.ti.com/git/android/manifest.git -b android16 -release -m releases/RLS_11_00_00_Kernel .xml
2727 $ repo sync
2828
2929 .. tip ::
@@ -32,7 +32,7 @@ Fetch the code using ``repo``:
3232
3333 .. code-block :: console
3434
35- $ repo init -u https://git.ti.com/git/android/manifest.git -b android15 -release -m releases/RLS_10_01_01_Kernel .xml --depth=1
35+ $ repo init -u https://git.ti.com/git/android/manifest.git -b android16 -release -m releases/RLS_11_00_00_Kernel .xml --depth=1
3636
3737 .. _android-build-kernel :
3838
@@ -45,7 +45,7 @@ tree which has been fully build and is located in:
4545
4646.. code-block :: text
4747
48- ${YOUR_PATH}/ti-aosp-15 /
48+ ${YOUR_PATH}/ti-aosp-16 /
4949
5050 Building everything from scratch
5151================================
@@ -57,9 +57,8 @@ Building everything from scratch
5757.. code-block :: console
5858
5959 $ cd ${YOUR_PATH}/ti-kernel-aosp/
60- $ export TARGET_KERNEL_USE="6.6"
61- $ export DIST_DIR=${YOUR_PATH}/ti-aosp-15/device/ti/am62x-kernel/kernel/${TARGET_KERNEL_USE}
62- $ tools/bazel run //common:ti_dist -- --dist_dir=$DIST_DIR
60+ $ export DIST_DIR=${YOUR_PATH}/ti-aosp-16/device/ti/am62x-kernel/kernel/6.12
61+ $ ./tools/bazel run --config=ti //private/devices/ti/am6x:ti_dist -- --destdir=$DIST_DIR
6362
6463 Re-running this command will rebuild incrementally.
6564
@@ -82,9 +81,9 @@ The usual (``make menuconfig``) is done via ``bazel`` command :
8281.. code-block :: console
8382
8483 $ cd ${YOUR_PATH}/ti-kernel-aosp/
85- $ tools/bazel run //common :ti_config -- menuconfig
84+ $ tools/bazel run --config=ti //private/devices/ti/am6x :ti_config -- menuconfig
8685
87- This will automatically update the :file: `arch/arm64/configs/ti_gki .fragment `.
86+ This will automatically update the :file: `private/devices/ti/am6x/ti .fragment `.
8887
8988.. note ::
9089
@@ -111,9 +110,9 @@ In order to flash a new kernel, several images should be flashed:
111110 < Wait for fastbootd reboot >
112111
113112 $ cd <PATH/TO/IMAGES>
114- $ fastboot flash boot boot.img
115- $ fastboot flash vendor_boot vendor_boot.img
116- $ fastboot flash vendor_dlkm vendor_dlkm.img
113+ $ fastboot flash boot boot.img --disable-verity
114+ $ fastboot flash vendor_boot vendor_boot.img --disable-verity
115+ $ fastboot flash vendor_dlkm vendor_dlkm.img --disable-verity
117116 $ fastboot reboot
118117
119118 The board should boot with the new kernel.
@@ -130,28 +129,35 @@ To enable new modules:
130129
131130 #. Run ``menuconfig `` as documented previously, Select ``=m `` for the driver.
132131
133- #. Edit :file: `${ YOUR_PATH } /ti-kernel-aosp/BUILD.bazel ` to add your new module.
134- Look for the following section :
132+ #. Edit :file: `${ YOUR_PATH } /ti-kernel-aosp/private/ti/device/am6x/ BUILD.bazel ` to add your new module.
133+ Look for the following sections :
135134
136135 .. code-block :: bazel
137136
138- _TI_MODULE_OUTS = [
137+ TI_IN_TREE_MODULES = [
139138 # keep sorted
140- "crypto/af_alg.ko",
141- "crypto/algif_hash.ko",
139+ "crypto/crc64_iso3309_generic.ko",
140+ "drivers/char/hw_random/optee-rng.ko",
141+ "drivers/clk/keystone/sci-clk.ko",
142+ ...
143+ ]
142144
143- #. In the ``_TI_MODULE_OUTS `` array, add the path to your new kernel module.
145+ TI_VENDOR_DLKM_MODULES = [
146+ # keep sorted
147+ "am65-cpts.ko",
148+ "cc33xx.ko",
149+ "cdns-usb-common.ko",
150+ ...
151+ ]
144152
145- #. Rebuild the kernel as documented in :ref: ` android-build-kernel `.
153+ #. Add your new kernel module to the appropriate array:
146154
147- #. If the driver module needs to be loaded early (in the ramdisk), edit
148- :file: `${ YOUR_PATH } /ti-aosp-15/device/ti/am62x/BoardConfig-common.mk `
149- and add the path to your module:
155+ - **TI_IN_TREE_MODULES **: For in-tree kernel modules. Use the full path from kernel root (e.g., ``"drivers/your_driver/your_module.ko" ``)
156+ - **TI_VENDOR_DLKM_MODULES **: For vendor-specific dynamically loadable kernel modules. Use only the module filename (e.g., ``"your_module.ko" ``)
150157
151- .. code-block :: make
158+ Keep the list sorted alphabetically.
152159
153- BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
154- device/ti/am62x-kernel/kernel/$(TARGET_KERNEL_USE)/your_module.ko
160+ #. Rebuild the kernel as documented in :ref: `android-build-kernel `.
155161
156162 #. Finally, rebuild the Android images.
157163
@@ -170,87 +176,77 @@ As listed in :ref:`android-dtbo`, we can configure an overlay to be applied
170176from U-Boot by setting the ``adtbo_idx `` variable.
171177
172178To view how the ``adtbo_idx `` maps with the dtbo file, we can inspect the :file: `BUILD.bazel `
173- from the `kernel source code <https://git.ti.com/cgit/ti-linux-kernel/ ti-linux-kernel /tree/BUILD.bazel?h=ti-android-linux-6.6.y#n953 >`__.
174- Looking at the ``kernel_images() `` macro , we can see:
179+ from the `kernel source code <https://git.ti.com/cgit/android/kernel- ti-device /tree/BUILD.bazel?h=ti-android-linux-6.12.y >`__.
180+ Looking at the ``TI_DTBOS `` array , we can see:
175181
176182.. code-block :: bazel
177183
178- kernel_images(
179- name = "ti_images",
180- build_dtbo = True,
181- build_initramfs = True,
182- dtbo_srcs = [
183- ":ti/k3-am62x-sk-hdmi-audio.dtbo",
184- ":ti/k3-am62x-sk-csi2-ov5640.dtbo",
185- ":ti/k3-am62x-sk-csi2-tevi-ov5640.dtbo",
186- ":ti/k3-am625-sk-microtips-mf101hie-panel.dtbo",
187- ":ti/k3-am62x-sk-lpm-wkup-sources.dtbo",
188- ":ti/k3-am62-lp-sk-microtips-mf101hie-panel.dtbo",
189- ":ti/k3-am625-beagleplay-csi2-ov5640.dtbo",
190- ":ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtbo",
191- ":ti/k3-am625-beagleplay-lincolntech-lcd185-panel.dtbo",
192- ":ti/k3-am62p5-sk-mcan.dtbo",
193- ":ti/k3-am62p5-sk-microtips-mf101hie-panel.dtbo",
194- ":ti/k3-am625-sk-m2-cc3301.dtbo",
195- ":ti/k3-am62p5-sk-m2-cc3301.dtbo",
196- ":ti/k3-am625-sk-wl1837.dtbo",
197-
198- The ``dtbo_srcs `` array order dicates the index. For example:
184+ TI_DTBOS = [
185+ "k3-am62x-sk-hdmi-audio.dtbo",
186+ "k3-am62x-sk-csi2-ov5640.dtbo",
187+ "k3-am62x-sk-csi2-tevi-ov5640.dtbo",
188+ "k3-am625-sk-microtips-mf101hie-panel.dtbo",
189+ "k3-am62x-sk-lpm-wkup-sources.dtbo",
190+ "k3-am62-lp-sk-microtips-mf101hie-panel.dtbo",
191+ "k3-am625-beagleplay-csi2-ov5640.dtbo",
192+ "k3-am625-beagleplay-csi2-tevi-ov5640.dtbo",
193+ "k3-am625-beagleplay-lincolntech-lcd185-panel.dtbo",
194+ "k3-am62p5-sk-mcan.dtbo",
195+ "k3-am62p5-sk-microtips-mf101hie-panel.dtbo",
196+ "k3-am625-sk-m2-cc3351.dtbo",
197+ "k3-am62p5-sk-m2-cc3351.dtbo",
198+ "k3-am625-sk-wl1837.dtbo",
199+ "k3-am62p5-sk-dsi-rpi-7inch-panel.dtbo",
200+ "k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtbo",
201+ "k3-j722s-evm-csi2-quad-tevi-ov5640.dtbo",
202+ "k3-j722s-evm-dsi-rpi-7inch-panel.dtbo",
203+ "k3-j722s-evm-fpdlink-fusion.dtbo",
204+ ]
205+
206+ The ``TI_DTBOS `` array order dictates the index. For example:
199207
200208.. list-table ::
201209 :header-rows: 1
202210
203211 * - filename
204212 - index
205213
206- * - :file: `ti/ k3-am62x-sk-hdmi-audio.dtbo `
214+ * - :file: `k3-am62x-sk-hdmi-audio.dtbo `
207215 - 0
208216
209- * - :file: `ti/ k3-am62x-sk-csi2-ov5640.dtbo `
217+ * - :file: `k3-am62x-sk-csi2-ov5640.dtbo `
210218 - 1
211219
220+ * - :file: `k3-am62x-sk-csi2-tevi-ov5640.dtbo `
221+ - 2
212222
213- Adding more :file: ` .dtbo ` files to the :file: `dtbo.img `
214- =======================================================
223+ * - :file: `k3-am625-sk-microtips-mf101hie-panel.dtbo `
224+ - 3
215225
216- In this section, we will see how to add more :file: `.dtbo ` files to the :file: ` dtbo.img `.
217- Let's see how to add :file: ` ti/k3-am62p5-sk-dsi-rpi-7inch-panel.dtbo ` for example:
226+ * - :file: `k3-am62x-sk-lpm-wkup-sources .dtbo `
227+ - 4
218228
219- #. Edit :file: `${ YOUR_PATH } /ti-kernel-aosp/BUILD.bazel `.
220- Look for the following section:
221229
222- .. code-block :: bazel
223-
224- kernel_build(
225- name = "ti",
226- outs = [
227- "Image",
228- "System.map",
229- "k3-am62-lp-sk.dtb",
230- "k3-am62-lp-sk-microtips-mf101hie-panel.dtbo",
231-
232- #. In the ``kernel_build() `` section, add ``k3-am62p5-sk-dsi-rpi-7inch-panel.dtbo `` to the ``outs `` array.
230+ Adding more :file: `.dtbo ` files to the :file: `dtbo.img `
231+ =======================================================
233232
234- #. Still in `` kernel_build() ``, look for the `` make_goals `` array and add `` ti/k3-am62p5-sk-dsi-rpi-7inch-panel. dtbo` `.
233+ In this section, we will see how to add more :file: ` .dtbo ` files to the :file: ` dtbo.img `.
235234
236- #. Now look for the following section:
235+ #. Edit :file: `${ YOUR_PATH } /ti-kernel-aosp/private/ti/device/am6x/BUILD.bazel `.
236+ Look for the ``TI_DTBOS `` array and add your new dtbo file:
237237
238238 .. code-block :: bazel
239239
240- kernel_images(
241- name = "ti_images",
242- build_dtbo = True,
243- build_initramfs = True,
244- dtbo_srcs = [
245- ":ti/k3-am62x-sk-hdmi-audio.dtbo",
246- ":ti/k3-am62x-sk-csi2-ov5640.dtbo",
247- ":ti/k3-am62x-sk-csi2-tevi-ov5640.dtbo",
248-
249- #. In the ``kernel_images() ``, add ``:ti/k3-am62p5-sk-dsi-rpi-7inch-panel.dtbo `` at the end of the array.
240+ TI_DTBOS = [
241+ "k3-am62x-sk-hdmi-audio.dtbo",
242+ "k3-am62x-sk-csi2-ov5640.dtbo",
243+ ...
244+ "your-new-overlay.dtbo", # Add your new dtbo here
245+ ]
250246
251247 .. important ::
252248
253- Make sure to add the it at the **end ** of the array. The order in ``dtbo_srcs `` will determine
249+ Make sure to add it at the **end ** of the array. The order in ``TI_DTBOS `` will determine
254250 the ``adtbo_idx `` to be used.
255251
256252 #. Rebuild the kernel as documented in :ref: `android-build-kernel `.
0 commit comments