Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#12027 - Add the Zipit Z2 as an build target.

Attached to Project: Rockbox
Opened by Don Heyse (dheyse) - Thursday, 24 March 2011, 19:36 GMT+2
Task Type Patches
Category Configuration
Status Unconfirmed
Assigned To No-one
Player Type Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

Here's a patch to version r29143M-110324 that adds the Zipit Z2 as a build target. It requires one new file (also attached) firmware/target/hosted/zipit/powermgmt-zipit-z2.c to monitor the battery.

This is mostly a generic SDL app with a few tweaks for the Zipit buttons and battery monitoring. The patch also includes a few small bug fixes for SDL app builds. I had to fix the labels in the asm section of lcd-16bit.c. There were some missing parenthesis on an #ifdef in button-application.c. And the apps/SOURCES file needs an #ifdef to handle an SDL app build without touchscreen support.
   rb-t11.patch (12.9 KiB)
 tools/configure                                     |   35 +++++++++++++++
 apps/codecs.c                                       |    2 
 apps/SOURCES                                        |    8 +++
 apps/main.c                                         |    4 -
 firmware/export/config.h                            |    4 +
 firmware/include/dir_uncached.h                     |    2 
 firmware/include/file.h                             |    2 
 firmware/SOURCES                                    |    4 +
 firmware/target/hosted/sdl/app/button-application.c |   46 +++++++++++++++++++-
 firmware/target/hosted/sdl/system-sdl.c             |    4 -
 firmware/target/hosted/sdl/button-sdl.c             |    6 ++
 firmware/common/rbpaths.c                           |    2 
 firmware/common/filefuncs.c                         |    2 
 firmware/drivers/lcd-16bit.c                        |   10 ++--
 uisimulator/common/SOURCES                          |    2 
 15 files changed, 116 insertions(+), 17 deletions(-)

   powermgmt-zipit-z2.c (6.5 KiB)
This task depends upon

Comment by Don Heyse (dheyse) - Thursday, 24 March 2011, 20:11 GMT+2
Oops. Forgot to include firmware/export/config/zipit_z2.h

This includes a solution for the long (and getting longer) #ifdef lines for various SDL app targets. If you include PLATFORM_SDL with your PLATFORM_X in your CONFIG_PLATFORM setting then you only need CONFIG_SDL on most of the long #ifdef lines. Actually I currently want ALL of the PLATFORM_SDL code for the zipit.
Comment by Don Heyse (dheyse) - Thursday, 24 March 2011, 21:31 GMT+2
Here's another try with the 2 new files included in the patch.
   rb-zipit.patch (22.9 KiB)
 tools/configure                                     |   35 ++
 apps/codecs.c                                       |    2 
 apps/SOURCES                                        |    8 
 apps/main.c                                         |    4 
 firmware/export/config.h                            |    4 
 firmware/export/config/zipit_z2.h                   |  107 ++++++++
 firmware/include/dir_uncached.h                     |    2 
 firmware/include/file.h                             |    2 
 firmware/SOURCES                                    |    4 
 firmware/target/hosted/zipit/powermgmt-zipit-z2.c   |  241 ++++++++++++++++++++
 firmware/target/hosted/sdl/app/button-application.c |   46 +++
 firmware/target/hosted/sdl/system-sdl.c             |    4 
 firmware/target/hosted/sdl/button-sdl.c             |    6 
 firmware/common/rbpaths.c                           |    2 
 firmware/common/filefuncs.c                         |    2 
 firmware/drivers/lcd-16bit.c                        |   10 
 uisimulator/common/SOURCES                          |    2 
 17 files changed, 464 insertions(+), 17 deletions(-)

Comment by Don Heyse (dheyse) - Friday, 25 March 2011, 15:27 GMT+2
Here's another try with the 2 new files included in the patch.
   rb-zipit.patch (22.9 KiB)
 tools/configure                                     |   35 ++
 apps/codecs.c                                       |    2 
 apps/SOURCES                                        |    8 
 apps/main.c                                         |    4 
 firmware/export/config.h                            |    4 
 firmware/export/config/zipit_z2.h                   |  107 ++++++++
 firmware/include/dir_uncached.h                     |    2 
 firmware/include/file.h                             |    2 
 firmware/SOURCES                                    |    4 
 firmware/target/hosted/zipit/powermgmt-zipit-z2.c   |  241 ++++++++++++++++++++
 firmware/target/hosted/sdl/app/button-application.c |   46 +++
 firmware/target/hosted/sdl/system-sdl.c             |    4 
 firmware/target/hosted/sdl/button-sdl.c             |    6 
 firmware/common/rbpaths.c                           |    2 
 firmware/common/filefuncs.c                         |    2 
 firmware/drivers/lcd-16bit.c                        |   10 
 uisimulator/common/SOURCES                          |    2 
 17 files changed, 464 insertions(+), 17 deletions(-)

Comment by Don Heyse (dheyse) - Wednesday, 30 March 2011, 03:57 GMT+2
Since it came up on IRC, i believe I started needing the assember fix for lcd-16bit.c when I enabled optimization for gcc. I suspect the optimizer inlined the assembler code multiple times, resulting in an error when it encountered the two assembler lables (rowstart and nextrow?) in multiple places. The fix just adds changes the label names slightly so each inlined occurance is numbered, and thus different, preventing the conflict.
Comment by Bertrik Sikken (bertrik) - Saturday, 04 June 2011, 14:08 GMT+2
Resync against current SVN. I doesn't seem to compile though... (problems in asm statements)
   rb-zipit_2.patch (23 KiB)
 b/apps/SOURCES                                        |    8 
 b/apps/codecs.c                                       |    2 
 b/apps/main.c                                         |    4 
 b/firmware/SOURCES                                    |    4 
 b/firmware/common/filefuncs.c                         |    2 
 b/firmware/common/rbpaths.c                           |    2 
 b/firmware/drivers/lcd-16bit.c                        |   10 
 b/firmware/export/config.h                            |    4 
 b/firmware/export/config/zipit_z2.h                   |  107 +++++++
 b/firmware/include/dir_uncached.h                     |    2 
 b/firmware/include/file.h                             |    2 
 b/firmware/target/hosted/sdl/app/button-application.c |   46 +++
 b/firmware/target/hosted/sdl/button-sdl.c             |    6 
 b/firmware/target/hosted/sdl/system-sdl.c             |    4 
 b/firmware/target/hosted/zipit/powermgmt-zipit-z2.c   |  241 ++++++++++++++++++
 b/tools/configure                                     |   35 ++
 b/uisimulator/common/SOURCES                          |    2 
 17 files changed, 464 insertions(+), 17 deletions(-)

Comment by Don Heyse (dheyse) - Sunday, 05 June 2011, 17:12 GMT+2
Hey, thanks for the update. I'm a bit behind, still trying to track down what happened to dim the the high frequency sound sometime around February.

Anyhow, the old fracmul.h code (with macros instead of the inline functions) still works. So here's a small additional patch to get the zipit code to compile. Looks like I also need to replace the HAVE_SIGALTSTACK_THREADS with HAVE_SDL_THREADS in the configure script since I couldn't get that to work with the uclibc on either zipit userland.
   fracmul.patch (1.3 KiB)
 apps/fracmul.h |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Loading...