From: notaz Date: Tue, 8 Dec 2009 19:50:24 +0000 (+0000) Subject: misc gp2x tweaks X-Git-Tag: v1.85~212 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8beb44303e3775fc574a92a558f5237bdd72fda3;p=picodrive.git misc gp2x tweaks git-svn-id: file:///home/notaz/opt/svn/PicoDrive@839 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/common/menu.c b/platform/common/menu.c index 8e3b9dd0..b5e5e36b 100644 --- a/platform/common/menu.c +++ b/platform/common/menu.c @@ -797,10 +797,13 @@ rescan: n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp); if (n < 0) { + char *t; lprintf("menu_loop_romsel failed, dir: %s\n", curr_path); // try root - plat_get_root_dir(curr_path, len); + t = getcwd(curr_path, len); + if (t == NULL) + plat_get_root_dir(curr_path, len); n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp); if (n < 0) { // oops, we failed diff --git a/platform/gp2x/code940/Makefile b/platform/gp2x/code940/Makefile index 886ded9a..b939d336 100644 --- a/platform/gp2x/code940/Makefile +++ b/platform/gp2x/code940/Makefile @@ -1,18 +1,18 @@ - # you may or may not need to change this #devkit_path = x:/stuff/dev/devkitgp2x/ -devkit_path = /usr/local/devkitPro/devkitGP2X/ +devkit_path ?= $(HOME)/opt/devkitGP2X/ lgcc_path = $(devkit_path)lib/gcc/arm-linux/4.0.3/ -export CROSS = arm-linux- +CROSS = arm-linux- #CROSS = $(devkit_path)bin/arm-linux- # settings #up = 1 -DEFINC = -I../.. -I. -D__GP2X__ -DARM -# -ftracer -COPT_COMMON = -static -s -O2 -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math -CFLAGS = $(COPT_COMMON) $(DEFINC) -mcpu=arm940t -mtune=arm940t +CFLAGS += -O2 -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math +CFLAGS += -I../.. -I. -D__GP2X__ -DARM +CFLAGS += -mcpu=arm940t -mtune=arm940t +LDFLAGS = -static -s -e code940 -Ttext 0x0 -L$(lgcc_path) -lgcc + GCC = $(CROSS)gcc STRIP = $(CROSS)strip AS = $(CROSS)as @@ -50,7 +50,7 @@ $(BIN) : code940.elf code940.elf : $(OBJS940) ../../common/helix/$(CROSS)helix-mp3.a @echo ">>>" $@ - $(LD) -static -e code940 -Ttext 0x0 $^ -L$(lgcc_path) -lgcc -o $@ -Map code940.map + $(LD) $^ $(LDFLAGS) -o $@ -Map code940.map 940ym2612.o : ../../../pico/sound/ym2612.c @echo ">>>" $@ @@ -78,6 +78,7 @@ tidy: $(RM) code940.elf $(OBJS940) code940.map +## OBJSMP3T = mp3test.o ../gp2x.o ../asmutils.o ../usbjoy.o mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a @@ -88,10 +89,3 @@ mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a cleanmp3test: $(RM) $(OBJSMP3T) mp3test.gpe -# uClibc/e_pow.o : uClibc/e_pow.c -# @echo $< -# @$(GCC) $(CFLAGS) -fno-profile-generate -c $< -o $@ - -# uClibc/e_sqrt.o : uClibc/e_sqrt.c -# @echo $< -# @$(GCC) $(CFLAGS) -fno-profile-generate -c $< -o $@