您好,我希望能通过SD卡或者U盘启动edge2开发板。
根据这篇文章尝试向u盘和SD卡烧录了ubuntu通用镜像和Fenix生成的khadas官方镜像,但是都没法启动edge2开发板。
我的这块edge2的spi flash和emmc都是被我擦除了的,MCU的程序没有更改。
@QiYin
请做下面的尝试
1.调整扩展小板连接,保证无虚接。
2.使用上面文档提到的工具,把这个固件烧录到SD卡
http://dl.khadas.com/products/edge2/firmware/ubuntu/generic/edge2-ubuntu-22.04-gnome-linux-5.10-fenix-1.5-230425.img.xz
我知道这一步的问题在哪了,我之前烧录的镜像是针对emmc的,所以启动不了。
现在通过SD卡能够启动edge2了,我该如何把镜像再干进emmc里面?目的是去掉io小板且完全不使用usbtypec接口。
我尝试根据别人的教程学习通过SD卡烧录eMMC,我使用的都是khadas提供的镜像。我在用SD卡启动edge2之后,dd烧录升级镜像,然后移除edge2开发板上的SD卡,edge2没法启动,实验失败了。我该如何通过SD卡烧录edge2的eMMC?
@QiYin
重新烧录一个eMMC固件
1.固件
http://dl.khadas.com/products/edge2/firmware/ubuntu/emmc/edge2-ubuntu-22.04-gnome-linux-5.10-fenix-1.5-230425-emmc.img.xz
2.方法
https://docs.khadas.com/products/sbc/edge2/install-os/install-os-into-emmc-via-usb-tool
我使用的是SD卡启动的edge2。
SD卡中的文件结构如下图所示
edge2启动所使用的镜像是edge2-ubuntu-20.04-gnome-linux-5.10-fenix-1.5.1-230701-develop.img.xz,已经用烧录工具烧录到了SD卡中。
SD卡的后面的UPDATE分区里存放了我想烧录到edge2开发板eMMC里的镜像文件edge2-ubuntu-22.04-gnome-linux-5.10-fenix-1.5.1-230701-emmc-develop.img
也就是希望烧录到下图中的/dev/mmcblk0中去
我试了 https://docs.khadas.com/products/sbc/edge2/install-os/install-os-into-emmc-via-usb-tool
这个方法,我在执行./INSTALL时提示没有lib32z1等内容。
据我推断,你可能误解了文档的描述
1.需要将工具安装在一台Ubuntu PC上,而不是Edge2本身
2.需要烧录的固件也是存放在Ubuntu PC的某个目录下,然后利用上述工具通过USB烧录到Edge2的eMMC。
安装过程出现缺少某些库或依赖,尝试搜索安装一下。
我就是想通过SD卡来烧录eMMC。安装工具在Ubuntu PC然后烧录的那种方式需要一根数据线连接edge2的usb typec接口,我并不想一端连电脑一端连edge2,很不灵活。
您好, Edge2 通过SD卡启动并烧录镜像至eMMC是否是可行的,需要哪些命令?
可以已使用下面的命令,将SD卡中的固件,烧录到eMMC中。不过对于有些发布的固件,此方法可能存在一些问题。
$ sudo emmc-install
我用edge2-ubuntu-22.04-gnome-linux-5.10-fenix-1.5.1-230703-develop.img,但是移除SD卡之后启动不了,能不能推荐一个好使的镜像。
log如下:
DDR V1.09 a930779e06 typ 22/11/21-17:50:56
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x6
CH0 RX Vref:31.7%, TX Vref:21.8%,21.8%
CH1 RX Vref:31.7%, TX Vref:21.8%,21.8%
CH2 RX Vref:30.7%, TX Vref:21.8%,21.8%
CH3 RX Vref:31.7%, TX Vref:21.8%,21.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
U-Boot SPL board init
U-Boot SPL 2017.09 (Jul 03 2023 - 15:10:24)
Trying to boot from MMC2
Card did not respond to voltage select!
mmc_init: -95, time 12
spl: mmc init failed with error: -95
Trying to boot from MMC1
part_get_info_efi: *** ERROR: Invalid GPT ***
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
part_get_info_efi: *** ERROR: Invalid GPT ***
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
spl: partition error
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(045b2cef29...) + OK
## Checking uboot 0x00200000 ... sha256(adfd0d0a9c...) + OK
## Checking fdt 0x0032e308 ... sha256(ffbcac624a...) + OK
## Checking atf-2 0x000f0000 ... sha256(30812190d0...) + OK
## Checking atf-3 0xff100000 ... sha256(cb7bdbec2b...) + OK
## Checking optee 0x08400000 ... sha256(fde0860845...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 529.820 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-481-g17b41886e:derrick.huang
NOTICE: BL31: Built : 16:20:07, Dec 7 2022
INFO: spec: 0x13
INFO: ext 32k is valid
INFO: ddr: stride-en 4CH
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO: system boots from cpu-hwid-0
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INFO: hdmirx_handler: dma not on, ret
I/TC:
I/TC: OP-TEE version: 3.13.0-652-g4542e1efd #derrick.huang (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #5 2022骞?09鏈?20鏃?鏄熸湡浜?09:41:09 CST aarch64
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2017.09 (Jul 03 2023 - 15:10:24 +0800)
Model: Khadas Edge2
PreSerial: 2, raw, 0xfeb50000
DRAM: 8 GiB
Sysmem: init
Relocation Offset: edb49000
Relocation fdt: eb9f9fe8 - eb9fece0
CR: M/C/I
Using default environment
mmc@fe2c0000: 1, mmc@fe2e0000: 0
Bootdev(atags): mmc 0
MMC0: HS200, 200Mhz
PartType: DOS
DM: v2
No misc partition
boot mode: None
FIT: No boot partition
** Unable to read file /dtb.img **
No resource partition
No resource partition
No resource partition
Failed to load DTB, ret=-19
No find valid DTB, ret=-22
Failed to get kernel dtb, ret=-22
gpio: pin 130 (gpio 130) value is 1
"Synchronous Abort" handler, esr 0x96000010
* Reason: Exception from a Data abort, from current exception level
* PC = 000000000023a580
* LR = 0000000000271c48
* SP = 00000000eb9f9d00
* ESR_EL2 = 0000000096000010
* Reloc Off = 00000000edb49000
x0 : 0000000000000000 x1 : 00000000eb9f9f20
x2 : 0000000000000001 x3 : 00000000eb9f9f88
x4 : 00000000ebd49cc0 x5 : 00000000ebd49d20
x6 : 0000000000000260 x7 : 00000000ede510c0
x8 : 00000000ebd509e0 x9 : 0000000000000008
x10: 00000000ffffffd0 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000000200
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000000084 x17: 0000000000000032
x18: 00000000eb9ffcf0 x19: 0000000000000000
x20: 00000000ede50e48 x21: 0000000000000038
x22: 00000000eb9f9f88 x23: 0000000000000001
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000eb9f9ee0
Call trace:
PC: [< 0023a580 >]
LR: [< 00271c48 >]
Stack:
[< 0023a580 >]
[< 00207e9c >]
[< 0029fbe0 >]
[< 0021b844 >]
[< 00201e40 >]
Copy info from "Call trace..." to a file(eg. dump.txt), and run
command in your U-Boot project: ./scripts/stacktrace.sh dump.txt
Resetting CPU ...
### ERROR ### Please RESET the board ###
DDR V1.09 a930779e06 typ 22/11/21-17:50:56
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x6
CH0 RX Vref:31.7%, TX Vref:22.8%,21.8%
CH1 RX Vref:30.7%, TX Vref:21.8%,21.8%
CH2 RX Vref:31.7%, TX Vref:21.8%,21.8%
CH3 RX Vref:31.7%, TX Vref:21.8%,21.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
U-Boot SPL board init
U-Boot SPL 2017.09 (Jul 03 2023 - 15:10:24)
Trying to boot from MMC2
Card did not respond to voltage select!
mmc_init: -95, time 12
spl: mmc init failed with error: -95
Trying to boot from MMC1
part_get_info_efi: *** ERROR: Invalid GPT ***
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
part_get_info_efi: *** ERROR: Invalid GPT ***
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
spl: partition error
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(045b2cef29...) + OK
## Checking uboot 0x00200000 ... sha256(adfd0d0a9c...) + OK
## Checking fdt 0x0032e308 ... sha256(ffbcac624a...) + OK
## Checking atf-2 0x000f0000 ... sha256(30812190d0...) + OK
## Checking atf-3 0xff100000 ... sha256(cb7bdbec2b...) + OK
## Checking optee 0x08400000 ... sha256(fde0860845...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 528.862 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-481-g17b41886e:derrick.huang
NOTICE: BL31: Built : 16:20:07, Dec 7 2022
INFO: spec: 0x13
INFO: ext 32k is valid
INFO: ddr: stride-en 4CH
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO: system boots from cpu-hwid-0
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INFO: hdmirx_handler: dma not on, ret
I/TC:
I/TC: OP-TEE version: 3.13.0-652-g4542e1efd #derrick.huang (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #5 2022骞?09鏈?20鏃?鏄熸湡浜?09:41:09 CST aarch64
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2017.09 (Jul 03 2023 - 15:10:24 +0800)
Model: Khadas Edge2
PreSerial: 2, raw, 0xfeb50000
DRAM: 8 GiB
Sysmem: init
Relocation Offset: edb49000
Relocation fdt: eb9f9fe8 - eb9fece0
CR: M/C/I
Using default environment
mmc@fe2c0000: 1, mmc@fe2e0000: 0
Bootdev(atags): mmc 0
MMC0: HS200, 200Mhz
PartType: DOS
DM: v2
No misc partition
boot mode: None
FIT: No boot partition
** Unable to read file /dtb.img **
No resource partition
No resource partition
No resource partition
Failed to load DTB, ret=-19
No find valid DTB, ret=-22
Failed to get kernel dtb, ret=-22
gpio: pin 130 (gpio 130) value is 1
"Synchronous Abort" handler, esr 0x96000010
* Reason: Exception from a Data abort, from current exception level
* PC = 000000000023a580
* LR = 0000000000271c48
* SP = 00000000eb9f9d00
* ESR_EL2 = 0000000096000010
* Reloc Off = 00000000edb49000
x0 : 0000000000000000 x1 : 00000000eb9f9f20
x2 : 0000000000000001 x3 : 00000000eb9f9f88
x4 : 00000000ebd49cc0 x5 : 00000000ebd49d20
x6 : 0000000000000260 x7 : 00000000ede510c0
x8 : 00000000ebd509e0 x9 : 0000000000000008
x10: 00000000ffffffd0 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000000200
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000000084 x17: 0000000000000032
x18: 00000000eb9ffcf0 x19: 0000000000000000
x20: 00000000ede50e48 x21: 0000000000000038
x22: 00000000eb9f9f88 x23: 0000000000000001
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000eb9f9ee0
Call trace:
PC: [< 0023a580 >]
LR: [< 00271c48 >]
Stack:
[< 0023a580 >]
[< 00207e9c >]
[< 0029fbe0 >]
[< 0021b844 >]
[< 00201e40 >]
Copy info from "Call trace..." to a file(eg. dump.txt), and run
command in your U-Boot project: ./scripts/stacktrace.sh dump.txt
Resetting CPU ...
### ERROR ### Please RESET the board ###
还有另一个事,edge2是没办法进入uboot控制台吗,即使我按space键,开发板还是auto boot。
@QiYin
1.
这是一个eMMC 固件,根据提供的方法烧录使用。
是要通过SD卡启动并烧录镜像至eMMC,不是通过RK烧录工具。您给的镜像是eMMC的,我没法烧录到SD卡。
@QiYin
1.将下面的固件烧录到SD卡,把SD卡插入扩展小板,为你的spi flash烧录OOWOW系统
http://dl.khadas.com/products/edge2/firmware/oowow/edge2-oowow-latest-spi-upgrade-sd.img.gz
2.将SD类型的固件复制到SD卡,烧录成功后,SD卡插入到扩展小板
http://dl.khadas.com/products/edge2/firmware/ubuntu/generic/edge2-ubuntu-22.04-gnome-linux-5.10-fenix-1.5-230425.img.xz
3.进入OOWOW系统(如果你第一步烧录成功,长按Edge2 上的F键,再按R键进入OOWOW系统)
- 进入 OOWOW main menu 界面
- 选择 Write image to eMMC