Android Customizing the Linux kernel: Difference between revisions

From Variscite Wiki
Line 19: Line 19:
== Making changes to device tree ==
== Making changes to device tree ==
Edit {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6| * VAR-SOM-MX6 : arch/arm/boot/dts/imx6qdl-var-som.dtsi <br>
Edit {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6| * VAR-SOM-MX6 : arch/arm/boot/dts/imx6qdl-var-som.dtsi <br>
*DART-MX6: arch/arm/boot/dts/imx6qdl-var-dart.dtsi| arch/arm64/boot/dts/{{#ifeq: {{#var:HARDWARE_NAME}} | DART-MX8M |freescale/fsl-imx8mq-var-dart-common.dtsi | freescale/fsl-imx8mm-var-dart.dts}}}}
*DART-MX6: arch/arm/boot/dts/imx6qdl-var-dart.dtsi| arch/arm64/boot/dts/{{#ifeq: {{#var:HARDWARE_NAME}} | DART-MX8M |freescale/fsl-imx8mq-var-dart-common.dtsi | freescale/fsl-imx8mm-var-dart.dts}}}} <br>
For example here making changes for SPI <br>
For example we want to make device tree changes for SPI configuration <br>
Refer to: {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6 |[[{{#var:HARDWARE_NAME}} SPI|SPI]]|{{Varlink|DART-MX8M SPI|{{#var:RELEASE_LINK}}|SPI}}}}
Refer to: {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6 |[[{{#var:HARDWARE_NAME}} SPI|SPI]]|{{Varlink|DART-MX8M SPI|{{#var:RELEASE_LINK}}|SPI}}}}



Revision as of 00:33, 31 December 2019

VAR-SOM-MX6 - Android Nougat N7.1.1 Developer Guide

Manual build and customizing Android Linux Kernel

Making changes to kernel configuration

$ cd ~/var_n_711_100/n_711_100_build/vendor/variscite/kernel_imx/
$ make ARCH=arm mrproper
$ make ARCH=arm imx_v7_var_android_defconfig
$ make ARCH=arm menuconfig

Navigate the menu and select the desired kernel functionality Exit the menu and answer "Yes" when asked "Do you wish to save your new configuration?"

$ make ARCH=arm savedefconfig
$ cp arch/arm/configs/imx_v7_var_android_defconfig arch/arm/configs/imx_v7_var_android_defconfig.orig 
$ cp defconfig arch/arm/configs/

Making changes to device tree

Edit

  • VAR-SOM-MX6 : arch/arm/boot/dts/imx6qdl-var-som.dtsi
  • DART-MX6: arch/arm/boot/dts/imx6qdl-var-dart.dtsi

For example we want to make device tree changes for SPI configuration
Refer to: SPI

Build New boot.img

When you perform changes to the kernel, you may build boot.img solely instead of building the whole Android.

$ cd ~/var_n_711_100/n_711_100_build
$ source build/envsetup.sh
$ lunch -userdebug
$ make bootimage

Flashing bootimage to target

Make sure device is in the fastboot mode if not , reboot in fastboot mode by using below commands.

$ adb reboot bootloader
$ fastboot flash boot boot-<setup-name>.img

Replace setup-name as per above table.