+4. BOOT PROCESS
+---------------
+
+4.1 Boot process over GERMS
+---------------------------
+When the NIOS CPU catch a reset signal it will begin to be running
+code from CFG_NIOS_CPU_RST_VECT. Normally at this place it will
+find the GERMS monitor. That's the case for the generic NIOS CPU
+configuration "standard_32". When the GERMS monitor starts running,
+it performs important system initializations and then looks for
+executable code in flash, using the following steps:
+
+ 1. Examining the two bytes at CFG_NIOS_CPU_FLASH_BASE + 0x04000C.
+ 2. Examining the button 0 on the PIO CFG_NIOS_CPU_BUTTON_PIO.
+ 3. If the button is not pressed and the two bytes contain 'N'
+ and 'i', the monitor executes a CALL to location
+ CFG_NIOS_CPU_FLASH_BASE + 0x040000.
+ 4. If the code is not executed in step 3 or the code returns,
+ then prints an 8-digit version number to STDOUT and waits for
+ user commands from STDIN.
+
+In normal case, for "standard_32", STDIN and STDOUT are the first
+serial port.
+
+4.2 Return to GERMS command line
+--------------------------------
+During the boot process, the GERMS monitor checks for the existence
+of application software in flash memory. If found, the processor
+immediately executes the code. To return program execution to the
+GERMS monitor (that is, avoid running code stored in flash memory):
+
+ 1. Hold down CFG_NIOS_CPU_BUTTON_PIO, button number 0.
+ 2. Press then release the CPU reset button.
+ 3. Release CFG_NIOS_CPU_BUTTON_PIO, button number 0.
+
+
+5. DEBUGGING WITH GDB
+---------------------
+
+Debug sessions using gdb are currently supported only via JTAG. The
+stubs for debugging via a serial port are not implemented. To enable
+the gdb JTAG stubs, simply reference _brkpt_hw_int and _brkpt_sw_int
+at vector table offsets 3 and 4, respectively. For an example, see
+board/altera/dk1c20/vectors.S.
+
+5.1 Vector Table Initialization and ROM Stubs
+---------------------------------------------
+If CONFIG_ROM_STUBS is defined, the debug breakpoint and single step
+entries in the vector table are restored to their initial values
+immediately _after_ initializing the vector table. Defining this macro
+is useful when ROM-based stubs are implemented.
+
+NOTE: The default GERMS monitor does NOT implement gdb stubs, nor does
+it initialize the vector table. Therefore, when debugging U-Boot, you
+should NOT set a software breakpoint prior to vector table initialization.
+
+5.2 Starting a Debug Session
+----------------------------
+If you're not familiar with gdb, you follow these step-by-step instructions.
+These instructions are NOT the only way to start a debug session, but they
+cover most of the individual functions to get you started.
+
+ 1. Start the JTAG gdb server. Open a Nios shell window and start
+ the server. When the server is started you must provide the base
+ address of the OCI core. For example, when using the Cyclone
+ development kit (DK1C20):
+
+ $ nios-gdb-server --ocibase=0x00920800 --tcpport=2342
+
+ 2. Start gdb. Open a Nios shell window, change to the top-level
+ U-Boot directory and start gdb, specifying the u-boot elf file:
+
+ $ nios-elf-gdb u-boot
+
+ 3. Update target settings. From the file menu, select
+ "Target Settings ..." and select the following, then click 'Ok':
+
+ Target: Remote/TCP
+ Port : 2342 (same as in step 1)
+ Display download dialog: checked
+ All other check boxes: unchecked
+
+ 4. Connect to the target. Select menu: 'Run->Connect to target'.
+ You should see a dialog box indicating the you successfully connected
+ to the target.
+
+ 5. Download U-Boot. Select menu: 'Run->Download'.
+
+ 6. Open a gdb console window and set the source directory paths.
+ Select menu: 'View->Console'. In the console window, enter the
+ following commands, then close the console window:
+
+ (gdb) directory common
+ (gdb) directory cpu/nios
+ (gdb) directory lib_nios
+ (gdb) directory board/altera/dk1c20
+
+ Note that the last command is for the DK1C20 board only. If you
+ are using another board, specify that board's directory.
+
+ 7. Open the file board.c (using the file menu in the lower
+ left hand corner). Scroll to the board_init() routine and set
+ a breakpoint.
+
+ 8. Run U-Boot. Just click on the run icon, or select menu:
+ 'Run->Run'. U-Boot should start running, then break at your
+ breakpoint.
+
+ 9. Have fun & start learning more about gdb.
+
+
+5.3 For advanced Users
+----------------------
+A few notes for those more familiar with gdb.
+
+ -Serial port stubs are not implemented. Sorry, but it's just not
+ worth _my_ effort. The JTAG stubs work great and are ridiculously
+ simple to implement.
+
+ -If you need to debug the early startup code (prior to the vector
+ table initialization), use the nios-console debugger.
+
+ - Connect, download & run -- there are some problems here. Connect
+ download and run seperately to avoid trouble.
+
+6. BRAIN DAMAGE