在shell script執行某程式之後判斷是否成功 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 12月 06, 2016 sh /etc/init.d/rcS if [ $? -ne 0 ]; then /sbin/check 1; fi $? is the exit status of the most recently-executed command; by convention, 0 means success and anything else indicates failure. 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
在嵌入式linux系統中使用android adbd,PC可直接透過USB對console下指令 12月 04, 2017 可以參考這一篇 http://www.cnblogs.com/zengjfgit/p/6289873.html /* ************************************************************************ * android-tools adb for ARM Linux * 说明: * 有时候还真是系统通过USB线直接连接到ARM主板,这样就不一定需要网络才 * 能传输文件,在做系统更新的时候,有时候也是不错的。 * * 2017-1-16 深圳 南山平山村 曾剑锋 *********************************************************************** */ 一、参考文档: 1 . [Buildroot] [PATCH v4] android-tools: add new package http: // lists.busybox.net/pipermail/buildroot/2015-November/145112.html 2 . Linux modules install http: // www.cnblogs.com/helloworldtoyou/p/6180404.html 二、内核配置: .config - Linux/arm 3.0 . 35 Kernel Configuration ────────────────────────────────────────────────────────────────────────────── ┌────────────────────────── USB Gadget Support ───────────────────────────┐ │ Arrow keys navigate the menu. <Enter> selects submenus ---> . │ │ Highlig... 閱讀完整內容
lighttpd + fcgi + C language to do file upload & download 12月 07, 2016 最近使用lighttpd當作http server 搭配fcgi來寫檔案上傳跟下載功能 比較討厭的是,html我完全不會寫啊~~~ 還有fcgi的範例也非常地缺乏 其他語言有很多相關API可以使用 C語言的話就得要自己寫 這邊就講一下是怎樣實現的 首先是下載的部分: 一開始得先要有個html給人下載 可以使用下面的範例 printf("Content-type: text/html\r\n" printf("<hr />"); printf("<a href='/download/?message'>message</a>"); printf("<hr />"); 當有人點選"message"後會跳轉另一個網址 之後可以利用queryString = getenv("QUERY_STRING"); 去判別server跳轉進來的下載網址 此時需要提供另一個html告訴browser要下載東西 printf("Content-type: application/octet-stream\r\n"); printf("Content-Transfer-Encoding: Binary\r\n"); printf("Content-Length: %d\r\n", size); ... 閱讀完整內容
linux fuse-exfat於嵌入式系統的設定 1月 07, 2015 要讓linux支援exfat格式是頗麻煩的一件事 一開始先試用nofuse-exfat 但裡面所支援的readdir function在某些版本的linux kernel無法正常作業 導致其他程式要讀取隨身碟裡的檔案時無法顯示 因為我們也沒辦法隨便換kernel版本,所以就放棄使用nofuse-exfat 不能使用nofuse-exfat,那只好使用fuse-exfat 但是fuse-exfat比較複雜 需要至少兩包東西: 1.fuse-2.9.3 2.fuse-exfat-1.1.0 3.exfat-utils-1.1.1(這個應該不一定需要,但我還是放進去了) 於是乎就開始compile這三包東西了 1.fuse-2.9.3 這個算是比較簡單的了 只要將cross compile環境設定好應該就OK了 我自己寫了一個簡單的script來跑 ./configure --prefix=$PWD/release --host=`/opt/toolchains/armv7-marvell-linux-gnueabi-softfp_i686/bin/arm-marvell-linux-gnueabi-gcc -dumpmachine` --enable-lib --enable-util --enable-example --exec-prefix=$PWD/release make clean make mkdir release mkdir release/lib cp lib/.libs/libfuse* release/lib 因為我是在marvell 78460上跑,所以使用的gcc是marvell版本的 請自行代換 compile之後在fuse-2.9.3/lib/.libs裡會出現libfuse.so.2.9.3以及相關的link檔 這就表示成功啦~ 到時fuse-exfat會需要reference這個lib以及include檔案夾內的東西 2.fuse-exfat-1.1.0 這個東西頗麻煩的 因為它是使用scons來compile的,而非一般常用的Makefile 所以請先下載scons 接下來要修改不少東西 (... 閱讀完整內容
留言
張貼留言