1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-22 18:12:27 +02:00

tidy-second-phase-stub.patch

Clean up the jump into the full SDRAM copy of bootloader that is made now.
Adjust the compiler options.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-08-13 00:43:27 +01:00
parent f26f60b0ac
commit b44cb06c6b
3 changed files with 14 additions and 46 deletions

View File

@ -25,7 +25,10 @@ BUILD_VERSION := ${BUILD_BRANCH}_${BUILD_HEAD}
LDS = src/kboot-stage1.lds LDS = src/kboot-stage1.lds
INCLUDE = include INCLUDE = include
IMAGE_DIR = image IMAGE_DIR = image
CFLAGS = -Wall -Werror -I $(INCLUDE) -g -c -DBUILD_HOST="${BUILD_HOST}" -DBUILD_VERSION="${BUILD_VERSION}" -DBUILD_DATE="${BUILD_DATE}" CFLAGS = -Wall -Werror -fno-builtin -ffreestanding -fno-strict-aliasing \
-fno-common -ffixed-r8 -I $(INCLUDE) -g -c \
-DBUILD_HOST="${BUILD_HOST}" -DBUILD_VERSION="${BUILD_VERSION}" \
-DBUILD_DATE="${BUILD_DATE}"
LDFLAGS = LDFLAGS =
#START = start.o lowlevel_init.o #START = start.o lowlevel_init.o
S_SRCS = src/start.S src/lowlevel_init.S S_SRCS = src/start.S src/lowlevel_init.S

View File

@ -34,10 +34,8 @@ SECTIONS
{ {
src/start.o (.text) src/start.o (.text)
src/lowlevel_init.o(.text) src/lowlevel_init.o(.text)
src/start_kboot.o (.text) src/start_kboot.o (.text .rodata)
src/start_kboot.o (.rodata) *(.text .rodata)
*(.text)
*(.rodata)
} }
. = ALIGN(4); . = ALIGN(4);

View File

@ -28,18 +28,8 @@
#include "kboot.h" #include "kboot.h"
#include <neo_gta02.h> #include <neo_gta02.h>
/* #define stringify2(s) stringify1(s)
unsigned char buf[]={ #define stringify1(s) #s
0x0d,0xc0,0xa0,0xe1,0x00,0xd8,0x2d,0xe9,0x04,0xb0,0x4c,0xe2,0x4c,0x20,0x9f,0xe5,
0x05,0x30,0xa0,0xe3,0x00,0x30,0x82,0xe5,0x44,0x20,0x9f,0xe5,0x44,0x30,0x9f,0xe5,
0x00,0x30,0x82,0xe5,0x40,0x20,0x9f,0xe5,0x3c,0x30,0x9f,0xe5,0x00,0x30,0x93,0xe5,
0x01,0x30,0xc3,0xe3,0x00,0x30,0x82,0xe5,0x28,0x00,0x9f,0xe5,0x0b,0x00,0x00,0xeb,
0x24,0x20,0x9f,0xe5,0x20,0x30,0x9f,0xe5,0x00,0x30,0x93,0xe5,0x01,0x30,0x83,0xe3,
0x00,0x30,0x82,0xe5,0x0c,0x00,0x9f,0xe5,0x04,0x00,0x00,0xeb,0xf0,0xff,0xff,0xea,
0x10,0x00,0x00,0x56,0x18,0x00,0x00,0x56,0xff,0xff,0x00,0x00,0x14,0x00,0x00,0x56,
0x01,0x00,0x50,0xe2,0xfd,0xff,0xff,0x1a,0x0e,0xf0,0xa0,0xe1,0x0a};
*/
#define stringify(x) #x
extern void bootloader_second_phase(void); extern void bootloader_second_phase(void);
@ -50,29 +40,9 @@ void start_kboot(void)
port_init(); port_init();
serial_init(0x11, UART2); serial_init(0x11, UART2);
puts("Openmoko KBOOT BUILD_HOST BUILD_VERSION BUILD_DATE\n"); puts("Openmoko KBOOT "stringify2(BUILD_HOST)" "
stringify2(BUILD_VERSION)" "
#if 0 stringify2(BUILD_DATE)"\n");
while(1) {
serial_putc(2, '0');
serial_putc(2, 'x');
print32((unsigned int)&n);
serial_putc(2, ' ');
serial_putc(2, '0');
serial_putc(2, 'x');
print32((unsigned int)p);
serial_putc(2, ' ');
serial_putc(2, '0');
serial_putc(2, 'x');
print32((unsigned int)hello);
serial_putc(2, '\n');
blue_on(1);
n++;
}
#endif
/* /*
* pull the whole U-Boot image into SDRAM * pull the whole U-Boot image into SDRAM
@ -82,12 +52,9 @@ void start_kboot(void)
while(1) while(1)
blink_led(); blink_led();
serial_putc(2, '0'); /*
serial_putc(2, 'x'); * jump to bootloader_second_phase() running from DRAM copy
print32((unsigned int)bootloader_second_phase); */
serial_putc(2, ' ');
serial_putc(2, '\n');
(phase2)(); (phase2)();
} }