The following series builds on Xiangfu's nice lean base he made and fixes some stability problems, adds serial debug functions, fixes NAND access, adds kernel image copy to RAM, parsing, ATAG addition and finally boots into Linux :-))
If you're confident about NAND U-Boot recovery by DFU from NOR U-Boot, you can give it a go on GTA02. It is currently configured to boot NAND kernel at +0x80000 in NAND and has a canned commandline set for ext2 rootfs on first partition of SD Card, but you can edit these in ./include/device_configuration.h and recook. The functional bootloader binary is 3.7K currently and Linux is starting booting in what seems to be around 2s. You can find the tree here http://git.openmoko.org/?p=kboot-stage1.git;a=summary --- Andy Green (15): add-comments-and-tidy.patch remove-prink.patch tidy-strings.patch add-kernel-init.patch tidy-second-phase-stub.patch fix-nand.patch fix-do-relocation change-text-base-and-meddle.patch add-build-stamps.patch add-kboot-h.patch add-serial-strings.patch build-link-with-libgcc.patch add-dfu-script.patch add-dfu-image-generation.patch build-warn-all-error-all.patch Makefile | 32 ++ config.mk | 14 + dfu-kboot | 7 include/device_configuration.h | 15 + include/image.h | 572 ++++++++++++++++++++++++++++++++++++++++ include/neo_gta02.h | 2 include/serial.h | 10 + include/setup.h | 269 +++++++++++++++++++ src/blink_led.c | 2 src/blink_led.h | 2 src/ctype.c | 27 ++ src/ctype.h | 45 +++ src/kboot-stage1.lds | 30 +- src/kboot.h | 37 +++ src/lowlevel_init.S | 6 src/nand_read.c | 97 ++++--- src/phase2.c | 145 ++++++++++ src/serial.c | 124 --------- src/start.S | 15 + src/start_kboot.c | 193 +++++++++++-- src/utils.c | 101 +++++++ 21 files changed, 1517 insertions(+), 228 deletions(-) create mode 100755 dfu-kboot create mode 100644 include/device_configuration.h create mode 100644 include/image.h create mode 100644 include/setup.h create mode 100644 src/ctype.c create mode 100644 src/ctype.h create mode 100644 src/kboot.h create mode 100644 src/phase2.c create mode 100644 src/utils.c -- Signature
