|
本帖最后由 比尔盖茨 于 2021-4-19 13:25 编辑
还以为变砖了,修改 /boot/uEnv.txt ,DTB改成千兆网卡,重启后进不去。搞了好久怀疑是无法写入EMMC数据,导致还是百兆网卡(而/boot/uEnv.txt 中改的是千兆网卡),X96 MAX+ 已经焊接了电阻。应该不是硬件问题。
当前刷的是57+,57+o都不行,获取不了IP,只能插U盘刷机时,调整成百兆网卡才进去,拔掉就不行了
root@OpenWrt:~# vim /boot/uEnv.txt
root@OpenWrt:~# dd if=/lib/u-boot/hk1box-bootloader.img of=/dev/mmcblk2 bs=1M
count=4 conv=fsync
4+0 records in
4+0 records out
root@OpenWrt:~# ./install-to-emmc.sh
/dev/mmcblk2
mmcblk2 : 31268536320 bytes
ROOTFS: sda2
BOOT: sda1
接下来的步骤将会覆盖 EMMC 的原始数据, 请确认是否要继续!
选择 y 开始安装到 EMMC, 请择 n 则退出 y/n [y]
-------------------
请选择 Amlogic S905X3 盒子型号:
1. X96-Max+ (4G DDR) 普通版 注意:将会强制刷入新的 bootloader!
2. X96-Max+ (4G DDR) 超频版 注意:将会强制刷入新的 bootloader!
3. HK1 Box (4G DDR) 普通版
4. HK1 Box (4G DDR) 超频版
5. H96 Max X3 (4G DDR) 普通版
6. H96 Max X3 (4G DDR) 超频版
0. 其它
-------------------
请选择: 1
备份原始 bootloader -> /root/bootloader_backup.img ... 4+0 records in
4+0 records out
完成
/mnt/mmcblk2p1
umount -f /mnt/mmcblk2p1
/mnt/mmcblk2p2
umount -f /mnt/mmcblk2p2
/mnt/mmcblk2p3
umount -f /mnt/mmcblk2p3
/mnt/mmcblk2p4
umount -f /mnt/mmcblk2p4
EMMC 上共有 4 个旧的分区会被删除
Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xfe8caec0.
Command (m for help): No partition is defined yet!
Command (m for help): 4: unknown command
Command (m for help): No partition is defined yet!
Command (m for help): 3: unknown command
Command (m for help): No partition is defined yet!
Command (m for help): 2: unknown command
Command (m for help): No partition is defined yet!
Command (m for help): Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (2048-61071359, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (139264-61071359, default 61071359):
Created a new partition 1 of type 'Linux' and of size 160 MiB.
Partition #1 contains a vfat signature.
Command (m for help): Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-61071359, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (466944-61071359, default 61071359):
Created a new partition 2 of type 'Linux' and of size 960 MiB.
Partition #2 contains a btrfs signature.
Command (m for help): Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p): Partition number (3,4, default 3): First sector (2048-61071359, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2764800-61071359, default 61071359):
Created a new partition 3 of type 'Linux' and of size 960 MiB.
Partition #3 contains a btrfs signature.
Command (m for help): Partition type
p primary (3 primary, 0 extended, 1 free)
e extended (container for logical partitions)
Select (default e):
Selected partition 4
First sector (2048-61071359, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (4730880-61071359, default 61071359):
Created a new partition 4 of type 'Linux' and of size 26.9 GiB.
Partition #4 contains a ext4 signature.
Command (m for help): Partition number (1-4, default 4): Hex code (type L to list all codes):
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.
Command (m for help): Partition number (1-4, default 4): Hex code (type L to list all codes):
Changed type of partition 'Linux' to 'Linux'.
Command (m for help): Partition number (1-4, default 4): Hex code (type L to list all codes):
Changed type of partition 'Linux' to 'Linux'.
Command (m for help): Partition number (1-4, default 4): Hex code (type L to list all codes):
Changed type of partition 'Linux' to 'Linux'.
Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
分区完成
1+0 records in
1+0 records out
1+0 records in
1+0 records out
1+0 records in
1+0 records out
1+0 records in
1+0 records out
----------------------------------------------------------------------
发现了可用的主线 bootloader (Mainline u-boot), 可以刷入 EMMC
好处是: 千兆网卡正常、HDMI颜色正常、启动速度快、且兼容所有版本的linux内核
坏处是:刷入后如果要还原成安卓固件的话,必须先还原安卓的 bootloader
或者只能用短接法刷回安卓固件
----------------------------------------------------------------------
请仔细阅读上述说明,然后选择是否把主线 bootloader 刷入 EMMC ? y/n y
************************************************************************
写入新的 bootloader ...
dd if=/lib/u-boot/x96maxplus-u-boot.bin.sd.bin of=/dev/mmcblk2 conv=fsync bs=1 count=444
444+0 records in
444+0 records out
dd if=/lib/u-boot/x96maxplus-u-boot.bin.sd.bin of=/dev/mmcblk2 conv=fsync bs=512 skip=1 seek=1
2185+1 records in
2185+1 records out
完成
************************************************************************
开始创建文件系统 ...
创建boot文件系统 ...
mkfs.fat 4.1 (2017-01-24)
创建 rootfs1 文件系统 ...
btrfs-progs v5.6
See http://btrfs.wiki.kernel.org for more information.
Label: EMMC_ROOTFS1
UUID: 70c7dc31-3c7d-480b-b09f-89c544f9211f
Node size: 16384
Sector size: 4096
Filesystem size: 960.00MiB
Block group profiles:
Data: single 8.00MiB
Metadata: single 8.00MiB
System: single 4.00MiB
SSD detected: yes
Incompat features: extref, skinny-metadata
Checksum: crc32c
Number of devices: 1
Devices:
ID SIZE PATH
1 960.00MiB /dev/mmcblk2p2
创建 rootfs2 文件系统 ...
btrfs-progs v5.6
See http://btrfs.wiki.kernel.org for more information.
Label: EMMC_ROOTFS2
UUID: c12a5e05-5523-40dc-8b7a-62d67592a605
Node size: 16384
Sector size: 4096
Filesystem size: 960.00MiB
Block group profiles:
Data: single 8.00MiB
Metadata: single 8.00MiB
System: single 4.00MiB
SSD detected: yes
Incompat features: extref, skinny-metadata
Checksum: crc32c
Number of devices: 1
Devices:
ID SIZE PATH
1 960.00MiB /dev/mmcblk2p3
等待 boot 文件系统挂载 ...
挂载成功
复制 boot ...done
Write uEnv.txt ... 完成.
完成
等待 rootfs 文件系统挂载 ...
挂载成功
创建文件夹 ... 完成
复制数据 ...
复制 root ... 完成
复制 etc ... 完成
复制 bin ... 完成
复制 sbin ... 完成
复制 lib ... 完成
复制 opt ... 完成
复制 usr ... 完成
复制 www ... 完成
复制完成
编辑配置文件 ... 完成
创建共享文件系统 ...
请选择共享文件系统的类型:
------------------------------------------
1. ext4 (默认的选项,适合一般用途)
2. btrfs (对 ssd/mmc 有一定优化,
可延长 ssd/mmc 使用寿命,
具有众多现代文件系统特性,
但速度稍慢)
3. f2fs (对 ssd/mmc 有专门的优化,
读写速度快,
且可延长 ssd/mmc 使用寿命,
但空间利用率稍低,
且兼容性稍差)
4. xfs (非常优秀的文件系统,ext4的替代品)
------------------------------------------
[1]
mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 7042560 4k blocks and 1761280 inodes
Filesystem UUID: 26766033-a781-48ab-988e-0ba16048312d
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
完成
注意:原版 bootloader 已导出到 /root/bootloader_backup.img , 请注意下载并保存!
所有步骤均已完成!
猴属性者: 请输入 reboot 命令重启动,然后迅速拔掉 SD卡或U盘 !
龟属性者: 请输入 poweroff 命令关机,拔除 SD卡或U盘 之后再开机 !
神属性者: 可以直接拔电!
root@OpenWrt:~# poweroff
请不要胡乱输入以及粘贴、复制等方式灌水
请尊重作者、并共同维护网站的正常阅读,否则账户将会被限制发帖、回帖,并且积分可能会被清零,站内短信以及阅读权限等都会受到影响,谢谢。
具体限制方式:https://www.right.com.cn/forum/thread-8307840-1-1.html
|
|