diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-03 18:17:11 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-09 12:41:18 -0400 |
commit | aabc8aca47e60cf745a34af28c50679fcb967910 (patch) | |
tree | cfe17f546aae9785fb13482f39527e2da0597ccb /bootloader | |
parent | 4231c2c83f2b5331e3e38b10a308ee3752315f9c (diff) |
New port: FiiO M3K
Most credit goes to: Roman Skylarov
Additional integration and refactoring by myself.
*** COMPLETELY UNTESTED ***
Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/SOURCES | 2 | ||||
-rw-r--r-- | bootloader/rocker_linux.c | 31 |
2 files changed, 29 insertions, 4 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES index b0d3e26e07..e52c6e782a 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES @@ -76,7 +76,7 @@ show_logo.c mpio_hd200_hd300.c #elif defined(SONY_NWZ_LINUX) nwz_linux.c -#elif defined(AGPTEK_ROCKER) || defined(XDUOO_X3II) || defined(XDUOO_X20) +#elif defined(AGPTEK_ROCKER) || defined(XDUOO_X3II) || defined(XDUOO_X20) || defined(FIIO_M3K) rocker_linux.c #elif defined(RK27_GENERIC) || defined(HM60X) || defined(HM801) \ || defined(MA9) || defined(MA9C) || defined(MA8) || defined(MA8C) \ diff --git a/bootloader/rocker_linux.c b/bootloader/rocker_linux.c index e3985ce100..4abc88c413 100644 --- a/bootloader/rocker_linux.c +++ b/bootloader/rocker_linux.c @@ -51,23 +51,42 @@ #define ICON_WIDTH 70 #define ICON_HEIGHT 70 #define RBFILE "rockbox.rocker" +#define ICON_NAME bm_hibyicon +#define OF_NAME "HIBY PLAYER" +#include "bitmaps/hibyicon.h" #elif defined(XDUOO_X3II) #define ICON_WIDTH 130 #define ICON_HEIGHT 130 #define RBFILE "rockbox.x3ii" +#define ICON_NAME bm_hibyicon +#define OF_NAME "HIBY PLAYER" +#include "bitmaps/hibyicon.h" #elif defined(XDUOO_X20) #define ICON_WIDTH 130 #define ICON_HEIGHT 130 #define RBFILE "rockbox.x20" +#define ICON_NAME bm_hibyicon +#define OF_NAME "HIBY PLAYER" +#include "bitmaps/hibyicon.h" +#elif defined(FIIO_M3K) +#define ICON_WIDTH 130 +#define ICON_HEIGHT 130 +#define RBFILE "rockbox.fiiom3k" +#define ICON_NAME bm_fiioicon +#define OF_NAME "FIIO PLAYER" +#include "bitmaps/fiioicon.h" #else #error "must define ICON_WIDTH/HEIGHT" #endif +#ifdef FIIO_M3K +#define BASE_DIR "/mnt" +#else #define BASE_DIR "/mnt/sd_0" +#endif /* images */ #include "bitmaps/rockboxicon.h" -#include "bitmaps/hibyicon.h" #include "bitmaps/toolsicon.h" /* don't issue an error when parsing the file for dependencies */ @@ -79,6 +98,10 @@ BMPHEIGHT_hibyicon != ICON_HEIGHT) #error hibyicon has the wrong resolution #endif +#if defined(BMPWIDTH_fiioicon) && (BMPWIDTH_fiioicon != ICON_WIDTH || \ + BMPHEIGHT_fiioicon != ICON_HEIGHT) +#error fiioicon has the wrong resolution +#endif #if defined(BMPWIDTH_toolsicon) && (BMPWIDTH_toolsicon != ICON_WIDTH || \ BMPHEIGHT_toolsicon != ICON_HEIGHT) #error toolsicon has the wrong resolution @@ -148,6 +171,8 @@ static int get_inactivity_tmo(void) else #endif return 10 * HZ; /* Inactivity timeout when not on hold */ + + // XXX if booting the last selection, use a short timeout? } /* return action on idle timeout */ @@ -229,11 +254,11 @@ static enum boot_mode get_boot_mode(void) } lcd_set_foreground(LCD_RGBPACK(255, 201, 0)); /* display icon */ - const struct bitmap *icon = (mode == BOOT_OF) ? &bm_hibyicon : + const struct bitmap *icon = (mode == BOOT_OF) ? &ICON_NAME : (mode == BOOT_ROCKBOX) ? &bm_rockboxicon : &bm_toolsicon; lcd_bmp(icon, (LCD_WIDTH - ICON_WIDTH) / 2, get_icon_y()); /* display bottom description */ - const char *desc = (mode == BOOT_OF) ? "HIBY PLAYER" : + const char *desc = (mode == BOOT_OF) ? OF_NAME : (mode == BOOT_ROCKBOX) ? "ROCKBOX" : "TOOLS"; int desc_height; |