U-boot for tiny210 ver1.0 (by liukun321 cool)

Source: Internet
Author: User
Tags spl
Download the new version:

The following link provides the source code of a newer version.

Download ver4.0 source code: U-boot for tiny210 ver4.0

Ver3.1 source code download: U-boot for tiny210 ver3.1

Download ver3.0 source code: U-boot for tiny 210 ver3.0

Ver2.2 source code download: U-boot for tiny210 ver2.2

Download ver2.1 source code: U-boot for tiny210 ver2.2

Download ver2.1 source code: U-boot for tiny210 ver2.1

Download ver2.0 source code: U-boot for tiny210 ver2.0

Link for modifying and analyzing versions: ver2.0  Ver2.1 ver2.2 ver2.2.1 ver2.2.2 ver
3.0 ver3.1
Ver4.0 tiny210 uboot is implemented based on the linaro-2011.10 for mini210 modification. Thanks to Alex Ling. Linaro-2011.10 for mini210 Source Code address uboot for mini210 following the instructions to modify, you can start on tiny210. Source code download: uboot for tiny210 version1.0 (version U-boot 2011.06) currently has fewer features, and I will continue to add them later. Basic functions: 1. SD boot, based on the SPL function of linaro U-boot
2. Load the file from the FAT partition of the SD card to the SDRAM
3. save the environment variable to the SD card (with writing to MMC (0 )... mmc_send_cmd: error during transfer: 0x00208001 MMC write failed), but the data is saved successfully and will be modified later.

But the linaro-2011.10 for mini210 cannot be started directly on tiny210, the terminal only prints OK. The main problem lies in the memory initialization. After the board is powered on, Ram does not implement correct initialization. However, in the lowlevel phase of uboot, code migration cannot be implemented. The core part of memory initialization is in/board/samsug/mini210/memsteup. S. The operation of this Code is correct. The problem may be caused by the memorycontrol configuration. The 210 memory configuration is implemented in/include/configs/mini210.h. The DDR2 of tiny210 is only mounted in the dram0 region, while the information provided by mini210.h shows that the mini210sdram is mounted to 256 m on dram0 and dram1 respectively. Therefore, make the following changes: row: 142: # define config_sys_load_addr (phys_sdram_1 + 0x1000000) 162: # define config_nr_dram_banks
1 // 2 # define sdram_bank_size (512ul <20ul) // 0x10000000/* 256256 MB */# define phys_sdram_1 memory_base_address # define phys_sdram_1_size sdram_bank_size + # If 0 # define phys_sdram_2 (memory_base_address + 0x20000000) /* SDRAM bank #2 */# define phys_sdram_2_sizesdram_bank_size + # the ram of endiftiny210 is attached to the dram0 region, for example: from the schematic diagram of the core board, we can see that the four 315 mddr2 chips are configured as 1 chip (the configuration is in mini210.h): # define dmc0_memcontrol0x00202400 // memcontrolbl = 4, 1 chip, DDR2 type, dynamic Self refresh, force precharge,
Dynamic Power down offdram0 starting address 0x20000000, offset 0x1fffffff (512 m), configure memconfig0 (chip_base = 0x20 chip_mask = 0xe0) according to this reference manual ), in this way, we can operate 0x20000000 ~ 0x3fffffff (memory space of 316 MB) the RAM address line of tiny210 is 14 (So chip_row 0x2 = 14 bit). For details, see the following Configuration: # define dmc0_memconfig_0 0x20e00323 // memconfig0512mb config, 8 banks, mapping method [12: 15] 0: linear, 1: linterleaved,
2: mixed317: # define dmc0_memconfig_1 0x00e00323 // memconfig1 In addition, the startup will read the ram size when initializing Ram. The function must be implemented in/board/samsug/mini210/mini210.c and the following modifications are required: + 187: # If defined (phys_sdram_2) 188: Gd-> BD-> bi_dram [1]. start = phys_sdram_2; 189: Gd-> BD-> bi_dram [1]. size = get_ram_size (long *) phys_sdram_2, \ 190: phys_sdram_2_size); + 191: # endif PS: Add tiny210 target board: 1. Modify boards in the uboot source code root directory. cfg file, add tiny210 arm armv7 tiny210 Samsung s5pc1xx2 in line 183 CP board/Samsung/mini210 board/Samsung/tiny2103, replace mini210 under Board/Samsung/tiny210 with tiny210, and change 29 lines of makefile under this directory to cobjs: = tiny210.o; then, modify row lowlevel_init.s in this directory to # include "tiny210_val.h ". 4. Modify CP include/configs/mini210 include/configs/tiny210.h5, VIM include/configs/tiny210.h: # define config_mini210 ----> # define config_tiny210 # define mach_type _ mini210 -----> # define prepare # define config_mach_type mach_type_mini210 ----> # define config_mach_type compile U-boot
$ Make arch = arm cross_compile =/opt/friendlyarm/toolschain/4.5.1/bin/ARM-None-Linux-gnueabi-tiny210_config
$ Make arch = arm cross_compile =/opt/friendlyarm/toolschain/4.5.1/bin/ARM-None-Linux-gnueabi-All SPL
Because there are two sets of cross-tool chains under my system, I didn't add/opt/friendlyarm/toolschain/4.5.1/bin/to the environment variable. I need to specify the path when using the tool chain.

Write the U-boot image to the SD card
Connect the SD card to your computer through a card reader (or directly insert it into the laptop card slot) and find the device corresponding to the SD card through "cat/proc/Partitions". My device node is/dev/sdb.

Run the following command:
$ Sudo dd iflag = dsync Oflag = dsync if = SPL/tiny210-spl.bin of =/dev/SDB seek = 1
$ Sudo dd iflag = dsync Oflag = dsync if = u-boot.bin of =/dev/SDB seek = 49 attachment: Burn complete Insert card into Development Board, start:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.