Env Set up

Table of Contents

Toolchain

CodeSourcery ARM tool chain version 2009-q1 https://sourcery.mentor.com/sgpp/portal/release858

Environment Setup

$ export PATH=/opt/toolchain/2009-q1/bin:$PATH
$ export PATH=/opt/u-boot/tools:$PATH

TFTP

step 1

install the package and find the directory

$ sudo apt-get install xinetd tftpd tftp
$ sudo mkdir /home/test/tftpboot
$ sudo chmod -R 777 /home/test/tftpboot
$ sudo chown -R nobody /home/test/tftpboot

step 2

copy the uimage to the folder

sudo cp uimage $tftproot

step 3

create the file /etc/xinetd.d/tftp

$ sudo vim /etc/xinetd.d/tftp

service tftp
{
        protocol = udp
        port = 69
        socket_type = dgram
        wait = yes
        user = nobody
        server = /usr/sbin/in.tftpd
        server_args = /home/test/tftpboot
        disable = no
}

step 4

start and stop the tftp server

sudo /etc/init.d/xinetd stop

sudo /etc/init.d/xinetd start

step 5

test

$ ifconfig > /home/renee/test/test.txt
$ tftp 127.0.0.1
tftp> get text.txt
Received 1445 bytes in 0.0 seconds
tftp> quit
$ ls
test.txt

NFS

step 1

find the location

dst="${HOME}/targetfs"
mkdir -p $dst

step 2

extract the filesystem

me='whoami'
#if exist the old filesystem, then sudo rm -rf $dst
sudo tar xzf xxx.tar.gz -C $dst

sudo chown $me:$me $dst
sudo chown -R $me:$me $dst/home $dst/usr $dst/etc $dst/lib $dst/opt $dst/boot

step 3

export the target filesystem for NFS access

sudo chmod 666 /etc/exports
sudo echo "$dst *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)" >> /etc/exports
sudo chmod 644 /etc/exports

step 4

start and stop the NFS server

sudo /etc/init.d/nfs-kernel-server stop

sudo /etc/init.d/nfs-kernel-server start

Author: Shi Shougang

Created: 2015-03-05 Thu 23:20

Emacs 24.3.1 (Org mode 8.2.10)

Validate