Hacking Compiling... Configurable USB Loader ( cfg-loader )

  • Thread starter Thread starter Yolanda98
  • Start date Start date
  • Views Views 6,562
  • Replies Replies 25

Yolanda98

Member
Newcomer
Joined
Aug 16, 2009
Messages
9
Reaction score
0
Trophies
1
XP
43
Country
United States
I downloaded the CFG source code (r304 @ http://code.google.com/p/cfg-loader/ ).
I changed the CFG main splash screen (as in data\intro4.jpg) and when tried to compile the project using devkitPro I received some errors (see below):

Code:
mload.c
c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c: In function 'mload_init':
c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c:67:4: warning: implicit declaration of function 'iosDestroyHeap'
...
...
linking ... cfg69d.elf
mload.o: In function `mload_init':
mload.c:(.text.mload_init+0xf8): undefined reference to `iosDestroyHeap'
mload.o: In function `mload_close':
mload.c:(.text.mload_close+0x28): undefined reference to `iosDestroyHeap'
collect2: ld returned 1 exit status
make[1]: *** [/c/devkitPro/cfg-loader.googlecode.com.r304/cfg69d.elf] Error 1
"make": *** [build] Error 2

I would like to know if any of the developers can help me on getting the DOL (and ELF) compiled.
Please find below the complete Programmer's Notepad output.

Code:
> "make" 

Building cfg69d -DVERSION=69d -DDEVKITPPCVER=22 -DCCOPT="-Os"
libOGC Release 1.8.6
button.png
intro4.jpg
window.png
GRRLIB.c
apploader.c
banner.c
cache.c
cfg.c
cfgutil.c
cheats.c
confont512.c
console.c
coverflow.c
debug.c
disc.c
dns.c
dol.c
dolmenu.c
dvd_broadway.c
fat.c
frag.c
fst.c
gcmodplay.c
gettext.c
grid.c
gui.c
guimenu.c
http.c
mem.c
memcheck.c
menu.c
mload.c
c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c: In function 'mload_init':
c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c:67:4: warning: implicit declaration of function 'iosDestroyHeap'
mload_modules.c
mp3player.c
multidol.c
music.c
net.c
partition.c
patchcode.c
playlog.c
restart.c
sdhc.c
sha1.c
sort.c
splits.c
strutil.c
subsystem.c
sys.c
unicmap.c
update.c
usb-loader.c
usbstorage.c
util.c
utils.c
video.c
wbfs.c
wbfs_fat.c
wdvd.c
wgui.c
wiip.c
wpad.c
xml.c
pngu.c
c:/devkitPro/cfg-loader.googlecode.com.r304/source/pngu/pngu.c: In function 'user_error':
c:/devkitPro/cfg-loader.googlecode.com.r304/source/pngu/pngu.c:1046:2: warning: 'jmpbuf' is deprecated (declared at c:/devkitPro/cfg-loader.googlecode.com.r304/lib/png/include/png.h:1098)
pngu_grrlib.c
libwbfs.c
rijndael.c
wiidisc.c
ioapi.c
miniunz.c
mztools.c
unzip.c
patchhook.S
stub.S
linking ... cfg69d.elf
mload.o: In function `mload_init':
mload.c:(.text.mload_init+0xf8): undefined reference to `iosDestroyHeap'
mload.o: In function `mload_close':
mload.c:(.text.mload_close+0x28): undefined reference to `iosDestroyHeap'
collect2: ld returned 1 exit status
make[1]: *** [/c/devkitPro/cfg-loader.googlecode.com.r304/cfg69d.elf] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 01:53
 
Hey Yolanda98,
It would help me a lot if you send the files by email so I can look at them.

@Slimmmmmm
I tried the site you sent me but there all read-only, I need to be able to download the sources to try this. And the only way I can download is by one-by-one which is too much time consuming.
 
Yolanda98 said:
Hi guys, thanks for your replies. I just uploaded the RAR file to mediafire since its almost 8mb.

cfg-loader.googlecode.com.r304.rar
Hi, thanks for the files, but there seems to be some files missing from this source, ex zlib.h
That's where my Programmer's Notepad stopped and gave me an error.
Did you upload the source that you were using? Or is this just downloaded from the website?
 
Hello Yolanda98, I don't have a problem in compiling it and I can't understand the error message you get because you have libogc 1.8.6, but the compiled dol just codedump for me. If I'm using the original picture it works fine, but if I use your custom intro it codedump. I'm now trying to find out why it doesn't work and I will upload the dol for you asap.
 
rahoul102 said:
Hi, thanks for the files, but there seems to be some files missing from this source, ex zlib.h
That's where my Programmer's Notepad stopped and gave me an error.
Did you upload the source that you were using? Or is this just downloaded from the website?

just use svn damnit

besides, including libs in the source is just wrong anyway
the should be taken from the system instead
this prevents disasters like the libwbfs delete bug that still lingers
 
  • Like
Reactions: bugzme
Alright, the filesize is somewhere specifed and I don't want to search, so I simply compressed the image to come under the original filesize and filled the compressed image with zero bytes to get the exact filesize of the original image, and now it seems to work fine
laugh.gif

cfg69d.7z
Remember, use at own risk.
 
rahoul102 said:
Yolanda98 said:
Hi guys, thanks for your replies. I just uploaded the RAR file to mediafire since its almost 8mb.

cfg-loader.googlecode.com.r304.rar
Hi, thanks for the files, but there seems to be some files missing from this source, ex zlib.h
That's where my Programmer's Notepad stopped and gave me an error.
Did you upload the source that you were using? Or is this just downloaded from the website?
1- I looked for the file you mentioned and I found it on cfg-loader.googlecode.com.r304\lib\zlib\src\zlib.h ... is this the one you pointed on your example? What other files are missing?
2- I downloaded the source code and only changed the image intro4.jpg
 
Yolanda98 said:
1- I looked for the file you mentioned and I found it on cfg-loader.googlecode.com.r304\lib\zlib\src\zlib.h ... is this the one you pointed on your example? What other files are missing?
2- I downloaded the source code and only changed the image intro4.jpg
Have you tried my version? I compiled the latest svn with your changed intro4.jpg, this is what you wanted right?
 
FIX94 said:
Yolanda98 said:
1- I looked for the file you mentioned and I found it on cfg-loader.googlecode.com.r304\lib\zlib\src\zlib.h ... is this the one you pointed on your example? What other files are missing?
2- I downloaded the source code and only changed the image intro4.jpg
Have you tried my version? I compiled the latest svn with your changed intro4.jpg, this is what you wanted right?
Fix94, thanks for the time you took on reviewing this. I was waiting to do some test before answer to you and here I go with some details.

YES, I tried your dol and it works (splash screen changed). You ROCKS and It seems you are the only one "lucky" who got a final dol. Nevertheless Fix94, I would like to change some other settings but inside the code and not into the xml or the global config file reads by the boot.dol. That's why I need to successfully compile everything on my end and I am asking for some help on getting this done.
Definitely the size of the intro4.jpg and some kind of (security or efficiency) checking during the compilation get me into the the final error and the unsuccessful compilation. Following your valuable advice (about the file size) I put back the original intro4.jpg and tried to compile everything and I got the same error once again. That's when I though devkitPro was my real problem because on the past I was reviewing/testing some wads source code and I may have mixed for example the lib folder/files of both projects (the wads and the cfg-loader). So I decided to start from the very beginning and please correct me if I did something wrong.

I downloaded and re-installed the devkitPro on a fresh path (C:\devkitPro). I also downloaded the source code (cfg-loader) again where I would like to comment that a new version of the cfg-loader just came out. I was using the version r304 when I posted the source code here and now the last revision is r306. I downloaded it the r306 (http://cfg-loader.googlecode.com/svn/trunk/Source/) and this time I didn't touch the intro4.jpg and put the new source code on the following folder structure:
C:\devkitPro
C:\devkitPro\cfg-loader.googlecode.com.r306\source\ (inside this folder I put the cfg-loader source code folders/files)
build
cios
data
Languages
lib
source
tools
LICENSE.txt
Makefile
README-CFG.txt
USBLoader.pnproj
usbloader.pnpsI opened the USBLoader.pnproj with the Programmers Notepad and when tried to compile everything I got some warnings and the same error that rahoul102 posted above.
In file included from c:/devkitPro/cfg-loader.googlecode.com.r306/source/source/gui.c:22:0:
c:/devkitPro/cfg-loader.googlecode.com.r306/source/lib/png/include/png.h:399:18: fatal error: zlib.h: No such file or directory
compilation terminated.This error is pretty simple but since I am into Microsoft Visual Studio and I don't know how devkitPro works I don't know how to setup or specify this reference. I would like to ask some questions about how to setup the devkitPro correctly.

1. Is it ok to put the cfg-loader source code folder inside "C:\devkitPro\" and specifically like I did "C:\devkitPro\cfg-loader.googlecode.com.r306\source\"? In other case what should I do?

2. Aside from the cfg-loader source code that I placed inside devkitPro, do I need to add something else to the root of the devkitPro?

3. Do you downloaded and compile the source code from Google or you compile the one I posted?

4. Can you please send me your folders/files structure list on how you have your devkitPro folder so I can compare with mine and see what is missing on my end?
Please I will appreciate so much if you can send me a file with that structure on it ( type on the DOS prompt ---> dir /b /s >cfg.txt and send me the cfg.txt )

Once again, THANKS A LOT for everything.
 
Alright, you need:
Devkitppc r22
LibOGC 1.8.6
Clear the c:/devkitPro/libogc folder and extract the contents of the libogc-1.8.6.tar.bz into the empty libogc folder. Install devkitppc r22.

Create a folder structure:
c:/devkitPro/portlibs/ppc/include
c:/devkitPro/portlibs/ppc/lib

Move the
cfg-loader.googlecode.com.r306/lib/zlib/lib22/libz.a
to
c:/devkitPro/portlibs/ppc/lib
and the contents of
cfg-loader.googlecode.com.r306/lib/zlib/include
into
c:/devkitPro/portlibs/ppc/include
Then it should compile fine.
 
PsyBlade said:
rahoul102 said:
Hi, thanks for the files, but there seems to be some files missing from this source, ex zlib.h
That's where my Programmer's Notepad stopped and gave me an error.
Did you upload the source that you were using? Or is this just downloaded from the website?

just use svn damnit

besides, including libs in the source is just wrong anyway
the should be taken from the system instead
this prevents disasters like the libwbfs delete bug that still lingers

I understand and agree with you on where the libs folder must resided, however I was trying to compile everything as it is online and that's the main reason I downloaded and follow 100% the project folder structure. Please take a look at the lib folder and how is inside the Source folder @ http://cfg-loader.googlecode.com/svn/trunk/Source/lib/

What do you recommend?
 
FIX94 said:
Alright, you need:
Devkitppc r22
LibOGC 1.8.6
Clear the c:/devkitPro/libogc folder and extract the contents of the libogc-1.8.6.tar.bz into the empty libogc folder. Install devkitppc r22.

Create a folder structure:
c:/devkitPro/portlibs/ppc/include
c:/devkitPro/portlibs/ppc/lib

Move the
cfg-loader.googlecode.com.r306/lib/zlib/lib22/libz.a
to
c:/devkitPro/portlibs/ppc/lib
and the contents of
cfg-loader.googlecode.com.r306/lib/zlib/include
into
c:/devkitPro/portlibs/ppc/include
Then it should compile fine.

OMG! THANKS! You just replied. Ok, now I remembered that I did something like this before compiling the other WAD project. I will try this right now...
 
Damn FIX I coulda used your help yesterday
tongue.gif


A good tip I recently learned is keep older versions of Devkitpro and libogc when you update them.
If you had updated devkit recently then cfg, libwiigui, tantrics emus, wiimc etc etc wouldn't compile and you needed to revert to an older rev.

Now in my C drive I have a few builds put into rars EG
devkitPro_r23+libogc_1.8.7.rar < newest doesn't work with anything unless you get busy
devkitPro_r22+libogc_1.8.6.rar < works with most things in development now etc etc
Remember to keep lib back-ups too (portlibs, grrlib, ntfs, ext2fs, miilib, libwiigui)

Now if you can compile certain things with a certain group of files you can either have seperate installs and edit the makefiles etc. Or just revert by unraring the builds you need. Not the best solution but very easy.
If something doesn't compile you can read the errors and sometimes figure them out, or ask for help but to revert to what works is by far quicker.

*EDIT* Folder structures

I have this....
C:\devkitPro\libogc < normal
C:\devkitPro\portlibs < normal
Back these up like I said earlier.

Then I have (you can change, but don't have spaces in the names of folders)
C:\OUR\CODING\WII\project_name\Source etc
The folder WII on my PC contains all my coding that runs on the Wii

In the "WII" folder I have SVNs of libwiigui, libgrr etc. You can go into dos in these folders (I have "send to dos" on right click)
In Vista open a folder and change the address bar to...
%APPDATA%\Microsoft\Windows\SendTo
This will open a folder
Then go to C:\WINDOWS\system32 and find cmd.exe, make a shortcut to this and name it EG SEND TO DOS etc.
Place this shortcut into your SendTo folder.
From now on you can open dos in any folder by clicking a file and selecting "SEND TO DOS"
ALSO while you have this open go to C:\devkitPro\devkitPPC\bin and make a shortcut to wiiload.exe, put this in your SendTo folder too, this will allow you to right click a dol anywhere and send it to the Wii.
I have a couple of Wiis so I opted to make 2 .bat files in my sendto so I can pick what wii it goes to.
If you only have 1 Wii, then there is a way to load the dol to your Wii with one click (or 2 if you double click things) but this involves editing the windows registry so I'll leave that out
wink.gif
If you type make in dos it makes, clean cleans and install moves the libs etc where they need to go, also run does what it says. So in dos ... make install makes and moves whats needed by libs that don't go in portlibs and go in the libogc or other folders.

*Correct me if I'm wrong, still a learner*
 
Yolanda98 said:
FIX94 said:
Alright, you need:
Devkitppc r22
LibOGC 1.8.6
Clear the c:/devkitPro/libogc folder and extract the contents of the libogc-1.8.6.tar.bz into the empty libogc folder. Install devkitppc r22.

Create a folder structure:
c:/devkitPro/portlibs/ppc/include
c:/devkitPro/portlibs/ppc/lib

Move the
cfg-loader.googlecode.com.r306/lib/zlib/lib22/libz.a
to
c:/devkitPro/portlibs/ppc/lib
and the contents of
cfg-loader.googlecode.com.r306/lib/zlib/include
into
c:/devkitPro/portlibs/ppc/include
Then it should compile fine.

OMG! THANKS! You just replied. Ok, now I remembered that I did something like this before compiling the other WAD project. I will try this right now...

GUESS WHAT?
> "make"
Building cfg69d -DVERSION=69d -DDEVKITPPCVER=22 -DCCOPT="-Os"
libOGC Release 1.8.6
.....
.....
..... /* linking errors fixed by FIX94 !!!
bow.gif
*/
.....
linking ... cfg69d.elf
output ... cfg69d.dol
It took me like an hour (lol) to composed my previous reply where at the same time I asked you some questions in order to be sure that the devkitPro was setup ok.
I must said that you answered with the correct dosage and medication. The DOL was finally born without any other complication. Thanks to you Dr94. lol

NOW, I have things to do with this little baby (source code). I would like to study/change some stuffs that I can't with the configurator. Will back soon...
 
Yolanda98 said:
I must said that you answered with the correct dosage and medication. The DOL was finally born without any other complication. Thanks to you Dr94. lol

NOW, I have things to do with this little baby (source code). I would like to study/change some stuffs that I can't with the configurator. Will back soon...
Great that it works now
laugh.gif

@Slimmmmmm:
Backups are damn important, oh yes
wink.gif

To the cmd thing:
I use this to open a cmd in the current directory because the other method is not that what I want to have.
To wiiload:
Well wiiload is way too complicated, I prefer transmitmii, it can open dols and elfs automatically and got a nice gui.
 

Site & Scene News

Popular threads in this forum