The transplanted target platform is the http://www.cvtech.com.cn teaching lab Board launched by Wuhan chuangwei Company (JX44B0-1B), host platform is installed with Red Hat Linux 9 PC.
The entire porting process is as follows:
1. Obtain uClinux-Dist
Log on to Red hatwith the root, from the tutorial Board attached to the disc beiuclinux-dist-jx44b0.tar.gz (using the uClinux-dist-20040408 release version) Compressed package to/root/directory, create a terminal, enter the command tar-zxvf uClinux-dist-jx44b0.tar.gz decompress. After decompression, you will get a new directory named uClinux-Dist under/root /.Source codeDirectory.
2. Establish and use the cross-compiling environment of uClinux
The PC uses an intel X86 compatible amd athlon XP 1800 + CPU, and the target platform uses a Samsung B0 chip with the ARM7TDMI core. The instruction sets of the two are not compatible, therefore, it is necessary to use a cross compiler that can run on a PC but generate a target code that can run on arm. The cross-compilation environment used in this porting is arm-elf-tools, which is installed by executing the command sh http://www.uclinux.org after the arm-elf-tools-20030314.sh is downloaded from the arm-elf-tools-20030314.sh.
3. Configure and compile the uClinux kernel
Go to/root/uClinux-Dist/. You can see that the Linux kernel source contains three versions.Code, Linux-2.0.x, linux-2.4.x and linux-2.6.x, this transplant uses a relatively stable linux-2.4.x. Go to/root/uClinux/linux-2.4.x/, execute the command make menuconfig to start the menu Configuration tool for Linux kernel, then select load an alternate configuration file, enter config-jx44b0, that is, select the config-jx44b0 of the standard configuration file that uses jx44b0, which is located in the/root/uClinux-Dist/linux-2.4.x/directory. Then select OK to confirm, click esc to exit, and select Yes when prompted whether to save. The configuration is complete. Next, execute the command make Dep to establish the file dependency during compilation. After completion, execute the command make zimage to compile the kernel. zimage indicates that a compressed kernel will be generated. After compilation, the generated uClinux executable image is located in the/root/uClinux-Dist/images/directory.