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.41k stars 1.72k forks source link

UNT403A开机U盘启动正常,写入emmc报错,寻求解决 #1276

Closed lh2513 closed 1 year ago

lh2513 commented 1 year ago
--------------------------------------------------------------------------------------
ID    SOC        MODEL                          DTB
--------------------------------------------------------------------------------------
301   s905x2     X96-Max-4GB,Tx5-Max            meson-g12a-x96-max.dtb
302   s905x2     X96-Max-2GB,A95X-F2            meson-g12a-x96-max-rmii.dtb
303   s905x2     MECOOL-KM3-4G                  meson-g12a-sei510.dtb
304   s905l3a    E900V22C-D                     meson-g12a-s905l3a-e900v22c.dtb
305   s905l3a    CM311-1a-YST                   meson-g12a-s905l3a-cm311.dtb
306   s905l3a    M401A,UNT403A,B863AV3.2-M      meson-g12a-s905l3a-m401a.dtb
0     Other      Customize                      Enter-custom-dtb-name
--------------------------------------------------------------------------------------
[ OPTIONS ] Please Input ID: 306
[ INFO ] Input Box ID: [ 306 ]
[ INFO ] FDTFILE: [ meson-g12a-s905l3a-m401a.dtb ]
[ INFO ] MAINLINE_UBOOT: [  ]
[ INFO ] BOOTLOADER_IMG:  [  ]
[ INFO ] UBOOT_OVERLOAD: [ u-boot-e900v22c.bin ]
[ INFO ] NEED_OVERLOAD: [ yes ]
[ STEPS ] Start selecting file system type...
-----------------------------------------------
  ID   TYPE
-----------------------------------------------
  1    ext4
  2    btrfs
-----------------------------------------------
[ OPTIONS ] Please Input ID (1/2): 2
[ INFO ] Input Type ID: [ 2 ]
[ INFO ] The type of file system: [ btrfs ]
[ STEPS ] Start creating eMMC partition...
[ INFO ] Start backing up the default bootloader.
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 1.68917 s, 2.5 MB/s
[ INFO ] Start create MBR and partittion.
Error: Input/output error during write on /dev/mmcblk2
Error: /dev/mmcblk2: unrecognised disk label
Error: /dev/mmcblk2: unrecognised disk label
[ ERROR ] Failed to create partition using [ parted ].
root@armbian:/boot/dtb/amlogic#
lovl88 commented 1 year ago

选择 1 ext4

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/documents/README.cn.md

看12.16

lh2513 commented 1 year ago

选1也是一样报错了

-----------------------------------------------
  1    ext4
  2    btrfs
-----------------------------------------------
[ OPTIONS ] Please Input ID (1/2): 1
[ INFO ] Input Type ID: [ 1 ]
[ INFO ] The type of file system: [ ext4 ]
[ STEPS ] Start creating eMMC partition...
[ INFO ] Start backing up the default bootloader.
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 4.98259 s, 842 kB/s
[ INFO ] Start create MBR and partittion.
Error: Input/output error during write on /dev/mmcblk2
Error: /dev/mmcblk2: unrecognised disk label
Error: /dev/mmcblk2: unrecognised disk label
[ ERROR ] Failed to create partition using [ parted ].
lh2513 commented 1 year ago

https://github . com/op hub/amlogic-s9xxx-arm bian/blob/main/build-arm bian/documents/readme . cn . MD

看12.16

难搞O大,我不会反编译,汗

ophub commented 1 year ago

命令复制粘贴

lh2513 commented 1 year ago

命令复制粘贴

是哪一行命令了

ophub commented 1 year ago

12.13里面

lh2513 commented 1 year ago

12.13里面

o大您好,昨晚我按文档12.13和12.16反编译安装依然报错 Error: Input/output error during write on /dev/mmcblk2 Error: /dev/mmcblk2: unrecognised disk label Error: /dev/mmcblk2: unrecognised disk label [ ERROR ] Failed to create partition using [ parted ].

我有4个UNT403A,其中有一个反复直接刷入都可以,另外三个反编译怎么刷都无法写入emmc, u盘启动是正常的

janko888 commented 1 year ago

刷的是哪个镜像文件? usb里用的dtb是哪个?

lh2513 commented 1 year ago

刷的Armbian_23.05.0_amlogic_s905l3a_jammy_6.1.23_server_2023.04.12.img镜像 usb里头刷 meson-g12a-s905l3a-m401a.dtb meson-g12a-s905l3a-e900v22c.dtb meson-g12a-s905l3a-cm311.dtb

lh2513 commented 1 year ago

按文档12.16编译后也无法写入

janko888 commented 1 year ago

1.保证你使用的dtb是你修改编译后降低emmc频率的,或者镜像里面的m401a.dtb(这个以及降频到100 000 000) 2.确保你使用的dtb是生效的:在pc上修改usb后插入盒子启动;或者在usb引导的系统修改后重启系统。然后在写入emmc. 3.如果还不成功,那你那3个写不进emmc的盒子和那个可以写进的盒子使用的emmc元件批次和型号可能有了较大的变化了。

lh2513 commented 1 year ago

现在我是按12.16改的最低值,修改如下,如有错误烦请指点一下了。 搞了一个通宵没搞定,不知道什么原因

    sd@ffe05000 {
        compatible = "amlogic,meson-axg-mmc";
        reg = <0x00 0xffe05000 0x00 0x800>;
        interrupts = <0x00 0xbe 0x04>;
        status = "disabled";
        clocks = <0x02 0x22 0x02 0x3d 0x02 0x02>;
        clock-names = "core\0clkin0\0clkin1";
        resets = <0x05 0x2d>;
        pinctrl-0 = <0x32>;
        pinctrl-1 = <0x33>;
        pinctrl-names = "default\0clk-gate";
        bus-width = <0x04>;
        cap-sd-highspeed;
        max-frequency = <0x17d7840>;
        disable-wp;
        cd-gpios = <0x34 0x2f 0x01>;
        vmmc-supply = <0x35>;
        vqmmc-supply = <0x35>;
        phandle = <0x125>;
    };

    mmc@ffe07000 {
        compatible = "amlogic,meson-axg-mmc";
        reg = <0x00 0xffe07000 0x00 0x800>;
        interrupts = <0x00 0xbf 0x04>;
        status = "okay";
        clocks = <0x02 0x23 0x02 0x3e 0x02 0x02>;
        clock-names = "core\0clkin0\0clkin1";
        resets = <0x05 0x2e>;
        pinctrl-0 = <0x36 0x37 0x38>;
        pinctrl-1 = <0x39>;
        pinctrl-names = "default\0clk-gate";
        bus-width = <0x08>;
        cap-mmc-highspeed;
        mmc-ddr-1_8v;
        mmc-hs200-1_8v;
        max-frequency = <0x17d7840>;
        non-removable;
        disable-wp;
        mmc-pwrseq = <0x3a>;
        vmmc-supply = <0x3b>;
        vqmmc-supply = <0x3c>;
        phandle = <0x126>;
    };
janko888 commented 1 year ago

你这一下子改25 000 000太低了,不知道会不会有影响,改100 000 000试试,

lh2513 commented 1 year ago

你这一下子改25 000 000太低了,不知道会不会有影响,改100 000 000试试,

尝试过了,我是从最高一直试到最低的,报错都是一样的

janko888 commented 1 year ago

more /sys/kernel/debug/mmc2/ios 执行这个命令发出来看看

lh2513 commented 1 year ago

more /sys/kernel/debug/mmc2/ios 执行这个命令发出来看看

root@armbian:~# more /sys/kernel/debug/mmc2/ios clock: 200000000 Hz actual clock: 199999997 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 9 (mmc HS200) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@armbian:~#

lh2513 commented 1 year ago

more /sys/kernel/debug/mmc2/ios 执行这个命令发出来看看

root@armbian:~# more /sys/kernel/debug/mmc2/ios clock: 200000000 Hz actual clock: 199999997 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 9 (mmc HS200) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@armbian:~#

janko888 commented 1 year ago

显然你并没有修改,或者你所谓修改其实根本没有修改到

lh2513 commented 1 year ago

是修改不成功吗, 大佬您能否发一个修改好的

janko888 commented 1 year ago

more /boot/uEnv.txt

发出来看看,因为不知道你之前到底“修改”了什么。

lh2513 commented 1 year ago

uEnv.txt文本也要改吗? 这里我没动过呀 LINUX=/zImage INITRD=/uInitrd FDT=/dtb/amlogic/meson-g12a-s905l3a-e900v22c.dtb APPEND=root=UUID=a1b11ab2-3069-403a-9699-7428d7869513 rootflags=data=writeback rw rootfstype=ext4 console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 这个是文本里面的内容,需要怎么修改呢

janko888 commented 1 year ago

啊。这。。。

会用vi命令修改保存的话,就直接修改这个uEnv.txt文件 把FDT=/dtb/amlogic/meson-g12a-s905l3a-e900v22c.dtb 改成FDT=/dtb/amlogic/meson-g12a-s905l3a-m401a.dtb 保存后,sync && reboot 重启

重启后再执行more /sys/kernel/debug/mmc2/ios 看看是否生效了

不会vi修改的,拔u盘放pc里修改后,再插回盒子开机

(前提是m401a.dtb文件没有被你错误修改覆盖过)

lh2513 commented 1 year ago

uEnv.txt文本也要改吗? 这里我没动过呀 LINUX=/zImage INITRD=/uInitrd FDT=/dtb/amlogic/meson-g12a-s905l3a-e900v22c.dtb APPEND=root=UUID=a1b11ab2-3069-403a-9699-7428d7869513 rootflags=data=writeback rw rootfstype=ext4 console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 这个是文本里面的内容,需要怎么修改呢

/

lh2513 commented 1 year ago

啊。这。。。

会用vi命令修改保存的话,就直接修改这个uEnv.txt文件 把FDT=/dtb/amlogic/meson-g12a-s905l3a-e900v22c.dtb 改成FDT=/dtb/amlogic/meson-g12a-s905l3a-m401a.dtb 保存后,sync && reboot 重启

重启后再执行more /sys/kernel/debug/mmc2/ios 看看是否生效了

不会vi修改的,拔u盘放pc里修改后,再插回盒子开机

(前提是m401a.dtb文件没有被你错误修改覆盖过)

我大概明白意思了,我是编译了meson-g12a-s905l3a-m401a.dtb文件保存,然后uEnv文件我没有去改调取的文件名,所以导致一直未成功的原因, 我先尝试一下,感谢大哥的耐心指点。

janko888 commented 1 year ago

关键是改了也要“重启“生效后,才能写入emmc

lh2513 commented 1 year ago

我成功啦,太开心了, 非常非常感谢大哥的耐心指导,不然我要气的丢垃圾桶去了 非常感谢

janko888 commented 1 year ago

那就好,另外说一下,l3a的盒子用6.1内核写入emmc后,无法启动usb的系统。5.15内核没有这个问题

lh2513 commented 1 year ago

这样啊,那还好我装的是5.15,

那就好,另外说一下,l3a的盒子用6.1内核写入emmc后,无法启动usb的系统。5.15内核没有这个问题

ophub commented 1 year ago

最后的结论是什么? UNT403A使用的 meson-g12a-s905l3a-m401a.dtb 原版?还是你降低频率到多少了? 写入emmc后有线网络可以正常工作吧。 你的这个是s905l3a?

gdscwh commented 1 year ago

IMG_20230415_164950 大神们,我这个错误也是改dtb文件就行了吗?