crosstool-ng
http://freshmeat.net/projects/crosstool-ng/
http://ymorin.is-a-geek.org/download/crosstool-ng/01-fixes/
$ sudo apt-get install subversion gcj g++
$ patch -p1 < 001-XXXX
$ ./configure --prefix=/opt/crosstool-ng
$ make
$ sudo make install $ echo "PATH=$PATH:/opt/crosstool-ng/bin" >> ~/.bashrc
$ source ~/.bashrc
$ mkdir ct_build
$ mkdir src
$ mkdir x-tools
$ cd ct_build
$ ct-ng arm-unknown-linux-gnueabi
$ ct-ng menuconfig
Target options --->
*** Target optimisations ***
(armv5te) Architecture level
(arm926ej-s) Emit assembly for CPU
(arm926ej-s) Tune for CPU
S3C2410/S3C2440
armv4t
arm920t
S3C2416/AT91SAM9263/AT91SAM9G45
armv5te
arm926ej-s
S3C6410
armv6
arm1176jzf-s
$ ct-ng build.2
=======================
1.cloog error
make: *** No rule to make target `/home/arthur/work/ct-atmel/targets/src/cloog-ppl-0.15.10/m4/libtool.m4', needed by `/home/arthur/work/ct-atmel/targets/src/cloog-ppl-0.15.10/Makefile.in'. Stop.
/opt/crosstool-ng/lib/ct-ng-1.9.0/scripts/build/companion_libs/c;oog.sh
diff -r 4d074e5882e5 -r be83d1a14c3d scripts/build/companion_libs/cloog.sh
--- a/scripts/build/companion_libs/cloog.sh Sun Oct 31 11:45:39 2010 +0200
+++ b/scripts/build/companion_libs/cloog.sh Thu Nov 04 18:23:35 2010 +0200
@@ -29,6 +29,7 @@
esac
CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}"
CT_Patch nochdir "cloog-ppl" "${CT_CLOOG_VERSION}"
+ ./autogen.sh
CT_Popd
}
2.
[ALL ] In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
[ALL ] ../misc/syslog.c: In function '__vsyslog_chk':
[ALL ] ../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to 'syslog': function body not available
[ALL ] ../misc/syslog.c:155: sorry, unimplemented: called from here
[ERROR] make[4]: *** [/home/arthur/work/ct-atmel/targets/arm-atmel-linux-gnueabi/build/build-libc/misc/syslog.o] Error 1
CT_LIBC_GLIBC_EXTRA_CFLAGS="-U_FORTIFY_SOURCE"
3.舊linux版會出現的error
[ERROR] /home/arthur/work/ct-2410/targets/src/linux-2.6.24/scripts/unifdef.c:209: error: conflicting types for 'getline'
root@arthur-VirtualBox:/home/arthur/work/ct-2410# find . -name 'unifdef.c'
./targets/src/linux-2.6.24/scripts/unifdef.c
+--- a/scripts/unifdef.c
++++ b/scripts/unifdef.c
+@@ -206,7 +206,7 @@ static void done(void);
+ static void error(const char *);
+ static int findsym(const char *);
+ static void flushline(bool);
+-static Linetype getline(void);
++static Linetype get_line(void);
+ static Linetype ifeval(const char **);
+ static void ignoreoff(void);
+ static void ignoreon(void);
+@@ -512,7 +512,7 @@ process(void)
+
+ for (;;) {
+ linenum++;
+- lineval = getline();
++ lineval = get_line();
+ trans_table[ifstate[depth]][lineval]();
+ debug("process %s -> %s depth %d",
+ linetype_name[lineval],
+@@ -526,7 +526,7 @@ process(void)
+ * help from skipcomment().
+ */
+ static Linetype
+-getline(void)
++get_line(void)
+ {
+ const char *cp;
+ int cursym;
+--
為工具鏈增加鏈接
$ cd arm-unknown-linux-gnueabi/bin
$ ./autoln.sh
autoln.sh是一個腳本,用來自動鏈接arm-unknown-linux-gnueabi的工具...
文件名:autoln.sh 拷到要自動建立鏈接的文件夾使用。
#!/bin/bash
#
# main
#
if [ $# -lt 1 ] ; then
echo "default path: ./"
BIN_PATH=./
else
BIN_PATH=$1
fi
if [ ! -d $1 ] ; then
echo "path error"
exit
fi
cd $BIN_PATH
SRC=`ls | awk '{print $1}'`
for i in $SRC ; do
if [ "$i" != "autoln.sh" ] ; then
#echo $i
TARGET=`echo $i | sed 's/arm-unknown-linux-gnueabi/arm-linux/g' `
echo $TARGET
ln -s $i $TARGET
fi
done
2010/12/02
2010/11/30
2010/11/25
$ mkdir ~/croosstool-ng
$ cd ~/croosstool-ng
$ tar -jxf crosstool-ng-1.9.0.tar.bz2
$ cd crosstool-ng-1.9.0
$ patch -p1 < 000-libc_eglibc_fix_downloading.patch
$ ./configure --prefix=/opt/crosstool-ng
$ make
$ sudo make install
$ echo "PATH=$PATH:/opt/crosstool-ng/bin" >> ~/.bashrc
$ source ~/.bashrc
=================================
mkdir build_toolchain
mkdir ~/src
ct-ng arm-unknown-linux-gnueabi
ct-ng menuconfig
$ cd ~/croosstool-ng
$ tar -jxf crosstool-ng-1.9.0.tar.bz2
$ cd crosstool-ng-1.9.0
$ patch -p1 < 000-libc_eglibc_fix_downloading.patch
$ ./configure --prefix=/opt/crosstool-ng
$ make
$ sudo make install
$ echo "PATH=$PATH:/opt/crosstool-ng/bin" >> ~/.bashrc
$ source ~/.bashrc
=================================
mkdir build_toolchain
mkdir ~/src
ct-ng arm-unknown-linux-gnueabi
ct-ng menuconfig
2010/11/24
embedded linux 開發常用工具及套件
1.編輯器
sudo apt-get install vim
2.GNU C/C++ Fortran編輯器及make工具
sudo apt-get install gcc build-essential fortran77-compiler make
3.GNU AWK語言支援
sudo apt-get install gawk
4.congiure及makefile 腳本自動化工具
sudo apt-get install automake autoconf
5.串列終端工具
sudo apt-get install minicom lrzsz
6.當前kernel 的headers檔案
sudo apt-get install linux-headers-$(uname -r)
*好像有改
7.text user interfaces 相關函式庫
sudo apt-get install ncurses-dev libncursesw5-dev libncurses5-dev
8.其他可能用到的工具函式
sudo apt-get install libtool bison flex texinfo binutils-dev libc6-dev linux-libc-dev
9.圖片格式轉換
sudo apt-get install netpbm libnerpbm10 libnetpbm10-dev
10.IA32-libs
sudo apt-get install ia32-libs-multiarch:i386
sudo apt-get install ia32-libs
(安裝有問題可以試sudo apt-get remove bluez ia32-libs,再重新安裝)
1.編輯器
sudo apt-get install vim
2.GNU C/C++ Fortran編輯器及make工具
sudo apt-get install gcc build-essential fortran77-compiler make
3.GNU AWK語言支援
sudo apt-get install gawk
4.congiure及makefile 腳本自動化工具
sudo apt-get install automake autoconf
5.串列終端工具
sudo apt-get install minicom lrzsz
6.當前kernel 的headers檔案
sudo apt-get install linux-headers-$(uname -r)
*好像有改
7.text user interfaces 相關函式庫
sudo apt-get install ncurses-dev libncursesw5-dev libncurses5-dev
8.其他可能用到的工具函式
sudo apt-get install libtool bison flex texinfo binutils-dev libc6-dev linux-libc-dev
9.圖片格式轉換
sudo apt-get install netpbm libnerpbm10 libnetpbm10-dev
10.IA32-libs
sudo apt-get install ia32-libs-multiarch:i386
sudo apt-get install ia32-libs
(安裝有問題可以試sudo apt-get remove bluez ia32-libs,再重新安裝)
2010/11/22
先記下來
libpng
#./configure --host=arm-linux --prefix=/home/lib/libpng --enable-shared LDFLAGS=-L/home/lib/zlib/lib/ CPPFLAGS=-I/home/lib/include
zlib
#CC=arm-linux-gcc
#./configure –host=arm-linux –prefix=/home/lib/zlib
qt修正
修改qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
QMAKE_CC = arm-linux-gcc -lts
QMAKE_CXX = arm-linux-g++ -lts
QMAKE_LINK = arm-linux-g++ -lts
QMAKE_LINK_SHLIB = arm-linux-g++ -lt
qt4.7
./configure -prefix /home/qt4.7.0 -release -shared -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -embedded arm -little-endian -qt-freetype -depths 16 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -no-glib -qt-mouse-tslib -I /home/include -L /home/lib
libpng
#./configure --host=arm-linux --prefix=/home/lib/libpng --enable-shared LDFLAGS=-L/home/lib/zlib/lib/ CPPFLAGS=-I/home/lib/include
zlib
#CC=arm-linux-gcc
#./configure –host=arm-linux –prefix=/home/lib/zlib
qt修正
修改qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
QMAKE_CC = arm-linux-gcc -lts
QMAKE_CXX = arm-linux-g++ -lts
QMAKE_LINK = arm-linux-g++ -lts
QMAKE_LINK_SHLIB = arm-linux-g++ -lt
qt4.7
./configure -prefix /home/qt4.7.0 -release -shared -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -embedded arm -little-endian -qt-freetype -depths 16 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -no-glib -qt-mouse-tslib -I /home/include -L /home/lib
2010/11/18
sudo
/etc/sudoers
要使用sudo,首先是編輯/etc/sudoers
sudoers格式如下:
用戶名稱 主機名稱=(可變換的身份) 可執行的指令
例
arthur localhost=(hmi) /usr/bin/*
arthur只可在localhost變成hmi,並執行/usr/bin中的指令
arthur ALL=(ALL) ALL
arthur可以用任何指令
%admin ALL=(ALL) ALL
加上%符號代表群組,admin群組中的人都可以使用sudo,並執行任何指令
gksu,gksuexec
在使用圖形介面時使用gksu指令來啟動圖形介面的程式
gksu naulitus
或
gksuexec,在輸入指令
==================
ubuntu下修改root密碼
$ sudo su- //切換至root (需輸入目前使用者的密碼)
$ passwd //修改root的密碼
/etc/sudoers
要使用sudo,首先是編輯/etc/sudoers
sudoers格式如下:
用戶名稱 主機名稱=(可變換的身份) 可執行的指令
例
arthur localhost=(hmi) /usr/bin/*
arthur只可在localhost變成hmi,並執行/usr/bin中的指令
arthur ALL=(ALL) ALL
arthur可以用任何指令
%admin ALL=(ALL) ALL
加上%符號代表群組,admin群組中的人都可以使用sudo,並執行任何指令
gksu,gksuexec
在使用圖形介面時使用gksu指令來啟動圖形介面的程式
gksu naulitus
或
gksuexec,在輸入指令
==================
ubuntu下修改root密碼
$ sudo su- //切換至root (需輸入目前使用者的密碼)
$ passwd //修改root的密碼
2010/06/25
2010/06/19
Terminal 專用字型
1.Return of Monaco
下載 http://www.gringod.com/2006/02/24/return-of-monacottf/
2.Debian Terminal 專用字型
$apt-get install ttf-inconsolata
3.alan 推薦 terminus 字型
$apt-get install xfonts-terminus
字型下載後放至/usr/share/fonts/truetype/
執行 fc-cache -f -v
參考
http://plog.longwin.com.tw/programming/2007/08/14/programmer_best_font_monaco_2007
http://zh.wikipedia.org/zh-tw/Consolas
1.Return of Monaco
下載 http://www.gringod.com/2006/02/24/return-of-monacottf/
2.Debian Terminal 專用字型
$apt-get install ttf-inconsolata
3.alan 推薦 terminus 字型
$apt-get install xfonts-terminus
字型下載後放至/usr/share/fonts/truetype/
執行 fc-cache -f -v
參考
http://plog.longwin.com.tw/programming/2007/08/14/programmer_best_font_monaco_2007
http://zh.wikipedia.org/zh-tw/Consolas
訂閱:
文章 (Atom)