3. yocto构建 imx8Mmini 镜像¶
关键词: yocto 构建 imx8mmini官方镜像
主要内容:
文档参考:
最新文档 https://taotaodiy-yocto.readthedocs.io/en/latest/yocto/project-imx8Mmini.html
3.1. 更新repo工具¶
mkdir ~/bin (this step may not be needed if the bin folder already exists) curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo export PATH=~/bin:$PATH
3.2. yocto 构建¶
$ mkdir imx-yocto-bsp $ cd imx-yocto-bsp $ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.47-2.2.0.xml $ repo sync 以上步骤,生成的文件夹在服务器/home/yening/ebf_repo/imx-yocto-bsp路径下
$DISTRO=fsl-imx-wayland MACHINE=imx8mmevk source imx-setup-release.sh -b imx8mmevk_wayland $bitbake fsl-image-validation-imx
3.2.1. 问题1¶
如何烧录
uuu 工具
uuu -b emmc bootloader Write bootloader to emmc uuu -b emmc_all bootloader rootfs.sdcard Write rootfs to emmc uuu -b emmc_all bootloader rootfs.sdcard.bz2/* Decompress rootfs and write - rootfs to emmc uuu -b sd bootloader Write bootloader to sd card uuu -b sd_all bootloader rootfs.sdcard Write rootfs to sd card uuu -b sd_all bootloader rootfs.sdcard.bz2/* Decompress rootfs and write - rootfs to sd card uuu -b qspi qspi_bootloader write bootloader to qspi uuu -b qspi qspi_bootloader m4image write m4image to qpsi uuu -b spl bootloader Download SPL and uboot
uuu -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk-20210709022132.rootfs.wic.bz2
uuu -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk imx-image-core-lubancat-8mini-20210710060704.rootfs.wic.bz2
uuu -b emmc_all imx-boot-lubancat-8mini-sd.bin-flash_evk imx-image-core-lubancat-8mini-20210710060704.rootfs.wic.bz2
3.2.2. 问题2¶
ERROR: No space left on device or exceeds fs.inotify.max_user_watches?
inode 用光了
vim /etc/sysctl.conf 添加下面参数 #Inotify监听文件数达到上限 fs.inotify.max_user_watches = 99999999
立即生效 sysctl -p /etc/sysctl.conf
3.2.3. 问题3¶
单独编译u-boot
cd imx-yocto-bsp source setup-environment build-xwayland bitbake -c cleansstate u-boot bitbake -c compile u-boot -f bitbake -c deploy u-boot bitbake imx-image-full
imx8Mmini/imx-yocto-bsp/imx8mmevk_wayland/tmp/deploy/images/imx8mmevk/imx-boot 快捷方式 指向 下面的文件 imx-yocto-bsp/imx8mmevk_wayland/tmp/deploy/images/imx8mmevk/imx-boot-imx8mmevk-sd.bin-flash_evk
使用UUU工具烧录
3.3. yocto 修改¶
添加层 meta-ebf 由 imx-yocto-bsp/sources/meta-imx 复制得到
添加 脚本 ebf-setup-release.sh
添加硬件 lubancat-6ul lubancat-8mini imx-yocto-bsp/sources/meta-lubancat/meta-bsp/conf/machine/lubancat-6ul imx-yocto-bsp/sources/meta-lubancat/meta-bsp/conf/machine/lubancat-8mini
添加镜像 imx-yocto-bsp/sources/meta-lubancat/meta-sdk/recipes-fsl/images/lubancat-carp-console.bb imx-yocto-bsp/sources/meta-lubancat/meta-sdk/recipes-fsl/images/lubancat-carp-qt.bb
DISTRO=fsl-imx-wayland MACHINE=lubancat-8mini source lubancat-setup-release.sh -b lubancat_8mini_wayland DISTRO=fsl-imx-wayland MACHINE=lubancat-8mini source lubancat-setup-release.sh -b lubancat_8mini_linuxfb DISTRO=fsl-imx-wayland MACHINE=lubancat-8mini source lubancat-setup-release.sh -b lubancat_8mini_eglfs
bitbake lubancat-yocto-console bitbake lubancat-yocto-qt