I have made some changes to build.mak in pspsdk, for easier use on v1.5 psp.
In the target kxploit I have changed the path names in order to hide the "corrupted data" entries in the vsh.
I have added the target kx-install which installs the kx directories to the user specified PSP_MOUNT variable, which could be for example /cygdrive/e in cygwin or /mnt/psp in Linux.
Here is the patch. I have only tested it on cygwin so if anyone feels like testing it on Linux and MacOSX it would be great.
Code: Select all
--- build.mak (revision 501)
+++ build.mak (working copy)
@@ -90,16 +90,29 @@
FINAL_TARGET = $(TARGET).elf
endif
+KXTARGET = $(shell echo $(TARGET)000000 | cut -b1-6)
+KXDIR = $(KXTARGET)_________________________1
+KXDUMMY = $(KXTARGET)~1%
+
all: $(EXTRA_TARGETS) $(FINAL_TARGET)
kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
- mkdir -p "$(TARGET)"
- $(STRIP) $(TARGET).elf -o $(TARGET)/$(PSP_EBOOT)
- mkdir -p "$(TARGET)%"
- $(PACK_PBP) "$(TARGET)%/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
+ mkdir -p "$(KXDIR)"
+ $(STRIP) $(TARGET).elf -o $(KXDIR)/$(PSP_EBOOT)
+ mkdir -p "$(KXDUMMY)"
+ $(PACK_PBP) "$(KXDUMMY)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
+kx-install: kxploit
+ifeq ($(PSP_MOUNT),)
+ @echo '*** Error: $$(PSP_MOUNT) undefined. Please set it to for example /cygdrive/e'
+ @echo if your PSP is mounted to E: in cygwin.
+else
+ cp -r $(KXDIR) $(PSP_MOUNT)/PSP/GAME/
+ cp -r $(KXDUMMY) $(PSP_MOUNT)/PSP/GAME/
+endif
+
$(TARGET).elf: $(OBJS)
$(LINK.c) $^ $(LIBS) -o $@
@@ -118,3 +131,4 @@
clean: $(EXTRA_CLEAN)
-rm -f $(FINAL_TARGET) $(OBJS) $(PSP_EBOOT_SFO) $(PSP_EBOOT)
+ -rm -r $(KXDIR) $(KXDUMMY)