u-boot环境变量错误导致:Kernel panic: No init found. Try passing init=option to kernel
由于之前需要增大内核分区而修改环境变量,但是修改后的环境变量适应于大于2M的内核运行,当运行小于2M的内核时,环境变量指定的地址和内核相对应的地址内容不匹配导致根文件系统挂载失败,最终使用nor flash中的u-boot启动,用nand erase params指令擦除nand flash中保存环境变量的区域,迫使系统应用新烧写u-boot的默认环境变量之后问题解决,从新烧写u-boot、uImage、rootfs后系统挂载成功。
默认环境变量如下:
OpenJTAG> print
bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
bootcmd=nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0
bootdelay=2
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
ipaddr=192.168.7.17
serverip=192.168.7.11
netmask=255.255.255.0
stdin=serial
stdout=serial
stderr=serial
mtdids=nand0=nandflash0
mtdparts=mtdparts=nandflash0:256k@0(bootloader),128k(params),2m(kernel),-(root)
partition=nand0,0
mtddevnum=0
mtddevname=bootloader
Environment size: 443/131068 bytes
OpenJTAG> mtd
device nand0 , # parts = 4
#: name size offset mask_flags
0: bootloader 0x00040000 0x00000000 0
1: params 0x00020000 0x00040000 0
2: kernel 0x00200000 0x00060000 0
3: root 0x0fda0000 0x00260000 0
active partition: nand0,0 - (bootloader) 0x00040000 @ 0x00000000
defaults:
mtdids : nand0=nandflash0
mtdparts: mtdparts=nandflash0:256k@0(bootloader),128k(params),2m(kernel),-(root)