I am using crosstool-ng to build a tolchain for beagleboard-xm. The build proceeds in a manner depicted below:
[INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [INFO ] Retrieving needed toolchain components' tarballs: done in 0.51s (at 00:08) [INFO ] ================================================================= [INFO ] Extracting and patching toolchain components [INFO ] Extracting and patching toolchain components: done in 7.91s (at 00:16) [INFO ] ================================================================= [INFO ] Installing GMP [INFO ] Installing GMP: done in 140.48s (at 02:36) [INFO ] ================================================================= [INFO ] Installing MPFR [INFO ] Installing MPFR: done in 36.01s (at 03:13) [INFO ] ================================================================= [INFO ] Installing PPL . .
`
Now, after 50 mins of compiling, it breaks with an error:
[ERROR] configure: error: expat is missing or unusable"
I installed the required package (in Ubuntu 10.04) but the error is a non-issue. Earlier I was able to get to steps where it had successfully installed the compiler and there were no errors till then. I was wondering if there is a way to have the tool skip over previously successfull steps, saving time? Is it even possible with the way crosstool-ng works?
Yes, it's possible. Run ct-ng like this
CT_DEBUG_CT_SAVE_STEPS=1 ct-ng build
After crashing at a certain step, just find the step in the list produced by
ct-ng list-steps
At which point you can resume the build by running
RESTART=libc_start_files ct-ng build
yes, current crosstool-ng has support this feature.
for ct-ng menuconfig
, config Paths and misc options
like this
───────────────────── Paths and misc options ─────────────────────
[*] Debug crosstool-NG
[ ] Pause between every steps
[*] Save intermediate steps
[*] gzip saved states
[*] Interactive shell on failed commands
2.when do build, for each step done successfully, you will see something like this:
Saving state to restart at step 'xxx'...
3.when fail, after fix it, then use ct-ng LAST_SUCCESSFUL_STETP_NAME+
to continue build
my example:
CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng list-steps
Available build steps, in order:
- libc_check_config
- companion_libs_for_build
- binutils_for_build
- companion_libs_for_host
- binutils_for_host
- cc_core_pass_1
- kernel_headers
- libc_start_files
- cc_core_pass_2
- libc
- cc_for_build
- cc_for_host
- libelf_for_target
- binutils_for_target
- debug
- test_suite
- finish
Use "<step>"p>" as action to execute only that step"+<step>"lt;step>" as action to execute up to tha"<step>+"se "<step>+" as action to execute from that step onward.
CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng libc+
[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20130801.120248
[INFO ] Building environ'libc'ariables
[EXTRA] Preparing working directories
[EXTRA] Restoring state at step 'libc', as requested.
[INFO ] =================================================================
[INFO ] Installing C library
[EXTRA] Configuring C library
[EXTRA] Building C library
[01:55] /
for more explaination, refer my post:crosstool-ng build for xscale
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With