LicheeNano开机启动之后卡死在Starting kernel ...


#1

参考官方文档 http://nano.lichee.pro/build_sys/build_flash.html 打包生成的uboot、dtb、linux、rootfs文件打包后,下载到设备中,发现开机一直停留在
“Starting kernel …”
以下是Log信息:

U-Boot SPL 2018.01-05679-g013ca45-dirty (May 22 2019 - 08:53:31)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22

spl: mmc init failed with error: -95
Trying to boot from sunxi SPI

U-Boot 2018.01-05679-g013ca45-dirty (May 22 2019 - 08:53:31 +0800) Allwinner Technology

CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB…
No controllers found
Hit any key to stop autoboot: 2 1 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK

Flattened Device Tree blob at 80c00000

Booting using the fdt blob at 0x80c00000
Loading Device Tree to 80e60000, end 80e642c8 … OK

Starting kernel …


#2

屏幕有信息吗?是不是tty转移到屏幕了?


#3

没有呢, 就一直卡在Starting kernel …
屏幕一直显示uboot的开机画面,小企鹅logo


#4

可以打开内核的early printk, 能够看到详细信息


#5

好的,谢谢
另外想问一下
下表为分区规划表:

分区序号 分区大小 分区作用 地址空间及分区名
mtd0 1MB (0x100000) spl+uboot 0x0000000-0x0100000 : “uboot”
mtd1 64KB (0x10000) dtb文件 0x0100000-0x0110000 : “dtb”
mtd2 4MB (0x400000) linux内核 0x0110000-0x0510000 : “kernel”
mtd3 剩余 (0xAF0000) 根文件系统 0x0510000-0x1000000 : “rootfs”

以上分区表烧录文件以下内容吗:
spl+uboot 是指编译出来的u-boot目录下的u-boot-sunxi-with-spl.bin
dtb文件 是指编译出来的u-boot/arch/arm/suniv-f1c100s-licheepi-nano.dtb
linux内核 指编译出来的linux/arch/arm/boot/zImage
根文件系统 指编译出来的buildroot-2017.08/output/images/rootfs.tar

另外以下是我根据官网打包脚本修改的自己脚本,能否帮忙看一下有没有问题

mkdir ./output
cd ./output
YOUR_UBOOT_FILE=../u-boot/u-boot-sunxi-with-spl.bin
YOUR_DTB_FILE=../u-boot/arch/arm/dts/suniv-f1c100s-licheepi-nano.dtb
#YOUR_DTB_FILE=../u-boot/u-boot.dtb
YOUR_KERNEL_FILE=../linux/arch/arm/boot/zImage
YOUR_MOD_FILE=../modules/spi-flash/4.15.0-next-20180202-licheepi-nano+/*
YOUR_ROOTFS_FILE=../buildroot-2017.08/output/images/rootfs.tar
YOUR_IMG_FILE=./image.dd

dd if=/dev/zero of=flashimg.bin bs=1M count=16 &&\
dd if=$YOUR_UBOOT_FILE of=flashimg.bin bs=1K conv=notrunc &&\
dd if=$YOUR_DTB_FILE of=flashimg.bin bs=1K seek=1024  conv=notrunc &&\
dd if=$YOUR_KERNEL_FILE of=flashimg.bin bs=1K seek=1088  conv=notrunc &&\
mkdir -p ./rootfs/lib/modules

tar -xvf $YOUR_ROOTFS_FILE -C ./rootfs &&\
#cp -r $YOUR_MOD_FILE  ./rootfs/lib/modules/ &&\
# 为根文件系统制作jffs2镜像包
# --pad参数指定 jffs2大小
# 由此计算得到 0x1000000(16M)-0x10000(64K)-0x100000(1M)-0x400000(4M)=0xAF0000
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o jffs2.img &&\
dd if=jffs2.img of=$YOUR_IMG_FILE  bs=1K seek=5184  conv=notrunc