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
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
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  A custom Rockbox build
« previous next »
  • Print
Pages: [1]

Author Topic: A custom Rockbox build  (Read 4244 times)

Offline zaphee

  • Member
  • *
  • Posts: 44
  • mrjl@xmppnet.de
A custom Rockbox build
« on: December 22, 2010, 04:45:42 PM »
Dear Rockbox developers,
I would like to build my own custom copy of rockbox from source. More precisely, I want to disable the database (I never use it anyway), disable the equalizer (bass/treble settings are sufficient for me), enable USB support (since my main machine I throw music on my Clip+ from runs Linux, I don't think I'll have much trouble using that), and I also want the "backlight on volume change" option to be enabled. To do so, I need your help. I have very little coding experience and knowledge in C (yet still I'm learning), so step-by-step instructions would be highly appreciated.
Thank you.
Logged
iPod nano (1-st gen. ; 4GB)
Sandisk sansa Clip+ (2GB)
Android 4.0 tablet

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9215
Re: A custom Rockbox build
« Reply #1 on: December 22, 2010, 07:15:44 PM »
Check the "contribute" link on the front page.  Once you setup the build tools and build a normal build, you can edit the config file for your target in firmware/export/config to disable things. 
Logged

Offline zaphee

  • Member
  • *
  • Posts: 44
  • mrjl@xmppnet.de
Re: A custom Rockbox build
« Reply #2 on: December 23, 2010, 04:54:26 PM »
Quote from: saratoga on December 22, 2010, 07:15:44 PM
Check the "contribute" link on the front page.  Once you setup the build tools and build a normal build, you can edit the config file for your target in firmware/export/config to disable things. 
OK, I managed to make a normal build without problems (got the .zip).
I've uncommented this :
Code: [Select]
//#define USE_ROCKBOX_USBand commented this :
Code: [Select]
#define USB_HANDLED_BY_OFin /rockbox/firmware/export/config/sansaclipplus.h

Now, I imagine that I have to build a bootloader that takes these settings  in account too. Then, I will have to modify the OF file with it manually (because rbutil won't modify it with the right bootloader, if I understand correctly) and reflash my player. How can I do ?
And where can I enable/disable features like database, equalizer etc. ?

Oh, and what does "#define HAVE_TUNER_PWR_CTRL" mean in sansaclipplus.h ? Can I uncomment it ?
Logged
iPod nano (1-st gen. ; 4GB)
Sandisk sansa Clip+ (2GB)
Android 4.0 tablet

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9215
Re: A custom Rockbox build
« Reply #3 on: December 23, 2010, 06:24:52 PM »
Quote from: zaphee on December 23, 2010, 04:54:26 PM
Now, I imagine that I have to build a bootloader that takes these settings  in account too.

No I don't think that really matters.

Quote from: zaphee on December 23, 2010, 04:54:26 PM
Oh, and what does "#define HAVE_TUNER_PWR_CTRL" mean in sansaclipplus.h ? Can I uncomment it ?

No idea, try grep and see where its used. 

Quote from: zaphee on December 23, 2010, 04:54:26 PM
And where can I enable/disable features like database, equalizer etc. ?

If theres no define for them, you'll have to dig into the code and figure out where they're called from.  Again, grep is your friend. 
Logged

Offline zaphee

  • Member
  • *
  • Posts: 44
  • mrjl@xmppnet.de
Re: A custom Rockbox build
« Reply #4 on: December 28, 2010, 06:58:12 AM »
So I've built r28891 from source. Here are the changes I made in sansaclipplus.h (most of them were made "just to see what happens", yes, I know it's risky) :

Code: [Select]
127c127
< //#define HAVE_TUNER_PWR_CTRL
---
> #define HAVE_TUNER_PWR_CTRL
172c172
< #define CPU_FREQ      240000000
---
> #define CPU_FREQ      200000000
182,183c182,183
< #define USB_HANDLED_BY_OF
< //#define USE_ROCKBOX_USB
---
> //#define USB_HANDLED_BY_OF
> #define USE_ROCKBOX_USB
192c192
< //#define HAVE_ADJUSTABLE_CPU_FREQ
---
> #define HAVE_ADJUSTABLE_CPU_FREQ

The code compiled without errors, I managed to build the bootloader (and patch the clip+ firmware with it using mkamsboot that I built from svn) and the main firmware. So here's the feedback :

Knowing that the USB stack is supposed to be enabled (and stable) now, I connected my player to my Linux machine... and it froze with the flash activity indicator icon stuck on the screen ! I tried to connect it several times, but it never worked. Do I still have to apply some patch to make it work as expected ?
Now I have frequency scaling, which works only once in a while (shows 24 MHz most of the time and sometimes briefly jumps to 240 MHz when boosted, and not 200 MHz as I defined in sansaclipplus.h). The player got noticeably slower, but in the end it doesn't matter that much since it does save battery life, doesn't it ?
Also, I can't change the volume in this build. It just remains the same as it was last set in the previous build that was installed. The volume indicator, however, does change. Why is that ? I didn't touch sound-related #defines...
Logged
iPod nano (1-st gen. ; 4GB)
Sandisk sansa Clip+ (2GB)
Android 4.0 tablet

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9215
Re: A custom Rockbox build
« Reply #5 on: December 28, 2010, 08:28:36 AM »
Quote from: zaphee on December 28, 2010, 06:58:12 AM
Knowing that the USB stack is supposed to be enabled (and stable) now,

No its not.  It'll be enabled when its stable.

Quote from: zaphee on December 28, 2010, 06:58:12 AM
Now I have frequency scaling, which works only once in a while (shows 24 MHz most of the time and sometimes briefly jumps to 240 MHz when boosted, and not 200 MHz as I defined in sansaclipplus.h).

You can't just punch in random clock speed settings.  You'll also have to add code to the driver to actually generate that clock speed from various oscillators built into the player.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  A custom Rockbox build
 

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

Page created in 0.023 seconds with 16 queries.