Rockbox

Tasklist

FS#9534 - Unified makefile

Attached to Project: Rockbox
Opened by Björn Stenberg (zagor) - Friday, 07 November 2008, 16:05 GMT
Last edited by Björn Stenberg (zagor) - Thursday, 20 November 2008, 11:38 GMT
Task Type Patches
Category Build environment
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Here's a snapshot of my "unified makefile" work in progress.

I'm not asking for bug reports. I am far from done. If you have opinions about the concept as such, though, feel free to comment.

The current state is that it builds the core completely (no plugins or codecs) and links it fine on ipod video, but nothing else.

If you want to play with other targets, remove/comment out the STARTUP(crt0.o) line in the app.lds file for that target.
This task depends upon

Closed by  Björn Stenberg (zagor)
Thursday, 20 November 2008, 11:38 GMT
Reason for closing:  Accepted
Comment by Björn Stenberg (zagor) - Monday, 10 November 2008, 16:02 GMT
One step further: Now builds single-file plugins as well, with plugin-specific compiler flags.
Comment by Björn Stenberg (zagor) - Tuesday, 11 November 2008, 10:15 GMT
Added codec libraries.
Comment by Björn Stenberg (zagor) - Tuesday, 11 November 2008, 15:09 GMT
Ipod video now compiles completely. Plugins, codecs and all.
Comment by Björn Stenberg (zagor) - Tuesday, 11 November 2008, 15:50 GMT
Added missing codecs.make, and some polishing.
Comment by Björn Stenberg (zagor) - Wednesday, 12 November 2008, 13:14 GMT
Now includes all plugins (subdir plugins were missing from patch 5).
Comment by Björn Stenberg (zagor) - Wednesday, 12 November 2008, 16:07 GMT
Split up codecs.make into subdir files. Added codec-specific -O flags.
Comment by Kai Posadowsky (Riffer) - Thursday, 13 November 2008, 12:23 GMT
Is it done now?
Comment by Björn Stenberg (zagor) - Thursday, 13 November 2008, 12:55 GMT
No. Targets are done, working on simulator now.
Comment by Björn Stenberg (zagor) - Friday, 14 November 2008, 00:40 GMT
Targets and sims are now ready. Bootloader remains.

Now is the time to start testing builds for your favourite targets. I'm sure there's a couple of glitches left.
Comment by Björn Stenberg (zagor) - Friday, 14 November 2008, 15:33 GMT
Commit candidate. Please review and comment.
Comment by Steve Bavin (pondlife) - Friday, 14 November 2008, 16:22 GMT
Hi Bjorn,

I get patch errors: http://www.pastebin.ca/1256232
Should Makefile itself be in the patch?
Comment by Steve Bavin (pondlife) - Friday, 14 November 2008, 16:23 GMT
Ah - I spoke too soon:

$ make
Generating dependencies
CC uclpack
CC lang.c
CC apps/action.c
CC apps/alarm_menu.c
CC apps/abrepeat.c
BMP2RB remote_rockboxlogo.128x42x1.bmp
CC buildsim/apps/bitmaps/remote_native/remote_rockboxlogo.128x42x1.c
BMP2RB remote_usblogo.104x27x1.bmp
CC buildsim/apps/bitmaps/remote_native/remote_usblogo.104x27x1.c
BMP2RB remote_default_icons.6x8x1.bmp
CC buildsim/apps/bitmaps/remote_native/remote_default_icons.6x8x1.c
CONVBDF fonts/08-Schumacher-Clean.bdf
CC apps/bookmark.c
In file included from /home/Steve/rockbox/apps/bookmark.c:34:
/home/Steve/rockbox/apps/recorder/icons.h:33:33: bitmaps/rockboxlogo.h: No such file or directory
make: *** [/home/Steve/rockbox/buildsim/apps/bookmark.o] Error 1
Comment by Daniel Stenberg (bagder) - Friday, 14 November 2008, 19:15 GMT
I got the makefile rejects too but they're harmless.

But I didn't get any rockbox-info.txt file created!?
Comment by Björn Stenberg (zagor) - Friday, 14 November 2008, 23:10 GMT
Steve: Thanks, fixed. (change line 13 in apps/bitmaps/bitmaps.make from = to += if you don't want to reapply the whole patch)

Daniel: Thanks. rockbox-info.txt added.

It seems /usr/bin/patch just doesn't handle removed files well. I have attached a version of this patch done with "svn diff --no-diff-deleted" that should apply easier.

Comment by Björn Stenberg (zagor) - Friday, 14 November 2008, 23:13 GMT
Uh, patch 10 was not against svn head. So here's patch11, against r19106.
Comment by Frank Gevaerts (fg) - Saturday, 15 November 2008, 01:00 GMT
m:robe 100:
/home/fg/rockbox/patched/apps/plugins/bitmaps/remote_native/SOURCES:20:6: warning: "LCD_REMOTE_DEPTH" is not defined
/home/fg/rockbox/patched/apps/plugins/bitmaps/remote_native/SOURCES:22:8: warning: "LCD_REMOTE_DEPTH" is not defined

h120 (and all other coldfires):
/home/fg/rockbox/dev/m68k-elf/bin/../lib/gcc/m68k-elf/3.4.6/../../../../m68k-elf/bin/ld: warning: cannot find entry symbol start; defaulting to 0010212c
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c: In function `mpc_move_next':
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c:184: warning: implicit declaration of function `swap32'
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c: In function `mpc_decoder_setup':
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c:1467: warning: implicit declaration of function `coldfire_set_macsr'
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c:1467: error: `EMAC_FRACTIONAL' undeclared (first use in this function)
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c:1467: error: (Each undeclared identifier is reported only once
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c:1467: error: for each function it appears in.)
/home/fg/rockbox/patched/apps/codecs/libmusepack/mpc_decoder.c:1467: error: `EMAC_SATURATE' undeclared (first use in this function)
make: *** [/home/fg/rockbox/patched/build-h120/apps/codecs/libmusepack/mpc_decoder.o] Error 1

Builds for other supported targets seem to be OK (although I haven't checked if all rocks were built) . I'm now building others as well. I haven't tried sims or bootloaders yet
Comment by Andrew Mahone (Unhelpful) - Saturday, 15 November 2008, 02:21 GMT
In a build against a completely clean tree, it was failing due to dependencies on sysfont.h and iaudio_bl_flash.h. This is an attempt to add those deps, and a rule for iaudio_bl_flash.h, to be applied on top of unified_make11-nodelete.patch. It works for me, but may need further improvement.
Comment by Björn Stenberg (zagor) - Sunday, 16 November 2008, 01:36 GMT
All reported issues fixed.
Comment by Frank Gevaerts (fg) - Sunday, 16 November 2008, 16:10 GMT
I tested all "normal" builds and quickly compared the zips:
- thai.lng isn't included in the zips for some reason
- ondio sp and player don't have a rombox.ucl anymore
- m200v4 and logik dax builds have linker errors that aren't there in trunk
- (probably as expected) no more midiplay.rock, but midi.rock instead
Comment by Frank Gevaerts (fg) - Sunday, 16 November 2008, 16:48 GMT
Bootloaders seem to build, except for the archoses (bootbox issues):
/home/fg/rockbox/patched/tools/root.make:33: /home/fg/rockbox/patched/flash/bootbox/apps.make: No such file or directory
/home/fg/rockbox/patched/tools/root.make:34: /home/fg/rockbox/patched/flash/bootbox/lang/lang.make: No such file or directory
/home/fg/rockbox/patched/tools/root.make:41: /home/fg/rockbox/patched/flash/bootbox/plugins/bitmaps/pluginbitmaps.make: No such file or directory
/home/fg/rockbox/patched/tools/root.make:42: /home/fg/rockbox/patched/flash/bootbox/plugins/plugins.make: No such file or directory
make: *** No rule to make target `/home/fg/rockbox/patched/flash/bootbox/plugins/plugins.make'. Stop.

The meizu m3 bootloader also doesn't build, but that's probably because of a meizu-specific bug (i.e. my fault). As that one isn't in the build table, it can be fixed later
Comment by Frank Gevaerts (fg) - Sunday, 16 November 2008, 19:36 GMT
All swcodec sims build on linux, but the hwcodec ones don't:
/home/fg/rockbox/patched/buildls-fmrecorder/uisimulator/sdl/sound.o: In function `pcm_apply_settings_nolock':
/home/fg/rockbox/patched/uisimulator/sdl/sound.c:75: undefined reference to `pcm_curr_sampr'
/home/fg/rockbox/patched/uisimulator/sdl/sound.c:78: undefined reference to `pcm_curr_sampr'
/home/fg/rockbox/patched/buildls-fmrecorder/uisimulator/sdl/sound.o: In function `sdl_audio_callback':
/home/fg/rockbox/patched/uisimulator/sdl/sound.c:235: undefined reference to `pcm_callback_for_more'
/home/fg/rockbox/patched/uisimulator/sdl/sound.c:236: undefined reference to `pcm_callback_for_more'
/home/fg/rockbox/patched/uisimulator/sdl/sound.c:256: undefined reference to `pcm_play_dma_stopped_callback'
collect2: ld returned 1 exit status
make: *** [/home/fg/rockbox/patched/buildls-fmrecorder/rockboxui] Error 1

The player gets another error first:
make: *** No rule to make target `lcd-playersim.h', needed by `/home/fg/rockbox/patched/buildls-player/uisimulator/sdl/lcd-charcells.o'. Stop.
Comment by Andrew Mahone (Unhelpful) - Sunday, 16 November 2008, 20:06 GMT
I get:
make: *** No rule to make target `../lib/codeclib.h', needed by `/home/chshrcat/build/rockbox/build/s_firm/apps/codecs/demac/libdemac/entropy.o'. Stop.

when building vs current svn. changing apps/codecs/demac/libdemac/entropy.c to include "codeclib.h" resolves it for me.
Comment by Andrew Mahone (Unhelpful) - Sunday, 16 November 2008, 20:34 GMT
On Gigabeat S, now that I've had a chance to attempt to play music, I'm getting codec failures attempting to play mp3 and vorbis (there's nothing else on the player).
Comment by Steve Bavin (pondlife) - Monday, 17 November 2008, 07:35 GMT
1) Small sync issue when patching:
...
patching file apps/codecs/demac/libdemac/parser.h
Hunk #1 FAILED at 31.
1 out of 1 hunk FAILED -- saving rejects to file apps/codecs/demac/libdemac/parser.h.rej
can't find file to patch at input line 3189
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: apps/codecs/demac/libdemac/rangecoding.h
|===================================================================
|--- apps/codecs/demac/libdemac/rangecoding.h (revision 19109)
|+++ apps/codecs/demac/libdemac/rangecoding.h (working copy)
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
...

2) Warnings displayed when making:
$ make
Makefile:67: warning: overriding commands for target `install'
/home/Steve/rockbox/tools/root.make:140: warning: ignoring old commands for target `install'
Makefile:72: warning: overriding commands for target `fullinstall'
/home/Steve/rockbox/tools/root.make:145: warning: ignoring old commands for target `fullinstall'
Generating dependencies
...

3) Error buildimg H300 sim under Cygwin:
make: *** No rule to make target `/home/Steve/rockbox/buildsim/apps/SDL_main.o', needed by `/home/Steve/rockbox/buildsim/rockboxui.exe'. Stop.
Comment by Björn Stenberg (zagor) - Tuesday, 18 November 2008, 08:18 GMT
Reported issues fixed, except:

- I don't have a gigabeat s so I haven't verified if it works. It works on my c200 though.
- I also don't have a cygwin environment to test in, so that is likely still broken.
Comment by Steve Bavin (pondlife) - Tuesday, 18 November 2008, 08:29 GMT
Thanks Bjorn - much better on Cygwin now, but sim builds still fail (as you expected).

Error is as before - "make: *** No rule to make target `/home/Steve/rockbox/buildsim/apps/SDL_main.o', needed by `/home/Steve/rockbox/buildsim/rockboxui.exe'. Stop."

Full output is at http://www.pastebin.ca/1260177, if it helps at all. Also attached a comparison of the old and new makefiles.
Comment by Björn Stenberg (zagor) - Tuesday, 18 November 2008, 23:45 GMT
According to tonight's 103 test builds, this patch should now compile on all targets svn compiles on.

The cygwin issue is still unsolved. My only clue is the file /usr/include/SDL/SDL_main.h. Can you upload make.dep somewhere?
Comment by Steve Bavin (pondlife) - Wednesday, 19 November 2008, 07:48 GMT
Hi Bjorn,

Here's my make.dep.
Comment by Björn Stenberg (zagor) - Wednesday, 19 November 2008, 12:16 GMT
Once more unto the breach.
Comment by Steve Bavin (pondlife) - Wednesday, 19 November 2008, 12:24 GMT
http://pastebin.com/m29f5c5e8 is the output for Cygwin/H300 sim.
Comment by Björn Stenberg (zagor) - Thursday, 20 November 2008, 09:46 GMT
Cygwin sim problems were due to mingw being an older gcc than any other compiler we use, and hence generating the dependencies differently.

This patch fixes that, so cygwin builds work now.
Comment by Steve Bavin (pondlife) - Thursday, 20 November 2008, 10:02 GMT
I can confirm it works for me now! (You probably didn't need confirmation, but it can't hurt.)

Loading...