New toolchain comitted

Michael Kurz michi.kurz at
Tue Aug 15 21:36:32 CEST 2006

Hmm, so far, for me the new toolchain worked on amd64.
But i got the same error again like with the old (prebuild) devkitarm. In
microwindows the nxkdb demo programm doesn't compile. It's the same Problem
Scor has reported in the forums. The make process doesn't recognize the
failure until the generation of the romfs. From that i searched up and find
out that the problem is:

Compiling keynorm.c ...
"ucfront-gcc arm-linux-elf-gcc  -c   ... -o keynorm.o keynorm.c
keynorm.c:6: error: size of array 'palette' is negative"

In keynorm.c I found:
"/* Generated by convbmp*/
#include "device.h"

/* MWIMAGEHDR image_keynorm converted from keynorm.bmp*/

static MWPALENTRY palette[-262273] = {

as stated in the comment it is genrated here:
"Generating keynorm.c from bitmap file ...
dslinux/user/microwin/src/bin/convbmp -o keynorm.c keynorm.bmp"

so i thought the problem is in convbmp.

So i now compiled the convbmp programm by hand with the -m32 (as i'm running
amd64 it was compiled as 64bit) compiler switch.
Now the output of
convbmp -o keynorm.c keynorm.bmp
looks much better.
I'm not really familiar with gcc, but i think the -m32 switch has no effect
on a 32bit gcc/linux.
So I think in the user/microwin/src/Makefile.rules

$(TOP)/bin/convbmp: $(TOP)/mwin/bmp/convbmp.c
    echo "Building $@ tool ..."
    $(HOSTCC) $(HOSTCFLAGS)  $< -o $@

 should be changed to

$(TOP)/bin/convbmp: $(TOP)/mwin/bmp/convbmp.c
    echo "Building $@ tool ..."
    $(HOSTCC) $(HOSTCFLAGS) -m32 $< -o $@

or as diff file attached :)
with that modification for me the build worked without problems (with the
new and the old toolchain)
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
Index: src/Makefile.rules
RCS file: /cvsroot/dslinux/dslinux/user/microwin/src/Makefile.rules,v
retrieving revision 1.2
diff -u -r1.2 Makefile.rules
--- src/Makefile.rules	10 Apr 2006 07:29:07 -0000	1.2
+++ src/Makefile.rules	15 Aug 2006 19:22:50 -0000
@@ -610,7 +610,7 @@
 $(TOP)/bin/convbmp: $(TOP)/mwin/bmp/convbmp.c
 	echo "Building $@ tool ..."
-	$(HOSTCC) $(HOSTCFLAGS) $< -o $@
+	$(HOSTCC) $(HOSTCFLAGS) -m32 $< -o $@
 # Compilation target for bdf font file conversion

More information about the dslinux-devel mailing list