PowerPC platform Linux porting three

Source: Internet
Author: User
Tags create directory

Following the PowerPC platform Linux Migration Two, a single Board mount NFS Network File system is implemented.

1.ubuntu Installation Configuration Start NFS Service
See http://blog.csdn.net/u010216127/article/details/8825735 for detailed procedures.
= = NFS 0x3000000 10.3.56.9:/home/freescale/work/nfs_root/hello
speed:100, Full Duplex
Using eTSEC2 Device
File transfer via NFS from server 10.3.56.9; Our IP address is 10.3.56.242
Filename '/home/freescale/work/nfs_root/hello '.
Load address:0x3000000
Loading: # #T T * * * Error:cannot Umount
Workaround:
To include in the host's/etc/hosts file
Your Dev Board ip NFS Directory (Ubuntu), eg
10.3.56.242/home/freescale/work/nfs_root
= = NFS 0x3000000 10.3.56.9:/home/freescale/work/nfs_root/hello
speed:100, Full Duplex
Using eTSEC2 Device
File transfer via NFS from server 10.3.56.9; Our IP address is 10.3.56.242
Filename '/home/freescale/work/nfs_root/hello '.
Load address:0x3000000
Loading: # #
Done
Bytes transferred = 7920 (1EF0 hex)
=

2. Burn and write Uimage DTB
= setenv Ethact eTSEC2
= TFTP 0x1000000 uimage
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Uimage '.
Load address:0x1000000
Loading: #################################################################
#################################################################
#################################################################
####
Done
Bytes transferred = 2907800 (2c5e98 hex)
= Erase 0xee080000 0xee37ffff

.... Done.-----------
Erased sectors
= cp.b 0x1000000 0xee080000 0x300000
Copy to Flash ... 9....8....7....6....5....4....3....2....1....done
= = MD 0xee080000
ee080000:27051956 2899922f 55640aa4 002c5e58 '. V (.. /ud...,^x
Ee080010:00000000 00000000 06436151 05070201 ..... CaQ ....
Ee080020:4c696e75 782d322e 362e3335 00000000 Linux-2.6.35 ....
Burn Write DtB
= TFTP 0xc00000 P1010RDB.DTB
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' P1010RDB.DTB '.
Load address:0xc00000
Loading: #
Done
Bytes transferred = 11988 (2ed4 hex)
= Erase 0xee040000 0xee07ffff

.. Done
Erased 2 sectors
= cp.b 0xc00000 0xee040000 0x40000
Copy to Flash ... 9....8....7....6....5....4....3....2....1....done
= = MD 0xee040000
Ee040000:d00dfeed 00002ed4 00000038 00002778 ..... 8.. ' X
ee040010:00000028 00000011 00000010 00000000 ... (............
ee040020:0000035c 00002740 00000000 00000000 ... @........
Ee040030:00000000 00000000 00000001 00000000 ..........
ee040040:00000003 0000000a 00000000 66736c2c .... FSL, the.
ee040050:50313031 30000000 00000003 0000000d P1010 .....
ee040060:00000006 66736c2c 50313031 30524442 .... fsl,p1010rdb

3. Implement NFS Mount file system
Setenv Nfsargs ' setenv bootargs root=/dev/nfs rw nfsroot=10.3.56.9:/home/freescale/work/source/fs_mini nolock ip= 10.3.56.242:10.3.56.9:10.3.57.255:255.255.0.0::eth1:off INIT=/LINUXRC console=ttys0,115200 '
Setenv Bootcmd ' run Nfsargs; Bootm 1000000-c00000 '
= setenv Bootargs root=/dev/nfs nfsroot=10.3.56.9:/home/freescale/work/source/fs_mini nolock ip= 10.3.56.242:10.3.56.9:10.3.57.255:255.255.0.0::eth1:off INIT=/LINUXRC \
> console=ttys0,115200

ALSA Device List:
No soundcards found.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP Cubic Registered
Initializing XFRM NetLink Socket
Net:registered Protocol Family 17
Net:registered Protocol Family 15
Turn off boot console udbg0

This halt occurs because $consoledev is not set, re-modifying parameters can be

= setenv Ethact eTSEC2
= setenv Nfsargs ' setenv bootargs root=/dev/nfs nfsroot=10.3.56.9:/home/freescale/work/source/fs_mini nolock ip= 10.3.56.242:10.3.56.9:10.3.57.255:255.255.0.0::eth1:off \
> INIT=/LINUXRC console=ttys0,115200 '
= = setenv Bootcmd ' run Nfsargs; Bootm 1000000-c00000 '
= TFTP 0x1000000 uimage
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Uimage '.
Load address:0x1000000
Loading: #################################################################
#################################################################
#################################################################
########
Done
Bytes transferred = 2969010 (2d4db2 hex)
= TFTP 0xc00000 P1010RDB.DTB
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' P1010RDB.DTB '.
Load address:0xc00000
Loading: #
Done
Bytes transferred = 11988 (2ed4 hex)
= setenv ipaddr 10.3.56.242
= = Set ServerIP 10.3.56.9
Unknown command ' Set '-try ' help '
= setenv ServerIP 10.3.56.9
= Ping $serverip
speed:100, Full Duplex
Using eTSEC2 Device
Host 10.3.56.9 is alive
= = Boot
........
Net:registered Protocol Family 17
Net:registered Protocol Family 15
eth1:attached PHY driver [Generic PHY] (mii_bus:[email protected]:06, id=4dd074)
Ip-config:complete:
Device=eth1, addr=10.3.56.242, mask=255.255.0.0, gw=10.3.57.255,
host=10.3.56.242, domain=, nis-domain= (None),
bootserver=10.3.56.9, rootserver=10.3.56.9, rootpath=
Looking up port of RPC 100003/2 on 10.3.56.9
Looking up port of RPC 100005/1 on 10.3.56.9
vfs:mounted Root (NFS filesystem) readonly on device 0:15.
devtmpfs:mounted
Freeing unused kernel memory:212k init
Nfs:server 10.3.56.9 not responding, still trying

4. Continue to modify the file system
The reason is that when the system is mounted, the IP of the Development Board is changed and IP can be modified.

eth1:attached PHY driver [Generic PHY] (mii_bus:[email protected]:06, id=4dd074)
Ip-config:complete:
Device=eth1, addr=10.3.56.242, mask=255.255.0.0, gw=10.3.57.255,
host=10.3.56.242, domain=, nis-domain= (None),
bootserver=10.3.56.9, rootserver=10.3.56.9, rootpath=
Looking up port of RPC 100003/2 on 10.3.56.9
Looking up port of RPC 100005/1 on 10.3.56.9
vfs:mounted Root (NFS filesystem) readonly on device 0:15.
devtmpfs:mounted
Freeing unused kernel memory:212k init
Can ' t open/dev/ttysac0:no such file or directory
Can ' t open/dev/ttysac0:no such file or directory
Can ' t open/dev/ttysac0:no such file or directory
Can ' t open/dev/ttysac0:no such file or directory
Can ' t open/dev/ttysac0:no such file or directory
Can ' t open/dev/ttysac0:no such file or directory
5. Continue to modify the file system
Modify the Inittab file
Ttys0::askfirst:-/bin/sh
6. Final successful Mount
eth1:attached PHY driver [Generic PHY] (mii_bus:[email protected]:06, id=4dd074)
Ip-config:complete:
Device=eth1, addr=10.3.56.242, mask=255.255.0.0, gw=10.3.57.255,
host=10.3.56.242, domain=, nis-domain= (None),
bootserver=10.3.56.9, rootserver=10.3.56.9, rootpath=
Looking up port of RPC 100003/2 on 10.3.56.9
Looking up port of RPC 100005/1 on 10.3.56.9
vfs:mounted Root (NFS filesystem) readonly on device 0:15.
devtmpfs:mounted
Freeing unused kernel memory:212k init

Press Enter to activate the this console.
# ls
Bin etc LINUXRC proc Sbin tmp
Dev lib mnt root sys usr
#

7. Resolving the read-only file system
# mkdir Test1
Mkdir:cannot Create directory ' test1 ': Read-only file system
# ls
Bin etc linuxrc proc sbin Test usr
Dev lib mnt root sys tmp
# mount
Rootfs on/type rootfs (rw)
/dev/root On/type NFS (Ro,relatime,vers=2,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,port=65535,timeo =11,retrans=3,sec=sys,mountport=65535,mountproto=,addr=10.3.56.9)
Devtmpfs On/dev type DEVTMPFS (rw,relatime,size=516660k,nr_inodes=129165,mode=755)
Proc On/proc type proc (rw,relatime)
Tmpfs on/tmp type TMPFS (rw,relatime)
Then is Mount NFS directory after read-only non-writable problem, toss half a day,
Later found to require Uid,gid to be consistent with the server
Then on the server with the ID command to check
# ID
Uid=0 gid=0
# ID
Uid=0 gid=0
#
Modify the/etc/exports file
/home/freescale/work/source/fs_mini * (rw,sync,no_root_squash,anonuid=0,anongid=0)
sudo service nfs-kernel-server restart
Setenv Nfsargs ' setenv bootargs root=/dev/nfs rw nfsroot=10.3.56.9:/home/freescale/work/source/fs_mini nolock ip= 10.3.56.242:10.3.56.9:10.3.57.255:255.255.0.0::eth1:off INIT=/LINUXRC console=ttys0,115200 '
Setenv Bootcmd ' run Nfsargs; Bootm 1000000-c00000 '
8. Re-mount NFS file system, read and write normal
# mkdir Test1
# ls
Bin etc LINUXRC proc sbin Test tmp
Dev lib mnt root sys test1 USR
# rmdir Test1
# ls
Bin etc linuxrc proc sbin Test usr
Dev lib mnt root sys tmp
# ping 10.3.56.9
PING 10.3.56.9 (10.3.56.9): Data bytes
Bytes from 10.3.56.9:seq=0 ttl=64 time=1.042 ms
Bytes from 10.3.56.9:seq=1 ttl=64 time=0.429 ms
^c
---10.3.56.9 ping statistics---
2 packets transmitted, 2 packets received, 0% packet loss
Round-trip Min/avg/max = 0.429/0.735/1.042 ms
#

PowerPC platform Linux porting three

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.