Debian Edit Modify Build and Flash Kernel: Difference between revisions
No edit summary |
|||
Line 41: | Line 41: | ||
{{Note|Note: If you have modules newly added / removed, make sure you run below command.}} | {{Note|Note: If you have modules newly added / removed, make sure you run below command.}} | ||
{{#ifeq: {{#var:SOC_SERIES}}|imx8| | {{#ifeq: {{#var:SOC_SERIES}}|imx8| | ||
$ sudo {{#var:BUILD_SCRIPT}} -c rtar | $ sudo {{#var:BUILD_SCRIPT}} -c rtar | ||
{{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X |{{#ifeq: {{#var:MACHINE_NAME_B0}} | imx8qxpb0-var-som | | {{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X |{{#ifeq: {{#var:MACHINE_NAME_B0}} | imx8qxpb0-var-som | | ||
Or, to build kernel, dtb, kernel modules for i.MXQXP SOC revision B0: | Or, to build kernel, dtb, kernel modules for i.MXQXP SOC revision B0: | ||
$ sudo {{#var:BUILD_SCRIPT_B0}} -c rtar | $ sudo {{#var:BUILD_SCRIPT_B0}} -c rtar | ||
|}}|}} | |}}|}} | ||
| | | | ||
$ sudo {{#var:BUILD_SCRIPT}} -c rubi | $ sudo {{#var:BUILD_SCRIPT}} -c rubi | ||
}} | }} | ||
This will create rootfs.tar.gz that contains your new modules. | |||
This will create rootfs.tar.gz that contains your new modules. | |||
== Deploy Kernel and DTB == | == Deploy Kernel and DTB == |
Revision as of 04:05, 18 July 2020
This section describes how to do menuconfig and build new kernel configuration and deploy it.
Configuring the kernel
The default kernel configuration file used by Debian is part of the kernel source tree and is located at:
~/var_mx8mm_dart_debian_buster/src/kernel/arch/arm64/configs/imx8_var_defconfig
To configure the kernel using Debian:
How-to: Modify the kernel configuration
To modify the kernel configuration (add/remove features and drivers) please follow the steps below:
$ cd ~/var_mx8mm_dart_debian_buster/src/kernel $ sudo make ARCH=arm64 mrproper $ sudo make ARCH=arm64 imx8_var_defconfig $ sudo make ARCH=arm64 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?"
$ sudo make ARCH=arm64 savedefconfig $ sudo cp arch/arm64/configs/imx8_var_defconfig arch/arm64/configs/imx8_var_defconfig.orig $ sudo cp defconfig arch/arm64/configs/imx8_var_defconfig
Building New Kernel Configuration
Build kernel, dtb files and kernel modules
$ cd ~/var_mx8mm_dart_debian_buster $ sudo MACHINE=imx8mm-var-dart ./var_make_debian.sh -c kernel $ sudo MACHINE=imx8mm-var-dart ./var_make_debian.sh -c modules
$ sudo MACHINE=imx8mm-var-dart ./var_make_debian.sh -c rtar
This will create rootfs.tar.gz that contains your new modules.
Deploy Kernel and DTB
You can deploy the kernel and dtb or modules from any of the below methods,
Deploy Kernel, dtb via network
Updating Device tree to target
Transfer dtbs to target
On PC:
$ cd ~/var_mx8mm_dart_debian_buster $ scp output/*.dtb root@<yourboard-ip>:/boot/
Once prompted give root as password. <yourboard-ip> is ipaddress of your board.
Once transfer is done, follow below commands
On Target Console:
# sync;reboot
Updating kernel Image to target
Transfer the output/Image.gz kernel image to target
On PC:
$ scp output/Image.gz root@<yourboard-ip>:/boot/
Once prompted give root as password. <yourboard-ip> is ipaddress of your board.
Once transfer is done, follow below commands
On Target Console:
# sync;reboot