Rockbox Technical Forums

Installation / Removal => Manual Installation => Other - Installation/Removal => Topic started by: amachronic on May 15, 2021, 01:16:40 PM

Title: FiiO M3K Install (Native port)
Post by: amachronic on May 15, 2021, 01:16:40 PM
Official FiiO M3K Native installation instructions
There is now a prebuilt bootloader available for the FiiO M3K native port! jztool binaries are currently provided for Windows, Mac, and Linux.

If you encounter any issues, spot mistakes, or have suggestions for improvements don't hesitate to get in touch.

Update June 14, 2021
Dual boot support was added! You can now boot the original FiiO firmware alongside Rockbox, useful if you want to use the USB DAC feature or the microphone for recording. If you've already installed an earlier version of the Rockbox bootloader, you can update to the latest version using the recovery menu, accessed by holding Vol+ while booting. Just copy bootloader.m3k to the root of your SD card, and pick "Install/update bootloader" from the recovery menu.

To access the FiiO firmware, hold the Play button while booting. You can access the FiiO recovery mode by holding Play and Vol+ while booting, in case you need to update the FiiO firmware. Be warned that updating with the FiiO recovery mode will erase the Rockbox bootloader and you will need to install it again using jztool.

How to install
First, download the Rockbox bootloader bootloader.m3k and the installation utility jztool for your platform. You will need to refer to the bootloader file later on the command line so it's recommended to put both files in the same folder.

Next, connect the M3K in USB boot mode: plug in one end of the USB cable, and then plug in the other end while holding down the Volume Down button. If you did it correctly then the button light will turn on and the LCD will remain off. Since the USB boot mode is very low level, you might not see any indication on your computer that a USB device was plugged in.

Windows users should now follow the USB driver installation instructions below, before running jztool.

To load the Rockbox bootloader, open a terminal / command prompt in the folder where you downloaded jztool and run the command below. If you have put bootloader.m3k in different folder, you will have to adjust the path accordingly.

Windows:
Code: [Select]
jztool.exe fiiom3k load bootloader.m3k

Linux and Mac: (Linux users will need to run jztool as root, eg. with sudo or su -c)
Code: [Select]
./jztool fiiom3k load bootloader.m3k

You should see the Rockbox recovery menu appear on your M3K. If this doesn't happen, check the terminal window for errors. Should you encounter repeated problems loading the bootloader please post here so we can be aware of the problem.

It is highly recommended that you take a backup of the original firmware's bootloader using the "Backup bootloader" option before installing, just in case anything goes wrong or you need to restore the old bootloader for any reason. The backup file fiiom3k-boot.bin will be placed on the root of your SD card, make sure to copy it to your computer and keep it safe somewhere. If you need to restore the bootloader, copy the backup file to your SD card and repeat the steps above to re-load the Rockbox bootloader. Then pick "Restore bootloader" from the menu.

To install the Rockbox bootloader, copy bootloader.m3k to the root of a FAT32-formatted SD card and plug it into your M3K, and choose "Install/update bootloader" from the recovery menu. Once the bootloader is installed, you can access the recovery menu by holding Volume Up while powering on the M3K.

Assuming everything went smoothly, your M3K is now Rockboxed! Simply unzip a Rockbox build to your SD card and enjoy.

Windows USB driver installation
jztool uses a library called libusb to access the M3K in its USB boot mode, and on Windows you need to enable the WinUSB driver for the M3K to make it accessible by libusb. WinUSB is a Microsoft driver and comes bundled with Windows, but unfortunately it's not easy to enable it directly, as it's intended to be "installed" by 3rd party applications as needed.

The recommended way to install the driver is using Zadig, a tool dedicated to installing various USB drivers on Windows for libusb-based applications (download link is at the end of the post). Zadig will require administrator access on the machine you're using. Also note that Zadig is not supported or maintained by the Rockbox developers, so we generally cannot provide support for any Zadig-specific issues you might encounter.

After connecting the M3K to your computer in USB boot mode, open Zadig and select the M3K from the drop down menu. Note the name may end up displaying strangely (just an "X" and a hollow square), the important thing is that the USB IDs are the correct ones (A108 1000).

(https://www.rockbox.org/wiki/pub/Main/FiioM3K/zadig.png)

Ensure you select the WinUSB driver and click "Install Driver". This can take a couple of minutes to complete. Assuming the driver installs successfully you can continue with the installation instructions above.

Note: if WinUSB does not work for you, you can try installing the libusbk driver instead. It might also be necessary to unplug the M3K, power it off, and reconnect it in USB boot mode to ensure the new driver is used.

Links
Title: Re: FiiO M3K Install (Native port)
Post by: GSV3MiaC on June 04, 2021, 12:52:48 PM
After I used the recovery tool to save a copy of the original boot loader, Windows (10, 64 bit) decided my micro SD card was corrupted and insisted on checking it for errors (which, being a large card full of music, took an age). I guess the 'backup the original boot loader' option may write to the card in some fashion windows does not approve of (at least the card did not provoke the error before I did that step).

Needless to say after the check 'no errors were found'. Gates Lives!!

Apart from that the install was a success, although I struggled to find a set of font files (the link takes me to a page where the FIIO M3K doesn't have any download items), nor is there yet any documentation (beyond how to install), but I am sure I can figure out what the various buttons  and touchscreens do. The wiki is desperately dated - go look at 'hardware you can buy which supports RB' and marvel over how none of it actually exists in the wild anymore (heck some of the makers have vanished too).
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 04, 2021, 06:25:57 PM
Happy you got it working! From the sounds of it you may have already found it, but the font pack can be downloaded from the Extras (https://www.rockbox.org/wiki//RockboxExtras) page (it's also a link on the sidebar). Though I can't find where that bit of info is actually documented. I'm not sure what other link you're referring to?

I'm not sure why the filesystem is being interpreted as "corrupted". After a little investigation none of the likely culprits that came to mind seem like they should be the issue, so let me know if it reoccurs in normal usage.
Title: Re: FiiO M3K Install (Native port)
Post by: GSV3MiaC on June 05, 2021, 03:38:53 PM
Yes, it is working.

.. the extras page says "A link to the latest font-pack can be found here.", but 'here' takes me to where there is a list of ancient players, none of which are the FIIO.

The alleged file corruption has not shown up again (but I haven't backed up the original boot loader using the recovery system again, so I doubt it would). I did have one more wrinkle - the new SD card showed up exfat formatted (being 128GB .. well 116GB in real money), and of course no way would RB mount that file system, and Win10 declines to reformat it as FAT32 (although it will sit for hours doing it before telling you it failed, if you force Powershell to try). Downloaded a suitable utility, reformatted the card, and was back in business (RB loaded fine). The original card I was using WAS fat32, stolen from my phone .. I guess I could have tried a reformat with the phone, or a camera or something .. can't reformat with the FIIO as I can't boot RB (the OF would presumably have done it, but that would involve re-undoing the boot loader etc). Not sure if RB has a format facility anyway, never needed it.
Title: Re: FiiO M3K Install (Native port)
Post by: bluebrother on June 05, 2021, 04:15:20 PM
.. the extras page says "A link to the latest font-pack can be found here.", but 'here' takes me to where there is a list of ancient players, none of which are the FIIO.

If you closely look at the links for the fonts pack you'll notice it's the same file for all players ... So take your pick.

(In other words, the fonts pack is independent of the actual player model)
Title: Re: FiiO M3K Install (Native port)
Post by: GSV3MiaC on June 06, 2021, 03:27:02 PM
In which case why doesn't the 'here' just take me to the font pack download, instead of a page with a selection of identical font packs downloads masquerading as separate for different player?  :D

As it happens I already downloaded the X3 version, which works fine, but I still think it could be less confusing! Actually I'm not sure why the font pack isn't just rolled into the release .zip, since practically everyone/every theme is going to need some of it. We are talking GByte (going on TB) memory players these days, not 'gosh I don't have 64k for some extra fonts, what can I leave out'.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 07, 2021, 07:47:07 PM
I'm Following the install instructions. I have the bootloader and the jztool.exe in a folder on my desktop. Used zadig to install driver. I'm soon to be 70 years and not very computer savy. How do I put a terminal/command prompt in that folder?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 07, 2021, 08:22:44 PM
Figured that out but got message device not found
Title: Re: FiiO M3K Install (Native port)
Post by: dconrad on June 07, 2021, 08:43:37 PM
Figured that out but got message device not found

Oh whoops, sorry I typed out a response but I thought you said "command not found". Sorry!
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 07, 2021, 09:03:11 PM
it says username\Desktop\Rockbox M3K install>cd Desktop
The System cannot find the path specified
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 07, 2021, 09:06:42 PM
The files in my folder on the desktop are:
bootloader m3k
jztool.exe
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 07, 2021, 09:39:03 PM
Tried again Got to the recovery menu. back up was succesful. went to install or update got error: -1102
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 07, 2021, 09:54:23 PM
Am I just supposed to start Rockbock after doing backup?
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 08, 2021, 04:43:35 AM
Tried again Got to the recovery menu. back up was succesful. went to install or update got error: -1102
That error is indicating that bootloader.m3k cannot be opened. (Guess I should've added proper error messages...)

You probably just forgot to copy bootloader.m3k to your SD card:
Quote
To install the Rockbox bootloader, copy bootloader.m3k to the root of a FAT32-formatted SD card and plug it into your M3K, and choose "Install/update bootloader" from the recovery menu.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 09:12:22 AM
Tried starting over. when trying to install zadig could not find device. could not get to recovery screen. The good news is original firmware 1.4.5 still works!
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 08, 2021, 09:57:15 AM
You need to reconnect the M3K in USB boot mode -- turn off the player, and hold Volume Down button while plugging in the USB. Then run jztool again, in order to get to the recovery screen. All that jztool does is load the bootloader into the M3K's RAM temporarily, and since the permanent bootloader installation failed due to a missing file, nothing was modified on your player during your first attempt. So no surprise everything is working as it did before  :)

In short, just follow the instructions again, in full, from the beginning, and you should be fine.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 05:49:29 PM
I get to the part of installing the driver and zadig shows nothing in the drop down menu. is ths because it was already installed on my first try?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 06:02:54 PM
Do I drag the bootloader and jztool.exe to the sd card and then run the command prompt?
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 08, 2021, 07:00:42 PM
There is no need to install the USB driver a second time. Sorry if this wasn't clear.

You should be doing this:

1. Move bootloader.m3k and jztool into a folder on your desktop, or anywhere else that's convenient for you.
2. Copy bootloader.m3k to your SD card.
3. Safely remove the SD card, and insert the SD card into your M3K.
4. Connect the M3K in USB boot mode (power it off, hold volume down button, insert the USB cable to M3K and computer, and then let go of volume down button)
5. Open a command prompt in the folder containing jztool, and run the command jztool.exe fiiom3k load bootloader.m3k
6. Choose "Install/update bootloader" in the recovery menu.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 07:41:52 PM
did all that still get failed error-1102
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 07:58:20 PM
Did it again after redownloading the boot loader file it says sucess. Do I scroll up to "Start Rockbox or do I safely eject  first and then stat up?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 08:01:23 PM
Before doing anything, should I do a backup from the recovery menu ?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 08:10:07 PM
This is not my first experience with Rockbox. I have rockboxed A Fuze,Fuze v2, Fuse+, Clip+ and clip zip.
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 08, 2021, 08:32:36 PM
Did it again after redownloading the boot loader file it says sucess. Do I scroll up to "Start Rockbox or do I safely eject  first and then stat up?

sounds like your download was corrupted, but I'm not sure how since that should've made jztool barf an error at you...

Anyway "success" means it all worked. Just reboot the player and enjoy.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 09:00:02 PM
"error loading Rockbox File not found" Now what
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 08, 2021, 09:12:54 PM
did you unzip Rockbox to the SD card?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 09:17:29 PM
No What is the best way to unzip
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 09:23:50 PM
Nevermind unzipped it Going to try again
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 09:33:22 PM
in CMD got these errors
[error] cannot open file bootloader.m3k (tar error: -2)
[error] Boot failed: -2
The un zipped bootloader file I unzipped and transfered was named "bootloader]
Should it be renamed?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 08, 2021, 09:36:38 PM
Inside the bootloader file are these 3 files
bootloader.ucl
bootloader-info.txt
spl.m3k
Title: Re: FiiO M3K Install (Native port)
Post by: 7o9 on June 09, 2021, 12:25:27 AM
Njones, the link to bootloader.m3k is in the first post: https://download.rockbox.org/bootloader/fiio/m3k/bootloader.m3k

You do not extract this bootloader.m3k file, you just copy it to the sd card.
Title: Re: FiiO M3K Install (Native port)
Post by: bahus on June 09, 2021, 12:25:53 AM
Inside the bootloader file are these 3 files
It's not bootloader you need to unzip. You should unzip rockbox archive https://build.rockbox.org/data/rockbox-fiiom3k.zip.  So your SD card must contain .rockbox folder in the end (be sure it's in the root not in some subfolder)
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 09, 2021, 05:00:09 AM
Njones, from what you've told me, you already installed the bootloader successfully. From this point on there is no difference between the M3K and any other rockbox player. You don't need to use jztool or bootloader.m3k anymore.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 09, 2021, 08:59:59 AM
It's working! How do you add themes and font pack?Is there any way to adjust the responsiveness of the slide bar? are you able to swap sd cards?
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 09, 2021, 09:01:45 AM
P.S. Thanks for everybodies help!!!
Title: Re: FiiO M3K Install (Native port)
Post by: 7o9 on June 09, 2021, 11:20:08 AM
Fonts and themes can be extracted just like the main rockbox package.

You can swap sd cards, but all need to have a copy of the .rockbox folder.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 09, 2021, 11:48:02 AM
Downloaded and unzipped the theme I wanted and font package and put them in the unzipped rockbox folder. New theme does not show up in theme settings
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 09, 2021, 12:11:54 PM
The font and theme zip files also contain a .rockbox folder when you unzip them. The theme's .rockbox folder should be merged with the .rockbox folder already on the SD card.

If you are asked to skip/overwrite files because they already exist at the destination, it should be safe to skip. Any file conflicts are usually from unnecessary files like READMEs, or due to two themes bundling the same font.

The scrollbar sensitivity can be adjusted in Settings > General Settings > System > Touchpad sensitivity. If it is too sensitive and hard to navigate the menus, you can tap on the top or bottom of the scrollbar to navigate up or down in the menus.

Glad you finally have it working.  ;D
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 09, 2021, 01:39:45 PM
All is good! Thanks again for putting up with an old retired music lover!
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 10, 2021, 01:07:08 PM
Is it a good idea to use the development builds as they change?
Title: Re: FiiO M3K Install (Native port)
Post by: 7o9 on June 10, 2021, 01:45:03 PM
It is safe to use development builds and for the M3K you have to anyway.

There is still active development making Rockbox on the M3K better.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 10, 2021, 08:59:54 PM
OK Thanks
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 16, 2021, 10:59:20 PM
Tried to update to the latest developmental build. Downloaded the M3K build, unzipped it. put it on the Sd card. Rebooted unit still shows the previous version. What am I doing wrong? Idon't need the dual boot so I'm not doing anything with that.
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on June 17, 2021, 05:18:22 PM
Did you check the version in System > Rockbox Info, or the version on the recovery screen? The recovery screen shows the bootloader version, not the version of Rockbox on your SD card.

Otherwise, all I can think of is maybe the new .rockbox accidentally ended up inside a subfolder? You only need to unzip the new version, and copy the new .rockbox folder to the root of the SD card.
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 17, 2021, 06:33:16 PM
Do I skip files or replace files when asked? System info was same as on screen
Title: Re: FiiO M3K Install (Native port)
Post by: Njones on June 17, 2021, 09:17:06 PM
I chose Replace and that worked. On another note, The car play mode turns on and starts playing when the ignition is turned on but doesn't turn off when the ignition is turned off.
Title: Re: FiiO M3K Install (Native port)
Post by: 7o9 on June 18, 2021, 12:30:19 AM
Replace, otherwise you keep your old version files.
Title: Re: FiiO M3K Install (Native port)
Post by: 7o9 on July 08, 2021, 04:12:41 PM
amachronic: does it make sense to reinstall the bootloader after all recent nand/spl changes?
Title: Re: FiiO M3K Install (Native port)
Post by: amachronic on July 09, 2021, 05:35:05 AM
amachronic: does it make sense to reinstall the bootloader after all recent nand/spl changes?
Updating isn't necessary, there's no new features or bugfixes. Generally speaking, I don't advise using development bootloaders; they may be broken for some reason because I don't test them regularly.