Embedded Linux


之前參考這篇文章

[ubuntu] TFTP Server 安裝

來設定Host的 tftp server 環境,只可惜我怎樣試了又試,還是體會不到成功的快感!

一度以為是防火牆的問題,似乎也不是,inetd 也裝了,就是不給面子。

後來乾脆全部移除掉:

~$:sudo -s

~$:apt-get remove –purge tftpd tftp inetutils-inetd

然後重裝 xinetd 與 tftpd, tftp

~$:apt-get install xinetd tftpd tftp

原先已經系統中還保留舊的 inetd.conf 檔,需要 mark 掉 tftpd 的啟動命令如下:

#tftp        dgram    udp    wait    nobody    /usr/sbin/tcpd    /usr/sbin/in.tftpd /tftpboot

接著用 vim 新增一個檔案:

~$:vim /etc/xinet.d/tftp

檔案內容如下:

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

再來,重新啟動 xinetd(tftpd必須透過 xinetd 這不用廢話了吧,當然也可有standalone的方式):

~$:/etc/init.d/xinetd restart

關於伺服器的目錄設定:

~$:mkdir /tftpboot

~$:chown -R nobody:\  /tftpboot

~$:chmod -R 777 /tftpboot

接著可以利用 client 端程式 tfpt 127.0.0.1 利用 get 指令下載檔案!

#我真的很討厭重複做無聊的事情……………….

最近幹點正經事起來了,不過正經事總是比較難搞,我在編譯 Buildroot[*註一] 的時候遇到錯誤訊息如下:

WARNING: `makeinfo' is missing on your system.  You should only need it
if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[4]: ***
[..............................略/bfd.info]
Error 1

終於,在我細心的爬文後,從 mailing list 找到了解法了,只要將 toolchain_build_arm/ 底下的子目錄

binutils-*-build 移除掉,並執行 make clean ,再度重新執行 make 即可!

  • *1:Buildroot 是一組 Makefile 可以用來輕鬆產生 Toolchain 與 Root Filesystem 並且使用 uclibc 函式庫。安裝可以透過匿名方式存取 svn
    svn co svn://uclibc.org/trunk/buildroot
  • 其他資訊參考:http://buildroot.uclibc.org/