Tutorial: Compile u-boot1.1.4 and above to start the development board based on S3C2410
Source: Internet
Author: User
Tutorial: Compile u-boot1.1.4 and above to start the development board based on S3C2410 -- Linux general technology-Linux programming and kernel information, the following is the details to read. Someone has tried to compile U-BOOT 1.1.4 or above to start the S3C2410/SMDK2410 compatible development board? I recently tried to compile U-BOOT-1.1.4, U-BOOT-1.1.5, U-BOOT-1.1.6 and U-BOOT-2006-06-30-2020, using the Development Board is Chengdu Bo Rui MC2410A. MC2410A is said to be based on S3C2410, but Chengdu borui made some changes on the basis of S3C2410. The basic configuration is ARM920T, 64 mb sdram and 64 mb nand flash, without nor flash. MC2410A can be started with vivi bootloader. however, after I burned the compiled u-boot.bin to the nand flash through the JTAG interface, the power off and then power up without any screen display (I connected the CONSOLE through the serial port ). I tried to modify the u-boot.lds under the u-boot/board/smdk2410/directory, put SECTIONS {...} In the first line ". = 0x ..." Changed to 0x33f80000, 0x33f00000, or 0x00000000. I also tried using head in the vivi/arch/s3c2410/directory. S completely replaces start under u-boot/cpu/arm920t. s, look at the beginning of the "_ start:" assembly code in the u-boot.bin can be recognized by hardware, however, nothing happens (I inserted the Assembly print statement in this assembly code to output debugging information to the serial port, which can be printed normally after being compiled in VIVI ). I have not modified any Makefile or config. mk. I don't know if it is related to Makefile settings. which of the following heroes can help me find out? Thanks first.
Here is the replacement of u-boot/cpu/arm920t/start. S vivi/arch/s3c2410/head. s. in VIVI compilation can be started normally, put in the U-BOOT did not respond.
/*
* Vivi/arch/s3c2410/head. S:
* Initialise hardware
*
* Copyright (C) 2001 MIZI Research, Inc.
*
* This program is free software; you can redistribute it and/or modify
* It under the terms of the GNU General Public License as published
* The Free Software Foundation; either version 2 of the License, or
* (At your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* But without any warranty; without even the implied warranty
* MERCHANTABILITY or fitness for a special PURPOSE. See
* GNU General Public License for more details.
*
* You shoshould have written ed a copy of the GNU General Public License
* Along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* Author: Janghoon Lyu
* Date: $ Date: 2003/02/26 10:38:11 $
*
* $ Revision: 1.18 $
*
*
* History:
*
* 2002-05-14: Janghoon Lyu
*-Initial code
*
*/
@ 0x20: magic number so we can verify that we only put
. Long 0
@ 0x24:
. Long 0
@ 0x28: where this vivi was linked, so we can put it in memory in the right place
. Long _ start
@ 0x2C: this contains the platform, cpu and machine id
. Long 0x010600C1
@ 0x30: vivi capabilities
. Long 0
@ 0x34:
BSleepRamProc
. Balignl 16, 0 xdeadbeef
_ TEXT_BASE:
. Word0x33f00000
. Globl _ armboot_start
_ Armboot_start:
. Word _ start
/*
* These are defined in the board-specific linker script.
*/
. Globl _ bss_start
_ Bss_start:
. Word 0
. Globl _ bss_end
_ Bss_end:
. Word 0
@
@ Start VIVI head
@
Reset:
/*
* Set the cpu to SVC32 mode
*/
Mrsr0, cpsr
Bicr0, r0, # 0x1f
Orrr0, r0, #0xd3
Msrcpsr, r0
@ PrintHexNibble: prints the least-significant nibble in R0 as
@ Hex digit
@ R0 contains nibble to write as Hex
@ R1 contains base of serial port
@ Writes ro with XXX, modifies r0, r1, r2
@ TODO: write ro with XXX reg to error handling
@ Falls through to PrintChar
PrintHexNibble:
Adrr2, HEX_TO_ASCII_TABLE
Andr0, r0, # 0xF
Ldrr0, [r2, r0] @ convert to ascii
BPrintChar
@ PrintChar: prints the character in R0
@ R0 contains the character
@ R1 contains base of serial port
@ Writes ro with XXX, modifies r0, r1, r2
@ TODO: write ro with XXX reg to error handling
PrintChar:
TXBusy:
Ldrr2, [r1, # oUTRSTAT]
Andr2, r2, # UTRSTAT_TX_EMPTY
Tstr2, # UTRSTAT_TX_EMPTY
BeqTXBusy
Strr0, [r1, # oUTXHL]
Movpc, lr
@ PrintWord: prints the 4 characters in R0
@ R0 contains the binary word
@ R1 contains the base of the serial port
@ Writes ro with XXX, modifies r0, r1, r2
@ TODO: write ro with XXX reg to error handling
PrintWord:
Movr3, r0
Movr4, lr
BlPrintChar
Movr0, r3, LSR #8/* shift word right 8 bits */
BlPrintChar
Movr0, r3, LSR #16/* shift word right 16 bits */
BlPrintChar
Movr0, r3, LSR #24/* shift word right 24 bits */
BlPrintChar
Movr0, # '\ R'
BlPrintChar
Movr0, # '\ N'
BlPrintChar
Movpc, r4
@ PrintHexWord: prints the 4 bytes in R0 as 8 hex ascii characters
@ Followed by a newline
@ R0 contains the binary word
@ R1 contains the base of the serial port
@ Writes ro with XXX, modifies r0, r1, r2
@ TODO: write ro with XXX reg to error handling
PrintHexWord:
Movr4, lr
Movr3, r0
Movr0, r3, LSR #28
BlPrintHexNibble
Movr0, r3, LSR #24
BlPrintHexNibble
Movr0, r3, LSR #20
BlPrintHexNibble
Movr0, r3, LSR #16
BlPrintHexNibble
Movr0, r3, LSR #12
BlPrintHexNibble
Movr0, r3, LSR #8
BlPrintHexNibble
Movr0, r3, LSR #4
BlPrintHexNibble
Movr0, r3
BlPrintHexNibble
. Align 4
PMCTL0_ADDR:
. Long 0x4c00000c
PMCTL1_ADDR:
. Long 0x56000080
PMST_ADDR:
. Long 0x56213b4
PMSR0_ADDR:
. Long 0x56213b8
REFR_ADDR:
. Long 0x48000024
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.