文章为作者原创,转载请附明原地址: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版本以上都支持
[[email protected] 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的日志查找出错原因并处理。
[[email protected] 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)。已下省略。
现在把内核文件再烧录到开发板