2014年5月13日 星期二

arm-linux-gcc( arm-none-linux-gnueabi-gcc) cause "No such file or directory"


after cross-complier installed, and env set

cmd> arm-linux-gcc -v
-bash: /usr/local/arm_linux_4.2/bin/arm-linux-gcc: No such file or directory


install ia32-libs (  lib32z1 lib32ncurses5 lib32bz2-1.0 replace it)

sudo apt-get install ia32-libs
However the following packages replace it:
  lib32z1 lib32ncurses5 lib32bz2-1.0


so, try install package
cmd> sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

cmd>  arm-linux-gcc -v
gcc version 4.2.1

--
DONE

2012年7月11日 星期三

Compile openssl on ARM platform (openssl-1.0.1c dynamic linking)

網站: http://www.openssl.org/source/  OpenSSL


版本:  openssl-1.0.1c.tar.gz 


LINK: http://www.openssl.org/source/openssl-1.0.1c.tar.gz


解壓縮後進入目錄(  openssl-1.0.1c/ )


#> CC=arm-linux-gcc ./config no-asm shared \
--prefix=~/install_openssl_dir

#> make
#> make install


之後就會在 ~/install_openssl_dir 的 lib目錄下生成libssl.so Library 


不必修改 Makefile [1]



後來看到 config 某段寫著

if [ -z "$CROSS_COMPILE$CC" ]; then
....


根據上面的條件判斷式於是改成下面的指令

#> CROSS_COMPILE=arm-linux- CC=gcc ./config no-asm shared \
--prefix=~/install_openssl_dir


[Ref. 1] [原]交叉编译openssl不修改Makefile的方法

2011年10月4日 星期二

U-Boot-( 可修改的 ) The hardware dependent configuration and supported hardware model

=============================
SPI Flash support list 在這裡看到可支援的spi flash 型號

Location:
$U-boot_DIR/ include/ spi_type.h
Define:
spi_info[]={ ... };

=============================
U-Boot version (see at booting message) 可以修改開機訊息顯示的版本別

Location:
$U-Boot_DIR/ lib_$ARCH/ board.c
Define:
const char version_string[] = $VERSION;

show message:
U-Boot 1.3.0 (Jan 20 2011 - 09:06:50)

****checksum is effected.****

=============================
U-Boot TEXT_BASE

FILE Location:
$U-Boot_DIR/ board/ $VENDOR/ $BOARD/config.mk

Code:
# RAM version
TEXT_BASE = 0xa000000

u-boot 存放在memory的位置

=============================
U-Boot Hardware dep. Setting Declare.

***宣告要包 哪種 Hardware的設定值
File Location:
$U-Boot_DIR/ include/config.h

Code:
#include _ configs/$BOARD.h _



***硬體相關名稱 ( mk檔多會用到,(if)define亦是 )
File Location:
$U-Boot_DIR/ include/config.mk

Code:
ARCH = $ARCH
CPU = $CPU
BOARD = $BOARD
VENDOR = $VENDOR


***define HW 週邊設定、宣告,時脈、I2C、SPI、bootargs、USB‧‧‧等
File Location:
$U-Boot_DIR/ include/ configs/ $BOARD.h

Code: (部分代碼)
...
#define CONFIG_BAUDRATE 115200
...
#define CONFIG_LOADADDR 0xa0000000 /* default load address */
...



2011年8月30日 星期二

Andriod - adb


<< Source Code >>
**** system/core/adb/adb.c Line: 921

<< target side >>

$> stop adbd
$> set service.adb.tcp.port 5032
$> start adbd

ps.
可將上面三行加入init.rc 執行adbd 之前,就可透過 tcp/ip 傳輸


<< host side >>

$> adb kill-server // 確保連接成功

$> adb connect $TARGET_IP: // 透過tcp/ip 連到android

$> adb devices // 確認連上的設備

$> adb shell $CMD
之後進入另一提示字元,輸入 su即以root權限工作

$> adb disconnect $TARGET_IP:$PORT_NUM // 斷開連接

ps.
adb shell 之後提示字元為
"#" 表示是以 root權限 ;
"$" 表示是以shell權限


2011年8月23日 星期二

Eclipse - Android Emulator invoke Error



[ ISSUE ] 出現以下錯誤訊息,導致模擬器不能執行:

[2011-08-23 15:01:22 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2011-08-23 15:01:22 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2011-08-23 15:01:22 - Emulator] please use -help for more information


[ 2 Solutions ]

1. 安裝 android SDK 到 沒有空格的目錄 (ex: C:\Android)

原本 assign 的路徑為 C:\PROGRAM FILES\Android\android-sdk
^ 因為空格(space) 導致設定錯誤

2. 在Eclipse 下重新設置路徑

Window > Preference > Android > SDK Location

變成新的路徑 C:\PROGRA~1\Android\android-sdk


2011年8月9日 星期二

linux - Seagate SpinDown Aware



取消隨身硬碟進入睡眠模式不能喚醒問題,將這行指令上去就可以了

echo 1 > /sys/class/scsi_disk/$scsi_disk/allow_restart





資料來源