I. Porting Environment
- MASTER: vmware6.5 -- fedora 9
- Development Board: homemade Development Board
CPU: S3C2440; SDRAM: HY57V561620FTP-H; nor FLASH: sst_39vf1601 (2 m );
Nand flash: k9f1g08u0b (128 M); Nic chip: dm9000ep
- Compiler: arm-linux-gcc-4.3.2
- U-boot: u-boot-2009.08
- Linux Kernel: linux-2.6.30
- Busybox: busybox-1.13.3
2. Blog address
Http://blog.csdn.net/liuqiqi677
If any error occurs, please correct it.
Iii. References
Mainly refer to the blog http://blogold.chinaunix.net/u3/101649/ of Huang gang
His blog is quite well written. His knowledge in various stages of embedded development is presented to readers in the form of learning, supplemented by pictures and explanations, it allows readers to grasp the main line and have an overall understanding of embedded development. It is strongly recommended !!!
Iv. Problems and Solutions
4. There is no dm9000_initialize function in the u-boot-2009.03
At first, I used U-boot is a u-boot-2009.03, Huang gang is using a u-boot-2009.08, all the way according to his blog to add support for dm9000 Nic, there is a problem. During U-boot compilation, the following error was reported: Undefined reference to 'dm9000 _ initialize', indicating that the dm9000_initialize function is not defined. I checked the steps again, the only difference is that the U-boot version is different. So, I downloaded the u-boot-2009.08 and found dm9000_initialize in drivers/NET/dm9000x. C.
Function Definition, but no dm9000_initialize is found in the corresponding file of the u-boot-2009.03
Function. The reason is clear.
So, how to add support for dm9000 Nic In u-boot-2009.03 Chinese medicine? This is very simple. According to Huang gang's blog,
Not on board/Samsung/my2440/my2440.
Add board_eth_init (bd_t * bis) to C)
Function.
5. Incomplete output information of u-boot-2009.08 Super Terminal
When I started the u-boot-2009.08, I accidentally found that its output information was missing a few lines, compared to Figure 4 and figure 5:
Figure 4 u-boot-2009.08 with incomplete output information
Figure 5 u-boot-2009.08 after bug fixing
Through analysis, locate the problem in common/console. c
Stdio_print_current_devices in the file
In the function, let's take a look at the definition of this function:
Figure 6 source code of the stdio_print_current_devices Function
The reason is obvious. Let's read the above Conditional compilation statement, which means that if config_sys_lele_info_quiet is defined, the following information will be printed, however, the macro literally means that the system terminal information is not printed, which leads to a conflict! The solution is simple. Set # ifdef
Change to # ifndef
You can. Re-compile U-boot, download it to the Development Board, run it, as shown in Figure 5. The terminal information is printed normally!
6. failed to set network address
In include/configs/my2440.h, I set the MAC address, IP address, and Linux host IP address of the Development Board. Then, each time I download the compiled U-boot to the Development Board, I enter printenv.
Command
To check whether the setting is successful, but the printed information is the same as the default value! But I did change it. Why is this problem? When there was no way, I suddenly burst into a flash. I realized that I had made a low-level mistake! U-boot and system environment variables are stored separately. Previously, I used the saveenv command to save the environment variables to the NAND Flash and never moved this area any more. I burned U-boot again, but the system environment variable is still the previous value. I erased all the NAND Flash files, re-downloaded U-boot, and entered saveenv on the terminal.
Command, reboot, and check the environment variable. It has changed to the value I have modified.
Today we will summarize so much. It is estimated that if you write too much, you will have a big head. Continue to study the driver today. Pai_^