Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Installation / Removal
| |-+  Manual Installation
| | |-+  Other - Installation/Removal
| | | |-+  Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« previous next »
  • Print
Pages: [1] 2

Author Topic: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs  (Read 11866 times)

Offline Infine

  • Member
  • *
  • Posts: 8
Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« on: March 07, 2016, 08:18:57 AM »
I'm installing rockbox on the HM-603 Slim 4GB player as per the wiki page http://www.rockbox.org/wiki/HifimanPort

Ater rebooting I get a fast rockbox splash followed by the loading screen with
Loading rockbox.rkw
Loading OK
and then nothing - blank white screen. Device apparently hangs - only reset button works.

I can still boot it into the original firmware by pressing any button with the power switch which gets me to
Loading BASE.RKW
Loading OK
Executing
And then the default firmware interface.

I can still rollback to the original firmware, I can still use the original firmware with the rockbox bootloader, but the rockbox itself hangs at boot.

I used both manual and mkrk methods to no avail.
SD card is 32GB formatted using mkfs.vfat on device (that is, without a partition table) and is otherwise visible to the player.

Also during firmware upgrade (both installing rockbox and rolling back to OF) it says it's upgrading HM-801 (probably just a generic message? image file is HM-603.IMG).

What am I doing wrong?

UPDATE:

I got a hold on another (16GB) SD card from a camera and tried booting from it.
This time I managed to see Executing, and the screen did not refresh and go white, but it still hung.

I repartitioned the new SD card making a 8GB fat32 partition, and this time the screen goes white, but pressing any button shuts down the player.

I've also tried cloning git version and building with various developer options (small c build, logf build), but it's the same. Apart from the logf build - it shuts down immediately without interaction.
Though I didn't try to build a bootloader, because I'm afraid to brick the device.

EDIT:

It sometimes goes blank white and sometimes gets stuck at executing with the same configuration.
« Last Edit: March 09, 2016, 02:20:12 AM by Infine »
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #1 on: March 09, 2016, 12:15:06 PM »
Okay, update.

I took a peek inside and found a single Hynix H57V2562GTR-60C memory chip for RAM which is different from photos of various HM-60x boards I've found in google.

I think datasheet says it's supposed to be 256Mb (which should be 32MB?), but I'm not sure if I'm understanding the datasheet correctly.
Regardless, changing the configure script to 32MB target RAM produced nothing, BUT.

I was able to successfully build and run a 4MB build.

2MB is too low to build, 8MB is white screen, but 4MB build consistently boots, navigates and plays. I'm a bit confused.
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 388
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #2 on: March 12, 2016, 08:37:01 AM »
That pretty much looks like dram controller misconfiguration which is odd considering that we relay on init performed by original first stage bootloader and don't touch it. There are two things you can try (depending how skilled you are):
1) Build hwstub for rk27xx (utils/hwstub/stub/rk27xx), convert binary to rkw format (according to convert_to_rkw.txt) and copy it as rockbox.rkw (this will preserve possibility to boot original firmware). Then you can boot this debug stub and poke ram and ram config with help of PC side utilities (/utils/hwstub/tools/hwstub_shell and /utils/regtools/qeditor). This may give a clue whats wrong.
2) Disassemble BASE.RKW to see if it performs dram controller init (previous versions didn't do that)

You can try to catch me on IRC if you need assistance.
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #3 on: March 13, 2016, 05:37:31 AM »
Quote from: wodz on March 12, 2016, 08:37:01 AM
That pretty much looks like dram controller misconfiguration which is odd considering that we relay on init performed by original first stage bootloader and don't touch it. There are two things you can try (depending how skilled you are):
1) Build hwstub for rk27xx (utils/hwstub/stub/rk27xx), convert binary to rkw format (according to convert_to_rkw.txt) and copy it as rockbox.rkw (this will preserve possibility to boot original firmware). Then you can boot this debug stub and poke ram and ram config with help of PC side utilities (/utils/hwstub/tools/hwstub_shell and /utils/regtools/qeditor). This may give a clue whats wrong.
2) Disassemble BASE.RKW to see if it performs dram controller init (previous versions didn't do that)

You can try to catch me on IRC if you need assistance.

Considering the second approach on the first glance requires experience with disassembling stuff, knowledge of ARM assembler and possibly an rk2706 datasheet, I'm probably better off with the first one (I assume it's a low-level shell over USB?). Not to mention, the firmware I've tried it with is .06 version which is out there since forever (circa 2012?) and apparently fits non-slim 603 version just fine.

Will try the next week.
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 388
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #4 on: March 13, 2016, 03:29:05 PM »
Yes disassembling BASE.RKW requires knowledge about format itself and, arm assembler and rk27xx memory map. Could you provide me the link to this firmware archive (or provide me BASE.RKW)? I may take a look, I've dissasembled a few base images for rk27xx hardware so it should be pretty easy to spot the difference.

hwstub is to tier thing. It is small firmware running on device which sole purpose is to communicate over usb with dedicated shell (hwstub_shell). It allows to read and write arbitrary memory location on device.
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #5 on: March 14, 2016, 01:13:58 AM »
Firmware was taken from the rockbox wiki page for hifiman port: http://down.hifiman.cn/HM-603_SFW_HCZ_V0.06_20120618.zip
There's a newer version: http://down.hifiman.cn/HM-603_SFW_HCZ_V0.07_20130109_.rar, but the one above works fine.

I assume one could pick up knowledge about rkw format from the rkw-loader code, and memory map from the rk27xx header(?), but I've got no idea where to look for the DRAM init in the code and how it should look apart from probably being somewhere in the beginning.

PS: I've found something rk2706 SDKish on some chinese forum ('ish because I obviously don't know chinese). It has some sources for something something including hw_memmap.h for that matter.
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 388
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #6 on: March 14, 2016, 04:37:33 AM »
Quick look at V0.06 and V0.07 shows no difference in DRAM init routine. I don't have the hardware so I can only guide you where to look.
Logged

mortalis

  • Guest
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #7 on: March 16, 2016, 08:14:30 AM »
Quote from: wodz on March 12, 2016, 08:37:01 AM
we relay on init performed by original first stage bootloader and don't touch it.

That's not quite true,  we tweak sdram settings in sytem_init() a little bit:

void system_init(void)
{
....
#ifndef BOOTLOADER
    /* SDRAM tweaks */
    MCSDR_MODE = (2<<4)|3;         /* CAS=2, burst=8 */
    MCSDR_T_REF = (125*100) >> 3;  /* 125/8 = 15.625 autorefresh interval */
    MCSDR_T_RFC = (64*100) / 1000; /* autorefresh period */
    MCSDR_T_RP = 1;                /* precharge period */
    MCSDR_T_RCD = 1;               /* active to RD/WR delay */

Although these tweaks looks correct, I think it worth to try without these lines.
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #8 on: April 01, 2024, 03:03:36 AM »
I was contacted by another person having the same problem via email

Quote
Hello!
My name is Eugene and I found your account on Rockbox forums while trying to install Rockbox firmware on HM-603. Yeah, it's a really old stuff and your wrote there a years ago, but the problem is still actual.
It seems that my HM has the same problem with a wrong display type so there is a white screen after loading Rockbox. Here https://forums.rockbox.org/index.php?topic=51233.0 you wrote that you reconfigure the script and successfully built a 4MB build. As I understand, it works well and you could install Rockbox firmware on your HM-603, right? Could you please share configured build in this case? That topic on rockbox forum was literally the only one possible solution of problem that I found.

Unfortunately there's no contact information to get to the person in question (email address is the rockbox noreply robot), I'm posting it here hoping we can get in touch somehow.

So, it was a long time ago, and I kinda forgor what I did, and I don't have the device at hand right now

BUT I searched around a bit and have found

1) https://github.com/Rockbox/rockbox with build instructions
2) Rockbox 3.13 sources in my downloads folder.
3) Several built images dated 2016.03.07. It's possible there were other, later images, deleted during some cleanup. There's no image dated march 8 or 9 (that being said, posting time can be an artifact of a holiday). Some of those might be the one you need. Or might be not.
4) I can get to the device by the weekend, but I'm not sure of its current state (haven't used it for a couple of years because mechanical damage, but should be alive unless SD card died to bitrot).

I skimmed through the ./tools/configure.sh script, and it seems this is the default settings for the HM-603 build target (via --target= option)

Quote
  190|hifimanhm60x)
    target_id=79
    modelname="hifimanhm60x"
    target="HM60X"
    memory=16
    arm7ejscc
    tool="$rootdir/tools/scramble -rkw -modelnum=79"
    bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
    bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
    output="rockbox.rkw"
    bootoutput="bootloader.rkw"
    appextra="recorder:gui"
    plugins="yes"
    swcodec="yes"
    # toolset is the tools within the tools directory that we build for
    # this particular target.
    toolset="$genericbitmaptools"
    # architecture, manufacturer and model for the target-tree build
    t_cpu="arm"
    t_manufacturer="rk27xx"
    t_model="hm60x"
    ;;

As you can see, the default memory size is 16mb

You can change the configure script directly to set the ram size to whatever might work (4mb in my case)

Or there is --ram= configure option that most likely achieves the same result.

So our options are

1) Try to build the image yourself with the instructions provided in the git repo. The preferable way because you can get the latest and greatest version that is not outdated by 10 years and doesn't contain any extra malware introduced by yours truly.
2) Wait until caturday when I can get to the thingy and try to get the working firmware off the SD card. Assuming it's still alive.
3) I can just throw random firmware files at you, starting with the latest built, and we'll pray one of them will work.

2 and 3 are bad options because where's guarantee I won't give you an infected firmware that will randomly shuffle your collection ID3 tags (of course it will be a timebomb that activates a month later).

Anyway, if we are to move anywhere with this, some way to contact each other would be useful.

EDIT: I are retardenings. I confused original firmware images with teh rockbox builds. I found an actual build directory with several built rockbox images, including the definitely specified 4mb and 8mb ones.

EDIT2: I have the device, but it lacks the SD card with the software. So I can either give you whatever builds I've found or try building one from scratch.
« Last Edit: April 07, 2024, 04:15:09 AM by Infine »
Logged

Offline lisk

  • Member
  • *
  • Posts: 4
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #9 on: April 12, 2024, 09:11:50 AM »
Greetings!
It was me who sent you email. Great thanks for your detailed answer! And excuse me for long response, I tried to create operable Rockbox build follow your advices and rockbox's instructions, but I failed.

As I understood from Github instruction, the build must be created at Linux, so the first my attempt was to use Ubuntu app from Microsoft store.
Using this instructions https://www.rockbox.org/wiki/Windows10CrossCompiler I installed dependencies and built the cross compiler (at the point with selecting the compiler I chose ARM because of line t_cpu="arm" in hifimanhm60x section in configure.sh), then built simulator (tried both versions of SDL - 2.30 which is the newest and 1.2 which is mentioned in instructions). I created some Rockbox builds with different memory (2, 4, 8 and default 16), editing configure.sh; platform always was Normal (N).
All this builds weren't working; attempts to load them on sd-card with further reboot lead to F/W data error ID: 2 (screenshot in attachments).

I thought that reason could be wrong dependencies installation (versions or something) or building process, so I found already prepared Ubuntu image here https://www.rockbox.org/wiki/DevelopmentGuide.html#Virtual_Machine_40Obsolete_41 (second link is still alive) and download it.
There I tried only configure and make scripts from https://github.com/Rockbox/rockbox, but they even weren't finished (another screenshot in attachments).

So at the moment I have no idea what should I try to create working Rockbox build

* KIMG1039.jpg (108.43 kB, 412x642 - viewed 169 times.)

* 2024-04-12_15h58_56.png (152.35 kB, 871x623 - viewed 180 times.)
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #10 on: April 12, 2024, 03:53:52 PM »
I don't think I've run into that problem, but I assume F/W means firmware? Maybe something went wrong not with rockbox, but with the firmware or bootloader? Can you boot the original firmware? When does the loading get stuck?

Here's a 4mb build I assume I had: https://drive.google.com/file/d/1csd8Xj3j-UXd7dLRO8WWGvcomWLVS7FU/view?usp=sharing

I'm not 100% sure it's the one I used, but it's the most likely one.

I'll probably try getting my device back to work again to see how if and how it works sometime during the weekend, and maybe just give you an archive of the whole filesystem if it manages to run properly.

As for being unable to build it, maybe try building an older version? Like 3.13 or something. I assume VM method being obsolete might mean it can't build newer versions

EDIT: https://drive.google.com/file/d/18awDyV4Gc8duXEwtQtRVSkWnuI4gVbg8/view?usp=sharing

This is a bunch of stuff I used to reanimate my device.

It contains the .rockbox folder that goes to SD card (i used 32GB kingston, FAT32) with BASE.RKW from 007 firmware and a modified 007 image with bootloader installed that goes to internal storage.

I hope you didn't bork the loader (because it looks like it's your case - the rockbox bootloader starts with some white text on black background) and it can load from the card. Because idunno how to access internal storage without the OG firmware working. I heard there's a way to flash it with some rokchip SDK, but that's a question to mortalis.

EDIT2: in case you are truly bricked, here's some findings https://www.head-fi.org/threads/how-to-installing-and-uninstalling-rockbox-to-the-hifiman-hm-801-603-602-and-601.579759/. Particularly, post 11. Unfortunately all the links to the tools are dead, but at least it's some direction to dig towards. Only try it if you truly bricked it.
« Last Edit: April 14, 2024, 04:22:33 AM by Infine »
Logged

Offline lisk

  • Member
  • *
  • Posts: 4
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #11 on: April 16, 2024, 06:46:56 AM »
Well, it seems that I really bricked my HM.
Now it is restarting all the time after power on (with message F/W data error ID: 2) - the message appears, HM turns off, then turns on, message appears, turns off... And, what is worse, this happens after connecting it to PC, because this is the reason it couldn't be recognized as USB storage - HM reboot breaks connection and I can't even select it in DISKPART or cmd to format. And there is no difference is SD card plugged in HM or not; as I understand, this is fail of initial loading, not updating.

By the way, when this message appears after my attempts to install Rockbox that were built by myself, there wasn't endless reloading - after first message HM was loading with original firmware (HM-603 v.007) and modified HM-603.img was deleted from internal flash, so I had to put it again before new attempt.

I read somewhere that it is possible to close the contacts on Samsung chip on inner plate and somwhen it could help, so I'll try to find out more about. Otherwise it seems that I have to find the donor or buy the whole player.

Anyway, I'll keep your builds and I'll try use them in case successfull repair of my HM. Thanks a lot for your attention and shared builds!
Hope that I'll update here soon with a good news
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #12 on: April 16, 2024, 01:27:23 PM »
Quote
I read somewhere that it is possible to close the contacts on Samsung chip on inner plate and somwhen it could help, so I'll try to find out more about. Otherwise it seems that I have to find the donor or buy the whole player.

Read the link above. Apparently you need a special flasher, a set of relevant drivers (probably on some old version of windows) and shorting 2 pins on the memory chip. I don't have the flasher and the drivers unfortunately though.
Logged

Offline lisk

  • Member
  • *
  • Posts: 4
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #13 on: April 21, 2024, 05:43:50 PM »
Aaand its finally done!
Following the steps in your link I restored HM even without tools archive; after closing 5th and 6th contacts HM was successfully recognized in explorer (windows 10 Home, assembly 19045.4291). After that I reformated the storage in FAT32 and put original HM-603.img into internal storage. That's all, on the next powering on HM successfully loaded original firmware.
Then I use your working rockbox for HM-603.zip (2nd link on drive.google) and it was finally installed.
Thanks a lot! I really surprised that I got help in the 8-years old topic.

PS. By the way, don't you know what is the version of Rockbox firmware in your archive? After installation it shows 5138995M-160309 (and it was mentioned in rockbox-info.txt), but found nothing on the forum with such numeration, only standard 3.15 and similar.
Logged

Offline Infine

  • Member
  • *
  • Posts: 8
Re: Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
« Reply #14 on: April 22, 2024, 01:31:11 AM »
I assume 160309 is the build date. I built it from GIT. So around that date.

3.13 was released in 2013. 3.14 - in 2017.

This puts this particular build somewhere between 3.13 and 3.14 releases.

It might be worth fiddling with building newer versions now that you have a functional bootloader. Since it can boot an image from the SD card (it's supposed to be the original image by default, but I assume you can place another rockbox build there).

Though I suppose memory initialization is done in the bootloader, so builds should probably be built against the original memory size (4mb for this build). I'm very much unsure how it works and this matter is better to be discussed with more knowledgeable people.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Installation / Removal
| |-+  Manual Installation
| | |-+  Other - Installation/Removal
| | | |-+  Installing rockbox on HiFiMAN HM-603 Slim - boot hangs
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.161 seconds with 21 queries.