In the previous article http://www.cnblogs.com/linzizhang/p/4817336.html introduced the first part of the system software on the Development Board--bootloader the compilation method.
Background: After the bootloader is burned into the NAND flash of the Development Board, the Development Board starts from the NAND, the hardware automatically loads the bootloader into memory, bootloader the onboard resources are initialized and stays in a command line interface. Receives and executes a user-typed command. At this time the user can control the Development Board through commands, such as viewing the parameter list: print, read/write Nand:nand Read\nand Write, memory management: MM, set parameter list: setenv, network download: TFTP, boot kernel: BOOTM and so on. If we download a compiled kernel through the TFTP server into memory, we can start the kernel with the BOOTM command.
All right, wordy 、、、 down to the chase-----kernel compilation.
Compiling the kernel image that is appropriate for the development Board is simply a matter of configuring and compiling it. Of course, the most troublesome is the configuration, because the configuration process needs to understand what resources on the board, what model, what needs to drive, and so on, and then based on the information learned to take. However, since we are using a development board developed by others, that means that manufacturers have been configured, as long as we can get someone else's configuration file, and then through their own little modification, can save a lot of trouble. Go to the top level directory and proceed as follows:
1. Configure the kernel: Execute command make Menuconfig arch=arm-linux the following configuration interface appears:
In front of said, here can according to the situation of the board of a choice, but I usually pull down, find a "Load an Alternate Configuration File"
The option to use the configuration file provided by the manufacturer, which saves time and effort. After the configuration is complete, save exit and proceed to the next step.
2. Compile kernel: Execute command: Make Uimage arch=arm cross_compile=arm-linux-. This is a very long process, and there may be compile errors, such as the author encountered a problem, mkimage not found, is actually a packaging tool not found, resulting in kernel image generation failure. It was later discovered that the tool was in the Uboot/tools directory, and the tool was copied to the/bin directory to execute a compile command.
After these two steps are completed, the user can find the Uimage.bin file in the arch/arm/boot/, which is a binary file that can be launched, and of course there is no file system code, which will be the content of the next article.
ARM Development Board System porting-----Kernel compilation