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,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

View file

@ -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 $@