DolBoot v1.0.2 by phpgeek

Discussion in 'Wii - Hacking' started by phpgeek, Oct 17, 2009.

Oct 17, 2009

DolBoot v1.0.2 by phpgeek by phpgeek at 8:04 PM (4,690 Views / 0 Likes) 18 replies

  1. phpgeek
    OP

    Member phpgeek GBAtemp Regular

    Joined:
    Feb 15, 2009
    Messages:
    112
    Country:
    United Kingdom
    File Updated to v1.0.3

    I developed this tool to aid me in compiling the source for preloader. What it basically does is binds any homebrew application with the appropriate boot loader, calculates the correct offsets and modifies the dol header accordingly. The modified dol will then be able to legally boot in place of the systems menu. It can easily be linked with devkitPro to create a seamless compilation process, for any developer who wishes to develop an application that replaces the systems menu.

    This is a dangerous tool if you do not know what you are doing, so if you do not have BootMii installed to boot2 or have no idea what the information above means then I strongly suggest that you don't download this tool!


    ReadMe File

    Code:
    -----------------------------
    | DolBoot v1.0.3 by phpgeek |
    -----------------------------
    
    
    * What is DolBoot? *
    
    DolBoot is a simple application that will take a compiled dol file
    containing a homebrew application for the nintendo wii and bind it
    with a boot loader. The file can then be launched in place of the
    official systems menu by replacing the appropriate .app nand file.
    
    
    * Do I need to compile my dol differently? *
    
    Yes! You need to compile your dol with an entry point of 81000000.
    
    Makefile example:
    
    LDFLAGSÂÂÂÂ=ÂÂÂÂ-g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81000000
    
    
    * Can I link DolBoot with my compiling process? *
    
    Sure you can!
    
    Makefile examples:
    
    #---------------------------------------------------------------------------------
    $(BUILD):
    ÂÂÂÂ@[ -d $@ ] || mkdir -p $@
    ÂÂÂÂ@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
    ÂÂÂÂdolboot $(OUTPUT).dol output.app
    
    #---------------------------------------------------------------------------------
    
    or:
    
    #---------------------------------------------------------------------------------
    run:
    ÂÂÂÂdolboot $(TARGET).dol target.app
    
    #---------------------------------------------------------------------------------
    
    * Usage *
    
    ÂÂÂÂdolboot.exe input.dol output.app

    Download
    http://gbatemp.net/index.php?download=7397


    /phpgeek
     
  2. xzxero

    Member xzxero ♥bong milk does good for the brain♥

    Joined:
    Jul 18, 2008
    Messages:
    3,831
    Location:
    SB
    Country:
    United States
    awesome nice work once again
     
  3. urherenow

    Member urherenow GBAtemp Addict

    Joined:
    Mar 8, 2009
    Messages:
    2,522
    Location:
    Japan
    Country:
    United States
    [​IMG]

    thanks a million!

    now...
    1)compile the preloader source, using this bootdol tool either during or after... and it results in an .app file
    2)Place this .app file into the data folder of the installer source and then compile it
    This results in a fully functional preloader installer... correct?
     
  4. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    Good news, looks like a 100% working preloader.
     
  5. phpgeek
    OP

    Member phpgeek GBAtemp Regular

    Joined:
    Feb 15, 2009
    Messages:
    112
    Country:
    United Kingdom
    10/10 [​IMG]
     
  6. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    Go for it, would be awesome.
     
  7. urherenow

    Member urherenow GBAtemp Addict

    Joined:
    Mar 8, 2009
    Messages:
    2,522
    Location:
    Japan
    Country:
    United States
    so what about the ticket thing?
    Does this need to be fixed in the preloader, or the installer source?

    or does all of this now take care of that problem as well? It seems the problem happens to people whave not installed an earlier preloader before installing .30 so I'm not sure if I'd get accurate results simply by installing a fresh SM 4.2...
     
  8. phpgeek
    OP

    Member phpgeek GBAtemp Regular

    Joined:
    Feb 15, 2009
    Messages:
    112
    Country:
    United Kingdom
    This is something that needs to be added to the installer, as it needs to select a suitable IOS that will allow appropriate ES Identification and adequate NAND access privileges. This is why I added the IOS249 selection option, until I get round to extending the code. ES_DIVerfiy patching is still required on the IOS used by preloader to load the systems menu so that could do with being implemented too. I will probably add all this to the installer at some point. Contrary to what I have read there is no way that preloader will launch the systems menu via an unpatched IOS, unless an unknown exploit exists. I maybe able to remove the requirement for this in IOS60 but everything changed in IOS70 which is probably another reason crediar gave up with the development cycle, as I think he was nearing a point where ES_DIVerfiy may no longer have been required, bang came along IOS70!

    Another thing you need to watch out for if you're playing with the installer is that once you have preloader installed, you will need to apply the original permissions and uid back to the original files/dirs after they have been restored, else it can mislead you on the next test cycle into thinking that you no longer have to authenticate yourself to get those privileges. Under IOS70 I can't even authenticate under the systems menu, as the systems menu using genuine certificates from the console itself. That's like refusing your own ID, lol!


    /phpgeek
     
  9. eggy

    Newcomer eggy Newbie

    Joined:
    Oct 17, 2009
    Messages:
    4
    Country:
    United States
    When I try to use dolboot in my Makefile, even when its successful (I get the Done! message) my make output's an Error 1 code.
    using the...
    dolboot $(TARGET).dol target.app
    example.

    Any ideas?
     
  10. urherenow

    Member urherenow GBAtemp Addict

    Joined:
    Mar 8, 2009
    Messages:
    2,522
    Location:
    Japan
    Country:
    United States
    dunno why, but don't worry about it. I get the same thing so it's nothing you did wrong. My guess is that dolboot.exe doesn't end with a 'return' or something like that so 'make' doesn't know that it finished properly

    @phpgeek: I've been playing around and so far I don't know what you mean about everything changing in IOS70. The ES_Identify patch, NAND permissions patch, and Trucha patch are all there and located the same way (ie. looking for the suspect hex strings turn up only 1 result in the 0000000e.app file of IOS70.

    I'm not much of a coder but the patches themselves can be taken directly out of the TBR source. I just don't know how to add it to the installer, read the 0000000e.app, make the patch, and write the patched file back to NAND. Also skip it after reading it into memory if the suspect hex strings don't exist (because it's already patched).

    And yea I know it's even a bit more complicated than that, 'cause to make it universal you'd have to check what system menu version the system is using so you can start in the right directory in the first place (to patch the system menu IOS)!


    Anyway, besides the error 1 at the end of compiling... everything works perfectly! At least on my machine (no ticket issues because I already had .29+ installed) I removed preloader, then reinstalled it. Thank you so much for your time!
     
  11. nicksasa

    Member nicksasa GBAtemp Maniac

    Joined:
    Oct 25, 2008
    Messages:
    1,410
    Country:
    Belgium
    i would still go for the idea of adding the bootloader and changing the load offsets in the installer itself, then you just need to add a normal DOL to the installer with entrypoint | 0x81000000 but maybe everyone would make a sysmenu replacement then [​IMG]
     
  12. phpgeek
    OP

    Member phpgeek GBAtemp Regular

    Joined:
    Feb 15, 2009
    Messages:
    112
    Country:
    United Kingdom
    Patching is fine, I was referring to getting the system menu booting under IOS70 without patching it, currently an impossibility.


    /phpgeek
     
  13. wiiman123

    Member wiiman123 GBAtemp Advanced Fan

    Joined:
    Apr 5, 2009
    Messages:
    938
    Country:
    New Zealand
  14. eggy

    Newcomer eggy Newbie

    Joined:
    Oct 17, 2009
    Messages:
    4
    Country:
    United States
    Yep, I figured that was the case, just wanted to make sure you knew about the issue. Or if you knew of a work around, as this does break my automatic build scripts, despite having a binary in the end.. For now, though, I have converted my script to a bat file, this will work until a proper response is written. Also.. if you get the time, I'd love to have a linux binary [​IMG] I do apperciate your work on preloader and this tool thus far.
    Thanks!
     
  15. laurozza

    Member laurozza GBAtemp Fan

    Joined:
    Sep 17, 2008
    Messages:
    348
    Country:
    Italy
    Can someone use this with crazyintro and upload the dol?
     
  16. KirovAir

    Member KirovAir Dutch Alcoholic Programmer

    Joined:
    Dec 7, 2006
    Messages:
    587
    Location:
    Netherlands
    Country:
    Netherlands
    Yes!
    I was looking for this.
    If I have time (work atm) I'll create a simple app that will always boot USBloader GX, but when any button is pressed, it will boot system menu. [​IMG] (Which' boot loader should be moved elsewhere..)
     
  17. phpgeek
    OP

    Member phpgeek GBAtemp Regular

    Joined:
    Feb 15, 2009
    Messages:
    112
    Country:
    United Kingdom
    First post updated to v1.0.3, couldn't be bothered to start a new thread as I didn't see any point!

    Nothing much added, except that it now returns an exit code on success, in order to not confuse linkage with make. You can also drag and drop dols on top of the file to output a .app file with the same name as the input .dol. This update is likely to be the final version!


    /phpgeek
     
  18. D34DL1N3R

    Member D34DL1N3R Nephilim

    Joined:
    Dec 6, 2008
    Messages:
    1,614
    Country:
    United States
    Don't think I understand exactly how to use this. I'll wait for v5. [​IMG]
     
  19. wiiman123

    Member wiiman123 GBAtemp Advanced Fan

    Joined:
    Apr 5, 2009
    Messages:
    938
    Country:
    New Zealand
    Thanks for the update.
     

Share This Page