fbBuild 0.32
============


Introduction:
=============
    Sad to hear the rumor of ikari stepping down, and even sadder to hear
    of the profiteers taking advantage of this... we bring you a tribute
    to ikari. If you paid for this, get a refund!

    fbBuild is a NAND image builder made to suit freeBoot style images,
    the included patches and freboot.bin core are based on the original
    works done by ikari.

    It is suitable to build rebooter images for all current JTAG exploit
    compatible xbox 360's. As with ibuild produced images, this version
    only requires a single flash 16MiB in size or larger.


What's New:
===========
    - detect and optionally retain NAND MU data in 64 and 256/512M dumps
    - optionally configure which power on button starts xell
    - bug fixes

Current Limitations:
====================
    - STAY THE HELL OFF LIVE! Nuff said, we're not you're mum.


How To Use:
===========
    - See individual folders for lists of files to provide
    - if desired provide replacement cpu and 1bl keys in text files
    - open a command window in the fbBuild directory
    - on the command line type, for example:

    example - if you provided keys in appropriate text files

        fbbuild.exe -c falcon -d myfalcon myfalconout.bin

        -c falcon = use falcon bl and patch set
        -d myfalcon = a folder is present called "myfalcon" with per machine files
        myfalconout.bin = the file that will be produced

    - type fbbuild.exe -? for command line info


Block Remapping & nanddump.bin:
===============================
    First, don't expect the method used to be perfect for every dump. The idea is,
    if you have a working JTAG you can dump it's current NAND by running something
    like Flash360 on it and the final freeboot image that is produced will mirror
    any existing remappings. Also, fbbuild should be able to take your current
    smc.bin, kv.bin and smc_config.bin straight from the dump (external files
    overrule/replace ones in the dump) provided it can decrypt them when needed.

    Most original.bin dumps using hardware methods will also produce usable
    remappings as well, with the exception of bad dumps which may produce some
    unusual issues with default settings. Corrupt or incomplete dumps will turn up
    a lot of unusual errors, the option "noecdremap" was added to work around such
    issues, and the option "noremap" was added so that a dump can be used to aquire
    smc.bin, smc config and keyvault without applying any remaps to the final image.


.ini files:
===========
    Just a word on the format... the ini parser is not very robust, the files need
    to be plain ACII, everything after a ; on a line is ignored, and spaces are
    not acceptable (they get removed).

    Things like CPU key and 1BL key, if present in the per box ini file need not be
    placed anywhere else.


Note:
=====
    - for those of you using donor data, the security files shouldn't pose a
    problem but make sure the CPU key you use is from the machine that donated
    the kv instead of the target machine you are building the image for.

    - DON'T USE THIS UNLESS YOU KNOW FOR SURE THAT YOU NEED IT! Using an incorrect
    controller config can result in problems remapping bad blocks (even manually.)
    If you have a 16M jasper, an additional build type has been added
    'jaspersb', by default the image will be built for jasper with big block
    controller (config 00023010), use this alternate switch to build for small
    block controller (config 01198010.) 

    - the /bin and /data folders are legacy folders from ibuild's format, they
    are not required or recommended.


Multi build/options example:
============================
    when you specify -f 9199 on the command line:
        9199\filelist.ini
    is parsed instead of data\filelist.ini

    Also the bin directory is used from
        9199\bin\
    instead of
        bin\
    allowing anyone to create multiple builds without multiple instances or
    rebuilds/hex edits/hacks of the main app.

    The example provided is the last version of 9199 patch set from dash launch and
        other files to build freeboot 9199

    example use:
    ------------
    fbbuild -c xenon -f 9199 -d myxenon x9199out.bin -o nodvd -o cygnos

    -c xenon    : specifies xenon patchset and bootloaders
    -f 9199     : use .\9199\filelist.ini, and .\9199\ for firmware files, .\9199\bin\ for rebooter files
    -d myxenon  : use .\myxenon for per build files (cpu key, keyvault, security files etc.)
    -o nodvd    : uses alternate tray check in bootstrap for those with problems with default one
    -o cygnos   : sets UART speed to cygnos compatible in bootstrap
    x9199out.bin: override auto generated name and produce .\x9199out.bin as the final NAND image

    note, if -d ***** is not specified it will still use the original /data and /bin dirs


Credits:
========
    Without ikari this would not have been possible, thanks!
          __               ____   ___   ___ _____
         / _|_ __ ___  ___| __ ) / _ \ / _ \_   _|
        | |_| '__/ _ \/ _ \  _ \| | | | | | || |
        |  _| | |  __/  __/ |_) | |_| | |_| || |
        |_| |_|  \___|\___|____/ \___/ \___/ |_|
                     [v0.07 - inspired by ikari]
        R.I.P.

    Thanks and greetz to everyone who has contributed to hacking this
    wonderful machine. Thanks to the engineers and countless others who made
    the machine what it is... we only wish they had listened and RROD was
    not a problem. If we were to list everyone here, there would be no time
    left to play on the machine!

    Big thanks to the folks at #freeboot on efnet for the tireless
    hours of help you all give freely. Thanks to the testers who tirelessly
    made sure stuff worked.

    Don't believe what random people *cough* write on forums ..

-----
2011/19/07
-----

Changes:
========
0.32
- fixed yet another bug in the ini parser (affected lhelper.xex integration)
- corrected bad block detection bug on large block dumps (nandmu)
- correct mobile dat extraction on small block dumps for big block controllers
- corrected wording (oops!) of ECD option in ini sample file
- added option to ini file to try to retain NAND MU data on big block machines
- added option to ini file to set which power-on reason starts xell when not using oldvd/nodvd
- -v messages are now automatically logged to a file regardless of specifying -v on command line
- core and ini updated to allow specifying a power reason to cause dual NAND !SWITCH command
- add 13599

0.31
- corrected some ini parser flaws, ';' is no longer required to terminate entries
    newline at end of file no longer required
- added errors/warnings when providing a command line option but no arg
- added checks for odd flash header data when seeking kv/smc binaries (xenon images)
- removed need of , in filelist.ini when no crc is provided on crc-optional sections

0.30
- correction to allow relative paths in ini files (using ..\
    and similar in flash files segment only)
- upgrade freeboot core and payload for embedding and buildtime customization
- add command line options to set cygnos UART speed and dvd tray state check in bootstrap
- starting xell based on tray state depreciated, now starts based on console
    powerup reason being eject button; 'olddvd' and 'nodvd' options ovveride this.
- correct spare data for big block system reserve size (previously handled via
    kernel patch; better known as big block nand MU corruption)
- simplify command line options via per build files for options and console type
- xell is now checked for as "xell-2f.bin" first in per build folder, then firmware /bin,
   then root/beside exe. First found is what is used.
- config_raw.bin and keyvault.bin added as alternate names for smc config and keyvault files
- level1 output now shows info on smc config data like fan speed and similar
- removed perbuild dir requirement so it is again possible to use old ibuild folder layout
- (optional) perbuild ini file for options and setting some smc config variables added (options.ini)
- nanddump.bin, providing console dump can provide smc/smc_config/kv and LBA mappings, can auto
    remap bad blocks and blocks with ECD issues (options to disable provided)
- added USB reset to OHCI on xell boots, xell should pick up USB sticks without unplugging the console
- add 13146 base files
- various bug fixes

0.20
- scriptable file lists
- no longer any need for .meta files
- encrypts crl/secdata/dae/extended
   no .meta needed, but will use if found
   must supply .meta when using pre-crypted files
- fixed random byte generator (yes, it was a bug)
- better checks for hacked SMC and encrypted security files

0.11
- add "jasper16a" LBA method as default for jasper
- add SMC check for encrypted and known hack SMC
- search for valid smc_config hash instead of hard coded
    offsets, support filename "config.bin"
- refine KV encryption check
- disable extended DVD auth for OSIG keyvaults (aka: AP25)
- random non-critical changes
