Android Customizing the Linux kernel: Difference between revisions
From Variscite Wiki
Line 9: | Line 9: | ||
$ make ARCH={{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}} {{#var:KERNEL_DEFCONFIG}} | $ make ARCH={{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}} {{#var:KERNEL_DEFCONFIG}} | ||
$ make ARCH={{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}} menuconfig | $ make ARCH={{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}} menuconfig | ||
Navigate the menu and select the desired kernel | Navigate the menu and select the desired kernel functionalities, save the new configuration and exit.<br> | ||
Then, save the new configuration as the new default configuration:<br> | |||
$ make ARCH={{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}} savedefconfig | $ make ARCH={{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}} savedefconfig | ||
$ cp arch/{{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}}/configs/{{#var:KERNEL_DEFCONFIG}} arch/{{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}}/configs/{{#var:KERNEL_DEFCONFIG}}.orig | $ cp arch/{{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}}/configs/{{#var:KERNEL_DEFCONFIG}} arch/{{#ifeq: {{#var:HARDWARE_NAME}} |VAR-SOM-MX6|arm|arm64}}/configs/{{#var:KERNEL_DEFCONFIG}}.orig |
Revision as of 14:32, 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 new 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
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 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