Android Customizing the Linux kernel: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 16: Line 16:


== Making changes to the device tree ==
== Making changes to the device tree ==
For example, edit the following file: {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6| * VAR-SOM-MX6 : arch/arm/boot/dts/imx6qdl-var-som.dtsi <br>
For example, edit the following file: {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6| * VAR-SOM-MX6 : {{#var:BUILD_FOLDER}}/{{#var:BUILD_FOLDER_ANDROID}}/vendor/variscite/kernel_imx/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}}}} <br>
*DART-MX6: {{#var:BUILD_FOLDER}}/{{#var:BUILD_FOLDER_ANDROID}}/vendor/variscite/kernel_imx/arch/arm/boot/dts/imx6qdl-var-dart.dtsi| {{#var:BUILD_FOLDER}}/{{#var:BUILD_FOLDER_ANDROID}}/vendor/variscite/kernel_imx/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, if you want to make changes related to the SPI configuration you can refer to: {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX6 |[[{{#var:HARDWARE_NAME}} SPI|SPI]]|{{Varlink|DART-MX8M SPI|{{#var:RELEASE_LINK}}|SPI}}}}
For example, if you want to make changes related to the SPI configuration you can 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 14:39, 31 December 2019

VAR-SOM-MX6 - Android Nougat N7.1.1 - Customizing the 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 functionalities, save the new configuration and exit.
Then, save the new configuration as the default 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 the device tree

For example, edit the following file:

  • VAR-SOM-MX6 : ~/var_n_711_100/n_711_100_build/vendor/variscite/kernel_imx/arch/arm/boot/dts/imx6qdl-var-som.dtsi
  • DART-MX6: ~/var_n_711_100/n_711_100_build/vendor/variscite/kernel_imx/arch/arm/boot/dts/imx6qdl-var-dart.dtsi

For example, if you want to make changes related to the SPI configuration you can refer to: SPI

Build a 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 the boot image to the target

Run the following to boot the device into fastboot mode and reflash the boot image:

$ adb reboot bootloader
$ fastboot flash bootout/target/product/var_mx6/boot-<setup-name>.img
Replace setup-name as per above table.
$ sudo fastboot reboot