您尚未登录。

楼主 #1 2020-03-25 18:01:03

jerryzheng
会员
注册时间: 2020-03-25
已发帖子: 9
积分: 9

Licheepi nano 系统启动失败,卡在 Staring kernel ...

U-Boot 2018.01-05679-g013ca457fd-dirty (Mar 25 2020 - 16:14:47 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected xt25f128b 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
Out:   vga
Err:   vga
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x70000, size 0x10000
SF: 65536 bytes @ 0x70000 Read: OK
device 0 offset 0x80000, size 0x400000
SF: 4194304 bytes @ 0x80000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e6409e ... OK

Starting kernel ...

SPI Flash  分区结构:

ID  SIZE    USAGE   ADDR
0   448kb   U-boot  0x0000 0000 - 0x0007 0000
1   64kb    dtb     0x0007 0000 - 0x0008 0000
2   4mb     kernel  0x0008 0000 - 0x0048 0000
3   7.5mb   rootfs  0x0048 0000 - 0x00c0 0000
4   4mb     overlay 0x00c0 0000 - 0x0100 0000   

uboot启动参数:

sf probe 0 60000000; sf read 0x80c00000 0x70000 0x10000; sf read 0x80008000 0x80000 0x400000; bootz 0x80008000 - 0x80c00000

镜像脚本

#!/bin/bash
echo "Hello World!"
echo "coping files............."
cp ../u-boot/u-boot-sunxi-with-spl.bin ./uboot.bin
cp ../linux/arch/arm/boot/zImage ./zImage
cp ../linux/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb ./licheepi-nano.dtb
cp ../buildroot-2017.08/output/images/rootfs.tar  ./

echo "delete rootfs directory............."
rm -rf rootfs

dd if=/dev/zero of=flashimg.bin bs=1M count=16
dd if=uboot.bin of=flashimg.bin bs=1K conv=notrunc
dd if=licheepi-nano.dtb of=flashimg.bin bs=1K seek=448  conv=notrunc
dd if=zImage of=flashimg.bin bs=1K seek=512  conv=notrunc
mkdir rootfs
echo "decompression rootfs.tar............"
tar -xf rootfs.tar -C ./rootfs

echo "decompression done..........."

fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.img
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -d overlay/

dd if=rootfs.img of=flashimg.bin  bs=1K seek=4608  conv=notrunc
dd if=jffs2.img of=flashimg.bin bs=1M seek=12 conv=notrunc

rm -rf rootfs.img jffs2.img uboot.bin zImage

参考了荔枝派nano(f1c100s)的SPI-Flash系统编译创建全过程

是不是这句影响了启动:*** Warning - bad CRC, using default environment

最近编辑记录 jerryzheng (2020-03-25 18:10:49)

离线

楼主 #3 2020-03-26 09:42:01

jerryzheng
会员
注册时间: 2020-03-25
已发帖子: 9
积分: 9

Re: Licheepi nano 系统启动失败,卡在 Staring kernel ...

我思故我在 说:

大概率是 zImage或dtb 不完整引起

我发现是dtb文件没有更新, 为什么呢? 我明明用了这个命令了

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4

离线

楼主 #4 2020-03-26 10:06:26

jerryzheng
会员
注册时间: 2020-03-25
已发帖子: 9
积分: 9

Re: Licheepi nano 系统启动失败,卡在 Staring kernel ...

jerryzheng 说:

我发现是dtb文件没有更新, 为什么呢? 我明明用了这个命令了

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4

将config删除,再重新menuconfig, dtb文件可以生成最新的了。。。

离线

楼主 #5 2020-03-26 10:25:17

jerryzheng
会员
注册时间: 2020-03-25
已发帖子: 9
积分: 9

Re: Licheepi nano 系统启动失败,卡在 Staring kernel ...

启动成功 big_smile big_smile big_smile

最近编辑记录 jerryzheng (2020-03-26 10:25:50)

离线

页脚

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

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