Make some tweaks and fixes for the build system for Ubuntu
This commit is contained in:
parent
442027050f
commit
1d1d50494e
2
Makefile
2
Makefile
|
@ -784,4 +784,4 @@ allclean:
|
|||
rm -rf build/*
|
||||
|
||||
codeclean:
|
||||
find $(B_DIR)/{game,inflate,lib} -name '*.o' -delete
|
||||
find $(B_DIR)/game $(B_DIR)/inflate $(B_DIR)/lib -name '*.o' -delete
|
||||
|
|
|
@ -17,11 +17,13 @@ The ntsc-1.0 and ntsc-final versions are fully decompiled, but a small handful o
|
|||
For Arch Linux:
|
||||
|
||||
* Install these packages: `binutils fakeroot gcc make python vim`
|
||||
* Install from AUR: `armips` and a mips binutils package of your choice (eg. `mips-elf-binutils`)
|
||||
* Install from AUR: `armips`
|
||||
* Install from AUR: a MIPS binutils package of your choice (eg. `mips-elf-binutils`)
|
||||
* Install from AUR: a MIPS gcc package of your choice (eg. `mips-elf-gcc`)
|
||||
|
||||
For Debian and Ubuntu:
|
||||
|
||||
* Install these packages: `binutils-mips-linux-gnu build-essential libc6-dev-i386 libcapstone3 libcapstone-dev make`
|
||||
* Install these packages: `binutils-mips-linux-gnu build-essential gcc-mips-linux-gnu libc6-dev-i386 libcapstone-dev make`
|
||||
* Compile and install `armips`
|
||||
|
||||
## ROM Versions
|
||||
|
|
|
@ -4,4 +4,4 @@ C_FILES = $(wildcard *.c)
|
|||
gcc -O3 %< -o $@
|
||||
|
||||
mkrom: $(C_FILES)
|
||||
gcc -O3 $(C_FILES) -o mkrom
|
||||
gcc -Wno-unused-result -O3 $(C_FILES) -o mkrom
|
||||
|
|
|
@ -41,9 +41,7 @@ bool map_get_function_rompos(char *funcname, uint32_t *start, uint32_t *end)
|
|||
|
||||
fseek(state.mapfd, 0, SEEK_SET);
|
||||
|
||||
while (!feof(state.mapfd)) {
|
||||
fgets(line, 1024, state.mapfd);
|
||||
|
||||
while (fgets(line, 1024, state.mapfd)) {
|
||||
if (lookingforend) {
|
||||
ptr = line;
|
||||
|
||||
|
@ -116,9 +114,7 @@ bool map_get_segment_rompos(char *segname, uint32_t *start, uint32_t *end)
|
|||
// Find lines like this:
|
||||
// " 0x0000000000001050 _libzipSegmentRomStart = __rompos"
|
||||
|
||||
while (!feof(state.mapfd)) {
|
||||
fgets(line, 1024, state.mapfd);
|
||||
|
||||
while (fgets(line, 1024, state.mapfd)) {
|
||||
if (!found_start && strstr(line, startstring)) {
|
||||
char *ptr = strstr(line, "0x");
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
extern struct state state;
|
||||
|
||||
static void copy(char *segname, uint8_t *payload, size_t len, char *constname)
|
||||
static void copy(char *segname, uint8_t *payload, uint32_t len, char *constname)
|
||||
{
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
|
|
|
@ -42,7 +42,11 @@ static uint32_t calc_sum(char *sumfunc, Algo algo)
|
|||
uint32_t offset;
|
||||
|
||||
if (!map_get_function_rompos(sumfunc, &start, &end)) {
|
||||
fprintf(stderr, "Unable to find function \"%s\" in map file\n", sumfunc);
|
||||
fprintf(stderr, "Unable to find function \"%s\" in map file.\n", sumfunc);
|
||||
fprintf(stderr, "If a piracy function has been renamed then you may need to rebuild mkrom:\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " make -C tools/mkrom\n");
|
||||
fprintf(stderr, "\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -99,7 +103,11 @@ static void write_sum(char *patchfunc, uint32_t sum)
|
|||
uint32_t end;
|
||||
|
||||
if (!map_get_function_rompos(patchfunc, &start, &end)) {
|
||||
fprintf(stderr, "Unable to find function \"%s\" in map file\n", patchfunc);
|
||||
fprintf(stderr, "Unable to find function \"%s\" in map file.\n", patchfunc);
|
||||
fprintf(stderr, "If a piracy function has been renamed then you may need to rebuild mkrom:\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " make -C tools/mkrom\n");
|
||||
fprintf(stderr, "\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue