2012-03-28 11 views
9

Sto usando crosstool-ng per creare un tolchain per beagleboard-xm. Il ricavato di generazione in maniera illustrati di seguito:È possibile velocizzare i build crosstool-ng una volta che si sono verificati errori?

[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 . .

`

Ora, dopo 50 minuti di compilazione, si rompe con un errore:

[ERROR] configure: error: expat is missing or unusable"

Ho installato il pacchetto richiesto (in Ubuntu 10.04) ma l'errore è un non-problema. Prima ero in grado di arrivare ai passaggi in cui aveva installato correttamente il compilatore e non c'erano errori fino ad allora. Mi stavo chiedendo se c'è un modo per fare in modo che lo strumento salti passi precedenti, risparmiando tempo? È possibile anche con il modo in cui funziona crosstool-ng?

+0

* Scusate formattazione. Grazie. – user461150

+0

Trovato. "ct-ng --help" non fornisce le informazioni corrette. Usa "aiuto ct-ng". Cerca l'opzione per RESTART build. – user461150

+4

Per i googler futuri, correggere questo errore con 'sudo apt-get install libexpat1-dev'. (Semplicemente installando expat non lo aggiusta.) – markgz

risposta

14

Sì, è possibile. Run ct-ng come questo

CT_DEBUG_CT_SAVE_STEPS=1 ct-ng build

Dopo l'incidente, a un certo punto, basta trovare il passo nella lista prodotta da

ct-ng list-steps

A tal punto si può riprendere la generazione eseguendo

RESTART=libc_start_files ct-ng build

8

sì, il crosstool corrente ha supportato questa funzione.

  1. attivare questa funzione in menuconfig

per ct-ng menuconfig, config Paths and misc options come questo

───────────────────── Paths and misc options ───────────────────── 
[*] Debug crosstool-NG 
[ ] Pause between every steps 
[*] Save intermediate steps 
[*]  gzip saved states 
[*] Interactive shell on failed commands 

2.when non costruire, per ogni passo fatto con successo, si vedrà qualcosa di simile a questo:

Saving state to restart at step 'xxx'...

3.when fail, dopo risolvere il problema, quindi utilizzare ct-ng LAST_SUCCESSFUL_STETP_NAME+ continuare costruire

il mio esempio:

[email protected] ~/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. 

[email protected] ~/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]/

per più spiegazione, vedere il mio post: crosstool-ng build for xscale

Problemi correlati