kernel panic - not syncing:Attempt to kill init!

文章爲作者原創,轉載請附明原地址:https://mp.csdn.net/postedit/79773173

這是接着上一篇文章後遇到的問題,我把新的內核燒錄進去後,一執行bootm 30008000。結果這樣了:


令人驚奇,系統又死掉了。錯誤信息 kernel panic - not syncing:Attempt to kill init!

這是交叉編譯器太新,其支持的版本與我們玩的Linux3.0內核不匹配,這又是新的問題。
那我們給怎麼解決呢。那就得回去重新配置crosstool-ng了。
C-library  --->
[ ] Build and install locales                                                                
                          Minimum supported kernel version (Specific kernel version)  --->
                                               ( ) Let ./configure decide                       
                                               ( ) Same as kernel headers (default)             
                                               (X) Specific kernel version     --->選擇這個選項後會跳出下面的選項
Specific kernel version                                                               
                        (2.6.9) Minimum kernel version to support   --->這裏選擇默認,我的開發板用的是3.0內核,這裏2.6.9版本以上都支持


[shun@localhost crosstool-ng-1.16.0]$ sudo ./ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20180330.205735
............
[INFO ]  Finishing installation (may take a few seconds)...    //這裏看到編譯安裝成功的信息,如果編譯安裝過程中出錯,則查看build.log的日誌查找出錯原因並處理。

[shun@localhost crosstool-ng-1.16.0]$ /opt/x-tools/arm920t/bin/arm-arm920t-linux-gnueabi-gcc -v   //查看交叉編譯器版本信息
Using built-in specs.
Target: arm-arm920t-linux-gnueabi
Configured with: /opt/crosstool-ng-1.16.0/.build/src/gcc-4.4.6/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=arm-arm920t-linux-gnueabi --prefix=/opt/x-tools/arm920t --with-sysroot=/opt/x-tools/arm920t/arm-arm920t-linux-gnueabi/sysroot --enable-languages=c,c++ --with-arch=armv4t --with-cpu=arm9tdmi --with-tune=arm920t --with-float=soft --with-pkgversion='crosstool-NG 1.16.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/opt/crosstool-ng-1.16.0/.build/arm-arm920t-linux-gnueabi/buildtools --with-mpfr=/opt/crosstool-ng-1.16.0/.build/arm-arm920t-linux-gnueabi/buildtools --with-ppl=/opt/crosstool-ng-1.16.0/.build/arm-arm920t-linux-gnueabi/buildtools --with-cloog=/opt/crosstool-ng-1.16.0/.build/arm-arm920t-linux-gnueabi/buildtools --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --disable-nls --disable-multilib --with-local-prefix=/opt/x-tools/arm920t/arm-arm920t-linux-gnueabi/sysroot --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.4.6 (crosstool-NG 1.16.0)

交叉編譯器做好了,現在可以重新做內核了(make menuconfig)。已下省略。

現在把內核文件再燒錄到開發板



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章