7Ji / amlogic-s9xxx-archlinuxarm

ArchLinux ARM for Amlogic s9xxx tv box.
GNU General Public License v3.0
66 stars 10 forks source link

在emmc上安装系统后无限循环开机图片 #22

Closed planktonzp closed 6 months ago

planktonzp commented 6 months ago

设备: 斐讯n1 原系统: ophub发布的Armbian_24.5.0_amlogic_s905d_noble_6.1.87_server_2024.04.20

安装方式:

  1. u盘烧录最新img并创建了data分区存储rootfs.tar.gz
  2. mkfs.ext4 -m 0 /dev/mmcblk2p2 作为root分区 挂载到/mnt
  3. mkfs.vfat -F 32 /dev/mmcblk2p1 作为boot分区 挂载到/mnt/boot
  4. fdisk /dev/mmcblk2p1 修改分区type为EFI
  5. 解压rootfs到/mnt下
  6. 拷贝uboot+修改uEnv.txt+修改exlinux/exlinux.conf
  7. arch-chroot切换根目录后更新系统

解除挂载后重启,拔掉u盘,无限卡在开机图片上,不知道是那一步的问题

7Ji commented 6 months ago

串口看日志

planktonzp commented 6 months ago

串口看日志

我可以用u盘正常进入archlinuxarm 也可以安装armbian到emmc 这个是uboot的问题吗 还没用串口方式查看过.... 是否有相关的资料我先学一下

planktonzp commented 6 months ago

重装armbian到emmc可以正常启动 从u盘启动archlinuxarm也是正常的 仍然不能确认是哪一步骤的问题 armbian更新时选择了使用主线uboot armbian-install -m yes 从启动流程文章里看n1的引导应该是没有被破坏的 我是否需要提供其他内容来方便你确认问题?

希望得到回应 感谢

7Ji commented 6 months ago

发串口日志

No log, no problem

planktonzp commented 6 months ago

我手边并没有焊接工具 因此无法进行拆机并焊接串口查看日志 但是我重装我的系统到armbian 并且使用ampart查看了我的emmc分区内容如下

CLI interface: Mode is set to webreport
CLI interface: Operating on target file/block device '/dev/mmcblk2'
IO identify target type: '/dev/mmcblk2' is a block device, getting its size via ioctl
IO identify target type: size of '/dev/mmcblk2' is 7818182656
IO identify target type: Guessing content type by size
IO identify target type: Size larger than reserved partition, considering content full disk
IO identify target type: Getting content type via reading
IO identify target type: Content type full disk, as pure 0 in the header was found
IO identify target type: Read and Size results are the same, using any
IO identify target type: target is a block device with a size of 7818182656 bytes, and contains the content of full disk
CLI interface: Content type set as auto, will use the type identified earlier as type
CLI interface: Content auto identified as whole disk
CLI interface: Target is block device for a whole drive and we will try to re-read partitions after adjusting EPT
CLI describe options: mode webreport, operating on /dev/mmcblk2, content type disk, migration strategy: essential, dry run: no, reserved gap: 33554432 (32.000000M), generic gap: 8388608 (8.000000M), reserved offset: 37748736 (36.000000M), dtb offset: 4194304 (4.000000M)
IO seek DTB: Seeking to 41943040
DTB checksum: Calculated 2a32f989, Recorded 2a32f989
DTB read: Using first 256K in DTB partition
DTB identify type: DTB type invalid
DTB read partitions and report: Unrecognizable DTB, magic 71b104da. Maybe your DTB is encrypted? You can follow the method documented on my blog to try to decrypt it before using ampart: https://7ji.github.io/crack/2023/01/08/decrypt-aml-dtb.html
DTB read into buffer helper: Failed to identify DTB type
IO seek EPT: Seeking to 37748736
EPT report: 13 partitions in the table:
===================================================================================
ID| name            |          offset|(   human)|            size|(   human)| masks
-----------------------------------------------------------------------------------
 0: bootloader                      0 (   0.00B)           400000 (   4.00M)      0
    (GAP)                                                 2000000 (  32.00M)
 1: reserved                  2400000 (  36.00M)          4000000 (  64.00M)      0
    (GAP)                                                  800000 (   8.00M)
 2: cache                     6c00000 ( 108.00M)         20000000 ( 512.00M)      2
    (GAP)                                                  800000 (   8.00M)
 3: env                      27400000 ( 628.00M)           800000 (   8.00M)      0
    (GAP)                                                  800000 (   8.00M)
 4: logo                     28400000 ( 644.00M)          2000000 (  32.00M)      1
    (GAP)                                                  800000 (   8.00M)
 5: recovery                 2ac00000 ( 684.00M)          2000000 (  32.00M)      1
    (GAP)                                                  800000 (   8.00M)
 6: rsv                      2d400000 ( 724.00M)           800000 (   8.00M)      1
    (GAP)                                                  800000 (   8.00M)
 7: tee                      2e400000 ( 740.00M)           800000 (   8.00M)      1
    (GAP)                                                  800000 (   8.00M)
 8: crypt                    2f400000 ( 756.00M)          2000000 (  32.00M)      1
    (GAP)                                                  800000 (   8.00M)
 9: misc                     31c00000 ( 796.00M)          2000000 (  32.00M)      1
    (GAP)                                                  800000 (   8.00M)
10: boot                     34400000 ( 836.00M)          2000000 (  32.00M)      1
    (GAP)                                                  800000 (   8.00M)
11: system                   36c00000 ( 876.00M)         50000000 (   1.25G)      1
    (GAP)                                                  800000 (   8.00M)
12: data                     87400000 (   2.11G)        14ac00000 (   5.17G)      4
===================================================================================
EPT report: Minumum block in table: 0x400000, 4194304, 4.000000M
CLI dispatcher: Dispatch to mode webreport
CLI mode webreport: Print a URL that can be opened in browser to get well-formatted partitio info
CLI mode webreport: DTB not correct or invalid

这些信息是否能够作为参考 我在另一个问题中看到类似的内容#6

planktonzp commented 6 months ago

armbian在n1的emmc中运行正常 看起来是整个引导的流程存在问题 是否是某个autoscript脚本的偏移位需要调整或者确认 我看到了你的文章 但是其中只有一个我看不太懂的Bootloader引导顺序 我无法和我本地的n1进行比对 如何确认我的n1是原厂u-boot还是主线u-boot?

7Ji commented 6 months ago
DTB identify type: DTB type invalid
DTB read partitions and report: Unrecognizable DTB, magic 71b104da. Maybe your DTB is encrypted? You can follow the > method documented on my blog to try to decrypt it before using ampart: https://7ji.github.io/crack/2023/01/08/decrypt-aml-dtb.html
DTB read into buffer helper: Failed to identify DTB type

日志不是有报告问题以及怎么修?

7Ji commented 6 months ago

拷贝uboot+修改uEnv.txt+修改exlinux/exlinux.conf

https://github.com/7Ji/amlogic-s9xxx-archlinuxarm/blob/19fc9876ba2ed075924c2b472092c6598dfca5f0/booting/aml_autoscript.sh#L4

https://github.com/7Ji/amlogic-s9xxx-archlinuxarm/blob/19fc9876ba2ed075924c2b472092c6598dfca5f0/booting/emmc_autoscript.sh#L1

u-boot.emmc

planktonzp commented 6 months ago

感谢 我去试试