我想将我的内核映像传输到 beaglebone black,并且指南提到我应该已经在主机上设置了 DHCP 和 tftp。
我已经使用以下命令设置了 TFTP:
sudo apt-get install tftpd-hpa tftp-hpa
sudo vim /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="your-ftp-root-directory"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
sudo service tftpd restart
另外,我需要主机上有一个 DHCP 服务器,这样它可以将 IP 分配给 BBBlack。
所以我遵循了:
sudo apt-get install isc-dhcp-server
sudo /etc/init.d/networking/restart
nano -w /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
ls /etc/default/isc-dhcp-server
接口“eth0”:
eth0 Link encap:Ethernet HWaddr 00:23:ae:15:85:ae
inet6 addr: fe80::223:aeff:fe15:85ae/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1462 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:279343 (279.3 KB)
Interrupt:16
/etc/网络/接口
auto lo
iface lo inet loopback
#auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
up service dhcp3-server restart
还没有。DHCP 尚未设置。
请指出我可能出错的地方
答案1
测试一下:
# server-identifier 192.168.1.2;
ddns-update-style interim;
ignore client-updates;
authoritative;
default-lease-time 900;
max-lease-time 7200;
option ip-forwarding off;
option domain-name "mydomain.example";
option ntp-servers 0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org, 3.pool.ntp.org;
shared-network mydomain {
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.2;
option netbios-name-servers 192.168.1.2;
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
}
答案2
我可能错了,但据我所知,大多数可以通过 tftp 使用新固件进行馈送的设备都需要在 dhcpd 为其提供的地址上启用 BOOTP。
也许这有帮助:
客户端的 BOOTP使用这个例子:
host haagen {
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 239.252.197.9;
filename "/tftpboot/haagen.boot";
}
关于这一点:
TFTP_DIRECTORY="your-ftp-root-directory"
我猜你把它改成了实际目录?