From 53a92f0ecce72ec92084a23a4f22679d2c01e22a Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 5 Mar 2022 13:52:11 +0000 Subject: x1000: bootloader: add original firmware boot capability Adds the ability to boot the OF's player or recovery kernels from the bootloader. Works on Shanling Q1 but broken on the FiiO M3K (kernel hang) so leave it disabled for the M3K. Change-Id: I26b973fba1c22afb906a78865963a96dd2107932 --- bootloader/x1000/x1000bootloader.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bootloader/x1000/x1000bootloader.h') diff --git a/bootloader/x1000/x1000bootloader.h b/bootloader/x1000/x1000bootloader.h index 9090523c14..88d4e3585b 100644 --- a/bootloader/x1000/x1000bootloader.h +++ b/bootloader/x1000/x1000bootloader.h @@ -41,6 +41,17 @@ struct uimage_header; # define BL_SELECT_NAME "PLAY" # define BL_QUIT_NAME "POWER" # define BOOTBACKUP_FILE "/fiiom3k-boot.bin" +// FIXME: OF kernel hangs on the m3k +//# define OF_PLAYER_NAME "FiiO player" +# define OF_PLAYER_ADDR 0x20000 +# define OF_PLAYER_LENGTH (4 * 1024 * 1024) +# define OF_PLAYER_ARGS OF_RECOVERY_ARGS \ + " init=/linuxrc ubi.mtd=3 root=ubi0:rootfs ubi.mtd=4 rootfstype=ubifs rw loglevel=8" +//# define OF_RECOVERY_NAME "FiiO recovery" +# define OF_RECOVERY_ADDR 0x420000 +# define OF_RECOVERY_LENGTH (5 * 1024 * 1024) +# define OF_RECOVERY_ARGS \ + "mem=64M@0x0 no_console_suspend console=ttyS2,115200n8 lpj=5009408 ip=off" #elif defined(SHANLING_Q1) # define BL_RECOVERY BUTTON_NEXT # define BL_UP BUTTON_PREV @@ -52,6 +63,16 @@ struct uimage_header; # define BL_SELECT_NAME "PLAY" # define BL_QUIT_NAME "POWER" # define BOOTBACKUP_FILE "/shanlingq1-boot.bin" +# define OF_PLAYER_NAME "Shanling player" +# define OF_PLAYER_ADDR 0x140000 +# define OF_PLAYER_LENGTH (8 * 1024 * 1024) +# define OF_PLAYER_ARGS OF_RECOVERY_ARGS \ + " init=/linuxrc ubi.mtd=5 root=ubi0:rootfs ubi.mtd=6 rootfstype=ubifs rw" +# define OF_RECOVERY_NAME "Shanling recovery" +# define OF_RECOVERY_ADDR 0x940000 +# define OF_RECOVERY_LENGTH (10 * 1024 * 1024) +# define OF_RECOVERY_ARGS \ + "mem=64M@0x0 no_console_suspend console=ttyS2,115200n8 lpj=5009408 ip=off" #elif defined(EROS_QN) # define BL_RECOVERY BUTTON_VOL_UP # define BL_UP BUTTON_SCROLL_BACK @@ -118,6 +139,8 @@ void bootloader_restore(void); */ void boot_rockbox(void); +void boot_of_player(void); +void boot_of_recovery(void); void shutdown(void); void reboot(void); -- cgit v1.2.3