2016년 3월 2일 수요일

ARM용 OpenSSL 크로스 컴파일하기

  • ARM 타겟 보드 용 OpenSSL 라이브러리 생성하기
  • openssl-1.0.1s

크로스 컴파일 설정
./Configure linux-generic32 shared -DL_ENDIAN --prefix=/usr/dev/2_nanogrid/imx287/ltib/rootfs/usr/local/openssl --openssldir=/usr/dev/2_nanogrid/imx287/ltib/rootfs/usr/local/openssl
의존성 체크
make depend CC="arm-fsl-linux-gnueabi-gcc" R="arm-fsl-linux-gnueabi-ar" RANLIB="arm-fsl-linux-gnueabi-ranlib" LD="arm-fsl-linux-gnueabi-ld" MAKEDEPPROG="arm-fsl-linux-gnueabi-gcc" PROCESSOR=ARM
빌드
make CC="arm-fsl-linux-gnueabi-gcc" R="arm-fsl-linux-gnueabi-ar" RANLIB="arm-fsl-linux-gnueabi-ranlib" LD="arm-fsl-linux-gnueabi-ld" MAKEDEPPROG="arm-fsl-linux-gnueabi-gcc" PROCESSOR=ARM
설치
sudo make install CC="arm-fsl-linux-gnueabi-gcc" R="arm-fsl-linux-gnueabi-ar" RANLIB="arm-fsl-linux-gnueabi-ranlib" LD="arm-fsl-linux-gnueabi-ld" MAKEDEPPROG="arm-fsl-linux-gnueabi-gcc" PROCESSOR=ARM

bash profile works for user but not sudo


that is the behavior of sudo in ubuntu..
for example run following command
echo 'echo $PATH' | sh
and than this one
echo 'echo $PATH' | sudo sh 
you see the output is different! to avoid different paths put the following in your ~/.profile
alias sudo='sudo env PATH=$PATH'

댓글 없음:

댓글 쓰기