User`s manual
Getting Started With Linux on the LPC3250 OEM Board Page 28
Copyright 2009 © Embedded Artists AB Rev A
loadkernel_usb=usb start; fatload usb 0 $(loadaddr) uImage; usb stop
1. First the USB interface must be initialized with the
usb start
command.
2. Using the
fatload
command the kernel image (
uImage
) is then loaded via the USB
interface, device 0 and to the load address specified by the
loadaddr
variable.
3. The final step is to stop the USB interface.
If you would like to load the kernel from a USB memory stick make sure that the
loadkernel
variable contains the content of the
loadkernel_usb
variable.
uboot> setenv loadkernel $(loadkernel_usb)
uboot> saveenv
4.3.2 Kernel from TFTP Server
During development of the Linux kernel it is convenient to use the Trivial File Transfer Protocol (TFTP)
to download a newly created kernel. The development cycle will be much shorter compared to when
you would need to copy the kernel image to, for example, a USB memory stick.
The
tftpboot
command is used when downloading images from a TFTP server. Before using this
command you have to make sure the network related variables described in section 4.2.2 are correctly
setup for your network. In the default environment there is a variable named
loadkernel_tftp
which illustrates how to load the kernel from a TFTP server.
loadkernel_tftp=tftpboot $(loadaddr) uImage
If you would like to load the kernel from a TFTP server make sure that the
loadkernel
variable
contains the content of the
loadkernel_tftp
variable.
uboot> setenv loadkernel $(loadkernel_tftp)
uboot> saveenv
4.3.3 Kernel Stored in NAND Flash
The LPC3250 OEM Board comes with a large NAND flash that can host the Linux kernel for fast
access without the need for a USB memory stick or network access.
Before the kernel can be loaded from NAND flash the NAND flash must be updated with the kernel.
For this purpose the default environment has been setup with a variable named
update_kernel
.
update_kernel=run loadkernel; nand erase $(nand_kernel_off)
$(nand_kernel_sz); nand write.jffs2 $(loadaddr) $(nand_kernel_off)
$(nand_kernel_sz)
1. The
loadkernel
variable is used by the
update_kernel
variable to load the kernel to
SDRAM (address given by
loadaddr
). Section 4.3.1 and section 4.3.2 describe how the
loadkernel
variable can be setup to load the kernel from either a USB memory stick or a
TFTP server.
2. The second step is to erase the part of the NAND flash that will be used to store the kernel.
The offset into the NAND flash as well as the maximum size of the kernel is given by the
variables
nand_kernel_off
and
nand_kernel_sz
.
3. The last step is to write the kernel image to NAND flash.