# build_sd_img **Repository Path**: LubanCat/build_sd_img ## Basic Information - **Project Name**: build_sd_img - **Description**: 此仓库为适用6ULL和MP157开发板的镜像 https://doc.embedfire.com/lubancat/build_and_deploy/zh/latest/building_image/build_sd_img/build_sd_img.html - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-03-15 - **Last Updated**: 2025-03-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 此仓库为适用6ULL和MP157开发板的镜像 https://doc.embedfire.com/lubancat/build_and_deploy/zh/latest/building_image/build_sd_img/build_sd_img.html 生成SD卡镜像 默认./all下为野火2022-12-24的镜像组件,如果需要修改可以根据以下进行修改。 1.修改rootfs ./all/rootfs下默认是没有内容的,需要把自己的rootfs解压到./all/rootfs目录,或者将野火官方的带qt的文件系统解压到./all/rootfs下,野火官方的文件系统可以从网盘 i.MX6ULL系列\3-Debian镜像\ebf_debian_2022_12_24\usb烧录文件\mfgtools-release\Profiles\Linux\OS Firmware\release中获取console-armhf-rootfs-lubancat-buster.tar为纯净版文件系统,qt-armhf-rootfs-lubancat-buster.tar为带qt的文件系统,解压到./all/rootfs下即可 2.修改kernel 把生成的zImage拷贝到./all/boot/kernel文件夹下更名替换vmlinuz-4.19.35-imx6,注意boot文件夹不能超过40M 3.修改uboot 把生成的u-boot-dtb.imx更名替换./all/uboot/目录下的u-boot-mmc.imx,注意编译时需要选择mmc版的uboot配置文件编译 4.修改设备树 把生成的设备树imx6ull-mmc-npi.dtb替换.all/rootfs/usr/lib/linux-image-4.19.35-imx6/imx6ull-mmc-npi.dtb 5.修改设备树插件 把生成的设备树插件xxx.dtbo添加或替换.all/rootfs/usr/lib/linux-image-4.19.35-imx6/overlays/下,并在./all/boot/uEnv.txt进行相应的修改 构建: 执行sudo ./build_sd_img.sh 8 构建SD卡镜像 参数8为内存卡大小为8G,同时也为镜像内可用大小,但总大小最小要求为rootfs文件夹的大小+40M 参数也可以为小数,比如0.5,即打包500M大小的镜像 构建前请确认./all/rootfs目录已经放了文件系统,参考以上 1.修改rootfs 确认。