1. Introduction to Linux kernel transplantation
Here is a test to see whether the Linux kernel or device tree of the I.MX6ULL EVK officially provided by NXP can be run on the Zhengdian Atom development board.
The premise is: the hardware configuration is the same. That is DDR. For example, the DDR of the development board used by NXP officially is 512MB. Then, the DDR capacity of the development board used here must also be 512MB.
2. Linux kernel transplantation
NXP official Linux kernel source code:
/[Punctual Atom] Alpha Linux Development Board (A Disk)-Basic Information-2022 /[Punctual Atom] Alpha Linux Development Board (A Disk)-Basic Information/Routine Source Code/NXP Official Original Uboot and Linux
The uboot and Linux source code packages in the above directory are the uboot and Linux officially provided by NXP.
1. Configure and compile the Linux kernel
(1) First, transfer the Linux source code package officially provided by NXP to the ubuntu system and decompress it.
Use the following command to decompress the Linux source package:
tar -xvf linux-imx-rel_imx_4.1.15_2.1.0_ga.tar.bz2
(2) Secondly, write the configuration compilation command. Write a shell script here to write configuration and compilation commands into the script file.
Note: You must configure the Linux kernel before compiling the Linux kernel. Each board has its corresponding default configuration file. These default configuration files are saved in arch/arm/configs :
Enter the root directory of the Linux kernel source code and create a shell script file named imx6ull_evk_nand.sh. The above configuration file will be written into the configuration commands here.
Here's how to do it:
wangtian@wangtian-virtual-machine:~/zhengdian_Linux/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga/arch/arm/configs$ gedit imx6ull_evk_nand.sh
The imx6ull_evk_nand.sh file command is as follows:
#!/bin/sh
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx_v7_mfg_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all
Change the imx6ull_evk_nand.sh script execution permissions:
wangtian@wangtian-virtual-machine:~/zhengdian_Linux/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga$ chmod 777 imx6ull_evk_nand.sh
(3) Finally, compile the Linux kernel.
Run the imx6ull_evk_nand.sh script to compile:
wangtian@wangtian-virtual-machine:~/zhengdian_Linux/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga/arch/arm/boot/dts$ ./imx6ull_evk_nand.sh
The next article verifies whether the zImage and device tree files can successfully start the development board.