Didj U Boot Flashing Kernel
This assumes you have followed Didj_U_Boot_Flashing_Primer to get lightning-boot 1.4 flashed, and have u-boot (plus the necessary rescue files) on a sdcard.
Contents
Step 1: Boot to u-boot
TODO: Put a link to the boot page here
Do not load the kernel image in u-boot, we will not need it here.
Step 2: Load kernel.bin into RAM
Initialize the MMC subsystem...
LF1000 # mmcinit
and load kernel.bin into memory.
LF1000 # fatload mmc 0 1400000 kernel.bin
Note the number of bytes read, you'll need to convert this to hexidecimal for use later.
Step 3: Erase the kernel pages
Use nand erase
to erase the kernel pages
LF1000 # nand erase 200000 200000
You may use nand dump 200000
to verify that the kernel pages are now all 0xFF
.
Step 4: Write kernel
Use nand write
to write your new kernel to flash.
LF1000 # nand write 1400000 200000 [value you wrote down in step 2]
You should use nand dump 200000
to verify that kernel was written.
Step 5: Repeat the above steps for RFS0
Use erootfs.jffs2 as the source file, 0x400000 as the target address, and 0xe00000 as the erase size. Just like with the kernel, you will want to note the size of the binary, and only write the necessary bytes.
Step 6: Cross fingers, reboot
At this point you should be ready to boot using your new kernel and RFS. Type reset
in u-boot, select normal boot and see what happens.
You should be able to use leapfrog connect to restore the remaining data.