惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
T
Tenable Blog
博客园_首页
S
Securelist
Spread Privacy
Spread Privacy
Google Online Security Blog
Google Online Security Blog
Forbes - Security
Forbes - Security
Engineering at Meta
Engineering at Meta
U
Unit 42
L
LINUX DO - 热门话题
量子位
T
Threat Research - Cisco Blogs
博客园 - 【当耐特】
C
Cyber Attacks, Cyber Crime and Cyber Security
K
Kaspersky official blog
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
Martin Fowler
Martin Fowler
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Security Latest
Security Latest
Scott Helme
Scott Helme
V
Vulnerabilities – Threatpost
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
Know Your Adversary
Know Your Adversary
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
V2EX - 技术
V2EX - 技术
T
Tailwind CSS Blog
月光博客
月光博客
Recent Announcements
Recent Announcements
G
Google Developers Blog
F
Full Disclosure
W
WeLiveSecurity
宝玉的分享
宝玉的分享
腾讯CDC
G
GRAHAM CLULEY
Vercel News
Vercel News
Simon Willison's Weblog
Simon Willison's Weblog
美团技术团队
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security

博客园 - Wu.Country@侠缘

用户中心 - 博客园 [Linux]OpenSuse12图形和文字界面转换 haneWIN NFS Server An Introduction to the Linux-based Assignments Booting Linux with U-Boot on QEMU ARM Using The mkimage Tool To Create U-Boot Images SUSE安全大揭秘之“十诫” [Copy]如何使用qemu执行交叉环境下的内核镜像文件 CT-NG编译错误以及解决办法 无法忍受在SUSE10上安装开发环境了 Windows的路由命令 Linux内核代码学习笔记(2.6.21.7 ARM) -- 内核启动函数start_kernel [读书笔记]Binary Hancks(2) livepatch在X86下的实践 [读书笔记]Binary Hancks(1) ARM Stack Unwinding Physical Address Extension - PAE Memory and Windows 如何制作grub启动光盘 [译]Kernel Memory Layout on ARM Linux [转]ucLinux下sqlite数据库移植全攻略
【CLFS】记录:
Wu.Country@侠缘 · 2011-08-21 · via 博客园 - Wu.Country@侠缘

CLFS在线文档:
http://cross-lfs.org/view/clfs-embedded/arm/index.html

1、环境变量准备:
export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/")

export CLFS=/home/wutiejun/host/clfs
export CLFS_HOST=i686-cross-linux
export CLFS_TARGET=arm-wap-linux-uclibceabi
export CLFS_PREFIX=/home/wutiejun/host/clfs/cross-tools
export CLFS_ARCH="arm"
export CLFS_ENDIAN="little"
export CLFS_FLOAT="soft"
export CLFS_ABI="aapcs-linux"
export CLFS_ARM_ARCH="armv6"
export CLFS_ARM_MODE="arm"
export CLFS_FPU=""

/home/wutiejun/host/clfs/cross-tools/usr/include

arm-wap-linux-uclibceabi-

2、准备内核头文件:
make mrproper
make ARCH=${CLFS_ARCH} headers_check
make ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=${CLFS_PREFIX}/usr/include headers_install

cp -rv dest/include/* ${CLFS}/usr/include


3、GMP包编译:
CPPFLAGS=-fexceptions ./configure \
    --prefix=${CLFS}/cross-tools

make
make check
make install

3、编译MPFR包:
LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
  ./configure --prefix=${CLFS}/cross-tools --enable-shared \
  --with-gmp=${CLFS}/cross-tools

make
make install

3、编译MPC包:
LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
  ./configure --prefix=${CLFS}/cross-tools \
      --with-gmp=${CLFS}/cross-tools \
      --with-mpfr=${CLFS}/cross-tools

make
make install


3、编译binutils;
config参数:

../binutils-2.21/configure --prefix=${CLFS}/cross-tools \
   --target=${CLFS_TARGET} --with-sysroot=${CLFS} --disable-nls \
   --enable-shared --disable-multilib

make configure-host
make

make install

cp -v ../binutils-2.21/include/libiberty.h ${CLFS}/usr/include


4、编译静态gcc:

AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
  ../gcc-4.6.0/configure --prefix=${CLFS}/cross-tools \
  --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
  --with-sysroot=${CLFS} --disable-nls  --disable-shared \
  --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
  --with-mpc=${CLFS}/cross-tools --without-headers --with-newlib \
  --disable-decimal-float --disable-libgomp --disable-libmudflap \
  --disable-libssp --disable-threads --enable-languages=c \
  --disable-multilib --with-abi=${CLFS_ABI} --with-arch=${CLFS_ARM_ARCH} \
  --with-mode=${CLFS_ARM_MODE} --with-float=${CLFS_FLOAT} \
  --with-fpu=${CLFS_FPU}

make all-gcc all-target-libgcc

make install-gcc install-target-libgcc


5、编译uclibc:
declare -x

PATH="/home/wutiejun/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt

/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin"

export PATH=$PATH:${CLFS_PREFIX}/bin

patch -Np1 -i ../uClibc-0.9.31-configs-2.patch

修改eabi或者oabi
cp -v clfs/config.${CLFS_ARCH}.${CLFS_ENDIAN} .config
if [ "${CLFS_ABI}" == "aapcs" ] || [ "${CLFS_ABI}" == "aapcs-linux" ]; \
  then sed -i s/CONFIG_ARM_OABI/CONFIG_ARM_EABI/g .config; fi

make oldconfig

make

make PREFIX=${CLFS} install

6、编译gcc第二次:

AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
  ../gcc-4.6.0/configure --prefix=${CLFS}/cross-tools \
  --build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
  --with-sysroot=${CLFS} --disable-nls --enable-shared \
  --enable-languages=c --enable-c99 --enable-long-long \
  --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
  --with-mpc=${CLFS}/cross-tools --disable-multilib \
  --with-abi=${CLFS_ABI} --with-arch=${CLFS_ARM_ARCH} \
  --with-mode=${CLFS_ARM_MODE} --with-float=${CLFS_FLOAT} \
  --with-fpu=${CLFS_FPU}

make

make install

cp -v ${CLFS}/cross-tools/${CLFS_TARGET}/lib/libgcc_s.so.1 ${CLFS}/lib

================================
  /\_/\                        
 (=^o^=)  Wu.Country@侠缘      
 (~)@(~)  一辈子,用心做一件事!
--------------------------------
  学而不思则罔,思而不学则怠!  
================================