ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.45k stars 1.74k forks source link

尝试编译uboot,失败:用于U盘启动没问题,放到emmc里就不行无法启动 #577

Closed xcray closed 1 year ago

xcray commented 1 year ago

仅仅是Overload-非完整版uboot,完整版更没敢试。 手上的两个盒子都不行,cm311加载u-boot.emmc后变成了系统不认识的乱码,TTL:

reading u-boot.emmc 699728 bytes read in 22 ms (30.3 MiB/s) ‘## Starting application at 0x01000000 ...

U-Boot 2022.01-18618-gab1714ee1e-dirty (Sep 21 2022 - 10:43:13 +0800) cm311

Model: CM311-1a-YST SoC: Amlogic Meson G12A (Unknown) Revision 28:c (70:2) DRAM: 2 GiB MMC: sd@ffe03000: 2, sd@ffe05000: 0, mmc@ffe07000: 1 Loading Environment from nowhere... OK In: serial@3000 Out: serial@3000 Err: serial@3000 Net: eth0: ethernet@ff3f0000 Hit any key to stop autoboot: 2  0 => => => ?00: 0, mmc@ffe07000: 1 Unknown command '?00:' - try 'help' => bjb jbhjbljbpjb'jb

=> b jb   jb  hjb      x  ! 9  hlp'jb ?00: 0, mmc@ffe07000: 1  b:jb:b: b: b: b:后面都是乱七八糟

而m401a(defconfig、dts啥的都是另外一套)也是U盘没问题emmc不行,只是TTL输出不一样,不认emmc进入了网络启动模式:

reading u-boot.emmc 698272 bytes read in 22 ms (30.3 MiB/s) ’## Starting application at 0x01000000 ...

U-Boot 2022.01-18618-gab1714ee1e-dirty (Sep 21 2022 - 08:55:12 +0800) u212

Model: Amlogic Meson G12A U212 platform M401A Box SoC: Amlogic Meson G12A (Unknown) Revision 28:c (70:2) DRAM: 2 GiB MMC: sd@ffe05000: 0, mmc@ffe07000: 1 Loading Environment from nowhere... OK In: serial@3000 Out: serial@3000 Err: serial@3000 Net: eth0: ethernet@ff3f0000 Hit any key to stop autoboot: 2  1  0 Card did not respond to voltage select! : -110 unable to select a mode : -110 MMC Device 2 not found no mmc device at slot 2 starting USB... Bus usb@ff500000: Register 3000140 NbrPorts 3 Starting the controller USB XHCI 1.10 scanning bus usb@ff500000 for devices... 2 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device Speed: 100, full duplex BOOTP broadcast 1 Unhandled DHCP Option in OFFER/ACK: 43 Unhandled DHCP Option in OFFER/ACK: 43 DHCP client bound to address 192.168.1.157 (525 ms) *** Warning: no boot file name; using '0A00019D.img' Using ethernet@ff3f0000 device TFTP from server 192.168.1.1; our IP address is 192.168.1.157 Filename '0A00019D.img'. Load address: 0x1000000

严格按照 https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-docs/README.cn.md#1211-%E5%A6%82%E4%BD%95%E5%88%B6%E4%BD%9C-u-boot-%E6%96%87%E4%BB%B6 执行的,这东西太难了。。。

xcray commented 1 year ago

dts也都是已经验证过没啥问题的,defconfig里仅仅是改了改型号字符串

ophub commented 1 year ago

Snip20220922_8

Snip20220922_10

Snip20220922_12

Snip20220922_14

Snip20220922_15

Snip20220922_16

我直接使用他源码库中的s922x-gtk-pro(u-boot: beelink-gtkingpro_defconfig / amlogic-boot-fip: beelink-s922x)编译了一下,替换本地的文件,可以正常启动。所以步骤和方法是可行的,相关文件正确的话制作的u-boot是可以使用的。 /boot 和 /usr/lib/u-boot 我都测试了没问题。 他仓库中有他制作过的u-boot的开源代码,你有相同设备的话,可以直接使用他的代码编译,本地替换测试即可。这样可以验证你的操作方法是正确的。

redo-gtk-pro.zip

xcray commented 1 year ago

关键是我手上的两个盒子:m401a和cm311,和f大库里的都不一样啊。。。一样的话我就不用折腾了,有现成的拿来就用多幸福啊。

我是尝试在u200基础上修改,这已经是我能想到的最省力的方法了,可惜能力欠缺,搞不定