On Tue, Mar 9, 2021 at 4:35 PM Brian Hutchinson via lists.yoctoproject.org wrote: > > > On Tue, Mar 9, 2021 at 4:29 PM Peter Bergin > wrote: > >> Hi Brian, >> >> >> Reviving this issue again ... I noticed that I had to make my own >> fw_env.config file and copy it to etc. in a read/write rootfs for quick >> testing ... there is no fw_env.config sample provided by libubootenv that >> is placed in rootfs under /etc. I'm now generating a squashfs can can't do >> that hack so need to do it in recipe and looking at the recipes ... not >> 100% sure how to go about it. >> >> But shouldn't libubootenv put a example fw_env.config in /etc? I mean it >> won't work like it's supposed to without one. >> >> Regards, >> >> Brian >> >> it is quite useless for libubootenv (in oe-core) to put a general example >> in /etc as it is highly dependent of the target system and where u-boot >> environment is located. But in the BSP-layer(s) it could be good to have >> example files. There are in the meta-freescale-3rdparty for some boards >> already: >> >> meta-freescale-3rdparty$ find . -name fw_env.config >> ./recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config >> ./recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config >> ./recipes-bsp/u-boot/u-boot-toradex/fw_env.config >> ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config >> ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config >> ./recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config >> ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config >> ./recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config >> ./recipes-bsp/u-boot/u-boot-kontron/fw_env.config >> >> In u-boot there are around 10 options where to store the environment >> (EEPROM, ext4, FAT, flash memory, MMC......) and for some options eMMC for >> example there are several other options such as boot partition and address. >> This is a proof that it is best practice to create your own fw_env.config >> that fits your system and matches the u-boot configuration. >> >> Still no fw_env.config in meta-freescale for the boards defined there. I >> don't know why. Probably it could be feasible with some defaults there. As >> there are default configs for u-boot I guess a fw_env.config could be >> shipped matching that. But on the other hand there are no example images in >> poky or meta-freescale* that includes libubootenv so that can be a reason. >> >> Best regards, >> /Peter >> > > I'm about to scream. I can't figure out what I'm doing wrong. > > I made a libubootenv_%.bbappend with: > FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" > > SRC_URI_append += " file://fw_env.config" > > do_install_append() { > install -d ${D}${sysconfdir} > install -m 0644 ${WORKDIR}/fw_env.config > ${D}${sysconfdir}/fw_env.config > } > > FILES_${PN} += "${sysconfdir}/fw_env.config" > > ... and fw_env.conf is going to tmp/deploy/images/imx8mmevk instead of > inside my squashfs.wic file. > > Regards, > > Brian > > It actually looks like it's simpler than what I did for libubootenv_%.bbappend in last email ... since I'm using poky distro and it looks like u-boot-imx.bb is including that (recipies-bsp/u-boot/u-boot.inc), simply adding " SRC_URI += " file://fw_env.config" " is all that's needed (with a fw_env.config file in files dir of course) in u-boot-imx_2020.04.bb ... but again, I do a bitbake core-image-minimal and go look at tmp/deploy/images/imx8mmevk and the time date stamp on my core-image-minimal-imx8mmevk-squashfs has not changed but it has on a fw_env.config file sitting right in the directory ... which is not where I want it! It should be in the squashfs. -rw-r--r-- 2 hutch hutch 1895 Mar 9 15:31 core-image-minimal-imx8mmevk-20210309203126.rootfs.manifest -rw-r--r-- 2 hutch hutch 9613312 Mar 9 15:32 core-image-minimal-imx8mmevk-20210309203126.rootfs.squashfs -rw-r--r-- 2 hutch hutch 9201440 Mar 9 15:32 core-image-minimal-imx8mmevk-20210309203126.rootfs.tar.bz2 -rw-r--r-- 2 hutch hutch 532719 Mar 9 15:31 core-image-minimal-imx8mmevk-20210309203126.testdata.json lrwxrwxrwx 2 hutch hutch 59 Mar 9 15:31 core-image-minimal-imx8mmevk.manifest -> core-image-minimal-imx8mmevk-20210309203126.rootfs.manifest lrwxrwxrwx 2 hutch hutch 59 Mar 9 15:32 core-image-minimal-imx8mmevk.squashfs -> core-image-minimal-imx8mmevk-20210309203126.rootfs.squashfs -rw-r--r-- 1 hutch hutch 9605120 Mar 8 09:36 core-image-minimal-imx8mmevk.squashfs_keep lrwxrwxrwx 2 hutch hutch 58 Mar 9 15:32 core-image-minimal-imx8mmevk.tar.bz2 -> core-image-minimal-imx8mmevk-20210309203126.rootfs.tar.bz2 lrwxrwxrwx 2 hutch hutch 57 Mar 9 15:31 core-image-minimal-imx8mmevk.testdata.json -> core-image-minimal-imx8mmevk-20210309203126.testdata.json lrwxrwxrwx 2 hutch hutch 34 Mar 9 16:48 fw_env.config -> fw_env.config-imx8mmevk-2020.04-r0 lrwxrwxrwx 2 hutch hutch 34 Mar 9 16:48 fw_env.config-imx8mmevk -> fw_env.config-imx8mmevk-2020.04-r0 -rw-r--r-- 2 hutch hutch 2858 Mar 9 16:48 fw_env.config-imx8mmevk-2020.04-r0