mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
Eros Q Native: Add Original Firmware Boot option
Hold "Play" to boot the OF, or boot it from the recovery menu by holding "Vol. Up". If you had the hosted port installed on your player before installing the native port, you'll still have to go through the hosted bootloader. A couple notes: - When booting from the menu, the recovery menu disappears, then reappears before going into the OF. - You need to hold the play button for like a half second after the blue light comes on in order to get into the OF. The recovery appears to be there, but it doesn't seem to be intended for end users - it just says "Updater V1.1 - Insert TF Pls". I haven't tested it beyond seeing that it boots, so I'm going to comment it out for now. Change-Id: Ie271ee479bb628cc74141b7fe07273b3f193f358
This commit is contained in:
parent
5ffe520de4
commit
7aa2a23b95
4 changed files with 65 additions and 0 deletions
|
@ -29,6 +29,10 @@
|
|||
#include "boot-x1000.h"
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#if defined(EROS_QN)
|
||||
# include "lcd-x1000.c"
|
||||
# include "backlight-target.h"
|
||||
#endif
|
||||
|
||||
void boot_rockbox(void)
|
||||
{
|
||||
|
@ -201,6 +205,24 @@ void boot_of_helper(uint32_t addr, uint32_t flash_size, const char* args)
|
|||
|
||||
gui_shutdown();
|
||||
|
||||
/* The Eros Q needs the LCD initialized in the bootloader */
|
||||
#if defined(EROS_QN)
|
||||
/* enable LCD if it's not yet on, but keep the backlight off to avoid a white flash */
|
||||
init_lcd();
|
||||
backlight_hw_off();
|
||||
|
||||
/* TODO: this doesn't work for some reason */
|
||||
//lcd_clear_display();
|
||||
//lcd_update();
|
||||
//lcd_wait_frame();
|
||||
|
||||
/* disable irq and dma */
|
||||
lcd_enable(false);
|
||||
|
||||
/* set up LCD in a config compatible with OF */
|
||||
lcd_tgt_enable_of(1);
|
||||
#endif
|
||||
|
||||
x1000_dualboot_load_pdma_fw();
|
||||
x1000_dualboot_cleanup();
|
||||
x1000_dualboot_init_clocktree();
|
||||
|
|
|
@ -99,6 +99,19 @@ struct uimage_header;
|
|||
# define BL_QUIT_NAME "POWER"
|
||||
# define BL_SCREENSHOT_NAME "MENU"
|
||||
# define BOOTBACKUP_FILE "/erosqnative-boot.bin"
|
||||
# define OF_PLAYER_NAME "Aigo Player"
|
||||
# define OF_PLAYER_ADDR 0x300000
|
||||
# define OF_PLAYER_LENGTH (6 * 1024 * 1024)
|
||||
# define OF_PLAYER_ARGS OF_RECOVERY_ARGS \
|
||||
" init=/linuxrc ubi.mtd=4 root=ubi0:rootfs ubi.mtd=5 rootfstype=ubifs \
|
||||
sn_no=00000000000000000000000000000000 bt_mac=xxxxxxxxxxxx wifi_mac=xxxxxxxxxxxx rw"
|
||||
# define OF_PLAYER_BTN BUTTON_PLAY
|
||||
/* Note: OF Recovery boots, but is otherwise untested. */
|
||||
//# define OF_RECOVERY_NAME "Aigo Recovery"
|
||||
//# define OF_RECOVERY_ADDR 0x900000
|
||||
//# define OF_RECOVERY_LENGTH (7 * 1024 * 1024)
|
||||
# define OF_RECOVERY_ARGS \
|
||||
"console=ttyS2,115200n8 mem=32M@0x0 no_console_suspend lpj=5009408 ip=off"
|
||||
#else
|
||||
# error "Missing keymap!"
|
||||
#endif
|
||||
|
|
|
@ -102,6 +102,19 @@ static const uint32_t erosqnative_lcd_cmd_enable[] = {
|
|||
LCD_INSTR_END,
|
||||
};
|
||||
|
||||
static const uint32_t erosqnative_lcd_of_compat_cmd[] = {
|
||||
/* Pixel Format Set */
|
||||
LCD_INSTR_CMD, 0x3a,
|
||||
LCD_INSTR_DAT, 0x66, /* 18 bpp */
|
||||
/* Exit Sleep */
|
||||
LCD_INSTR_CMD, 0x11,
|
||||
LCD_INSTR_UDELAY, 120000,
|
||||
/* Display On */
|
||||
LCD_INSTR_CMD, 0x29,
|
||||
LCD_INSTR_UDELAY, 20000,
|
||||
LCD_INSTR_END,
|
||||
};
|
||||
|
||||
/* sleep and wake copied directly from m3k */
|
||||
static const uint32_t erosqnative_lcd_cmd_sleep[] = {
|
||||
/* Display OFF */
|
||||
|
@ -180,6 +193,15 @@ void lcd_tgt_enable(bool enable)
|
|||
}
|
||||
}
|
||||
|
||||
void lcd_tgt_enable_of(bool enable)
|
||||
{
|
||||
/* silence the unused parameter warning */
|
||||
if (enable)
|
||||
{}
|
||||
|
||||
lcd_exec_commands(&erosqnative_lcd_of_compat_cmd[0]);
|
||||
}
|
||||
|
||||
void lcd_tgt_sleep(bool sleep)
|
||||
{
|
||||
if(sleep)
|
||||
|
|
|
@ -105,6 +105,14 @@ extern void lcd_exec_commands(const uint32_t* cmdseq);
|
|||
*/
|
||||
extern void lcd_tgt_enable(bool on);
|
||||
|
||||
/* Enable/disable the LCD controller, but intended for booting the OF.
|
||||
*
|
||||
* This is only used for the Eros Q Native port, as the OF seems to be
|
||||
* unable to initialize the LCD in the kernel boot rather than having
|
||||
* the bootloader do it.
|
||||
*/
|
||||
extern void lcd_tgt_enable_of(bool on);
|
||||
|
||||
/* Enter or exit sleep mode to save power, normally by sending the necessary
|
||||
* commands with lcd_exec_commands().
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue