| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 
 | # 修改引导分区相关配置cat > ${BOOT_PATH}/armbianEnv.txt <<EOF
 verbosity=7
 bootlogo=false
 fdtfile=rockchip/rk3588-hlink-h88k-v3.dtb
 rootdev=UUID=${ROOTFS_UUID}
 rootfstype=ext4
 rootflags=
 console=serial
 consoleargs=console=ttyFIQ0 console=tty1
 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
 earlycon=on
 docker_optimizations=on
 extraargs=
 extraboardargs=net.ifnames=0
 overlay_prefix=rk3588
 overlays=
 user_overlays=
 EOF
 
 
 # 配置开机挂载。二次运行需要blkid才能查看正确的UUID
 cat >> ${ROOT_PATH}/etc/fstab <<EOF
 UUID=${BOOTFS_UUID} /boot ext4 noatime,errors=remount-ro 0 2
 UUID=${ROOTFS_UUID} / ext4 defaults,noatime,commit=600,errors=remount-ro 0 1
 EOF
 
 
 # 写入 u-boot 到磁盘镜像,rockchip的bootloader统一从硬盘的第65个扇区开始至16MB这个范围
 wget https://github.com/unifreq/openwrt_packit/raw/master/files/rk3588/h88k/rk3588-h88k-bootloader.bin
 wget https://github.com/unifreq/openwrt_packit/raw/master/files/bootfiles/rockchip/rk3588/h88k-v3/boot.scr
 dd if=rk3588-h88k-bootloader.bin of=/dev/loop0 conv=fsync,notrunc bs=512 skip=64 seek=64
 cp boot.scr ${BOOTFS_UUID}/
 
 
 # 卸载镜像,如果target is busy则lsof查看是谁占用,然后杀了即可
 losetup -D
 lsof | grep ${BOOT_PATH}
 lsof | grep ${ROOT_PATH}
 kill 14897
 
 umount /dev/loop0p1
 umount /dev/loop0p2
 
 
 |