This is an old revision of the document!


Uploading a Kernel via the Serial Port

WARNING: uploading a kernel via the serial port takes about 20 minutes and uploading a ram disk image can take about 70 minutes, if interrupted will leave your unit inoperable until the procedure is completed correctly. U-boot if used incorrectly can leave your unit completely inoperable, even beyond recovery by this procedure. Since this procedure requires hooking up a serial port, your warranty is already void, but doing anything mentioned here will futher void it. While care has been taken to ensure the following procedure is correct we offer no gurantee that it will not destroy your hardware and burn down your domcile.

Das U-Boot is a GPL'ed cross-platform boot loader, it is a small piece of software that executes soon after powering up a computer. It will initialize the basic hardware and, if not interrupted, load and execute the Linux Kernel.

By entering a character soon after u-boot starts outputting messages you can interrupt the boot process and communicate directly with u-boot. The version of u-boot supplied with the DSM G600 is severly restricted in the commands it supports, pretty mouch the only useful command is loadb. The loadb provided by D-Link is non-standard in that instead of loading a binary into RAM, it will take a binary and load it as a kernel and/or a ramdisk image. For loading a kernel, the command is:

loadb k

If you want to load ram disk image instead of kernel then the command is:

loadb r

Loadb uses the kermit protocol to upload the image. While minicom claims to provide the kermit protocol it does not appear to work with u-boot, so the kermit program is suggested.

Kermit, the program, is an very complex application and it's use is beyond the scope of this document. This link describes it's use with a full-featured u-boot.

My .kermrc file looks like:

set line /dev/ttyS0
set speed 9600
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set rec pack 1000
set send pack 1000
set window 5

U-Boot command prompt

After starting kermit and connecting the serial port, power-up the unit, when u-boot starts displaying messages press the space-bar. U-boot will display something like:

U-Boot 0.2.0 (May 11 2005 - 18:56:16)

CPU:   MPC8245 V1.2 at 170.503 MHz:
Board: Sandpoint 8245
DRAM:  32 MB
FLASH: FUJI_DL323BE 
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 
=> 

You are now at the u-boot command prompt. Assuming the kernel you want to load is /tftpboot/pImage, enter the u-boot command

loadb k

U-boot will respond with:

## Ready for binary (kermit) download ...

Now type Ctrl=\c (control backslash follwoed by “c”) to return the the kermit prompt and type:

send /tftpboot/pImage

U-boot will now upload the image, when the upload is complete, type “connect” to reconnect to u-boot to monitor the next step (which will occur automatically). After uploading the image u-boot will check the image, if it is a u-boot compatible image and not too large it will program it into flash. To reboot and execute the new kernel, cycle power (be sure the programming is done before removing the power).


Personal Tools