From 7b827aa925d855add3a9dbf13f5a1d2c03328953 Mon Sep 17 00:00:00 2001 From: Ave O Date: Sun, 19 Aug 2018 14:13:22 +0300 Subject: [PATCH] Allow disabling inclusion of default splash Saves ~7k --- Makefile | 2 +- bootloader/gfx/logos.h | 3 +++ bootloader/main.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 86ec266..e69bc9e 100755 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ OBJS += $(addprefix $(BUILD)/$(TARGET)/, \ ) ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork -CUSTOMDEFINES := -DMENU_LOGO_ENABLE #-DDEBUG +CUSTOMDEFINES := #-DSPLASH_ENABLE #-DMENU_LOGO_ENABLE #-DDEBUG CFLAGS = $(ARCH) -O2 -nostdlib -flto -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -std=gnu11 -Wall $(CUSTOMDEFINES) LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections diff --git a/bootloader/gfx/logos.h b/bootloader/gfx/logos.h index f57cfa5..f27fbd4 100644 --- a/bootloader/gfx/logos.h +++ b/bootloader/gfx/logos.h @@ -501,6 +501,8 @@ static unsigned char Kc_MENU_LOGO_blz[SZ_MENU_LOGO_BLZ] = { #endif //MENU_LOGO_ENABLE + +#ifdef SPLASH_ENABLE // 68 x 192 @8bpp Grayscale RAW. #define X_BOOTLOGO 68 #define Y_BOOTLOGO 192 @@ -927,5 +929,6 @@ static u8 BOOTLOGO_BLZ[SZ_BOOTLOGO_BLZ] = { 0x1C, 0x1C, 0x1C, 0x1D, 0x0E, 0x1C, 0x0A, 0xA0, 0x1B, 0x03, 0x30, 0x00, 0x00, 0x1B, 0x1B, 0x1B, 0x1A, 0xFF, 0xFF, 0xFF, 0x30, 0x1A, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0xD0, 0x18, 0x00, 0x00 }; +#endif //SPLASH_ENABLE #endif diff --git a/bootloader/main.c b/bootloader/main.c index 14ab035..b8c8941 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -2063,6 +2063,7 @@ void auto_launch_firmware() gfx_render_bmp_argb(&gfx_ctxt, (u32 *)BOOTLOGO, bmpData.size_x, bmpData.size_y, bmpData.pos_x, bmpData.pos_y); } + #ifdef SPLASH_ENABLE else { BOOTLOGO = (void *)malloc(0x4000); @@ -2070,6 +2071,7 @@ void auto_launch_firmware() gfx_set_rect_grey(&gfx_ctxt, BOOTLOGO, X_BOOTLOGO, Y_BOOTLOGO, 326, 544); free(BOOTLOGO); } + #endif free(BOOTLOGO); display_backlight(true);