void285 / build-beikeyun

scripts for build beikeyun firmware
MIT License
5 stars 4 forks source link

ubuntu刷入后无法启动 #1

Open Omoinemie opened 3 years ago

Omoinemie commented 3 years ago

刷入后通电黑屏无法启动

MiltonLai commented 2 years ago

我这里也能复现这个情况, 通过AndroidTool_Release_v2.58写入无法启动. focal和buster的image都测了, 用的是v2.49的loader, 除了loader和image以外未刷入其它内容 2021-10-09_123512 并且刷完后, 按钮失效了, 不能再按按钮进入maskrom状态, 必须短接背后的触点才能进maskrom.

void285 commented 2 years ago

抱歉,之前的代码中将dtb版本写错了,现在已经修改,你可以自己编译试试。目前的makefile中使用的镜像地址也是旧版本的,可以自己改成新版本的。 我有段时间没编译了,手生了,要熟悉下才行……

void285 commented 2 years ago

我是将好几个系统装到分了好几个分区的U盘上,上电时在PC上通过串口线监听uboot过程,可以手动选择系统,当时发现镜像有问题后,进了个别的系统修复了错误的dtb后就好了。makefile当时修改了,但忘记push了,当时应该是将5.x的dtb误写成4.x的了。

MiltonLai commented 2 years ago

还没编译, 确定OK? 我看提交里新增了两个dts, 其它的改动是跟自动构建相关的. 这两个dts在构建时会生成新的dtd吗?

void285 commented 2 years ago

应该没问题,之前启动不了是因为dtb路径写错了,现在已经改过来了。 dts不用管,那是我从dtb反编译得到的,忘删了。

MiltonLai commented 2 years ago

新编译了, 不行, 刷机完还是一样的错误, 我把TTL焊上了, 能看到启动输出, 这个错误和之前有问题的镜像输出的错误是一样的

U-Boot TPL 2020.10-armbian (Aug 08 2021 - 18:02:43)
data training error
col error
data training error
LPDDR3, 800MHz
BW=16 Col=12 Bk=8 CS0 Row=16 CS=1 Die BW=8 Size=4096MB

编译时只是把镜像版本号更新到现在的版本, 其它没动, 因为我不用界面, 所以把两个xfce的目标去掉了

root@ubuntu:~/armbian/build-beikeyun# git diff
diff --git a/Makefile b/Makefile
index 788a955..e89d368 100644
--- a/Makefile
+++ b/Makefile
@@ -19,10 +19,10 @@ build: $(TARGETS)
 clean: $(TARGETS:%=%_clean)
        rm -f $(OUTPUT)/*.img $(OUTPUT)/*.xz

-ARMBIAN_PKG_UBUNTU_XFCE := Armbian_21.02.3_Rock64_focal_current_5.10.21_xfce_desktop.img.xz
-ARMBIAN_PKG_UBUNTU := Armbian_21.02.3_Rock64_focal_current_5.10.21.img.xz
-ARMBIAN_PKG_DEBIAN_XFCE_LEGACY := Armbian_21.02.3_Rock64_buster_legacy_4.4.213_xfce_desktop.img.xz
-ARMBIAN_PKG_DEBIAN := Armbian_21.02.3_Rock64_buster_current_5.10.21.img.xz
+ARMBIAN_PKG_UBUNTU_XFCE := Armbian_21.08.1_Rock64_focal_current_5.10.60_xfce_desktop.img.xz
+ARMBIAN_PKG_UBUNTU := Armbian_21.08.1_Rock64_focal_current_5.10.60.img.xz
+ARMBIAN_PKG_DEBIAN_XFCE_LEGACY := Armbian_21.08.1_Rock64_buster_legacy_4.4.213_xfce_desktop.img.xz
+ARMBIAN_PKG_DEBIAN := Armbian_21.08.1_Rock64_buster_current_5.10.60.img.xz
 ifneq ($(CI),)
 ARMBIAN_URL_BASE := https://mirrors.dotsrc.org/armbian-dl/rock64/archive
 # ARMBIAN_URL_BASE := https://imola.armbian.com/dl/rock64/archive
@@ -42,7 +42,7 @@ ARMBIAN_PKG_%_CLEAN:
        rm -f $(DL)/$($(@:_CLEAN=))

 ifeq ($(build_armbian),y)
-ARMBIAN_TARGETS := ARMBIAN_PKG_UBUNTU_XFCE ARMBIAN_PKG_UBUNTU ARMBIAN_PKG_DEBIAN_XFCE_LEGACY ARMBIAN_PKG_DEBIAN
+ARMBIAN_TARGETS := ARMBIAN_PKG_UBUNTU ARMBIAN_PKG_DEBIAN

 armbian: $(ARMBIAN_TARGETS)
        ( for pkg in $(foreach n,$^,$($(n))); do \

编译用的命令是

make build_armbian=y build

是我编译的方式不对?

void285 commented 2 years ago

编译命令没问题,原makefile挺直白的,我也没大更改。前面我是云编译的,编译过程没报错就不是编译的问题吧。 你uboot是停在这个输出不动了吗,看着熟悉,之前我应该碰到过,怎么感觉uboot早期阶段就出错了呢,就是还没读取armbianenv.txt,有没可能是刷的bootloader有问题?

MiltonLai commented 2 years ago

一直用的是这个bootloader, 就是前面截图里用的那个,

188750 bytes (184 KiB)
sha256: 6DAE854F1E848552DA426493607C39D5D90492249182E9C46F130EA44E32FC61

不知道你用的是否一样? 不一样的话能否共享一下, 我换下bootloader试试

附: 刷 https://github.com/hanwckf/build-beikeyun 的版本, 正常运行时输出的是这样的日志

DDR version 1.13 20180428
ID:0xFFF
In
SRX
DDR3
786MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
ddrconfig:1
OUT
Boot1 Release Time: Feb  2 2018 15:41:39, version: 2.46
ChipType = 0x11, 211
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
SdmmcInit=0 2
StorageInit ok = 19169
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
LoadTrustBL
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xa4e44
RunBL31 0x10000
NOTICE:  BL31: v1.3(debug):f947c7e
NOTICE:  BL31: Built : 14:38:28, Aug 26 2018
NOTICE:  BL31:Rockchip release version: v1.3
INFO:    ARM GICv2 driver initialized
INFO:    Using rkfiq sec cpu_context!
INFO:    boot cpu mask: 1
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9

U-Boot 2017.09-armbian (Jun 28 2019 - 17:32:38 +0200)

Model: Pine64 Rock64
DRAM:  1022 MiB
MMC:   rksdmmc@ff520000: 0, rksdmmc@ff500000: 1
SF: unrecognized JEDEC id bytes: ff, ff, ff
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: Pine64 Rock64
misc_init_r
cpuid=55524b503039303232000000000d192c
serial=f226eb424b34b22
normal boot
Net:   eth0: ethernet@ff540000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2943 bytes read in 14 ms (205.1 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 0
130 bytes read in 12 ms (9.8 KiB/s)
7794159 bytes read in 234 ms (31.8 MiB/s)
19044360 bytes read in 541 ms (33.6 MiB/s)
67303 bytes read in 18 ms (3.6 MiB/s)
** File not found /boot/dtb/rockchip/overlay/rockchip-fixup.scr **
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    7794095 Bytes = 7.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to 3d792000, end 3df00daf ... OK
   reserving fdt memory region: addr=1f00000 size=76000
   Loading Device Tree to 000000003d719000, end 000000003d791fff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
void285 commented 2 years ago

uboot没问题的话通过串口应该是可以输入执行命令的,这个阶段可以测试启动环境配置、dtb、内核什么的有没问题,如果进行不到这个阶段,应该是uboot本身有问题。 搞这个是半年前的,本身不是搞这个领域的,不少东西模糊了记不大起来了……

void285 commented 2 years ago

我也有这个bootloader,命名是rk3328_loader_v1.14.249.bin,用的应该也是它吧,bootloader好像是处于启动链条的第二步,第三步才是uboot本体,应该是位于打包的镜像的一个分区上。

MiltonLai commented 2 years ago

比较奇怪的是, 一开机就输出U-Boot TPL 2020.10-armbian (Aug 08 2021 - 18:02:43), 按理说应该前面还有一个Boot, 第二阶段才到这个UBoot对吧? 输出错误信息之后就卡住了, 没有可执行命令的地方. 而且这样之后, 必须要短接触点才能进Maskrom.

我对这块也不熟, 我再研究研究.

void285 commented 2 years ago

启动流程中读取的程序或配置顺序大约是: 板载存储的stage1 -> bootloader -> uboot主体(会读取env) -> 系统启动器(syslinux等) -> 内核

上面你贴的报错应该是第三阶段有问题。 你先研究研究吧,这个错误我碰到过,可是我一时也想不起来当时是怎么解决的了……

void285 commented 2 years ago

如果不是为求知解决问题,系统能用就可以,你可以用hanwcfk发布的先装上个能用的,再在新划分的分区上装别的系统(用dd直接灌根或根+Boot分区,uboot可以省掉)

MiltonLai commented 2 years ago

hanwcfk的可以装, 我找高内核版本的是因为要跑wireguard, 要5.6版本以上才在内核里有集成. 刚才用恩山论坛上flippy发布的版本试了可以用. 他发布的是OpenWRT, 但是盘上也有Debian版本的Armbian, 我就先拿他的版本装了.

多谢你的指导帮助.

robinZhao commented 2 years ago

5.10需要替换dtd后替换loader下的idb,uboot,trust后 可正常启动 修改后的脚本 https://github.com/robinZhao/build-beikeyun

robinZhao commented 2 years ago

5.10需要替换dtd后替换loader下的idb,uboot,trust后 可正常启动 修改后的脚本 https://github.com/robinZhao/build-beikeyun

还是有问题,网络不稳定,百兆网络正常,在千兆网络下时断时连,谁能解决下。。

robinZhao commented 1 year ago

0需要替换dtd后替换loader下的idb,uboot,trust后 可正常启动 修改后的脚本

替换flippy的uboot和dtb就没问题了