您尚未登录。

楼主 #1 2018-07-24 19:39:38

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

licheeZero bsp内核启动失败:Kernel panic: No init found.

通过zero_imager对uboot、内核、以及文件系统相关文件进行打包,下载到tf卡中,在启动时出现
Kernel panic: No init found. Try passing init= option to kernel.问题,一直重启

串口打印信息如下:

U-Boot 2017.01-rc2-00057-g32ab180-dirty (Apr 11 2018 - 09:34:22 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
reading uImage
2673424 bytes read in 143 ms (17.8 MiB/s)
reading script.bin
32536 bytes read in 25 ms (1.2 MiB/s)
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2673360 Bytes = 2.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (zhangqi@zhangqi-B85M-D3V) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) ) #43 Thu Jun 28 17:24:51 CST 2018
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 29196k/29196k available, 36340k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0516000   (5176 kB)
[    0.000000]       .init : 0xc0516000 - 0xc0539000   ( 140 kB)
[    0.000000]       .data : 0xc053a000 - 0xc05c8f10   ( 572 kB)
[    0.000000]        .bss : 0xc05c8f34 - 0xc06a9a8d   ( 899 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000157] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000179] pid_max: default: 32768 minimum: 301
[    0.000317] Mount-cache hash table entries: 512
[    0.000856] CPU: Testing write buffer coherency: ok
[    0.001111] Setting up static identity map for 0x4039b410 - 0x4039b468
[    0.001758] devtmpfs: initialized
[    0.003404] pinctrl core: initialized pinctrl subsystem
[    0.003878] NET: Registered protocol family 16
[    0.004185] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004237] script_sysfs_init success
[    0.004980] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.005833] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006201] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007145] persistent_ram: found existing buffer, size 20505, start 20505
[    0.099880] console [ram-1] enabled
[    0.100721] Not Found clk pll_isp in script 
[    0.100865] Not Found clk pll_video in script 
[    0.101110] Not Found clk pll_ve in script 
[    0.101244] Not Found clk pll_periph0 in script 
[    0.101488] Not Found clk pll_de in script 
[    0.105503] bio: create slab <bio-0> at 0
[    0.105903] pwm module init!
[    0.108178] SCSI subsystem initialized
[    0.108543] usbcore: registered new interface driver usbfs
[    0.108740] usbcore: registered new interface driver hub
[    0.109119] usbcore: registered new device driver usb
[    0.109375] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.109629] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.110479] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.110747] axp20_board 0-0034: failed reading at 0x03
[    0.110907] axp20_board: probe of 0-0034 failed with error -70
[    0.111202] Linux media interface: v0.10
[    0.111383] Linux video capture interface: v2.00
[    0.111729] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.112176] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.113063] Switching to clocksource arch_sys_counter
[    0.119976] NET: Registered protocol family 2
[    0.119976] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119976] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.119993] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.120200] TCP: Hash tables configured (established 2048 bind 2048)
[    0.120450] TCP: reno registered
[    0.120593] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.120851] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.121248] NET: Registered protocol family 1
[    0.121821] standby_mode = 1. 
[    0.121955] wakeup src cnt is : 3. 
[    0.122107] pmu1_enable = 0x1. 
[    0.122349] pmux_id = 0x1. 
[    0.122490] config_pmux_para: script_parser_fetch err. 
[    0.122623] pmu2_enable = 0x0. 
[    0.122872] add_sys_pwr_dm: get ldo name failed
[    0.123004] add_sys_pwr_dm: get ldo name failed
[    0.123136] add_sys_pwr_dm: get ldo name failed
[    0.123381] add_sys_pwr_dm: get ldo name failed
[    0.123513] add_sys_pwr_dm: get ldo name failed
[    0.123756] add_sys_pwr_dm: get ldo name failed
[    0.123888] add_sys_pwr_dm: get ldo name failed
[    0.124019] add_sys_pwr_dm: get ldo name failed
[    0.124263] add_sys_pwr_dm: get ldo name failed
[    0.124397] add_sys_pwr_dm: get ldo name failed
[    0.124643] after inited: sys_mask config = 0x0. 
[    0.124777] dynamic_standby enalbe = 0x0. 
[    0.124953] sunxi_reg_init enter
[    0.127072] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.127263] jffs2: version 2.2. (NAND) (SUMMARY)   2001-2006 Red Hat, Inc.
[    0.127694] msgmni has been set to 57
[    0.128724] io scheduler noop registered
[    0.128873] io scheduler deadline registered
[    0.129194] io scheduler cfq registered (default)
[    0.129732] [DISP]disp_module_init
[    0.130433] cmdline,disp=
[    0.131104] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.131373] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.134049] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.136747] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.137776] [DISP]disp_module_init finish
[    0.138294] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.138442] sw_uart_get_devinfo()1503 - uart2 has no uart_regulator.
[    0.139126] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.139270] sw_uart_pm()890 - uart0 clk is already enable
[    0.139528] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.253100] console [ttyS0] enabled
[    0.787971] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI
[    0.796184] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.804149] spi spi0: master is unqueued, this is deprecated
[    0.812108] Failed to alloc md5
[    0.815880] eth0: Use random mac address
[    0.820463] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.848177] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.857245] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.866008] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.890032] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.897542] hub 1-0:1.0: USB hub found
[    0.901896] hub 1-0:1.0: 1 port detected
[    0.906914] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.912591] usb usb1: USB disconnect, device number 1
[    0.919796] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.936256] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.963480] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.972163] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.980863] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    1.044743] hub 1-0:1.0: USB hub found
[    1.049163] hub 1-0:1.0: 1 port detected
[    1.054053] sunxi-ohci sunxi-ohci.1: remove, state 1
[    1.059835] usb usb1: USB disconnect, device number 1
[    1.066129] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.082581] Initializing USB Mass Storage driver...
[    1.088311] usbcore: registered new interface driver usb-storage
[    1.095129] USB Mass Storage support registered.
[    1.100801] file system registered
[    1.106143] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.114093] android_usb gadget: Number of LUNs=1
[    1.119343]  lun0: LUN: removable file: (no medium)
[    1.125474] android_usb gadget: android_usb ready
[    1.130982] sunxikbd_script_init: key para not found, used default para. 
[    1.139691] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.147636] [VFE]cci probe start cci_sel = 0!
[    1.152769] [VFE]cci probe end cci_sel = 0!
[    1.157641] [VFE]cci_init end
[    1.161092] [VFE]Welcome to Video Front End driver
[    1.166924] [VFE]pdev->id = 0
[    1.170368] [VFE]dev->mipi_sel = 0
[    1.174297] [VFE]dev->vip_sel = 0
[    1.178094] [VFE]dev->isp_sel = 0
[    1.188136] [VFE_WARN]vfe vpu clock is null
[    1.199458] [VFE]vfe_init end
[    1.202934] [VFE]probe_work_handle start!
[    1.207657] [VFE]..........................vfe clk open!.......................
[    1.216861] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.225903] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.235064] [VFE]v4l2 subdev register input_num = 0
[    1.240614] [VFE]vfe sensor detect start! input_num = 0
[    1.246662] [VFE]Find sensor name is "ov5648", i2c address is 6c, type is "RAW" !
[    1.255097] [VFE]Sub device register "ov5648" i2c_addr = 0x6c start!
[    1.262396] [VFE]v4l2_device_register_subdev return 0
[    1.268123] [VFE]registered sensor subdev is OK!
[    1.273484] [VFE]Check sensor!
[    1.276997] [VFE]Sub device register "ov5648" is OK!
[    1.282793] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.291619] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.300394] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.309037] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.317806] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.326890] [VFE]Check open /system/etc/hawkview/ov5648/isp_test_param.ini failed!
[    1.326898] Match isp cfg  start!
[    1.339410] [VFE]Match isp cfg ok
[    1.343284] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.350774] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.362302] [VFE]V4L2 device registered as video0
[    1.367996] [VFE]..........................vfe clk close!.......................
[    1.376662] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.384059] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.390491] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.399719] [VFE]probe_work_handle end!
[    1.406810] no led_3, ignore it!
[    1.410603] no led_4, ignore it!
[    1.414308] no led_5, ignore it!
[    1.418121] no led_6, ignore it!
[    1.421831] no led_7, ignore it!
[    1.426961] leds-gpio: probe of leds-gpio failed with error -16
[    1.434024] usbcore: registered new interface driver usbhid
[    1.440361] usbhid: USB HID core driver
[    1.445539] ashmem: initialized
[    1.449376] logger: created 256K log 'log_main'
[    1.454689] logger: created 32K log 'log_events'
[    1.460248] logger: created 32K log 'log_radio'
[    1.465555] logger: created 32K log 'log_system'
[    1.475699] script_get_item return type err, consider it no ldo
[    1.482608] *******************Try sdio*******************
[    1.489830] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.497486] *******************Try sd *******************
[    1.504109] TCP: cubic registered
[    1.508036] NET: Registered protocol family 17
[    1.513292] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.522196] ThumbEE CPU extension supported.
[    1.528373] Registering SWP/SWPB emulation handler
[    1.534778] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.546149] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.554896] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.563502] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.572203] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.580897] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.589758] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.598586] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 01:26:36 UTC (5196)
[    1.609132] ALSA device list:
[    1.612656]   #0: audiocodec
[    1.616348] Waiting for root device /dev/mmcblk0p2...
[    1.629567] mmc0: new high speed SDHC card at address aaaa
[    1.636269] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.645559]  mmcblk0: p1 p2
[    1.649558] mmcblk mmc0:aaaa: Card claimed for testing.
[    1.655549] mmc0:aaaa: SC16G 14.8 GiB 
[    1.660082] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.668883] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.677807] *******************sd init ok*******************
[    1.684404] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.692980] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.701679] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.710361] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.718922] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.732905] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.744739] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.764118] EXT4-fs (mmcblk0p2): recovery complete
[    1.769706] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.779034] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.788391] devtmpfs: error mounting -2
[    1.793097] Freeing init memory: 140K
[    1.797489] Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    1.811592] Backtrace: 
[    1.814594] [<c00131ec>] (dump_backtrace+0x0/0x108) from [<c0393150>] (dump_stack+0x18/0x1c)
[    1.824212]  r7:c05385ec r6:c05c8f40 r5:000000a2 r4:c05ca0f0
[    1.831149] [<c0393138>] (dump_stack+0x0/0x1c) from [<c0393524>] (panic+0x78/0x1c0)
[    1.839888] [<c03934ac>] (panic+0x0/0x1c0) from [<c0393114>] (init_post+0xa4/0xc8)
[    1.848535]  r3:0000000f r2:0000000c r1:c06aa000 r0:c0490387
[    1.855451]  r7:c05385ec
[    1.858521] [<c0393070>] (init_post+0x0/0xc8) from [<c0516984>] (kernel_init+0x168/0x1a4)
[    1.867852] [<c051681c>] (kernel_init+0x0/0x1a4) from [<c0031d80>] (do_exit+0x0/0x65c)
[    1.876891] Rebooting in 5 seconds..
[    6.881292] Restarting Linux version 3.4.39 (zhangqi@zhangqi-B85M-D3V) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) ) #43 Thu Jun 28 17:24:51 CST 2018
[    6.881304] 

请问,这个问题应该如何解决??

离线

楼主 #3 2018-07-24 20:22:29

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

晕哥 说:

你的根文件系统没有挂载上,是tf卡第二分区吗?

是第二分区,rootfs里的内容,我直接挂载拷贝是可以正常启动的,但是打包后用镜像烧录就不行了

离线

楼主 #6 2018-07-25 08:56:05

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

晕哥 说:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631381

console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  rootfstype=ext4 rootdelay=8 vt.global_cursor_default=0

加了这部分还是没有用。
我的文件系统是从已经运行通过的SD卡里拷贝出来的,然后tar成rootfs.tar
会不会和这个有关系??

离线

楼主 #8 2018-07-25 09:47:08

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

晕哥 说:

已经运行通过的SD卡里

这个怎么理解?

就是这个文件系统我已经在一个TF卡里运行过得
不过是在一开始buildroot生成的文件系统上加了一些应用程序(摄像头采集图像等)
然后我把这个修改过的文件系统的内容拷贝处理,重新进行了打包

离线

楼主 #10 2018-07-25 10:14:36

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

晕哥 说:

那你看下 手动指定 init=/linuxrc  或者 init=/init,
看下你的根文件系统是不是存在这个文件?

是在uboot的启动参数加入吗?我试了试,显示

Failed to execute /linuxrc. Attempting defaluts...

离线

楼主 #12 2018-07-25 10:24:48

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

晕哥 说:

根文件系统不存在 /linuxrc ?

我在文件系统目录下面看到linuxrc文件了

离线

楼主 #14 2018-07-31 14:03:30

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

晕哥 说:

这是我编译好的uboot, linux&dtb, rootfs: V3s_TFCard.7z
荔枝派Zero开发板网卡验证通过, 登陆账号root,无密码。

为了排除问题, 你还是先换我上面这个根文件系统.

tar xvf rootfs.tar -C /mnt/你的TF卡/

晕哥,找到问题了,是由于我自己打包的文件系统经过zero_imager打包成镜像之后,
解压时会在第二分区会多一层rootfs的目录,rootfs目录下面才是文件系统里的各个文件,
如果我直接把这些文件从rootfs里面拷贝出来,放到第二分区可以正常启动,应该是解压指令部分有问题
不过我测试了下,我自己在ubuntu上同样的解压指令是没有这一层子目录的,感觉很奇怪

离线

楼主 #16 2018-07-31 14:48:53

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: licheeZero bsp内核启动失败:Kernel panic: No init found.

对了,解决的话,只需要在打包脚本的解压部分末尾加上一句
--strip-components 1
烧写完镜像就可以正常启动了

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn