U-Boot-2009-03 transplant notes (graft preparation)

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

  Because of the need of work, should the board in the S3C2440 transplantation of U-boot and Linux, while on S3c2440 transplantation of the article is more comprehensive, but after all is not much, but others are, the do it yourself, the whole process of this series of record.

  With the support of smdk2410 in U-boot1.1.6 code, while the 2440 and 2410 or more similar, so up transplantation on the basis of 2410.

The establishment of xinna2440 code

  We call ourselves the transplantation of u-boot called xinna2440-u-boot, the first to establish the xinna2440 code

  Modify the top Makefile

  Find in VIM smdk2410_config, then add xinna2440_config is defined in the following

1 smdk2410_config    :    unconfig
2     @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
3 
4 xinna2440_config    :    unconfig
5     @$(MKCONFIG) $(@:_config=) arm arm920t xinna2440 NULL s3c24x0

  Then copy the code

cp  include/configs/smdk2410.h include/configs/s3c2440.h
cp board/samsung/smdk2410/ board/xinna2440 -r 

  Test xinna2440 code

make xinna2440_config
Configuring for xinna2440 board...
make

  If you install the cross compile chain (appear link error here when the recommended 3.4.5, other versions are likely to drive in the port of Nandflash), the compiler should not go wrong, will generate the u-boot.bin file in the root directory.   

What to transplant content

  U-Boot is divided into two parts, the first part is the assembly part of the start, we should set the CPU mode at this stage, turn off the watchdog, initialization of memory (SDRAM) shut down the MMU, no interruption, set the PLL, the copy of the code, C language prepared to run the environment (setting the stack pointer) and some work. Transplantation is a skilled work, not familiar with quickly, need to have patience.

  Because we are based on the smdk2410 to transplant xinna2440, so we must make clear what we need a transplant.

The difference of SOC

  Smdk2410 is used in the S3C2410 chip, xinna2440 is used in the S3C2440 chip, so we just make a clear distinction between the two chips, you know the CPU of different places to transplantation.

  1,Frequency of two chip is different, so we need to modify the PLL drive

  2,Interrupt controller, we need to disable all interrupts

  3,The NandFlash controller two chips of different.

    Smdk2410 is an NORFlash, can start from NORFlash, but xinna2440 is not NORFlash, we can only boot from NandFlash, so we must transplant NandFlash driver.

The BOARD difference

  1,The first is to pay attention to the GPIO link is different, here is not all about.

  2,Second pay attention to peripheral devices of different

    1. Xinna2440 without Norflash, all are unable to boot from NORFlash
    2. Nandflash chip smdk2410 and xinna2440 is different, xinna2440 is used in K9F2G08U0A
    3. The smdk2410 is using the CS8900 card chip, xinna2440 DM9000

Find the entrance point

  Use VIM to open cpu/arm920t/u-boot.lds, you can see, the starting of U-boot code in cpu/arm920t/start.S, we can go on from here as a starting point, start transplantation.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Ivan at November 10, 2013 - 4:31 PM