1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 10:22:48 +02:00

change-text-base-and-meddle.patch

change the TEXT_BASE and meddle around

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-08-13 00:40:01 +01:00
parent 7143408081
commit 0b4bd34f15
6 changed files with 38 additions and 10 deletions

View File

@ -23,6 +23,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
#define TEXT_BASE 0x33F80000 /* xiangfu add*/
#define TEXT_BASE 0x33000000
#endif /* __CONFIG_H */

View File

@ -8,7 +8,9 @@
int printk(const char *fmt, ...);
int vsprintf(char *buf, const char *fmt, va_list args);
void puts(const char *string);
int puts(const char *string);
void printhex(unsigned char v);
void print32(unsigned int u);
#endif

View File

@ -120,9 +120,6 @@
#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */
/**************************************/
_TEXT_BASE:
.word TEXT_BASE
.globl lowlevel_init
lowlevel_init:
/* memory control configuration */

View File

@ -86,17 +86,40 @@ int puts(const char *string)
return 1;
}
/* done like this to avoid needing statics in steppingstone */
void printnybble(unsigned char n)
{
if (n < 10)
serial_putc(DEBUG_CONSOLE_UART, '0' + n);
else
serial_putc(DEBUG_CONSOLE_UART, 'a' + n - 10);
}
void printhex(unsigned char n)
{
printnybble((n >> 4) & 15);
printnybble(n & 15);
}
void print32(unsigned int u)
{
printhex(u >> 24);
printhex(u >> 16);
printhex(u >> 8);
printhex(u);
}
int printk(const char *fmt, ...)
{
va_list args;
int r;
static char buf[512];
char *p = buf;
const char *p = buf;
va_start(args, fmt);
r = vsprintf(buf, fmt, args);
va_end(args);
p = fmt;
while (*p)
serial_putc(DEBUG_CONSOLE_UART, *p++);

View File

@ -158,6 +158,8 @@ clbss_l:
cmp r0, r1
ble clbss_l
/* we are going to jump into the C part of the init now */
ldr pc, _start_armboot
_start_armboot:

View File

@ -40,15 +40,19 @@ unsigned char buf[2*1024];
int start_kboot(void)
{
static int n = 0;
port_init();
serial_init(0x11, UART2);
while(1) {
serial_putc(2, '0');
serial_putc(2, 'x');
serial_putc(2, 'x');
serial_putc(2, 'x');
printk("Openmoko KBOOT "stringify(BUILD_HOST)" "stringify(BUILD_VERSION)" "stringify(BUILD_DATE)"\n");
print32((unsigned int)&n);
serial_putc(2, '\n');
// printk("Openmoko KBOOT "stringify(BUILD_HOST)" "stringify(BUILD_VERSION)" "stringify(BUILD_DATE)"\n");
blue_on(1);
n++;
}
/*2. test nand flash */