Rockbox Technical Forums

Third Party => Unsupported Builds => Topic started by: Bilgus on July 10, 2017, 07:44:27 PM

Title: SANSA ClipZip Clip+ Fuze+ FuzeV2 Multiboot Bootloader and Firmware
Post by: Bilgus on July 10, 2017, 07:44:27 PM
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 and you can even direct the bootloader to run the firmware from a
different root folder within the sd card.

Currently only for select players; The list of supported players will eventually be expanded.

For those of you who can compile your own builds see:
(Gerrit) g#1556 g#1613
for the requisite patches

Clip+, Fuze+, FuzeV2, ClipZip users I have compiled everything you need, builds are at this link:
https://www.mediafire.com/folder/jmkihef72v62p/Multiboot_Bootloaders
http://www.mediafire.com/folder/x9hvpqrmfx76n/Multiboot_Firmware
https://www.mediafire.com/folder/bt7aow95pwlo8/MultiBoot_Bootloaders

The proper layout of file: rockbox_main.<playername> is imperative;
The 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)


Clip+ User:
First download clppa_MBOOT.zip
unzip the file clppa_new.bin to root of internal storage rename as clppa.bin,
safely remove device then reboot and enter original firmware ( left button on DPAD )
wait till device turns off
Next download MultiBoot_FW_ClipPLUS [latest date]_rockbox-full.zip and unzip to the root of your SD card
Finally create an empty file called rockbox_main.clip+ in the root of the SD card
now put sd card in device and reboot; Under Debug menu you should have a new entry 'Bootdata' that lists the current boot drive
if not check that the rockbox_main.clip+ file is actually empty or single slash '/'.

Fuze+ User:
First download fuzeplus_MBOOT.zip
enter original firmware ( Volume Down )
unzip the file firmware_new.sb to root of internal storage while connected in the Original Firmware USB MODE rename as firmware.sb,
safely remove device then reboot and again enter original firmware ( Volume Down )
wait till device turns off
Next download MultiBoot_FW_Fuze+ [latest date]_rockbox-full.zip and unzip to the root of your SD card
Finally create an empty file called rockbox_main.fuze+ in the root of the SD card
now put sd card in device and reboot; Under Debug menu you should have a new entry 'Bootdata' that lists the
current boot drive if not check that the rockbox_main.fuze+ file is actually empty or single slash '/'.

ClipZip User:
First download clpza_MBOOT.zip
unzip the file clpza_new.bin to root of internal storage rename as clpza.bin,
safely remove device then reboot and enter original firmware ( left button on DPAD? )
wait till device turns off
Next download MultiBoot_FW_ClipZip [latest date]_rockbox-full.zip and unzip to the root of your SD card
Finally create an empty file called rockbox_main.clipzip in the root of the SD card
now put sd card in device and reboot; Under Debug menu you should have a new entry 'Bootdata' that lists the current boot drive
if not check that the rockbox_main.clipzip file is actually empty or single slash '/'.

FuzeV2 User:
First download fuze_v2_MBOOT.zip
unzip the file fuzpa_new.bin to root of internal storage rename as fuzpa.bin,
safely remove device then reboot and enter original firmware ( Left on the click wheel while powering on )
wait till device turns off
Next download MultiBoot_FW_FuzeV2_[latest date]_rockbox-full.zip and unzip to the root of your SD card
Finally create an empty file called rockbox_main.fuze2 in the root of the SD card
now put sd card in device and reboot; Under Debug menu you should have a new entry 'Bootdata' that lists the current boot drive
if not check that the rockbox_main.fuze2 file is actually empty or single slash '/'.

Advanced:
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.<name> 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)

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

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 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)
Title: USB bootloader mode vs regular USB mode (Clip+)
Post by: Orbiter on August 08, 2017, 11:14:18 AM
I have installed a special Rockbox build that boots from an external SD card (reported version fc9c7d7M-170228). When I take out the SD card and then power on the player, it switches into "Bootloader USB mode".
In this mode, the player is recognized as an external drive. But when I put the SD card back and restart Rockbox,
 it does not show up in the computer.
Is there a way to make the USB connection work in regular mode, provided it works in the bootloader mode?
Title: Re: USB bootloader mode vs regular USB mode (Clip+)
Post by: johnb on August 08, 2017, 12:35:30 PM
The version fc9c7d7M-170228 is only mounting the external drive. I am using that on purpose.

Are you sure you have RB put onto the internal drive at all, i.e. is there a .rockbox directory with content?
If so, you can simply (re)move the rockbox_main.clip+ on the SD root and next time it should boot from internal.


If not you can download a newer version which boots from SD and shows both internal and external from here:
http://www.mediafire.com/file/ulqkbvq64a819rp/MultiBoot_FW_Clip%2B_5-22-17_rockbox-full.zip 
by Bilgus.


Title: Re: USB bootloader mode vs regular USB mode (Clip+)
Post by: Orbiter on August 10, 2017, 09:25:00 AM
Thanks for the detailed explanation, but booting is not the problem. The problem is that the player does not show up as an external
USB drive and I cannot transfer audio files to it when it boots normally.
In USB bootloader mode it is recognized as two drives, one of which is the internal drive, and the other is probably the SD card slot.
So the question is how to make the player show up as an external drive under normal boot.
Currently it does not even appear as 'Unknown device', plugging it in has no effect.
Title: Re: USB bootloader mode vs regular USB mode (Clip+)
Post by: johnb on August 10, 2017, 12:07:59 PM
Have you hidden the internal drive?:
https://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildch8.html#x10-1500008.5.9

Try and clear the .rockbox/config.cfg file or check whether you find the relevant line/setting in there ...
Title: Re: SANSA CLIP+ FUZE+ FUZEV2 ZIP: Bilgus Multiboot Bootloader and Firmware
Post by: saratoga on August 18, 2017, 10:54:30 AM
They are entries on our gerrit server here:

http://gerrit.rockbox.org/r/
Title: How To: Compiling Multiboot Firmware
Post by: Bilgus on August 22, 2017, 03:27:53 PM
You are going to want to see https://www.rockbox.org/wiki/WorkingWithPatches

When you go into gerrit you will want to click Download and save the patch files

Multiboot Firmware
http://gerrit.rockbox.org/r/#/c/1556/
http://gerrit.rockbox.org/r/#/c/1613/

They will need to be applied in sequence so save them and add a sequential number at the end eg. 1;2;3
[they download as zip files so do this as you unzip them as well]

So first lets start from a clean branch
note: if you already have stuff going on you will need to commit it or 'git stash ; All the below commands ; git stash pop'

type
Code: [Select]
git checkout master
git pull --rebase
git checkout -b multibootFW
patch -p1 < /path/to/fab3535-1.diff <-repeat for each patch
patch -p1 < /path/to/78d621f-2.diff


next after you are done adding the patches to your build (you might need -p0 or -p2 instead of -p1)
it is time to compile the firmware

so from the root of your rockbox dir ~/Desktop/rockbox for instance
type
Code: [Select]
mkdir <yourplayer>-multibootFW
cd clipzip-multibootFW
../tools/configure

then type the number of your player from the list for instance the clip zip is #65 so I type 65 then hit enter
next type 'N' for normal build
and finally type
Code: [Select]
make -j && make fullzip
this zip will get unzipped to your sd card

If you are continuing with other builds you will want to commit these edits

Type '..' to return to the root folder
first type 'git status' to get a list of the modified files
make sure the files don't start with ../ or you will need to go up a level by typing '..'
type
git add <fullfilepath>(..For each of the files we just patched)

OR if you FOR SURE don't have any other modified files
type
Code: [Select]
git add `git status | grep modified | sed 's/\(.*modified:\s*\)//'`

Finally type 'git commit'
add some text for description at the top (note empty commits do not save)
then hit CTRL 'o' and press enter to write commit message then press CTRL 'x' to exit

after all is done you can go back to master 'git checkout master'
and then start on your next branch git checkout -b <my totally awesome edits>'
or go back to your previous work and type git stash pop ( if you stashed work )

Thanks @ [Saint]

Multiboot Bootloader [Most likely You won't need this use the precompiled bootloader instead]

You risk bricking your player if you mess up a bootloader build

Although most of these players do have recovery modes You Have Been Warned

Bootloader code is now in dev builds
Title: Re: SANSA CLIP+ FUZE+ FUZEV2 ZIP: Bilgus Multiboot Bootloader and Firmware
Post by: Bilgus on September 04, 2017, 11:53:13 AM
I edited the instructions for building the multiboot firmware
Title: Re: SANSA ClipZip Clip+ Fuze+ FuzeV2 Multiboot Bootloader and Firmware
Post by: Bilgus on November 18, 2018, 02:29:43 PM
Update the firmware builds to the latest Dev version as of 11-17-2018