How to self-compile USB-Loader GX?

Discussion in 'Wii - Backup Loaders' started by Kawaii-Tora, Sep 18, 2010.

Sep 18, 2010
  1. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    I would be happy if someone could give me a little help in compiling USB Loader GX.
    what do i need and where do i get it? (i think DevKit Pro and all libraries are free so this should'nt be a Problem ^^)

    And should i rather compile using make in a command shell (i don't care if i do it on Windows or Linux, have both systems running) or Compile it through Programmers Notepad?

    thx
     
  2. xmrnogatcox

    Newcomer xmrnogatcox Advanced Member

    Joined:
    Oct 25, 2008
    Messages:
    53
    Country:
    United States
    I'm a little busy right now but I'll try to make a quick tutorial for you when I get home. The easiest way is through Linux.
     
  3. Arm the Homeless

    Member Arm the Homeless Custom Title

    Joined:
    May 26, 2008
    Messages:
    1,762
    Location:
    /home/andy/
    Country:
    United States
    Something about that statement makes me angry.
     
  4. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    I've edited my post,I hope now you don't get angry anymore =)

    @xmrnogatcox don't hurry, i have enough time
     
  5. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    the GUI version of make isn't free-ware.
     
  6. Cyan

    Global Moderator Cyan GBATemp's lurking knight

    Joined:
    Oct 27, 2002
    Messages:
    16,407
    Location:
    Engine room, learning
    Country:
    France
    there's already a tutorial (though, there's nothing special to it) :
    http://gbatemp.net/index.php?showtopic=169078

    read the bottom part of the message, it's even easier with giantpune method.
    just be sure to use the libogc version corresponding to the loader revision you want to compile. (look in the "download tab" on google code to know which lib_version/loader_revision matches).

    I guess you want to compile a r940+, so you would want to use the "libogc pack for devkitPPC r21 needed for R940+".
    remember, don't post issues on google code regarding the new revisions without official build, they will be closed right away.

    Here is a quick recap guide for windows :
    for all the files, check the link I posted.

    A) compiler installation :
    1. install sliksvn and tortoisesvn
    2. Download Devkitpro and update to the latest revision.
    3. Replace "include" and "lib" folder in your c:/devkitpro/libogc/ folder with the provided zip from usbloaderGX website.
    Attention: this version of libogc will work only for compiling USBloaderGX. keep a copy of your original libogc folder if you want to compile other homebrew.
    4. Reboot your computer to register the environment variables correctly.

    B) Source code compiling :
    1. create a new folder located on your HDD, and be sure to place it in a path NOT containing a space. (drive:/homebrew/wii/usbloaderGX/ is a very good place)
    2. go inside the new created folder and rightclick, select SVN checkout and write this : http://usbloader-gui.googlecode.com/svn/trunk/
    3. once downloaded, doubleclick the gui.pnproj file, it will open programmer's notepad. Hit Alt+1 to compile.
     
  7. petspeed

    Member petspeed GBAtemp Fan

    Joined:
    Nov 13, 2009
    Messages:
    482
    Country:
    Denmark
    When I try this I get the following error:

    wbfs_ntfs.cpp
    q:/Gemmes/Wii/Homebrew/Compiling/source/GX/source/usbloader/wbfs/wbfs_ntfs.cpp: In member function 'virtual int Wbfs_Ntfs::GetFragList(char*, int (*)(void*, u32, u32, u32), FragList*)':
    q:/Gemmes/Wii/Homebrew/Compiling/source/GX/source/usbloader/wbfs/wbfs_ntfs.cpp:13: error: '_NTFS_get_fragments' was not declared in this scope
    make[1]: *** [wbfs_ntfs.o] Error 1
    "make": *** [build] Error 2

    > Process Exit Code: 2

    Can someone tell me what I am doing wrong?

    Thanks

    Edit: Updated the code with SVN Update to rev. 959 and now it compiles without errors.

    Edit2:

    I tried to compile Wiiflow and Dop-mii aswell. Both programs would only compile using libogc from USB Loader GX and NOT the standard libogc. Why is that?
     
  8. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    As I have set up a Virtual Machine running Debian Linux a litte how to for linux were great.
    BTW: I'm not using KDE, Gnome etc. Command Line only so i need the options for make too

    But thanks a lot for your help so far
     
  9. Cyan

    Global Moderator Cyan GBATemp's lurking knight

    Joined:
    Oct 27, 2002
    Messages:
    16,407
    Location:
    Engine room, learning
    Country:
    France
    If it works for the other loader, then it's because they need a modified version too, or doesn't use the modified files [​IMG]
    but for example, it will not compile for WiiSX.


    About the errors, sometime I have errors too (about "undeclared variable, first time using it"), which I don't have when I use the other compiling method (either typing "make" in a dos command window, or using programmer's notepad). But sometime after few clean/make, it works again. it's just weird [​IMG]
    Maybe my environment variables are not correctly set (as I use multiple ppc/arm versions environement and select them with a Set command).
    And I have a batch.exe.stackdump log on each make or clean, I don't know if it's a bad thing.


    @Kawaii : Sorry, I don't know how to compile homebrew under linux. (but you said windows would be ok too, so I helped about that)
    Giantpune might know, he uses one.
     
  10. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    Yes I said so, but i decided to use 2 VMs for compiling homebrew, one for USB Loader GX and another for SNES9x GX, FCEU GX etc.... so I don't need to set environtment variables every time.
     
  11. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    there is an official guide here http://devkitpro.org/wiki/Getting_Started/devkitPPC

    i have mine set up a little different. i just put the devkitpro folder in my home folder instead of in /opt/. it doesnt really matter too much where it is, as long as you put the correct location in your path. ive done that by adding the "export..." lines in ~/.profile.
     
  12. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    @giantpune: thx a lot, i knew how to install devkit pro on linux. I only wanted to know if i need any parameters for make, but just typing make did well.
    BTW: could it be that compiling under Linux x64 is faster than under Windows?
     
  13. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    compiling with make under linux is faster than windows. devkit uses a compatibility layer to get programs that were made for *nux to run in windows. it works in reverse also. programs written for windows can be run with wine, but dont run as fast as they would in their native environment.

    if it is speed you care about, you can really get it to compile faster using multiple jobs. most makefiles for wii projects are based on a premade one from the devkit examples which has a little booboo in it. you can replace the instances of "make" with "$(MAKE)". this will let the parent process pass proper parameters to child processes. now you can use the -j option of make. on my quad-core i can build with "make -j4" and it will build the entire project in 51 seconds.
     
  14. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    now everything is working fine so far. just one little thing is left. after putting the compiled binary (boot.dol) on my SD:\apps\usbloadergx and starting it via HBC it tells me "no WBFS Drive found" I have a 500GB USB Drive formatted as FAT32 and it works fine with cfg loader, SNES 9x GX, FCEU... etc just USB Loader GX rev. 960 won't work.

    and i also took the libogc provided at usb loader gui googlecode page for devkit pro rev 21
     
  15. Cyan

    Global Moderator Cyan GBATemp's lurking knight

    Joined:
    Oct 27, 2002
    Messages:
    16,407
    Location:
    Engine room, learning
    Country:
    France
    yeah, the last revision (960) doesn't find real wbfs drive either (not fat32), and just return to HBC after the count down.
    using a previous version, the WBFS is detected just fine.

    I guess It will be back in few days. I'm just waiting patiently.
     
  16. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    its not really that the loader doesnt find your drive, but there is a change in the settings. the way the IOS is stored got changed, so now old settings files will try to get it to reload IOS1 or something really low.

    heres how i fixed it
    you can take out your SD card and start the loader and it will use default settings and should show your gamelist. put your SD card in now and click the sd card button. it will now reload and use all your old settings except the IOS selection. go to the settings screen and adjust the IOS setting like you want it.

    you still cant play games with these revisions, so there not much point trying. but you will be able to look at your list of games.
     
  17. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    ok, thanks.
    just one another question; is it possible to choose a specific version via "svn checkout"?

    PS.: I've tried compiling using make -j, compiling speed is incredible compared to the use of a single core out of 4. thx for that =)
     
  18. Cyan

    Global Moderator Cyan GBATemp's lurking knight

    Joined:
    Oct 27, 2002
    Messages:
    16,407
    Location:
    Engine room, learning
    Country:
    France
    Thanks for the info Pune [​IMG]

    @Kawaii :
    If you use tortoise svn : right click the trunk folder>tortoiseSVN>Update to revision...> put the revision number is the input form.

    for command line svn : svn checkout -r xxx http://node-name/repos/svn/trunk/parentPath
    or
    svn update -r xxx
    xxx being the revision number
     
  19. Kawaii-Tora
    OP

    Newcomer Kawaii-Tora Advanced Member

    Joined:
    Sep 14, 2009
    Messages:
    67
    Country:
    Germany
    thx, command line svn was important... i'm using a Debian Linux without graphical user interface to compile homebrew.
     

Share This Page