release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > MultibootBootloader

Multiboot Firmware - Load Rockbox from SD card

Supported Players

Clip+ ClipZip, Fuze+ Fuzev1 and Currently only for select players; The list of supported players may eventually be expanded

Purpose

Multiboot bootloader and firmware allows SD card boot. By putting the multi-boot bootloader on your device you can still run Rockbox from the internal memory like normal. Alternatively by using a special firmware build that allows the boot drive to be passed from the bootloader you can run Rockbox from a SD card

Supported Firmware Versions

Edit 11-15-2019:
Dev versions of the firmware now include redirect code
simply place the .rockbox folder and rockbox_main.<playername> on the root of the SD card and you should be good to go

How to Use

The proper layout of file: rockbox_main.<playername> is imperative 
The Redirect file either needs to be completely empty for the root of the SD card or a single slash '/' this will instruct the bootloader to look in SD/.rockbox _
The text editor within RB seems to add a (EOF) as does linux so use 'touch rockbox_main.<playername>'in linux
or simply put a single forward slash in the file '/' (no quotes)

Redirect file will not work on internal drive (whatever is default boot drive)

Clip+ User:

Unzip .rockbox folder to the root of your SD card Create an empty file called rockbox_main.clip+ in the root of the SD card now put sd card in device and reboot

Fuze+ User:

Unzip .rockbox folder to the root of your SD card Create an empty file called rockbox_main.fuze+ in the root of the SD card now put sd card in device and reboot

ClipZip User:

Unzip .rockbox folder to the root of your SD card Create an empty file called rockbox_main.clipzip in the root of the SD card now put sd card in device and reboot'.

FuzeV2 User:

Unzip .rockbox folder to the root of your SD card Create an empty file called rockbox_main.fuze2 in the root of the SD card now put sd card in device and reboot

Check if Rockbox is running from SD card

Under Debug menu you should have an entry 'Bootdata' that lists the current boot drive with the message CRC OK!
if not check that the rockbox_main.<playername> file is actually empty or single slash '/'

Notes:

Volume with the highest index containing redirect file will be loaded first.

Firmware file is checked for boot data region. If bootdata region is missing, firmware image will not be loaded.

On failure or if no redirect file is found load will fallback to internal drive

As a safety feature a blank file, a single '/' or a /<directory> needs to be in the redirect file otherwise internal storage is loaded

Firmware (.rockbox directory) may be copied to the sd card while still in device no need to actually remove the card to copy the firmware to it

Bootloader file goes in root of the internal storage on these 3 devices, the Fuze+ however, needs to be in Original FW USB mode to recognize the addition of a new boot loader file (firmware.sb)

ROLO reboot after transferring the firmware is not supported yet so you need to actually turn off and turn on the player.

The proper layout of file: rockbox_main.<playername> is imperative 
The Redirect file either needs to be completely empty for the root of the SD card or a single slash '/' this will instruct the bootloader to look in SD/.rockbox _
The text editor within RB seems to add a (EOF) as does linux so use 'touch rockbox_main.<playername>'in linux
or simply put a single forward slash in the file '/' (no quotes)

Redirect file will not work on internal drive (whatever is default boot drive)

Advanced:

with a custom build you can also redirect the firmware to a different directory on the sdcard with Redirect file
rockbox_main.<playername>
should again be placed in root of drive you would like to be main, if this file empty or there is no leading slash firmware will be loaded from /.rockbox in root of the internal drive
If instead a /<*DIRECTORY*> is supplied in rockbox_main.<playername> then
firmware will be loaded from /<dir>/.rockbox/

The directory can have multiple levels however leading slash MUST be included trailing slash can be omitted (eg. /test/.rockbox would be simply '/test' in the redirect file)

How does it work?

_(FW = the /.rockbox firmware)_

[Bootloader]
Looks for FW to load (it starts at the highest drive index)
In the root of each drive /rockbox_main. can specify a directory to look for the FW
if it finds a .rockbox directory [based on the data in the redirect file] then it generates a CRC and fills in a special data struct with the crc and what volume the FW was found on
*[end of boot loader]* FW was loaded to memory and booted either the FW on internal or the sd card

[FIRMWARE] -> with a valid redirect file and fimware
FW does its init -- Looks for the special memory left by bootloader
FW Checks to see if the CRC it generates matches the CRC generated by the bootloader
CRC OK - FW makes note of where it is running from and sets path accordingly directs writes/reads there
CRC BAD - As far as FW is concerned it resides on the internal memory directs writes/reads there

[FW LOAD FAILED] The bootloader returns and tries again this time falling back to the original behavior

r1 - 29 Mar 2020 - 20:03:17 - WilliamWilgus

Copyright © by the contributing authors.