Porting Rockbox to YP-R0 (FAQ in the 1st post)
EDIT lebellium January, 21st 2013: LightROM 4.6
How to install Rockbox?
-New firmware 2.51 dualboot:
-New LightROM 4.6 (Rockbox-only!)
-Old firmware 2.30 dualboot (not recommended):
Is it safe to install Rockbox?
If you follow carefully all the steps above, there is no risk. The Modded Firmware 2.30 or 2.51 is no more no less dangerous than the latest stock firmware 1.25, the original features and bugs are still present. The improvements have been carefully tested.
How to uninstall Rockbox?
You don't want Rockbox anymore? :( Just delete the .rockbox folder as well as the loader file and that's it! We advise you to keep the firmware 2.30 or 2.51 though, particularly for the Safe Mode.
Install Rockbox themes for R0
The R0 has been showing up on the official theme page for a few months now: http://themes.rockbox.org/index.php?target=samsungypr0. As themes are only sorted by screen resolution, any theme for another 240*320 target (Sansa Fuze+, Toshiba Gigabeat etc) is theoretically compatible.
You can find my theme lebellium Samsung-like especially designed for the R0 on the official website here or on ABI here.
The R0 displays "system checking" at every startup before loading Rockbox. How to get rid of that?
First you have to start the Samsung app instead of Rockbox after the "system checking". Then turn off the device (only press the power button for 2-3 seconds) and press the reset hole. Power it on and you'll see the annoying "system checking" has gone!
I don't find my songs using the Rockbox file browser. Where are they?
On the main menu go to Files>mnt. Then you can see several directories: media0=internal memory, media1="neo-ghost" hidden memory and mmc=microSD.
You can start file browsing at a specific folder. For example if you want to start the browsing in the Music folder of the internal memory, just go to Files>mnt>media0 and make a long press on the "select" button when you are on the "Music" folder. In the context menu select "Start File Browser here". That's it!
please register if you want to join the dev team.
I think you mean you want to port Rockbox to the R0, not vice versa.
Why did you make your own forum for the porting attempt? It might be more useful if you just posted on the official Rockbox forums and wiki instead. That way developers involved in Rockbox development could help, and the info would all be in one centralized location. Starting your own forum for that port might not make that much sense, in my opinion - it just adds clutter and fragmentation to the available info.
Its good to have one forum for developers, where they can keep all their boring stuff and it also will keep this forum clean, but all the progress will be published here and on the Rockbox web site, and of course its porting Rockbox to R0, not vice versa.
Its probably just going to be 1 or 2 people working on a port, so just using email or gtalk seems like a better solution.
Yep its basically just a dev forum one trackers what needs to be done to have it between the dev.
the progress will be posted on rockbox and also a lot of other stuff once we get to the point where its needed.
just as i promised to keep you updated.
We were able to extract SYSDATA.bin today and I am currently looking through all the files. As for now we are getting closer to uncover how the player itself works.
What happend so far:
- Cracked the Player open to figure out hardware
- Extraced Firmware v1.22 to its 4 contents
- able to mount cram_fs containing kernel and filesystem
- figured out most of the mount path within player starting
- were able to extract sysdata.bin
- mboot.bin gives us some knowledge on how update progress is started AND that Upgrade.sh in Sysdata.bin is used to finalize upgrade
- mboot.bin still gives me troubles on how to modify it and be able to manipulate boot process
- maybe compiling new kernel and chain a bootloader after mboot bin is the way to go but still needs research
I am currently flashing the YP-R0 to a custom kernel with modified rc.start script. If it works I should be able to start custom scripts from flash. I will get back once I flashed it.
Great News I proudly present the output of the first script I ran. I can now manage to run every script I want simply connecting the MP3 Player to my computer and changing the customscript.sh in the root folder :)
That means I will make a copy of the System Root Drive and copy it to the 8GB flash.
This just makes my day :)
here is the the first script I ran (cat /proc/cpuinfo > cpu.txt)
Maybe someone could help me looking through the filesystem
I would really appreciate it. We need to find something concerning bootloader!
Hopefully, other people will get interested in this port and will help you :)
I will release the Script- able firmware with instructions on how to use and very important what not to do. After I make some clean ups and writing a reboot feature. What that means is that the customscript.sh which is created on the 8/16gb flash will be erased from its content leaving a blank shell script after it has been called.
Call it a safety feature, because scripts will be started right after initial boot BEFORE application or USB Transfer drivers are loaded. Making any bogus script very dangerous. With this adjustment scripts will be empty right after pushing reset button and doing a regular boot.
Thats why I will take sometime to make it almost fool proof to use.
the script which is being used is the rc.local script which is called within rc.start ->
Oh man, oh man...I truly wish you well on this endeavor. A RB enabled Samsung R0/R1 would prolly push me over the edge to grab one if I can as I quite like the sexy form factor....
Godspeed and thank you for your efforts!!! :D
cheering from the wings...
For Anyone who wants to try here is the source code of my program to extract sysdata.bin
be aware it still needs some manual adjustments. everytime it stops it hits one of the 0x30 byte filename heaser. so jump to the next file and adjust offset and subtract offset from while argument i.
Feel Free to modify and maybe contribute back with fully automated script
In order to get systata.bin you have to unpack firmware file, i think we will make it public avaliable. And if somemeone want to experiment with sysdata.bin, he has to figure out why there are 3 types of records inside header and how the folders tree is stored in the header.
You can download the modified firmware which is able to run script here:
SCRIPTING IS VERY POWERFUL BE VERY CAREFUL WHAT YOU DO
Here are the steps to make it work and some Instructions:
Here is the first script you could run if you want to test it:
/mnt/media0 <-- your 8GB or 16GB Flash with all your files
/mnt/media1 <-- is internal Data with Samsung Application you see when the player is running
/ <-- root filesystem everybody who ever used Linux will understand
AGAIN PLEASE BE VERY CAREFUL WHAT YOU DO!!!
There is a safety feature which will protect you when you run a bogus script and the player is not responding -> wait for at least 2 minutes. push reset button -> every script you run will be deleted and replaced with a dummy script so if you will have to write the script again if you want to use it again after every reboot of the player.
I will release another firmware without this security feature in a few but I advise everybody to test scripts with this firmware and if you want a permanent change upgrade to the other firmware. There is also the possibilty to update the /etc/rc.start script. But this is for proffesional users only.
Scripting on the player means a powerful way to change the linux running on the player and to be able to customize it any way you want.
Update Process List
I just tried this customscript.sh script:
Jeez....you guys are really scaring me - in a damnably good way.
Awesome guys - THANK YOU.... :D
just for your info:
scripts will be launched while booting there is a little way to trick it:
create another .sh script on the root of the player.
i called it myscript.sh
do the following in customscript:
Also I tried many ways now to brick it even creating new folders on the player and try to mount some stuff.
Never ran into problems I still advise NOT to delete or change any files in there.
Also cp command runs great but cp -R seems to make it crash so don't use cp -R copy folders one by one using cp /file/* its the safest way to do it.
For anyone who wants to help.
I was hoping you could also help to figure out where the sysdata.bin files are. so far I have not been able to find them so I guess its a new mount somewhere else maybe even just a program /usr/local/bin/r0 calls by the way some programms to read and write on /dev/afe and someplace else (you can see it in hexeditor).
I hope we could figure out a way to change files in sysdata.bin to customize skins and layout. that would be cool for modders.
and on the the other hand I will try to compile rockbox as an application instead of porting drivers. since we have a linux we should be able to do that. there is a thread in rockbox forums under new ports: running rockbox as application.
Found something interesting:
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/bml2 35 35 0 100% /
/dev/stl2 64 5 59 8% /mnt/media1
/dev/stl3 7578 268 7310 4% /mnt/media0
May be this document can help - http://www.samsung.com/global/busine...ting_Guide.pdf .
Thanks for the Link this is very interesting and also a very annoying thing to know ;) As I am not sure if there is any driver for this on rockbox ... which means I would have to write the driver myself.
Btw. I never posted the link but here it is:
This is most of the content of Sysdata.bin extracted no folder structure unfortunately
I figured out how Sysdata.bin works. It is fairly simple.
I am currently writing a program to extract the entire thing even with folder structure.
If anyone out there knowing Java I could need some help to get it done faster ;).
Also I am sure we can replace files in Sysdata.bin like pictures and Stuff but I wouldn't suggest to replace bigger files. We don't know if there's any room left on the player for a bigger sysdata.bin and we don't know what would happen. But for smaller files it shouldn't be a problem but this would mean I would have to write another program which again takes time so for now I will just stick with extraction as there is some files I'd like to see how they are organized.
I think we will skip porting Rockbox firmware and instead porting Rockbox as an application. Rockbox application is exactly the same but using drivers from the main system instead of the rewritten drivers for the rockbox firmware. Since we are running a linux already on our player we can use the rockbox firmware natively as an application. All I would need to do in theory is to compile the SDL Libraries for our linux kernel and make a new Kernelimage then port rockbox application and compile it as well. This will take some time but I think we do have a fairly good Chance of seeing Rockbox in a few weeks/months on our beloved YP-R0. Since its basically a two man show at the moment I would really like if someone has the time to give me a hand as it is a lot of work.
Have a good day guys! I'll keep you updated on the progress!
These are really great news! I would love to see Rockbox on the R0!
Unfortunately I can't code so I can't really help with the port but to say "Thumbs up!"
|All times are GMT -5. The time now is 04:44 PM.|