Uboot running kernel from RAM

From RidgeRun Developer Wiki

Copying kernel file image to TFTP directory

The SDK does not copy files from $DEVDIR/images to your tftp directory until you run 'make install'. If you are manually issuing u-boot commands, say because you don't want to modify NAND or SD card images, you can make a simply modification to the top-level SDK Makefile to copy the kernel image to your tftp directory everytime you make the kernel:

$DEVDIR/Makefile - around line 162

was

kernel: kernel_build bootloader_build

change to

kernel: kernel_build bootloader_build tftp

tftp:
	cp images/kernel.uImage $(CONFIG_INSTALLER_TFTP_SERVER_DIRECTORY)/kernel.uImage$(TFTPIMGSUFFIX)

u-boot kernel load and run commands

If you are modifying the kernel image and don't want to always save each kernel image to NAND or the SD card, you can load and run the kernel from RAM. The following script, called t, shows you how (for DM365):

setenv setargs 'setenv bootargs davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=720P-60 davinci_display.cont2_bufsize=6291456  console=ttyS0,115200n8  mem=99M root=/dev/mmcblk0p2 rootdelay=2 rootfstype=ext3'
setenv t 'setenv autostart no ; setenv autoload no; dhcp ; setenv serverip 10.111.0.4 ;  tftp 0x82000000 kernel.uImage.bsp.leo365 ; run setargs ; bootm 0x82000000'
saveenv

run t

If your hardware is setup for boot from SD (DM365):

setenv bootargs2 davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=720P-60 vpfe_capture.cont_bufoffset=6291456 vpfe_capture.interface=1 vpfe_capture.cont_bufsize=6291456  console=ttyS0,115200n8  video=davincifb:vid0=off:vid1=off:osd1=off  dm365_imp.oper_mode=0  mem=99M root=/dev/nfs nfsroot=10.111.0.4:/local/home/tfischer/work/vidleo3/fs/fs rw ip=dhcp debug=8

setenv setargs setenv bootargs \${bootargs2} ; setenv t 'setenv autostart no ; setenv autoload no; dhcp ; setenv serverip 10.111.0.4 ; tftp 0x82000000 kernel.uImage.tfischer.vidleo3.leopard ; run setargs ; bootm 0x82000000' ; run t

Second example, limiting max args to 16

setenv bootargs2 davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=NTSC vpfe_capture.cont_bufoffset=6291456 vpfe_capture.interface=1 vpfe_capture.cont_bufsize=6291456  console=ttyS0,115200n8  video=davincifb:vid0=off:vid1=off:osd1=off  dm365_imp.oper_mode=0  mem=99M root=/dev/nfs nfsroot=10.111.0.4:/local/home/tfischer/work/esp/fs/fs rw ip=dhcp

setenv setargs setenv bootargs \${bootargs2} ; setenv autostart no ; setenv autoload no ; dhcp ; setenv t 'setenv serverip 10.111.0.4 ; tftp 0x82000000 kernel.uImage.tfischer.esp.tievm ; run setargs ; bootm 0x82000000' ; run t