mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
FS#7977: Bootloader logo for PP-based targets (H10, Sansa, M-Robe 100).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17374 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9560ba6696
commit
940091ae38
5 changed files with 66 additions and 9 deletions
|
@ -33,6 +33,8 @@ rockboxlogo.240x74x16.bmp
|
||||||
rockboxlogo.320x98x16.bmp
|
rockboxlogo.320x98x16.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER /* We don't need these for the bootloader */
|
||||||
|
|
||||||
/* USB logo */
|
/* USB logo */
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
#if LCD_WIDTH > 176
|
#if LCD_WIDTH > 176
|
||||||
|
@ -63,4 +65,6 @@ default_icons.6x8x2.bmp
|
||||||
default_icons.6x8x1.bmp
|
default_icons.6x8x1.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOOTLOADER */
|
||||||
|
|
||||||
#endif /* HAVE_LCD_BITMAP */
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER /* We don't need these for the bootloader */
|
||||||
|
|
||||||
#if (LCD_REMOTE_DEPTH == 1)
|
#if (LCD_REMOTE_DEPTH == 1)
|
||||||
remote_rockboxlogo.128x42x1.bmp
|
remote_rockboxlogo.128x42x1.bmp
|
||||||
remote_usblogo.104x27x1.bmp
|
remote_usblogo.104x27x1.bmp
|
||||||
|
@ -10,4 +12,6 @@ remote_usblogo.104x27x2.bmp
|
||||||
remote_default_icons.6x8x2.bmp
|
remote_default_icons.6x8x2.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOOTLOADER */
|
||||||
|
|
||||||
#endif /* HAVE_REMOTE_LCD */
|
#endif /* HAVE_REMOTE_LCD */
|
||||||
|
|
|
@ -8,11 +8,31 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR) \
|
INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR) \
|
||||||
-I$(BUILDDIR)
|
-I$(BUILDDIR) -I$(BUILDDIR)/bitmaps
|
||||||
|
|
||||||
DEPFILE = $(OBJDIR)/dep-bootloader
|
DEPFILE = $(OBJDIR)/dep-bootloader
|
||||||
LDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/boot.lds
|
LDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/boot.lds
|
||||||
|
|
||||||
|
# Set up the bitmap libraries
|
||||||
|
BITMAPLIBS =
|
||||||
|
LINKBITMAPS =
|
||||||
|
ifneq ($(strip $(BMP2RB_MONO)),)
|
||||||
|
BITMAPLIBS += $(BUILDDIR)/libbitmapsmono.a
|
||||||
|
LINKBITMAPS += -lbitmapsmono
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(BMP2RB_NATIVE)),)
|
||||||
|
BITMAPLIBS += $(BUILDDIR)/libbitmapsnative.a
|
||||||
|
LINKBITMAPS += -lbitmapsnative
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
|
||||||
|
BITMAPLIBS += $(BUILDDIR)/libbitmapsremotemono.a
|
||||||
|
LINKBITMAPS += -lbitmapsremotemono
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
|
||||||
|
BITMAPLIBS += $(BUILDDIR)/libbitmapsremotenative.a
|
||||||
|
LINKBITMAPS += -lbitmapsremotenative
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
DEFINES := -DDEBUG
|
DEFINES := -DDEBUG
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
|
@ -47,6 +67,8 @@ else
|
||||||
all: $(BUILDDIR)/$(BINARY) $(FLASHFILE)
|
all: $(BUILDDIR)/$(BINARY) $(FLASHFILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$(DEPFILE): $(BITMAPLIBS)
|
||||||
|
|
||||||
dep: $(DEPFILE)
|
dep: $(DEPFILE)
|
||||||
|
|
||||||
$(LINKFILE): $(LDS)
|
$(LINKFILE): $(LDS)
|
||||||
|
@ -58,8 +80,22 @@ $(MAXOUTFILE):
|
||||||
$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
|
$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
|
||||||
$(SILENT)rm $(MAXINFILE)
|
$(SILENT)rm $(MAXINFILE)
|
||||||
|
|
||||||
$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
|
build-bitmapsmono:
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
|
$(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C ../apps/bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
|
||||||
|
|
||||||
|
build-bitmapsnative:
|
||||||
|
$(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C ../apps/bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
|
||||||
|
|
||||||
|
build-bitmapsremotemono:
|
||||||
|
$(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C ../apps/bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
|
||||||
|
|
||||||
|
build-bitmapsremotenative:
|
||||||
|
$(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C ../apps/bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
|
||||||
|
|
||||||
|
$(BITMAPLIBS): $(BUILDDIR)/lib%.a: build-%
|
||||||
|
|
||||||
|
$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS)
|
||||||
|
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
|
||||||
|
|
||||||
$(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf
|
$(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf
|
||||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||||
|
@ -76,5 +112,9 @@ clean:
|
||||||
$(call PRINTS,cleaning bootloader)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
|
$(call PRINTS,cleaning bootloader)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
|
||||||
$(OBJDIR)/bootloader.bin $(OBJDIR)/bootloader.elf $(OBJDIR)/*.map \
|
$(OBJDIR)/bootloader.bin $(OBJDIR)/bootloader.elf $(OBJDIR)/*.map \
|
||||||
$(LINKFILE) $(MAXOUTFILE) $(DEPFILE)
|
$(LINKFILE) $(MAXOUTFILE) $(DEPFILE)
|
||||||
|
$(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
|
||||||
|
$(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
|
||||||
|
$(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
|
||||||
|
$(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
|
||||||
|
|
||||||
-include $(DEPFILE)
|
-include $(DEPFILE)
|
||||||
|
|
|
@ -13,6 +13,7 @@ gigabeat-s.c
|
||||||
#ifdef E200R_INSTALLER
|
#ifdef E200R_INSTALLER
|
||||||
main-e200r-installer.c
|
main-e200r-installer.c
|
||||||
#else
|
#else
|
||||||
|
show_logo.c
|
||||||
main-pp.c
|
main-pp.c
|
||||||
#endif
|
#endif
|
||||||
#elif defined(ELIO_TPJ1022)
|
#elif defined(ELIO_TPJ1022)
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
#include "usb_drv.h"
|
#include "usb_drv.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Show the Rockbox logo - in show_logo.c */
|
||||||
|
extern int show_logo(void);
|
||||||
|
|
||||||
/* Button definitions */
|
/* Button definitions */
|
||||||
#if CONFIG_KEYPAD == IRIVER_H10_PAD
|
#if CONFIG_KEYPAD == IRIVER_H10_PAD
|
||||||
|
@ -442,23 +444,27 @@ void* main(void)
|
||||||
|
|
||||||
system_init();
|
system_init();
|
||||||
kernel_init();
|
kernel_init();
|
||||||
|
|
||||||
lcd_init();
|
lcd_init();
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
|
lcd_set_foreground(LCD_WHITE);
|
||||||
|
lcd_set_background(LCD_BLACK);
|
||||||
|
#endif
|
||||||
|
|
||||||
font_init();
|
font_init();
|
||||||
|
show_logo();
|
||||||
|
|
||||||
button_init();
|
button_init();
|
||||||
#if defined(SANSA_E200)
|
#if defined(SANSA_E200)
|
||||||
i2c_init();
|
i2c_init();
|
||||||
_backlight_on();
|
_backlight_on();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
|
||||||
lcd_set_foreground(LCD_WHITE);
|
|
||||||
lcd_set_background(LCD_BLACK);
|
|
||||||
#endif
|
|
||||||
lcd_clear_display();
|
|
||||||
|
|
||||||
if (button_hold())
|
if (button_hold())
|
||||||
{
|
{
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
lcd_clear_display();
|
||||||
printf("Hold switch on");
|
printf("Hold switch on");
|
||||||
printf("Shutting down...");
|
printf("Shutting down...");
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
|
@ -468,8 +474,10 @@ void* main(void)
|
||||||
btn = button_read_device();
|
btn = button_read_device();
|
||||||
|
|
||||||
/* Enable bootloader messages if any button is pressed */
|
/* Enable bootloader messages if any button is pressed */
|
||||||
if (btn)
|
if (btn) {
|
||||||
|
lcd_clear_display();
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(SANSA_E200) || defined(SANSA_C200)
|
#if defined(SANSA_E200) || defined(SANSA_C200)
|
||||||
#if !defined(USE_ROCKBOX_USB)
|
#if !defined(USE_ROCKBOX_USB)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue