misc gp2x tweaks

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@839 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-12-08 19:50:24 +00:00
parent 8b4f38f4c6
commit 8beb44303e
2 changed files with 13 additions and 16 deletions

View file

@ -797,9 +797,12 @@ rescan:
n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp); n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);
if (n < 0) { if (n < 0) {
char *t;
lprintf("menu_loop_romsel failed, dir: %s\n", curr_path); lprintf("menu_loop_romsel failed, dir: %s\n", curr_path);
// try root // try root
t = getcwd(curr_path, len);
if (t == NULL)
plat_get_root_dir(curr_path, len); plat_get_root_dir(curr_path, len);
n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp); n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);
if (n < 0) { if (n < 0) {

View file

@ -1,18 +1,18 @@
# you may or may not need to change this # you may or may not need to change this
#devkit_path = x:/stuff/dev/devkitgp2x/ #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/ lgcc_path = $(devkit_path)lib/gcc/arm-linux/4.0.3/
export CROSS = arm-linux- CROSS = arm-linux-
#CROSS = $(devkit_path)bin/arm-linux- #CROSS = $(devkit_path)bin/arm-linux-
# settings # settings
#up = 1 #up = 1
DEFINC = -I../.. -I. -D__GP2X__ -DARM CFLAGS += -O2 -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math
# -ftracer CFLAGS += -I../.. -I. -D__GP2X__ -DARM
COPT_COMMON = -static -s -O2 -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math CFLAGS += -mcpu=arm940t -mtune=arm940t
CFLAGS = $(COPT_COMMON) $(DEFINC) -mcpu=arm940t -mtune=arm940t LDFLAGS = -static -s -e code940 -Ttext 0x0 -L$(lgcc_path) -lgcc
GCC = $(CROSS)gcc GCC = $(CROSS)gcc
STRIP = $(CROSS)strip STRIP = $(CROSS)strip
AS = $(CROSS)as AS = $(CROSS)as
@ -50,7 +50,7 @@ $(BIN) : code940.elf
code940.elf : $(OBJS940) ../../common/helix/$(CROSS)helix-mp3.a code940.elf : $(OBJS940) ../../common/helix/$(CROSS)helix-mp3.a
@echo ">>>" $@ @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 940ym2612.o : ../../../pico/sound/ym2612.c
@echo ">>>" $@ @echo ">>>" $@
@ -78,6 +78,7 @@ tidy:
$(RM) code940.elf $(OBJS940) code940.map $(RM) code940.elf $(OBJS940) code940.map
##
OBJSMP3T = mp3test.o ../gp2x.o ../asmutils.o ../usbjoy.o OBJSMP3T = mp3test.o ../gp2x.o ../asmutils.o ../usbjoy.o
mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a
@ -88,10 +89,3 @@ mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a
cleanmp3test: cleanmp3test:
$(RM) $(OBJSMP3T) mp3test.gpe $(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 $@