从树莓派带你掌握嵌入式linux产品实战开发-- 树莓派系统镜像制作(七)
从树莓派带你掌握嵌入式linux产品实战开发–树莓派系统镜像制作(七)
作者:伍俊伟 [email protected]
本文非作者授权,禁止转载
2020年8月22日
原文链接
文章目录
1、创建目录
mkdir makesystemimage
chmod 777 makesystemimage
cd makesystemimage
mkdir boot
mkdir rootfs
chmod 777 boot rootfs
将镜像文件2018-11-13-raspbian-stretch-full.img复制到makesystemimage目录
2、查看挂载偏移量
fdisk -l 2018-11-13-raspbian-stretch-full.img
3、挂载boot分区
mount -o loop,offset=$((8192*512)) 2018-11-13-raspbian-stretch-full.img ./boot
挂载成功后,就可以对boot分区的文件进行修改,然后执行sync命令保存
umount boot分区
umount ./boot
4、挂载rootfs分区
mount -o loop,offset=$((98304*512)) 2018-11-13-raspbian-stretch-full.img ./rootfs
挂载成功后,就可以对boot分区的文件进行修改,然后执行sync命令保存
umount rootfs分区
umount ./rootfs
镜像制作完后,我们就可以烧录到启动盘了
设备评估板链接
视频课程与图片教程同步更新
《从树莓派带你掌握嵌入式linux产品实战开发》视频课程:
https://edu.****.net/course/detail/30448/442897
本课程高级技术交流Q群:91165448(此群需要作者拉进群)