Uboot main command:
Set of OPERATIONS commands for NAND flash devices
NAND info displays flash device information.
NAND device [NUM] Displays information about the specific flash device.
NAND erase offset size erases the size byte data at the off offset address of the NAND flash. Example:
Nand Erase 200000 300000
NAND read LOADADDR offset size reads the size byte of data from the offset offset address of the NAND flash to the LOADADDR address of the memory.
NAND write loadaddr offset size writes the data of size bytes starting with the LOADADDR address in memory to Flash, starting from where the offset address offsets. Example:
NAND write 80700000 200000 300000
Bootm [addr] directs execution of the kernel image in memory. If addr is specified, the kernel image is loaded at that memory address, otherwise it is booted from the default memory address. Example:
Bootm 80700000
Nboot load_ram_addr flash_dev_num Offset
Load the kernel from flash to physical memory, then execute the kernel program. Load_ram_addr refers to the address of the kernel file loaded into memory, flash_dev_num refers to the flash device number, you can use the command "NAND device" to view the specific Flash device information on the Development Board. Offset refers to the starting offset address of the kernel file in Flash. It automatically reads the end of the kernel image (processed with mkimage), so no read size is given. Example:
Nboot 80700000 0 200000
Tftpboot [LOADADDR] [[Host_ip:]filename] uses the TFTP protocol to boot the kernel image. HOST_IP the host IP address of the TFTP server, filename is the kernel image file name, and LOADADDR is the memory address. Example:
Tftpboot 80200000 192.168.0.6:uimage
NFS [LOADADDR] [[Host_ip:]filename] uses the NFS protocol to boot the kernel image. HOST_IP the host IP address of the NFS server, filename is the kernel image file name, and LOADADDR is the memory address. Example:
NFS 0x30008000 192.168.0.100:/nfs/uimage
Printenv prints all the uboot environment variables.
Setenv env_name Env_value Sets the environment variable for the uboot. Examples of major environmental variables:
setenv ipaddr 192.168.0.26
Setenv ServerIP 192.168.0.6
Setenv ethaddr 00:0c:29:94:d7:d6
Setenv Bootfile Uimage
Setenv Autostart Yes
setenv bootcmd nboot 80700000 0 200000
setenv Bootargs mem=80m console=ttys0,115200n8,noinitrd rw root=/dev/mtdblock3 rootfstype=yaffs
Askenv Env_name When the command is executed, a direct carriage return in the input state allows the setting of the environment variable env_name to be canceled.
Saveenv Save the changes to the environment variable in Flash.
For more Uboot command explanations, refer to the blog post:
Http://blog.chinaunix.net/uid-28325016-id-3402039.html
Burn and write your own compiled kernel image practice
Assume that you have compiled your own custom uimage file on a development host with IP 192.168.0.6, and configured the TFTP Service and NFS service as well. The export can be mounted nfsroot:/nfs/nfsboot. Ready for the DM365 Development Board, serial cable and network cable are all connected. In the connection serial cable development host side, serial debugging software is also configured, in the open state!
Seed_dvs365-sdk.tar.gz is the software compression package provided by the DM365 Development Board, wherein the kernel source file "LINUX-2.6.18_PRO500/ARCH/ARM/MACH-DAVINCI/BOARD-DM365-EVM.C" Defines the partition information of the NAND flash device on the development Board, the size definition of 4 partitions is as follows (starting from 204 lines):
#define Bootloader_size 0x1c0000
#define Params_size 0x40000
#define Kernel_size 0x400000
#define Fs_size 0x3a00000
In fact, the size is 1m+768k, 256K, 4M, 58M, Total 64M.
1. On the DM365 board power up, follow the prompts to enter the Uboot command line mode.
2. Configure the environment variables and save them using the command "Saveenv". The environment variables that are set up are printed with the PRINTENV command as follows:
seed_dvs365v1.0: >printenv
baudrate=115200
Bootfile= "Uimage"
Ethaddr=00:0c:29:94:d7:d6
bootargs=mem=80m console=ttys0,115200n8 noinitrd rw root=/dev/mtdblock3 rootfstype=yaffs
Bootdelay=9
Filesize=212f4c
fileaddr=80700000
ipaddr=192.168.0.26
serverip=192.168.0.6
Autostart=yes
Bootcmd=nboot 80100000 0 200000
Stdin=serial
Stdout=serial
Stderr=serial
Ver=u-boot 1.3.4 (Dec 7 2009-11:07:06)
3. After the power-off restart, enter the Uboot command line mode again. Execute the following command:
seed_dvs365v1.0: >setenv autostart No
seed_dvs365v1.0: >tftp 80700000
TFTP from server 192.168.0.6; Our IP address is 192.168.0.26
Filename ' Uimage '.
Load address:0x80700000
Loading: #################################################################
############# #T ########################################## #T ##### #T # #
# #T #################
Done
Bytes transferred = 2174796 (212f4c hex)
seed_dvs365v1.0: >nand Erase 200000 300000
NAND erase:device 0 Offset 0x200000, size 0x300000
Erasing at 0x4fc000 – 100% complete.
Ok
seed_dvs365v1.0: >nand write 80700000 200000 300000
NAND write:device 0 Offset 0x200000, size 0x300000
3145728 bytes Written:ok
seed_dvs365v1.0: >setenv autostart Yes
seed_dvs365v1.0:>
4. Power off restart, the system successfully loaded!
5. Enter the system as root, and enter the following command to verify your custom kernel burn-write success:
[Email protected]_dvs365:~# uname-r
2.6.18_pro500-davinci_evm-arm_v5t_le-zjp2
[Email protected]_dvs365:~#
This article is from the "Brown Bosom Yu Shan" blog, please be sure to keep this source http://deshanrenjian.blog.51cto.com/9324633/1603965
Uboot operation Practice on DM365 Development Board