Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: braewoods on November 17, 2020, 09:45:00 AM

Title: new iRiver H100, H120, H300 V8 bootloaders released
Post by: braewoods on November 17, 2020, 09:45:00 AM
Greetings. I have spent the last month finishing up the development of the H1x0 and H300 bootloaders in order to release new production bootloaders for them. Surprisingly this hasn't been done in nearly 15 years even though they could have used the unreleased bug fixes. Here is a summary of the known changes:

H1x0 & H300:
 - Various fixes for modern Compact Flash cards
 - Various fixes for compatible remotes
 - Can boot from original firmware in an emergency
 - Can replace original firmware if desired
 - Can boot rockbox from RAM / ROM
 - Can store some bootloader settings in EEPROM
 - Can boot from ROM rockbox image in an emergency

H300:
 - Powers on from RTC alarm
 - Powers on when AC or USB is connected
 - Has a charging screen now
 - Charges from USB when in disk mode

I expect the new bootloaders will not be released to the main website until a new rbutil is released but for now you can find them here as an attachment: https://www.rockbox.org/wiki/IriverBoot

Also, for now the only way to install them is via the iriver_flash plugin from a recent development build. This is also the utility that can flash RAM/ROM rockbox firmware images to the internal ROM but doing so will replace the OF. However you can still reflash the OF from a ROM dump produced from the debug menu or from a decoded binary of the OF flash image.
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: LambdaCalculus on November 17, 2020, 11:33:03 AM
This is pretty damn good news to hear! I just want to confirm a couple of things first, before I go risking wrecking anything (oh yeah, also want to note that I was a Rockbox dev back in the olden days):

1) As far as I still remember, the iriver_flash plugin was only built for the H100 series. I have an H300, but it looks like iriver_flash is available for the H300 now?

2) Will a future H300 bootloader release finally allow installing Rockbox as a full-on replacement for the OF?
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: braewoods on November 17, 2020, 12:13:27 PM
1) As far as I still remember, the iriver_flash plugin was only built for the H100 series. I have an H300, but it looks like iriver_flash is available for the H300 now?

That was one of the first things I did. I ended up having to completely refactor and review the old iriver_flash code in order to ensure it would be compatible with both the H100 and H300 series iRiver devices. It was designed for the H100 series only originally and so it had made a number of assumptions that would have caused it to fail on the H300 series. So yes, it is available for the H300 series now but only in the latest development builds.

2) Will a future H300 bootloader release finally allow installing Rockbox as a full-on replacement for the OF?

It already does in both this V8 bootloader and any built from the latest development sources. But it wasn't easy to get there. I had to port iriver_flash to the H300 first and also update various parts of the firmware code to support the H300's larger ROM chip as they made assumptions that were only true for the more common 2 megabyte ROM chips. I think the H300 is the only coldfire target with a 4 megabyte ROM chip.

I also discovered that the H300 bootloader was broken and I had to trace it all the way back to the commit that originally broke it in late 2009. Thankfully the reset cookie was still working so I was able to recover from the bad bootloaders by triggering it on purpose to boot the OF. Without that I wouldn't have been able to trace the issue and ultimately fix it. There was also another issue that broke it but I was able to find a solution thanks to Bilgus.

After that I went to work porting over the features of the H100 series bootloader to the H300 series bootloader that were compatible with it. The main feature is the failsafe menu that allows you to choose whether to boot from disk, the rom image, or the ram image. You can also choose to make a default selection that will be chosen the next time you start the bootloader. This should work the same as the H100 series version that was in the pre-release versions of the V7 bootloader.

Edit: I just realized that you may have meant storing the entire rockbox installation in ROM? I don't think that's possible nor is it planned. You can only embed the rockbox core image in the ROM. There's not enough room to store all of it. The rest of the files are still loaded from disk.
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: LambdaCalculus on November 18, 2020, 02:33:43 PM
Edit: I just realized that you may have meant storing the entire rockbox installation in ROM? I don't think that's possible nor is it planned. You can only embed the rockbox core image in the ROM. There's not enough room to store all of it. The rest of the files are still loaded from disk.

My bad, I should've worded that a little better. I was indeed thinking of how the old Archos devices had the Rombox option (flash the Rockbox core image to ROM to speed boot times; the rest of Rockbox is on the HDD as normal), and if that was a possibility now with the H300, as I remember the H100 had the option as well.

Thanks for your contributions to the iriver bootloaders and making them much more viable and capable!
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: saanaito on November 18, 2020, 03:47:05 PM
Awesome work! I look forward to updating my H320 tonight.  ;D
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: SHiiNZoN on November 23, 2020, 09:39:05 PM
This is great news! Thanks for your hard work.

my H340 runs a 200GB microSD which is awesome. Any additional FW work is welcome :)
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: Julian67 on March 10, 2021, 04:15:09 PM
Thank you very much for these bootloaders.  I just noticed them today so updated my H140 to the latest daily build, updated the bootloader and then rsync'd the previously installed 128GB KingSpec 1.8" SSD over to a 512GB microsd and used a 50 pin IDE to CF adapter, and a CF to SD adapter and a SD to microSD adapter (!) to upgrade my H140 to 512GB.  It works great, boots in a fraction of a second from ROM and is super responsive.  I'm really pleased and amazed that this 15 year old player is still getting better thanks to Rockbox and a few easy hardware mods. I'm about to buy its 4th battery.  And it got a little lighter every time I upgraded from HDD to SSD to microSD.
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: benH320 on September 03, 2022, 08:18:56 AM
Thank you very much for your incredible work!

I am currently reactivating my 18 years old H320 and patched it with the v8 bootloader. Unfortunately, the H320 does not start at all after the patch (the screen remains completely black). Connecting the USB cable does not cause any sign of life either.  The only way to force the device to start is to press the reset button when the cable is connected (power supply or USB). Then the original firmware starts. On a Windows PC, I then took a look at the contents of the hard drive. There was a ".trash" folder that my MAC created. After I deleted it, Rockbox suddenly started. But the joy was short-lived. After I turned off the H320, it did not start again.

I have now installed the bootloader v6 (edit: okay, it seems to be v5) as a test. Now everything runs fine. How can this be? I wanted to change to a 256GB SD card. Therefore I would probably need the v8, right?

Edit: For both bootloader versions I used the fwpatcher.exe with an original H300.HEX of the 1.29J version. I used this one for the v8: https://download.rockbox.org/bootloader/iriver/8.0/
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: benH320 on September 04, 2022, 07:13:42 PM
Could it possibly be that the version in fwpatcher.exe is corrupt? I would like to test this with the iriver_flash plugin. Where exactly can I find that? Is there somewhere a manual how to use it?

[Update]
I found out how to use the flashing plugin and tried to flash my H320 with the v8. Unfortunately, with the same result as before. After flashing, the device can only be started with a reset while the cable is plugged in with the original firmware. Something does not fit there apparently. As an interim solution I have now chosen the existing patched variant of the v5 firmware. Also works so far without problems.
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: braewoods on September 22, 2022, 01:13:06 PM
I doubt it. But I no longer own an H320 or H340 so I can't test this anymore. But based on what you described, I wonder if the internal storage has issues now. In any case the V8 bootloader should work. I recall it having a USB mode when first plugged in from being off. In the event a rockbox ROM / RAM image has been flashed it should also produce a boot menu. Were you using a recent Rockbox build?
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: mr_2022 on January 30, 2023, 10:52:28 AM
Dear all,

for my H120 and H140 devices I have flashed the bootloader v8 and also ROM and RAM and everthing works flawlessly with CF/SD Mod and also old HDD and Kingston 64GB SSD.

But my H320 and H340 do have problems when booting with bootloader v8 was flashed. I have the same issues like benH320 posted earlier in this thread. Which is upon Play button press the HDD spins up, but no screen is coming on and the player can only be recovered (to boot to original iRiver firmware) by a reset with either USB or DC charger being connected. I've had this problem with both 1.29EU and 1.28EU Version of the original iRiver Firmware and the latest dev-build (i.e. today) from the Rockbox-Utility (Windows).

However, when HOLD was on, I saw the bootloader v8 Message on lit display that HOLD switch is on and the player shutdown.

As a partial workaround for my H320 I found that the following method worked once:

This worked for me one day and then fixed the problem until I charged (DC plug) the H320 (original iRiver Charging Screen was shown). Then the player had the same issues like before and the above described workaround did not work anymore.

I did not dare to flash ROM or RAM on my H320 to get rid of the original iRiver firmware because I have a bad feeling about the bootloader v8 not working properly...

I also tried the following
which didn't solve the problem.

Any ideas what could be the problem of not booting after v8 bootlader was flashed from iRiver firmware?
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: mr_2022 on January 30, 2023, 11:51:37 AM
I wonder if the internal storage has issues now. In any case the V8 bootloader should work. I recall it having a USB mode when first plugged in from being off. In the event a rockbox ROM / RAM image has been flashed it should also produce a boot menu.

So I just thought okay let's flash the damn ROM and RAM and yes it is a boot menu being produced upon HOLD on and Play power up.

So I hope the Error-Code contains some information to tackle the problem?
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: mr_2022 on April 05, 2023, 06:59:18 PM
I have now two H300 players that have the exact same symptoms when flashing the v8 bootloader...

Could it possibly be that the version in fwpatcher.exe is corrupt? I would like to test this with the iriver_flash plugin. Where exactly can I find that? Is there somewhere a manual how to use it?

[Update]
I found out how to use the flashing plugin and tried to flash my H320 with the v8. Unfortunately, with the same result as before. After flashing, the device can only be started with a reset while the cable is plugged in with the original firmware. Something does not fit there apparently. As an interim solution I have now chosen the existing patched variant of the v5 firmware. Also works so far without problems.

Anyone any idea what might prevent the successful usage of the v8 bootloader? I mean earlier in the thread some people reported success with v8...
Title: Re: new iRiver H100, H120, H300 V8 bootloaders released
Post by: fraukzsent on July 11, 2023, 06:51:59 AM
Thanks for your contributions to the iriver bootloaders and making them much more viable and capable!

whatsapp plus (http://"https://waplus.win/")

project free tv (http://"https://projectfreetv.onl/")