您尚未登录。

楼主 #1 2021-05-13 10:06:40

Meekdai
会员
注册时间: 2021-04-30
已发帖子: 62
积分: 52
个人网站

V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

我的编译步骤完成参照晕哥的帖子https://whycan.com/p_63208.html

编译环境:ubuntu-18.04
编译前安装了依赖包如下

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y make gcc g++ unzip git bc python device-tree-compiler mtd-utils
sudo apt install gcc build-essential bison flex gettext tcl sharutils libncurses-dev zlib1g-dev exuberant-ctags g++ texinfo patch vim libtool bc git python3 unzip python3-distutils swig python-dev
sudo apt install gcc-arm-linux-gnueabihf

编译版本:buildroot-2018.08.2 并且使用晕哥帖子里面的backup_20190220A.tgz文件

编译结果:

>>>   Generating root filesystem image rootfs.tar
rm -rf /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar
mkdir -p /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar
echo '#!/bin/sh' > /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
echo "set -e" >> /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
printf '   	mkdir -p /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/target\n	tar xf /opt/buildroot-2018.08.2/output/build/buildroot-fs/rootfs.common.tar -C /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/target\n' >> /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
printf '   \n' >> /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
printf '   	(cd /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/target; find -print0 | LC_ALL=C sort -z | tar  -cf /opt/buildroot-2018.08.2/output/images/rootfs.tar --null --no-recursion -T - --numeric-owner)\n' >> /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
chmod a+x /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
PATH="/opt/buildroot-2018.08.2/output/host/bin:/opt/buildroot-2018.08.2/output/host/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/pipx_bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /opt/buildroot-2018.08.2/output/host/bin/fakeroot -- /opt/buildroot-2018.08.2/output/build/buildroot-fs/tar/fakeroot
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../rasterwindow -I../../../include -I../../../include/QtGui -I../../../include/QtCore -I.moc -I../../../mkspecs/devices/linux-buildroot-g++ -o .obj/rasterwindow.o ../rasterwindow/rasterwindow.cpp
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../rasterwindow -I../../../include -I../../../include/QtGui -I../../../include/QtCore -I.moc -I../../../mkspecs/devices/linux-buildroot-g++ -o .obj/main.o main.cpp
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -dM -E -o .moc/moc_predefs.h /opt/buildroot-2018.08.2/output/host/mkspecs/features/data/dummy.cpp
/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/bin/moc -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB --include .moc/moc_predefs.h -I/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/mkspecs/devices/linux-buildroot-g++ -I/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/examples/gui/analogclock -I/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/examples/gui/rasterwindow -I/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/include -I/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/include/QtGui -I/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/include/QtCore -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/include/c++/7.3.0 -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/include/c++/7.3.0/arm-buildroot-linux-gnueabihf -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/include/c++/7.3.0/backward -I/opt/buildroot-2018.08.2/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/7.3.0/include -I/opt/buildroot-2018.08.2/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/7.3.0/include-fixed -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/include -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include ../rasterwindow/rasterwindow.h -o .moc/moc_rasterwindow.cpp
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../rasterwindow -I../../../include -I../../../include/QtGui -I../../../include/QtCore -I.moc -I../../../mkspecs/devices/linux-buildroot-g++ -o .obj/moc_rasterwindow.o .moc/moc_rasterwindow.cpp
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-gnueabihf-g++ --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-gnueabihf/sysroot -Wl,-O1 -Wl,--enable-new-dtags -o analogclock .obj/rasterwindow.o .obj/main.o .obj/moc_rasterwindow.o   -L/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/lib -lQt5Gui -lQt5Core -lrt -ldl -latomic -lpthread 
32+0 records in
32+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.0668632 s, 502 MB/s
814+1 records in
814+1 records out
417028 bytes (417 kB, 407 KiB) copied, 0.00202072 s, 206 MB/s
dd: failed to open 'output/images/env.bin': No such file or directory
0+1 records in
0+1 records out
11856 bytes (12 kB, 12 KiB) copied, 6.9301e-05 s, 171 MB/s
3+1 records in
3+1 records out
4298088 bytes (4.3 MB, 4.1 MiB) copied, 0.00327763 s, 1.3 GB/s
4+1 records in
4+1 records out
27197440 bytes (27 MB, 26 MiB) copied, 0.0221604 s, 1.2 GB/s
jffs2.bin
output/build/uboot-v3s-spi-experimental/u-boot-sunxi-with-spl.bin
tar: output/images/env.bin: Cannot stat: No such file or directory
output/images/sun8i-v3s-licheepi-zero-dock.dtb
output/images/zImage
tar: Exiting with failure status due to previous errors
flash_32m.bin

1、直接烧录打包文件
sunxi-fel.exe -p spiflash-write 0 flash_32m.bin
烧写完发现芯片不能启动,上下电后依旧停留在sunxi-fel的烧写模式

2、单独烧录
sunxi-fel.exe -p spiflash-write 0 u-boot-sunxi-with-spl.bin
烧写完后,发现可以进入uboot,日志如下:

U-Boot SPL 2017.01-rc2 (May 12 2021 - 10:54:41)
DRAM: 64 MiB
Trying to boot from sunxi SPI

U-Boot 2017.01-rc2 (May 12 2021 - 10:54:41 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 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 (May 12 2021 - 10:54:41 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 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
Card did not respond to voltage select!
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
starting USB...
No controllers found
No ethernet found.
No ethernet found.
=>
=>

3、然后依次烧录其他文件
sunxi-fel.exe -p spiflash-write 0x100000 sun8i-v3s-licheepi-zero.dtb
sunxi-fel.exe -p spiflash-write 0x110000 zImage2
sunxi-fel.exe -p spiflash-write 0x610000 jffs2.bin

发现烧录到最后jffs2.bin文件的时候,芯片就无法正常启动了,停留在sunxi-fel的烧写模式。

新人第一次入坑,求大佬帮忙看看,谢谢!

离线

#2 2021-05-13 10:24:07

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

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

感觉是uboot的sun8i.h修改没有成功,或者没有重新编译uboot。





离线

楼主 #3 2021-05-13 10:29:02

Meekdai
会员
注册时间: 2021-04-30
已发帖子: 62
积分: 52
个人网站

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

哇酷小二 说:

感觉是uboot的sun8i.h修改没有成功,或者没有重新编译uboot。

这个文件我没有动过
sun8i.h

/*
 * (C) Copyright 2014 Chen-Yu Tsai <wens@csie.org>
 *
 * Configuration settings for the Allwinner A23 (sun8i) CPU
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __CONFIG_H
#define __CONFIG_H

/*
 * A23 specific configuration
 */

#ifdef CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_SUNXI
#endif

#ifdef CONFIG_MACH_SUN8I_H3
	#define CONFIG_SUNXI_USB_PHYS	4
#elif defined CONFIG_MACH_SUN8I_A83T
	#define CONFIG_SUNXI_USB_PHYS	3
#elif defined CONFIG_MACH_SUN8I_V3S
	#define CONFIG_SUNXI_USB_PHYS	1
#else
	#define CONFIG_SUNXI_USB_PHYS	2
#endif

/*
 * Include common sunxi configuration where most the settings are
 */
#include <configs/sunxi-common.h>




#define CONFIG_BOOTCOMMAND    "sf probe 0 50000000;sf read 0x41800000 0x100000 0x4000;sf read 0x41000000 0x110000 0x500000; bootz 0x41000000 - 0x41800000"
#define CONFIG_BOOTARGS       "console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:992k(uboot)ro,32k(env)ro,64k(dtb)ro,5M(kernel)ro,-(rootfs) root=31:04 rw rootfstype=jffs2"



#endif /* __CONFIG_H */

我只是修改了.config文件的LCD配置

BR2_TARGET_UBOOT_BOARD_DEFCONFIG="LicheePi_Zero_800x480LCD"

修改为

BR2_TARGET_UBOOT_BOARD_DEFCONFIG="LicheePi_Zero_480x272LCD"

离线

#4 2021-05-13 10:33:05

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

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

那你在 uboot控制台 printenv 看下bootargs,bootcmd的变量值





离线

楼主 #5 2021-05-13 10:35:52

Meekdai
会员
注册时间: 2021-04-30
已发帖子: 62
积分: 52
个人网站

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

哇酷小二 说:

那你在 uboot控制台 printenv 看下bootargs,bootcmd的变量值

如下

=> printenv
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefi                                                                              x}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ef                                                                              i/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${f                                                                              dt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
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
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp};                                                                               then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfi                                                                              le}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi;                                                                               setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_                                                                              vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr                                                                              _r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; t                                                                              hen bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtc                                                                              ontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_ar                                                                              ch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(F                                                                              EL 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
devnum=0
dfu_alt_info_ram=kernel ram 0x41000000 0x800000;fdt ram 0x41800000 0x100000;ramd                                                                              isk 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=43b56388
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_pa                                                                              rt; 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_scrip                                                                              ts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env ex                                                                              ists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fs                                                                              type ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_b                                                                              oot; fi; done
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 prefix i                                                                              n ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${p                                                                              refix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${dev                                                                              num}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable medi                                                                              a binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: contin                                                                              uing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefi                                                                              x}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run b                                                                              oot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${d                                                                              evnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${pr                                                                              efix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x41900000
serial#=12c00001f8900c7e
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: 4050/32764 bytes
=>

离线

#6 2021-05-13 11:27:25

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

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

那哪里有点不对了。





离线

楼主 #7 2021-05-13 13:26:01

Meekdai
会员
注册时间: 2021-04-30
已发帖子: 62
积分: 52
个人网站

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

我不是很清楚,这个env.bin文件是干嘛用的?存储环境变量的吗?

编译的过程中没有输出这个文件是不是哪里没有配置好?

离线

楼主 #8 2021-05-13 15:04:03

Meekdai
会员
注册时间: 2021-04-30
已发帖子: 62
积分: 52
个人网站

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

请教一下,在pack.sh代码中的/dev/zero里面是什么,如下

###初始化flash烧录文件, 大小32M
dd if=/dev/zero bs=1M count=32 | tr "\000" "\377" > flash_32m.bin

离线

#9 2021-05-13 15:05:12

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

取0填充文件吧

离线

楼主 #10 2021-05-14 13:49:03

Meekdai
会员
注册时间: 2021-04-30
已发帖子: 62
积分: 52
个人网站

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

烧录打包文件flash_32m.bin不启动是因为我没有使用32M的sunxi-fel烧写flash导致,目前使用论坛里的32M工具,烧写打包文件flash_32m.bin可以进uboot了,但是还是没有进入内核。日志如下:

U-Boot SPL 2017.01-rc2 (May 13 2021 - 14:12:35)
DRAM: 64 MiB
Trying to boot from sunxi SPI

U-Boot 2017.01-rc2 (May 13 2021 - 14:12:35 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

Setting up a 480x272 lcd console (overscan 0x0)
dotclock: 10000kHz = 10000kHz: (1 * 3MHz * 20) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2 (May 13 2021 - 14:12:35 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

Setting up a 480x272 lcd console (overscan 0x0)
dotclock: 10000kHz = 10000kHz: (1 * 3MHz * 20) / 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
Card did not respond to voltage select!
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
starting USB...
No controllers found
No ethernet found.
No ethernet found.
=>

环境变量:

=> 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} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
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
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
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
devnum=0
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=43b56388
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_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
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 prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
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 ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x41900000
serial#=12c00001f8900c7e
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: 4050/32764 bytes

请问,晕哥的这个backup_20190220A.tgz文件解压到buildroot目录里面后还需要做其他的修改吗?

离线

#11 2022-06-08 15:50:10

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

Re: V3S 使用晕哥的配置编译buildroot无env.bin文件,烧写flash_32m.bin无法启动

sun8i.h里的bootcommand和bootargs两行需要放在#include之前。
我放到#include之前后发现bootcommand还是默认值,然后在make menuconfig里boot option里将使用bootcommand这个去掉,就可以。

离线

页脚

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

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