Fatdog64 Kernel Builder
-----------------------
This is a tool to download, patch, configure, compile, and package
a kernel into kernel/kernel-modules.sfs which can be used to boot
Fatdog.

To use this tool, you MUST BE root.

How to use this script:
-----------------------
1. Create a directory in a partition with large free space (6GB or more)
2. Put (or symlink) build-kernel.sh into that empty directory.
3. Run it from terminal like this: 'sh build-kernel.sh' (or make it executable
   and run it directly). 

How it works:
-------------
This script build the kernel in stages. You run this script multiple
times to advance between the stages. It will download, patch, and build
and package the kernel. It will run whatever it can run, and stops when
human intervention is needed.

Once you have resolved what the script asks you to do, you can re-run
the script. The script remembers where it left previously and will
automatically continue to the next stage.

You can interrupt the script anytime by pressing Ctrl-C. When you re-run
it, it will pick up where it left and continue; except when you 
explicitly are warned NOT to interrupt (only a few stages cannot be
interrupted).

The GUI version:
----------------
Alternatively, you can use the rudimentary GUI. The GUI version is a driver
or wrapper around the CLI build-kernel.sh, so they both must be present.

1. Put (or symlink) both build-kernel.sh and gui-build-kernel.sh into the
   same empty directory. 
2. Run 'sh gui-builder-kernel.sh' (or make it executable and run it
   directly).

The GUI version will ask some questions, once answered will proceed to
build everything without stopping (except when you purposely tell it to
pause).


Mini FAQ
--------
1. Q: What about kernel config (the DOTconfig)?
   A: You have to supply this yourself. There is an option to use the config
      from the existing kernel (/proc/config.gz) if it exists; there is also
      an option to use an existing DOTconfig anywhere from the filesystem, or
      you can start with "default config" and configure it manually from there.
      
      Please note that the kernel config is one most important configuration
      that determines whether a kernel can boot, or not.

2. Q: Can I choose not to use aufs?
   A: Yes you can but a kernel built that way won't boot Fatdog. You may
      still find it other purposes, though.

3. Q: What about the firmware?
   A: The builder will by default copy your existing firmware (/lib/firmware)
      and package into the kernel-modules.sfs. This may or may not be right
      for you.
      
      You will be given the chance "pause" right after the copy process so
      you can add/remove/change them before they get re-packaged.

4. Q: How about third party / external / out-of-tree modules?
   A: This script does not handle them. You will have to do it yourself.
      But know that once the compile process, the kernel tree is good enough
      for your to be able to build an out-of-tree module by pointing the KSRC
      or KBUILD_DIR directory to the newly kernel build directory.
      
      How to do this is beyond the scope of this FAQ, but the point is,
      once you have successfully compiled the module, you will get the chance
      to add it during the packaging process (the same time you've got the
      chance to adjust the firmware - see previous question).
