Commit ab5089a1 authored by Henrik Nordstrom's avatar Henrik Nordstrom
Browse files

felboot: NO_PRINTF=1 make option to disable printf for smaller code size

parent de093ee7
...@@ -30,7 +30,15 @@ UBOOT_OBJS= \ ...@@ -30,7 +30,15 @@ UBOOT_OBJS= \
.c.o: .c.o:
$(CROSS_COMPILE)$(CC) -c $(CFLAGS) $< -o $@ $(CROSS_COMPILE)$(CC) -c $(CFLAGS) $< -o $@
fel-boot-$(BOARD).elf: main.o printf-stdarg.o early_print.o $(addprefix $(UBOOTOBJ),$(UBOOT_OBJS)) OBJS += main.o
ifeq ($(NO_PRINTF),1)
CFLAGS += -DNO_PRINTF
else
OBJS += printf-stdarg.o early_print.o
endif
fel-boot-$(BOARD).elf: $(OBJS) $(addprefix $(UBOOTOBJ),$(UBOOT_OBJS))
$(CROSS_COMPILE)$(CC) -Tfel-boot.ld -static -nostartfiles $(CFLAGS) -Wl,-Map=$@.map $^ -o $@ $(CROSS_COMPILE)$(CC) -Tfel-boot.ld -static -nostartfiles $(CFLAGS) -Wl,-Map=$@.map $^ -o $@
fel-boot-$(BOARD).bin: fel-boot-$(BOARD).elf fel-boot-$(BOARD).bin: fel-boot-$(BOARD).elf
......
...@@ -28,6 +28,9 @@ Build instructions: ...@@ -28,6 +28,9 @@ Build instructions:
make BOARD=cubieboard CROSS_COMPILE=arm-linux-gnueabihf- UBOOT=~/SRC/u-boot/ UBOOTOBJ=~/SRC/u-boot/build/'$(BOARD)'/ make BOARD=cubieboard CROSS_COMPILE=arm-linux-gnueabihf- UBOOT=~/SRC/u-boot/ UBOOTOBJ=~/SRC/u-boot/build/'$(BOARD)'/
Other options
NO_PRINTF=1 Disable printf, reducing the code size a bit
Defaults: Defaults:
# Target board name. This should match the dram_<boardname>.c in # Target board name. This should match the dram_<boardname>.c in
......
...@@ -38,9 +38,6 @@ void sunxi_wemac_initialize(void) ...@@ -38,9 +38,6 @@ void sunxi_wemac_initialize(void)
{ {
} }
void *gd;
int gdata;
void preloader_console_init(void) void preloader_console_init(void)
{ {
} }
...@@ -55,6 +52,18 @@ void udelay(unsigned long usec) ...@@ -55,6 +52,18 @@ void udelay(unsigned long usec)
__udelay(usec); __udelay(usec);
} }
int sunxi_mmc_init(void)
{
return -1;
}
int status_led_set(void)
{
return -1;
}
#ifndef NO_PRINTF
int putchar(int ch) int putchar(int ch)
{ {
return uart_putc(ch); return uart_putc(ch);
...@@ -65,12 +74,24 @@ int puts(const char *str) ...@@ -65,12 +74,24 @@ int puts(const char *str)
return uart_puts(str); return uart_puts(str);
} }
int sunxi_mmc_init(void) #else
int putchar(int ch)
{ {
return -1; return -1;
} }
int status_led_set(void) int puts(const char *str)
{
return -1;
}
int printf(const char *fmt, ...)
{ {
return -1; return -1;
} }
void uart_init(void)
{
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment