Now we are ready to operate the board
we want to load the kernel inside the board flash memory and mount the file system in out host computer. this is very useful in the development process because the only thing we should do to download out application/driver to the target is to copy it from one directory to another on the host computer
restart the device and press a key to get u-boot shell
the easiest way to load files from host to target is to use tftp server on the host.
start the tftp server and place the kernel image (uImage.cc) in the server directory
on the target uboot shell:
# setenv serverip [your tftp server ip address]
# tftpboot 0x10000000 uImage.cc
after this you will get a number in hex format - REMEMBER IT
now we should erase the flash memory : (bank 8 to 20)
# erase 1:8-20
# cp.b 0x10000000 0x100000 [the number above]
now set the bootargs variable:
# setenv bootargs console=ttyS0,115200n8 noinitrd ip=${OSK_IP}:
${PC_IP}:${GATEWAY_IP}:${NETMASK}:osk:eth0:off root=
/dev/nfs rw nfsroot=${PC_IP}:/data/rootfs2.6,nolock mem=32M
# saveenv
to test the board restart it or:
# bootm 0x100000
after all the messages , you will get a prompt with the file system on the host
now you can use the toolchain to build applications and drivers, copy the output files to the root filesystem directory and execute/load it from the target
for help and other learning materials
visit our site: Bina
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment