新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 基于3c2410的linux2.6.22移植(3)

        基于3c2410的linux2.6.22移植(3)

        作者: 時間:2016-11-20 來源:網(wǎng)絡(luò) 收藏
        4、 生成第一階段gcc: arm/build-tools/%23">$root@host:/home/arm/build-tools/# tar xvjf gcc-4.2.1.tar.bz2
        打補丁:
        $root@host:/home/arm/build-tools/# cd gcc-4.2.1
        $root@host:/home/arm/build-tools/gcc-4.2.1#
        patch –Np1 –i /home/arm/build-tools/patch/gcc-4.2.1-*
        $root@host:/home/arm/build-tools/ gcc-4.2.1# cd ..
        $root@host:/home/arm/build-tools/# cd build-boot-gcc
        $root@host:/home/arm/build-tools/build-boot-gcc#
        ../gcc-4.2.1/configure --target=${TARGET} --prefix=${PREFIX} --with-headers=${TARGET_PREFIX}/include
        --with-newlib --enable-languages=c --disable-threads --disable-shared
        $root@host:/home/arm/build-tools/build-boot-gcc # make all-gcc
        $root@host:/home/arm/build-tools/build-boot-gcc # make install-gcc
        在${PREFIX}/bin下會生成 arm-linux-開頭的文件:
        $root@host:/home/arm/build-tools/build-boot-gcc # ls ${PREFIX}/bin
        5、 生成glibc庫文件:
        $root@host:/home/arm/build-tools/build-boot-gcc # cd ..
        $root@host:/home/arm/build-tools# cd build-glibc
        $root@host:/home/arm/build-tools/build-glibc# CC=arm-linux-gcc ../glibc-2.6.1/configure --host=$TARGET --prefix=”/usr”
        --enable-add-ons --with-headers=${TARGET_PREFIX}/include
        --cache-file=config.cache
        這里的config.cache與前面編譯glibc頭文件時的config.cache完全相同。
        $root@host:/home/arm/build-tools/build-glibc# make
        $root@host:/home/arm/build-tools/build-glibc#
        make install_root=${TARGET_PREFIX} prefix=”” install
        對libc.so作出修改:
        $root@host:/home/arm/build-tools/build-glibc# cd ${TARGET_PREFIX}/lib
        $root@host:/home/arm/tools/arm-linux/lib# cat libc.so

        OUTPUT_FORMAT(elf32-littlearm)
        GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) )
        將GROUP這一行的內(nèi)容改為:
        GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.2 ) )
        $root@host:/home/arm/tools/arm-linux/lib# cat libpthread.so

        OUTPUT_FORMAT(elf32-littlearm)
        GROUP ( /lib/libpthread.so.0 /lib/libpthread_nonshared.a )
        將GROUP這一行的內(nèi)容改為:
        GROUP (libpthread.so.0 libpthread_nonshared.a )
        6、 生成完整的編譯工具:
        $root@host:/home/arm/tools/arm-linux/lib# cd ${PRJROOT}/build-tools/build-gcc
        $root@host:/home/arm/build-tools/build-gcc#
        ../gcc-4.2.1/configure --target=$TARGET --prefix=${PREFIX} --enable-shared
        --enable-languages=c,c++ --with-threads=posix
        $root@host:/home/arm/build-tools/build-glibc# make all
        $root@host:/home/arm/build-tools/build-glibc# make in install


        關(guān)鍵詞: 3c2410linux2.6.22移

        評論


        技術(shù)專區(qū)

        關(guān)閉
        主站蜘蛛池模板: 承德县| 页游| 文安县| 龙江县| 科技| 原平市| 三江| 安吉县| 桂阳县| 石景山区| 依安县| 陇南市| 通海县| 湘西| 商河县| 资阳市| 瓮安县| 军事| 鄂伦春自治旗| 潮安县| 安岳县| 三原县| 德昌县| 南部县| 舞钢市| 磴口县| 嘉义市| 马关县| 滨海县| 屯留县| 新龙县| 汝州市| 黔西| 中江县| 闸北区| 平果县| 阳高县| 泸溪县| 峨边| 中牟县| 马尔康县|