启动报错:Kernel panic - not syncing: No working init found. Try passing init= option to kernel.
前言环境介绍:1.编译环境Ubuntu 18.04.5 LTS2.busyboxbusybox-1.29.03.gccgcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabih一、现象根据正点原子的教程制作根文件系统,单板通过nfs挂载系统启动报错打印如下:[5.247191] IP-Config: Got DHCP answer from 192.168
·
前言
环境介绍:
1.编译环境
Ubuntu 18.04.5 LTS
2.busybox
busybox-1.29.0
3.gcc
gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabih
一、现象
根据正点原子的教程制作根文件系统,单板通过nfs挂载系统启动报错打印如下:
[ 5.247191] IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.8
[ 5.254767] IP-Config: Complete:
[ 5.257995] device=eth0, hwaddr=02:81:e5:3c:8e:ef, ipaddr=192.168.1.8, mask=255.255.255.0, gw=192.168.1.1
[ 5.267988] host=192.168.1.8, domain=, nis-domain=(none)
[ 5.273733] bootserver=0.0.0.0, rootserver=192.168.1.15, rootpath=
[ 5.273737] nameserver0=192.168.1.1
[ 5.284518] ALSA device list:
[ 5.287485] No soundcards found.
[ 5.390334] VFS: Mounted root (nfs filesystem) on device 0:15.
[ 5.397796] devtmpfs: mounted
[ 5.401825] Freeing unused kernel memory: 1024K
[ 5.443456] Run /sbin/init as init process
[ 5.447657] random: fast init done
[ 5.465569] Run /etc/init as init process
[ 5.472176] Run /bin/init as init process
[ 5.477364] Run /bin/sh as init process
[ 5.484286] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
二、解决
问题出在库文件拷贝上,我使用的gcc版本与教程不一致,在处理ld-linux-armhf.so.3这个文件时不能像教程一样删掉而是保留,再将ld-linux-armhf.so.3所对应的文件ld-2.25.so拷贝过来即可。
zhoufeng@ubuntu:/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/lib$ ls ld-linux-armhf.so.3 -l
lrwxrwxrwx 1 11827 9000 10 12月 4 2019 ld-linux-armhf.so.3 -> ld-2.25.so
zhoufeng@ubuntu:/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/lib$ cp ld-2.25.so ~/linux/nfs/rootfs/lib/
更多推荐
已为社区贡献2条内容
所有评论(0)