Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
c8493720
Commit
c8493720
authored
May 24, 2013
by
Henrik Nordstrom
Browse files
felboot: Move closer to u-boot build structure, reducing source size even further
parent
7c056093
Changes
2
Hide whitespace changes
Inline
Side-by-side
felboot/Makefile
View file @
c8493720
...
@@ -20,11 +20,14 @@ all: fel-boot-$(BOARD).bin
...
@@ -20,11 +20,14 @@ all: fel-boot-$(BOARD).bin
UBOOT_OBJS
=
\
UBOOT_OBJS
=
\
spl/arch/arm/cpu/armv7/sunxi/libsunxi.o
\
spl/arch/arm/cpu/armv7/sunxi/libsunxi.o
\
spl/arch/arm/cpu/armv7/syslib.o
\
spl/arch/arm/cpu/armv7/libarmv7.o
\
spl/arch/arm/lib/libarm.o
\
spl/arch/arm/lib/eabi_compat.o
\
spl/arch/arm/lib/eabi_compat.o
\
spl/drivers/power/libpower.o
\
spl/drivers/power/libpower.o
\
spl/drivers/i2c/libi2c.o
\
spl/drivers/i2c/libi2c.o
\
spl/common/memsize.o
\
spl/common/libcommon.o
\
spl/common/spl/libspl.o
\
spl/lib/libgeneric.o
\
spl/board/sunxi/libsunxi.o
spl/board/sunxi/libsunxi.o
.c.o
:
.c.o
:
...
@@ -35,11 +38,11 @@ OBJS += main.o
...
@@ -35,11 +38,11 @@ OBJS += main.o
ifeq
($(NO_PRINTF),1)
ifeq
($(NO_PRINTF),1)
CFLAGS
+=
-DNO_PRINTF
CFLAGS
+=
-DNO_PRINTF
else
else
OBJS
+=
printf-stdarg.o
early_print.o
OBJS
+=
early_print.o
endif
endif
fel-boot-$(BOARD).elf
:
$(OBJS) $(addprefix $(UBOOTOBJ)
,
$(UBOOT_OBJS))
fel-boot-$(BOARD).elf
:
$(OBJS) $(addprefix $(UBOOTOBJ)
,
$(UBOOT_OBJS))
$(CROSS_COMPILE)$(CC)
-Tfel-boot
.ld
-static
-nostartfiles
$(CFLAGS)
-Wl
,-Map
=
$@
.map
-o
$@
$(OBJS)
-Wl
,--start-group
$(
addprefix
$(UBOOTOBJ)
,
$(UBOOT_OBJS)
)
-Wl
,--end-group
$(CROSS_COMPILE)$(CC)
-Tfel-boot
.ld
-static
-Wl
,--gc-sections
-nostartfiles
-nostdlib
$(CFLAGS)
-Wl
,-Map
=
$@
.map
-o
$@
$(OBJS)
-Wl
,--start-group
$(
addprefix
$(UBOOTOBJ)
,
$(UBOOT_OBJS)
)
-lgcc
-Wl
,--end-group
fel-boot-$(BOARD).bin
:
fel-boot-$(BOARD).elf
fel-boot-$(BOARD).bin
:
fel-boot-$(BOARD).elf
$(CROSS_COMPILE)
objcopy
-O
binary
$<
$@
$(CROSS_COMPILE)
objcopy
-O
binary
$<
$@
...
...
felboot/main.c
View file @
c8493720
...
@@ -25,34 +25,6 @@ __attribute__ ((section (".text.start"))) void _start(void)
...
@@ -25,34 +25,6 @@ __attribute__ ((section (".text.start"))) void _start(void)
s_init
();
s_init
();
}
}
gd_t
gdata
__attribute__
((
section
(
".data"
)));
void
dcache_enable
(
void
)
{
}
void
sunxi_wemac_initialize
(
void
)
{
}
void
preloader_console_init
(
void
)
{
uart_init
();
puts
(
"
\n
U-Boot FEL "
PLAIN_VERSION
" ("
U_BOOT_DATE
" - "
\
U_BOOT_TIME
")
\n
"
);
}
void
hang
(
void
)
{
printf
(
"Please reset the board!"
);
while
(
1
);
}
void
udelay
(
unsigned
long
usec
)
{
__udelay
(
usec
);
}
int
sunxi_mmc_init
(
void
)
int
sunxi_mmc_init
(
void
)
{
{
return
-
1
;
return
-
1
;
...
@@ -63,7 +35,12 @@ void status_led_set(int led, int state)
...
@@ -63,7 +35,12 @@ void status_led_set(int led, int state)
return
;
return
;
}
}
#ifndef NO_PRINTF
int
serial_init
(
void
)
{
uart_init
();
return
0
;
}
void
putchar
(
int
ch
)
void
putchar
(
int
ch
)
{
{
if
(
ch
==
'\n'
)
if
(
ch
==
'\n'
)
...
@@ -71,28 +48,9 @@ void putchar(int ch)
...
@@ -71,28 +48,9 @@ void putchar(int ch)
uart_putc
(
ch
);
uart_putc
(
ch
);
}
}
void
puts
(
const
char
*
str
)
void
serial_
puts
(
const
char
*
str
)
{
{
while
(
*
str
)
while
(
*
str
)
putchar
(
*
str
++
);
putchar
(
*
str
++
);
}
}
#else
void
putchar
(
int
ch
)
{
}
void
puts
(
const
char
*
str
)
{
}
int
printf
(
const
char
*
fmt
,
...)
{
return
-
1
;
}
void
uart_init
(
void
)
{
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment