-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathboot linux over tftp and nfs.txt
52 lines (37 loc) · 1.79 KB
/
boot linux over tftp and nfs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
1) Build u-boot with support Network, tftp and nfs
2) Check nfsv3 support in linux configs
3) Write u-boot to sd-card
4) On host run tftp and nfsv3 (see your distro wiki)
5) Create bootscript file. Example:
setenv tftp_dir zed
setenv nfs_rfs /srv/nfs/zed
setenv bootargs ip=dhcp
setenv bootargs ${bootargs} console=ttyPS0,115200n8
setenv nfs_ip 192.168.100.7
setenv bootargs ${bootargs} root=/dev/nfs rootfstype=nfs nfsroot=${nfs_ip}:${nfs_rfs},port=2049,nfsvers=3,tcp rw loglevel=8 nfsrootdebug
setenv bitstream_image 'fpga.bin'
setenv bitstream_addr 0x4000000
setenv bitstream_tftp 'tftpboot ${bitstream_addr} ${tftp_dir}/${bitstream_image}'
setenv bitstream_load 'fpga load 0 ${bitstream_addr} ${filesize}'
setenv devicetree_image system.dtb
setenv devicetree_addr 0x2A00000
setenv devicetree_tftp 'tftpboot ${devicetree_addr} ${tftp_dir}/${devicetree_image}'
setenv kernel_image uImage
setenv kernel_addr 0x3000000
setenv kernel_tftp 'tftpboot ${kernel_addr} ${tftp_dir}/${kernel_image}'
setenv phy_rst 'mw.w f8000008 df0d ; mw.w f8000140 00100801 ; mw.w f8000004 767b'
setenv rset_phy 'run phy_rst'
setenv boot_now 'bootm ${kernel_addr} - ${devicetree_addr}'
run bitstream_tftp bitstream_load kernel_tftp devicetree_tftp rset_phy boot_now
6) Compile bootscript file by mkimage (uboot-tools package):
sudo mkimage -A arm -O u-boot -T script -C none -a 0 -e 0 -n "t-Boot Script" -d bootscr.txt /srv/tftp/boot.scr
7) Copy uImage and devicetree.dtb to tftp_dir (see example on bootscript file)
8) Run board and go to U-BOOT
9) Change u-boot environment:
setenv ipaddr 192.168.100.6
setenv serverip 192.168.100.7
setenv t-addr 0x100000
setenv t-boot 'tftpboot ${t-addr} boot.scr ; source ${t-addr}'
setenv bootcmd 'run t-boot'
saveenv
10) restart