用crosstool-NG-1.9.3构建ARM工具链

 

    在成功重装了两次系统之后之前的移植工作终于还是被我弄丢了,无奈只好一切重头再来了。
    首先下载u-boot源码,下载地址为ftp://ftp.denx.de/pub/u-boot/,这次将要移植的版本为2010-12。
    制作交叉工具链(Cross-Tool),还是使用crosstool-NG来制作编译工具,下载地址:http://ymorin.is-a-geek.org/download/crosstool-ng 。版本为1.9.3,这个工具的使用方法可以在文档或是http://ymorin.is-a-geek.org/projects/crosstool中找到,由于之前在弄crosstool的时候遇到一些问题,所以这次也把它的安装过程和使用方法记录下来。
    Features of This Tool

  • kernel-like menuconfig configuration interface
    • widespread, well-known interface
    • easy, yet powerful configuration
  • growing number of supported architectures
  • support for alternative components in the toolchain
    • uClibc-, glibc- or eglibc-based toolchain supported right now!
    • others easy to implement
  • different target OS supported
    • Linux
    • bare metal
  • patch repository for those versions needing patching
    • patches for many versions of the toolchain components
    • support for custom (understand local) patch repository
  • different threading models
    • NPTL
    • linuxthreads
  • support for both soft- and hard-float toolchains
  • debug facilities
    • native and cross gdb, gdbserver
    • debugging libraries: dmalloc, duma
    • restart a build at any step
  • sample configurations repository usable as starting point for your own toolchain

    安装crosstool-NG
    配置安装路径./configure --prefix=/opt/programs/crosstool-ng-1.9.3,会提示缺少必要的工具,安装就行了。
    sudo yum install lzma,接下来make, make install,可以检查以下是否安装成功
        PREFIX='/opt/programs/crosstool-ng-1.9.3'
        BINDIR='/opt/programs/crosstool-ng-1.9.3/bin'
        LIBDIR='/opt/programs/crosstool-ng-1.9.3/lib/ct-ng-1.9.3'
        DOCDIR='/opt/programs/crosstool-ng-1.9.3/share/doc/ct-ng-1.9.3'
        MANDIR='/opt/programs/crosstool-ng-1.9.3/share/man'
    然后测试,将其添加到PATH环境变量中,运行ct-ng help, ct-ng menuconfig, ct-ng build。
    使用ct-ng制作工具链
    ct-ng list-samples,列出已经通过实践检验的示例配置脚本。
    这里使用arm-unknown-linux-uclibcgnueabi的配置方案预先配置一下,然后再调整。
    Options:


  • OS:linux-2.6.33.7
  • uClibc-0.9.30.2
  • linuxthread

    调整完成之后可以在工作目录下查看配置结果.config文件,然后确认无误就可以build了,哦,对了,如果不能正常下载需要的tar文件时最好自己手动下载,然后再build,build时会出现错误提示'Don't set LD_LIBRARY_PATH. It screws up the build.',按照提示unset LD_LIBRARY_PATH,这时程序自动创建了目录结构,接下来先停下来,手动下载所需要的安装文件,需要在配置时选择forbid download:

    当所有的安装文件都下载、解压、patch之后,还差一个uClibc的配置文件'[ERROR]    You did not provide a uClibc config file!',我们默认的配置文件在.config中的定义是"CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config",但是经过修改之后的CT_TARGET已经不存在了,所以直接把‘uClibc-0.9.30.2.config‘文件复制出来,放到刚才的工作目录的target下,然后再修改.config中的CT_LIBC_UCLIBC_CONFIG_FILE内容。

    虽然一切都准备好了,但是在编译器生成的最后阶段(Installing final compiler)还是出问题了,所以只好把gcc的版本换成4.3.2再试一次,不过这次没有手动下载所需的安装文件,直接通过为wget设置代理来自动通过ct-ng下载。为wget设置代理也很简单,直接编辑/etc/wgetrc文件,加上这两行:

http_proxy = http://58.248.245.225:80/

use_proxy = on

就行了,build的时候还是死掉了,原因是.../scripts/functions文件中的代码

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# OK, just look if we have them...
_aria2c=$(CT_Which aria2c)
_wget=$(CT_Which wget)
#_curl=$(CT_Which curl)
  
  
# Wrapper function to call one of, in order of preference:
#   aria2
#   curl
#   wget
# Usage: CT_DoGetFile <URL>
CT_DoGetFile() {
#CT_DoLog EXTRA "1 ${_aria2c}"
#CT_DoLog EXTRA "2 ${_curl}"
#CT_DoLog EXTRA "3 ${_wget}"
     if   [ -n "${_aria2c}" -a ${CT_DOWNLOAD_MAX_CHUNKS} -gt 1 ]; then
         CT_DoGetFileAria2 "$1"
     elif [ -n "${_curl}" ]; then
         CT_DoGetFileCurl "$1"
     elif [ -n "${_wget}" ]; then
         CT_DoGetFileWget "$1"
     else
         CT_Abort "Could find neither wget nor curl"
     fi
}

 

实际上CT_DoGetFile函数调用的是CT_DoGetFileCurl而非刚才设置的wget,把上面的那个_curl=$(CT_Which curl)注释掉就行了。

程序脚本中安装文件的下载地址有时不可用,需要修改以下。

下载完成之后重新开始安装,最后成功!

.config的文件内容如下:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
#
# Automatically generated make config: don't edit
# crosstool-NG version: 1.9.3
# Fri Feb 18 19:16:42 2011
#
# CT_BACKEND is not set
CT_MODULES=y
  
#
# Paths and misc options
#
  
#
# crosstool-NG behavior
#
# CT_OBSOLETE is not set
CT_EXPERIMENTAL=y
# CT_DEBUG_CT is not set
  
#
# Paths
#
CT_LOCAL_TARBALLS_DIR= "${HOME}/src"
CT_SAVE_TARBALLS=y
CT_WORK_DIR= "${CT_TOP_DIR}/targets"
CT_PREFIX_DIR= "${HOME}/x-tool-2/${CT_TARGET}"
CT_INSTALL_DIR= "${CT_PREFIX_DIR}"
CT_REMOVE_DOCS=y
CT_INSTALL_DIR_RO=y
CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES=y
  
#
# Downloading
#
# CT_FORBID_DOWNLOAD is not set
# CT_FORCE_DOWNLOAD is not set
CT_USE_MIRROR=y
# CT_PREFER_MIRROR is not set
CT_MIRROR_BASE_URL= "http://ymorin.is-a-geek.org/mirrors/"
CT_CONNECT_TIMEOUT=10
CT_DOWNLOAD_MAX_CHUNKS=1
# CT_ONLY_DOWNLOAD is not set
  
#
# Extracting
#
# CT_FORCE_EXTRACT is not set
CT_OVERIDE_CONFIG_GUESS_SUB=y
# CT_ONLY_EXTRACT is not set
CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL is not set
# CT_PATCH_BUNDLED_LOCAL is not set
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
# CT_PATCH_NONE is not set
CT_PATCH_ORDER= "bundled"
# CT_PATCH_SINGLE is not set
# CT_PATCH_USE_LOCAL is not set
  
#
# Build behavior
#
CT_PARALLEL_JOBS=1
CT_LOAD=0
CT_USE_PIPES=y
# CT_CONFIG_SHELL_SH is not set
# CT_CONFIG_SHELL_ASH is not set
CT_CONFIG_SHELL_BASH=y
# CT_CONFIG_SHELL_CUSTOM is not set
CT_CONFIG_SHELL= "bash"
  
#
# Logging
#
# CT_LOG_ERROR is not set
# CT_LOG_WARN is not set
# CT_LOG_INFO is not set
CT_LOG_EXTRA=y
# CT_LOG_ALL is not set
# CT_LOG_DEBUG is not set
CT_LOG_LEVEL_MAX= "EXTRA"
# CT_LOG_SEE_TOOLS_WARN is not set
CT_LOG_PROGRESS_BAR=y
CT_LOG_TO_FILE=y
CT_LOG_FILE_COMPRESS=y
  
#
# Target options
#
CT_ARCH= "arm"
CT_ARCH_SUPPORTS_BOTH_MMU=y
CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
CT_ARCH_SUPPORTS_32=y
# CT_ARCH_SUPPORTS_64 is not set
CT_ARCH_SUPPORT_ARCH=y
# CT_ARCH_SUPPORT_ABI is not set
CT_ARCH_SUPPORT_CPU=y
CT_ARCH_SUPPORT_TUNE=y
CT_ARCH_SUPPORT_FPU=y
CT_ARCH_DEFAULT_HAS_MMU=y
# CT_ARCH_DEFAULT_BE is not set
CT_ARCH_DEFAULT_LE=y
CT_ARCH_DEFAULT_32=y
# CT_ARCH_DEFAULT_64 is not set
CT_ARCH_ARCH= "armv4t"
CT_ARCH_CPU= ""
CT_ARCH_TUNE= ""
CT_ARCH_FPU= ""
# CT_ARCH_BE is not set
CT_ARCH_LE=y
CT_ARCH_32=y
# CT_ARCH_64 is not set
CT_ARCH_BITNESS=32
# CT_ARCH_FLOAT_HW is not set
CT_ARCH_FLOAT_SW=y
CT_TARGET_CFLAGS= ""
CT_TARGET_LDFLAGS= ""
  
#
# General target options
#
CT_ARCH_arm=y
# CT_ARCH_x86 is not set
# CT_ARCH_sh is not set
# CT_ARCH_avr32 is not set
# CT_ARCH_ia64 is not set
# CT_ARCH_mips is not set
# CT_ARCH_powerpc is not set
# CT_ARCH_s390 is not set
# CT_ARCH_m68k is not set
# CT_ARCH_alpha is not set
# CT_ARCH_blackfin is not set
CT_ARCH_arm_AVAILABLE=y
CT_ARCH_x86_AVAILABLE=y
CT_ARCH_sh_AVAILABLE=y
CT_ARCH_avr32_AVAILABLE=y
CT_ARCH_ia64_AVAILABLE=y
CT_ARCH_mips_AVAILABLE=y
CT_ARCH_powerpc_AVAILABLE=y
CT_ARCH_s390_AVAILABLE=y
CT_ARCH_m68k_AVAILABLE=y
CT_ARCH_alpha_AVAILABLE=y
CT_ARCH_blackfin_AVAILABLE=y
CT_ARCH_USE_MMU=y
  
#
# arm other options
#
CT_ARCH_ARM_MODE= "arm"
CT_ARCH_ARM_MODE_ARM=y
# CT_ARCH_ARM_MODE_THUMB is not set
# CT_ARCH_ARM_INTERWORKING is not set
CT_ARCH_ARM_EABI=y
  
#
# Target optimisations
#
  
#
# Toolchain options
#
  
#
# General toolchain options
#
CT_USE_SYSROOT=y
CT_SYSROOT_DIR_PREFIX= ""
  
#
# Tuple completion and aliasing
#
CT_TARGET_VENDOR= "cool"
CT_TARGET_ALIAS_SED_EXPR= ""
CT_TARGET_ALIAS= "arm-cool-uClibc"
  
#
# Toolchain type
#
# CT_NATIVE is not set
CT_CROSS=y
# CT_CROSS_NATIVE is not set
# CT_CANADIAN is not set
CT_TOOLCHAIN_TYPE= "cross"
  
#
# Build system
#
CT_BUILD= ""
CT_BUILD_PREFIX= ""
CT_BUILD_SUFFIX= ""
  
#
# Operating System
#
# CT_BARE_METAL is not set
# CT_MINGW32 is not set
CT_KERNEL_SUPPORTS_SHARED_LIBS=y
CT_KERNEL= "linux"
CT_KERNEL_VERSION= "2.6.33.7"
# CT_KERNEL_mingw32 is not set
# CT_KERNEL_bare_metal is not set
CT_KERNEL_linux=y
CT_KERNEL_mingw32_AVAILABLE=y
CT_KERNEL_bare_metal_AVAILABLE=y
CT_KERNEL_linux_AVAILABLE=y
CT_KERNEL_LINUX_INSTALL=y
# CT_KERNEL_V_2_6_36 is not set
# CT_KERNEL_V_2_6_35_8 is not set
# CT_KERNEL_V_2_6_34_7 is not set
CT_KERNEL_V_2_6_33_7=y
# CT_KERNEL_V_2_6_32_25 is not set
# CT_KERNEL_V_2_6_31_14 is not set
# CT_KERNEL_V_2_6_27_55 is not set
# CT_KERNEL_LINUX_CUSTOM is not set
CT_KERNEL_LINUX_VERBOSITY_0=y
# CT_KERNEL_LINUX_VERBOSITY_1 is not set
# CT_KERNEL_LINUX_VERBOSITY_2 is not set
CT_KERNEL_LINUX_VERBOSE_LEVEL=0
CT_KERNEL_LINUX_INSTALL_CHECK=y
# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set
  
#
# Common kernel options
#
CT_SHARED_LIBS=y
  
#
# Binary utilities
#
CT_ARCH_BINFMT_ELF=y
# CT_ARCH_BINFMT_FLAT is not set
# CT_ARCH_BINFMT_FDPIC is not set
  
#
# GNU binutils
#
# CT_BINUTILS_V_2_20_1 is not set
# CT_BINUTILS_V_2_20 is not set
CT_BINUTILS_V_2_19_1=y
# CT_BINUTILS_V_2_19 is not set
# CT_BINUTILS_V_2_18 is not set
# CT_BINUTILS_V_2_17 is not set
# CT_BINUTILS_V_2_16_1 is not set
CT_BINUTILS_VERSION= "2.19.1"
CT_BINUTILS_EXTRA_CONFIG= ""
CT_BINUTILS_FOR_TARGET=y
CT_BINUTILS_FOR_TARGET_IBERTY=y
CT_BINUTILS_FOR_TARGET_BFD=y
  
#
# C compiler
#
CT_CC= "gcc"
CT_CC_VERSION= "4.3.2"
CT_CC_gcc=y
# CT_CC_V_4_5_1 is not set
# CT_CC_V_4_5_0 is not set
# CT_CC_V_4_4_5 is not set
# CT_CC_V_4_4_4 is not set
# CT_CC_V_4_4_3 is not set
# CT_CC_V_4_4_2 is not set
# CT_CC_V_4_4_1 is not set
# CT_CC_V_4_4_0 is not set
# CT_CC_V_4_3_5 is not set
# CT_CC_V_4_3_4 is not set
# CT_CC_V_4_3_3 is not set
CT_CC_V_4_3_2=y
# CT_CC_V_4_3_1 is not set
# CT_CC_V_4_2_4 is not set
# CT_CC_V_4_2_3 is not set
# CT_CC_V_4_2_2 is not set
# CT_CC_V_4_2_1 is not set
# CT_CC_V_4_2_0 is not set
# CT_CC_V_4_1_2 is not set
# CT_CC_V_4_0_4 is not set
# CT_CC_V_3_4_6 is not set
CT_CC_GCC_4_2_or_later=y
CT_CC_GCC_4_3_or_later=y
# CT_CC_GCC_4_4_or_later is not set
# CT_CC_GCC_4_5_or_later is not set
# CT_CC_GCC_HAS_GRAPHITE is not set
# CT_CC_GCC_HAS_LTO is not set
CT_CC_GCC_USE_GMP_MPFR=y
# CT_CC_GCC_USE_PPL_CLOOG is not set
# CT_CC_GCC_USE_MPC is not set
# CT_CC_GCC_USE_LIBELF is not set
CT_CC_PKGVERSION= "crosstool-NG-${CT_VERSION}"
CT_CC_BUGURL= ""
CT_CC_ENABLE_CXX_FLAGS= ""
CT_CC_CORE_EXTRA_CONFIG= ""
CT_CC_EXTRA_CONFIG= ""
CT_CC_SUPPORT_CXX=y
CT_CC_SUPPORT_FORTRAN=y
CT_CC_SUPPORT_JAVA=y
CT_CC_SUPPORT_ADA=y
CT_CC_SUPPORT_OBJC=y
CT_CC_SUPPORT_OBJCXX=y
  
#
# Additional supported languages:
#
CT_CC_LANG_CXX=y
# CT_CC_LANG_FORTRAN is not set
# CT_CC_LANG_JAVA is not set
# CT_CC_LANG_ADA is not set
# CT_CC_LANG_OBJC is not set
# CT_CC_LANG_OBJCXX is not set
CT_CC_LANG_OTHERS= ""
  
#
# gcc other options
#
CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y
# CT_CC_GCC_LIBMUDFLAP is not set
# CT_CC_GCC_LIBGOMP is not set
# CT_CC_GCC_LIBSSP is not set
  
#
# Misc. obscure options.
#
CT_CC_CXA_ATEXIT=y
# CT_CC_GCC_DISABLE_PCH is not set
CT_CC_GCC_SJLJ_EXCEPTIONS=m
CT_CC_GCC_LDBL_128=m
  
#
# C-library
#
CT_LIBC= "uClibc"
CT_LIBC_VERSION= "0.9.30.2"
# CT_LIBC_mingw is not set
# CT_LIBC_glibc is not set
# CT_LIBC_newlib is not set
CT_LIBC_uClibc=y
# CT_LIBC_none is not set
# CT_LIBC_eglibc is not set
CT_LIBC_mingw_AVAILABLE=y
CT_LIBC_glibc_AVAILABLE=y
CT_LIBC_newlib_AVAILABLE=y
CT_LIBC_uClibc_AVAILABLE=y
# CT_LIBC_UCLIBC_V_0_9_31 is not set
# CT_LIBC_UCLIBC_V_0_9_30_3 is not set
CT_LIBC_UCLIBC_V_0_9_30_2=y
# CT_LIBC_V_0_9_30_1 is not set
# CT_LIBC_V_0_9_30 is not set
# CT_LIBC_V_0_9_29 is not set
# CT_LIBC_V_0_9_28_3 is not set
# CT_LIBC_V_snapshot is not set
# CT_LIBC_V_specific_date is not set
CT_LIBC_UCLIBC_0_9_30_or_later=y
CT_LIBC_UCLIBC_PARALLEL=y
CT_LIBC_UCLIBC_VERBOSITY_0=y
# CT_LIBC_UCLIBC_VERBOSITY_1 is not set
# CT_LIBC_UCLIBC_VERBOSITY_2 is not set
CT_LIBC_UCLIBC_VERBOSITY= ""
CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y
# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set
# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set
CT_LIBC_UCLIBC_DEBUG_LEVEL=0
CT_LIBC_UCLIBC_CONFIG_FILE= "${HOME}/scratch/toolchain-build/${CT_LIBC}-${CT_LIBC_VERSION}.config"
CT_LIBC_none_AVAILABLE=y
CT_LIBC_eglibc_AVAILABLE=y
CT_LIBC_SUPPORT_THREADS_ANY=y
# CT_LIBC_SUPPORT_NPTL is not set
CT_LIBC_SUPPORT_LINUXTHREADS=y
# CT_LIBC_SUPPORT_WIN32THREADS is not set
CT_THREADS= "linuxthreads"
  
#
# Common C library options
#
# CT_THREADS_NPTL is not set
CT_THREADS_LINUXTHREADS=y
# CT_THREADS_WIN32THREADS is not set
# CT_THREADS_NONE is not set
CT_LIBC_XLDD=y
  
#
# uClibc other options
#
CT_LIBC_UCLIBC_LNXTHRD_OLD=y
# CT_LIBC_UCLIBC_LNXTHRD_NEW is not set
CT_LIBC_UCLIBC_LNXTHRD= "old"
# CT_LIBC_UCLIBC_LOCALES is not set
# CT_LIBC_UCLIBC_WCHAR is not set
  
#
# Debug facilities
#
CT_DEBUG_ltrace=y
CT_LTRACE_V_0_5_3=y
# CT_LTRACE_V_0_5_2 is not set
# CT_LTRACE_V_0_5 is not set
# CT_LTRACE_V_0_4 is not set
CT_LTRACE_VERSION= "0.5.3"
CT_LTRACE_0_5_3_or_later=y
CT_DEBUG_gdb=y
CT_GDB_CROSS=y
# CT_GDB_CROSS_STATIC is not set
# CT_GDB_NATIVE is not set
CT_GDB_GDBSERVER=y
CT_GDB_GDBSERVER_STATIC=y
# CT_GDB_V_7_2 is not set
# CT_GDB_V_7_1 is not set
# CT_GDB_V_7_0_1 is not set
# CT_GDB_V_7_0 is not set
CT_GDB_V_6_8=y
CT_GDB_VERSION= "6.8"
CT_DEBUG_duma=y
CT_DUMA_A=y
CT_DUMA_SO=y
CT_DUMA_V_2_5_15=y
# CT_DUMA_V_2_5_14 is not set
# CT_DUMA_V_2_5_12 is not set
# CT_DUMA_V_2_5_8 is not set
# CT_DUMA_V_2_5_1 is not set
CT_DUMA_VERSION= "2_5_15"
CT_DEBUG_dmalloc=y
CT_DMALLOC_V_5_5_2=y
CT_DMALLOC_VERSION= "5.5.2"
CT_DEBUG_strace=y
# CT_STRACE_V_4_5_20 is not set
CT_STRACE_V_4_5_19=y
# CT_STRACE_V_4_5_18 is not set
# CT_STRACE_V_4_5_17 is not set
# CT_STRACE_V_4_5_16 is not set
# CT_STRACE_V_4_5_15 is not set
CT_STRACE_VERSION= "4.5.19"
  
#
# Companion libraries
#
CT_COMPLIBS_NEEDED=y
CT_GMP_NEEDED=y
CT_MPFR_NEEDED=y
# CT_PPL_NEEDED is not set
# CT_CLOOG_NEEDED is not set
# CT_MPC_NEEDED is not set
# CT_LIBELF_NEEDED is not set
CT_COMPLIBS=y
# CT_WRAPPER_NEEDED is not set
CT_GMP=y
CT_MPFR=y
CT_LIBELF_TARGET=y
# CT_GMP_V_5_0_1 is not set
CT_GMP_V_4_3_2=y
# CT_GMP_V_4_3_1 is not set
# CT_GMP_V_4_3_0 is not set
# CT_GMP_V_4_2_4 is not set
# CT_GMP_V_4_2_2 is not set
CT_GMP_VERSION= "4.3.2"
# CT_MPFR_V_3_0_0 is not set
CT_MPFR_V_2_4_2=y
# CT_MPFR_V_2_4_1 is not set
# CT_MPFR_V_2_4_0 is not set
# CT_MPFR_V_2_3_2 is not set
# CT_MPFR_V_2_3_1 is not set
CT_MPFR_VERSION= "2.4.2"
  
#
# libelf version needed to build for target
#
CT_LIBELF_V_0_8_13=y
# CT_LIBELF_V_0_8_12 is not set
CT_LIBELF_VERSION= "0.8.13"
  
#
# Companion libraries common options
#
CT_COMPLIBS_BACKUP=y
# CT_COMPLIBS_CHECK is not set
# CT_COMPLIBS_SHARED is not set
  
#
# Companion tools
#
  
#
# READ HELP before you say 'Y' below !!!
#
# CT_COMP_TOOLS is not set
  
#
# Test suite
#
# CT_TEST_SUITE is not set
# CT_TEST_SUITE_GCC is not set

   

参考链接:

http://forum.samdroid.net/wiki/showwiki/How+to+build+cross+toolchains+for+ARM+crosstool-NG?s=3be360ee3bb8458456aadf55f3229e12&do=comments

http://ymorin.is-a-geek.org/projects/crosstool

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Ubuntu是一种基于Linux的操作系统,而crosstool-ng是一个工具生成工具。这个工具允许用户在Ubuntu操作系统上生成交叉编译工具,从而能够在一个平台上为不同的目标体系结构编译和构建软件。 使用crosstool-ng可以为各种不同的目标体系结构生成交叉编译工具,包括ARM、MIPS、PowerPC等。生成的工具包含了一个交叉编译器、库和头文件,可以用来编译和构建适用于特定目标体系结构的应用程序。 Ubuntu的用户可以通过安装crosstool-ng并按照相应的文档和指南进行设置和配置。首先,用户需要在Ubuntu上安装和配置必要的开发工具和依赖项,然后从crosstool-ng的官方网站下载最新的源代码并进行编译和安装。 安装完成后,用户需要使用crosstool-ng提供的配置文件进行配置和设置。用户可以选择合适的目标体系结构,并选择所需的版本和选项。之后,用户可以运行crosstool-ng来生成交叉编译工具。 一旦工具生成完成,用户就可以使用它来编译和构建适用于特定目标体系结构的应用程序。用户可以在Ubuntu上开发应用程序,并将其交叉编译为可在其他平台上运行的可执行文件。 总之,Ubuntu和crosstool-ng的结合为用户提供了一个方便而强大的工具,使他们能够在Ubuntu上生成适用于不同目标体系结构的交叉编译工具,并开发多平台的应用程序。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值