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

推荐订阅源

博客园 - 三生石上(FineUI控件)
V
Vulnerabilities – Threatpost
C
Cisco Blogs
A
Arctic Wolf
L
LINUX DO - 热门话题
P
Proofpoint News Feed
Security Latest
Security Latest
AWS News Blog
AWS News Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
W
WeLiveSecurity
爱范儿
爱范儿
Last Week in AI
Last Week in AI
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security Affairs
PCI Perspectives
PCI Perspectives
C
Cybersecurity and Infrastructure Security Agency CISA
Spread Privacy
Spread Privacy
IT之家
IT之家
月光博客
月光博客
云风的 BLOG
云风的 BLOG
宝玉的分享
宝玉的分享
J
Java Code Geeks
美团技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
I
Intezer
博客园_首页
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Palo Alto Networks Blog
NISL@THU
NISL@THU
Recent Commits to openclaw:main
Recent Commits to openclaw:main
有赞技术团队
有赞技术团队
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
量子位
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Security @ Cisco Blogs
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
V
V2EX
Jina AI
Jina AI

博客园 - 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@侠缘      
 (~)@(~)  一辈子,用心做一件事!
--------------------------------
  学而不思则罔,思而不学则怠!  
================================