您尚未登录。

楼主 # 2022-07-01 12:32:30

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

参考官方文档做flash:http://zero.lichee.pro/%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/SPI_flash_build.html#

启动时卡在了Starting kernel ,没有任何下文,等多久都没有用

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Jun 30 2022 - 07:09:30)
DRAM: 64 MiB
Trying to boot from sunxi SPI

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jun 30 2022 - 07:09:30 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 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)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jun 30 2022 - 07:09:30 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 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)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dffec2 ... OK

Starting kernel ...

离线

#1 2022-07-01 13:50:51

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,378
积分: 1343.5

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

可以考虑进入uboot命令模式,看下bootcmd和bootargs这两个参数。
print bootcmd
print bootargs
或者printenv

离线

楼主 #2 2022-07-01 14:57:05

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

Gentlepig 说:

可以考虑进入uboot命令模式,看下bootcmd和bootargs这两个参数。
print bootcmd
print bootargs
或者printenv

printenv
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r}i
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 usb0 pxe dhcp 
bootargs=console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2
bootcmd=sf probe 0; sf read 0x41800000 0x100000 0x10000; sf read 0x41000000 0x110000 0x400000; bootz 0x41000000 - 0x41800000
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${f;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootm_size=0x2e00000
console=ttyS0,115200
cpu=armv7
dfu_alt_info_ram=kernel ram 0x41000000 0x800000;fdt ram 0x41800000 0x100000;ramdisk ram 0x41B00000 0x1000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x41800000
fdtcontroladdr=43b572a8
fdtfile=sun8i-v3s-licheepi-zero.dtb
kernel_addr_r=0x41000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
preboot=usb start
pxefile_addr_r=0x41A00000
ramdisk_addr_r=0x41B00000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_s;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do ie
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefe
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; ri
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script e
scriptaddr=0x41900000
serial#=12c00003ac5e36ca
soc=sunxi
stderr=serial@01c28000
stdin=serial@01c28000
stdout=serial@01c28000
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Environment size: 4295/32764 bytes

离线

#3 2022-07-01 17:15:42

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,378
积分: 1343.5

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

不知道了,匿了...

可以看下烧录的zImage文件有多大,荔枝派是给内核分配了4M空间。

最近编辑记录 Gentlepig (2022-07-01 17:16:48)

离线

#4 2022-07-01 17:34:31

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

boot 前可以用 crc命令计算出文件(内存段)的校验码,和写入文件的校验码比较,如果对不上, 那就是zImage或者dtb有问题了.





离线

楼主 #5 2022-07-01 17:43:19

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

Gentlepig 说:

不知道了,匿了...

可以看下烧录的zImage文件有多大,荔枝派是给内核分配了4M空间。

编译后是4.1M,也有4M,都试过了,也不行

离线

#6 2022-07-01 20:08:57

linux-xc
会员
注册时间: 2022-06-28
已发帖子: 29
积分: 51

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

踩完坑了,可以看看
https://whycan.com/t_8436.html

离线

#7 2022-07-02 08:34:35

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,378
积分: 1343.5

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

happy 说:
Gentlepig 说:

不知道了,匿了...

可以看下烧录的zImage文件有多大,荔枝派是给内核分配了4M空间。

编译后是4.1M,也有4M,都试过了,也不行

超过4M应该是不行的,可以试试将文件系统再裁剪下。

离线

#8 2022-07-02 09:58:01

xfdr0805
会员
注册时间: 2020-07-23
已发帖子: 312
积分: 355

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

uboot和kernel用的不是同一个console 也是这种现象

离线

楼主 #9 2022-07-02 15:16:55

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

linux-xc 说:

踩完坑了,可以看看
https://whycan.com/t_8436.html

多谢,发现真的是好多坑

离线

#10 2022-11-13 10:10:20

tocurd
会员
注册时间: 2021-08-14
已发帖子: 19
积分: 4

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

楼主搞定了吗,我也是5.2想从flash启动一直卡在Starting kernel

离线

楼主 #11 2022-11-14 09:02:44

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: zero spi flash启动时卡在了Starting kernel ...,大神们帮我看下

tocurd 说:

楼主搞定了吗,我也是5.2想从flash启动一直卡在Starting kernel


好像是SEC_4K的问题,我没去搞了,卡在alsa编译的问题上

离线

页脚

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

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