Hi all,
I am playing rauc to update my rootfs on imx8mq maaxboard,
I need an additional rootfs im image to burn SD card. but I do not know how to write the .wks file.
Do you know where is the default wks file for imx8mq ? so I can add an additional partition to write the additional rootfs. I can not find it in the yocto source code
I can build my rauc in my yocto.
Thank you very much.
I have found someone mention the wks file at here, but it shows the wks not work .
https://community.nxp.com/t5/i-MX-Processors/Bitbake-after-add-RAUC-not-work-IMX8MN/m-p/1309665
I need the optee function ,so my uboot is SPL (I think, so I think I can not directly use it)
therefore, I want to know where is the default default wks file for imx8mq? I can modify it if I know
I add the IMAGE_FSTYPES = "tar.bz2 ext4 wic.gz wic.bz2 wic.map sdcard.bz2" in "imx/meta-sdk/conf/distro/include/fsl-imx-base.inc" I get the similar error to here (someone posted : https://community.nxp.com/t5/i-MX-Processors/Error-when-building-Yocto-Sumo-with-Bitbake/m-p/879773
/home/yocto/yocto/source/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'wic.map' - possibly invalid type name or missing support class
ERROR: /home/yocto/yocto/source/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'wic.map' - possibly invalid type name or missing support class
ERROR: /home/yocto/yocto/source/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-validation-imx.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'wic.map' - possibly invalid type name or missing support class
ERROR: /home/yocto/yocto/source/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-gui.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'wic.map' - possibly invalid type name or missing support class
I am using yocto sumo, L4.14.98-2.0.0_ga
Hi all.
I modified file ./imx-yocto-bsp/sources/meta-freescale/wicimx-uboot-spl-bootpart.wks as below in yocto sumo source code, can add WKS_FILE="imx-uboot-spl-bootpart.wks" in local.conf.
but after bitbake fsl-image-validation-imx to build the image , there is no additional rootfs partition in sdcard.
it seems the bitbake do not use the file: WKS_FILE="imx-uboot-spl-bootpart.wks". because I put a wrong file name (eg:imx-uboot-spl-bootpart.wks.in), bitbake still can build, no error to show that the file imx-uboot-spl-bootpart.wks.in is not found).
any help? how can I add or modify the WKS file?
Thank you.
Thank you very much.
I have read the doc you posted. it's useful for me. but it's for only linux guide. not the yocto guide .
I am using the yocto L4.14.98-2.0.0_ga . after build, it will generate rootfs.sdcard.bz2. image.
I think I need to generate rootfs.wic.bz2 code so that the bitbake can use wks file.
now if it generates rootfs.sdcard.bz2, the yocto bitbake can not enable wks function and can not read the wks file , right?
hi @jimmychan
and all,
Thank you very much for you reply so soon.
firstly, I can not change newer version, I have to use L4.14.98-2.0.0_ga . because our colleagues node code can not work well in newer version. there are a lots work to do.
yes ,I found the files are in the folder imx-yocto-bsp/build-xwayland/tmp/deploy/images/imx8mqevk/
but I am not sure what exactly files will be written in to Sd card. especially what is the u-boot files will be written in to Sd card?
let me describe more detail about my situations:
I need rauc , so I need .wks file to add additional roofts . so I add the following file in local config file:
WKS_FILE="imx-uboot-spl-bootpart.wks"
IMAGE_BOOT_FILES = "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin em-sbc-imx8m.dtb Image"
IMAGE_FSTYPES_append = " wic"
UBOOT_CONFIG_append = " wic"
SOC_DEFAULT_IMAGE_FSTYPES_append = " wic"
--
after that: it can build rootfs.wic.bz2 image with an additional rootfs to burn SD card (not the default rootfs.sdcard.bz2) and it can read *wic while building.
as I mentioned before ,I used optee, so I not sure sure I will use which .wks file ,
there are two wks files at meta-freescale/wic/imx-uboot-spl-bootpart.wks
# The disk layout used is:
# - ----- --------- -------------- --------------
# | | SPL | u-boot | boot | rootfs |
# - ----- --------- -------------- --------------
# ^ ^ ^ ^ ^
# | | | | |
# 0 1kiB 69kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
#
part SPL --source rawcopy --sourceparams="file=u-boot-spl.bin" --ondisk mmcblk --no-table --align 1
part u-boot --source rawcopy --sourceparams="file=imx-boot-imx8mqevk-sd.bin-flash_ddr4_em" --ondisk mmcblk --no-table --align 69
part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root_A --align 4096 --overhead-factor 1
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root_B --align 4096 --overhead-factor 1
bootloader --ptable msdos
and file:
imx-uboot-spl-bootpart.wks
# The disk layout used is:
# - --------- -------------- --------------
# | | u-boot | boot | rootfs |
# - --------- -------------- --------------
# ^ ^ ^ ^
# | | | |
# 0 1kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
#
part u-boot --source rawcopy --sourceparams="imx-boot-imx8mqevk-sd.bin-flash_ddr4_em" --ondisk mmcblk --no-table --align 1
part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root_A --align 4096
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root_B --align 4096
bootloader --ptable msdos
----
so my qestions are:
1. at line :bootloader --ptable msdos . the bootloader is msdos will be written into SD card? right? I do not need to modify it?
2. part /boot will read "IMAGE_BOOT_FILES = xxxx" in local.conf. I write the files name there. after burning sdcard. the files are boot partition that are same as rootfs.scard,bz2. I think it correct. it includes Kernel image, dtb ...
3. the most important Qz: what is the u-boot file ?. I read your kernal guide. it should be flash.bin, in the folder tmp/deploy/images/imx8mqevk/, there is no flash.bin. it seems changes name to imx-boot-imx8mqevk-sd.bin-flash_ddr4_em ? (I find they are same size, because I added maaxboard in imx8mqevk- and changed imx8mqevk.conf line :#IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
IMXBOOT_TARGETS = "flash_ddr4_em" ), so it seems it's the correct u-boot file that finally be written into sdcard? right?
tmp/deploy/images/imx8mqevk$ ls imx-boot* -l
imx-boot-imx8mqevk-sd.bin -> imx-boot-imx8mqevk-sd.bin-flash_ddr4_em
imx-boot-imx8mqevk-sd.bin-flash_ddr4_em
....
3. if I use imx-uboot-spl-bootpart.wks , so I need to add u-boot-spl.bin ? right?
or imx-boot-imx8mqevk-sd.bin-flash_ddr4_em always includes u-boot-spl.bin? and DO NOT need u-boot-spl.bin? I am not clear. it seems imx-boot-imx8mqevk-sd.bin-flash_ddr4_em always includes u-boot-spl.bin from the kernal guide and mkimage in yocto?
Thank you very much.
hi all
I can not boot the board with both imx-uboot-spl-bootpart.wks and imx-uboot-bootpart.wks
I think my sdcard file structure(partition) is wrong. or the u-boot file is not correct.
any help?
hi
I make sure th u-boot image is imx-boot-imx8mqevk-sd.bin-flash_ddr4_em
(I tested in rootfs.sdcard.bz2,if I remove this file imx-boot-imx8mqevk-sd.bin-flash_ddr4_em ->imx-boot-imx8mqevk-sd.bin, can not build rootfs.sdcard.bz2 successfully, it shows can not find imx-boot-imx8mqevk-sd.bin) ,so my u-boot file is correct!
but why I use wks to build rootfs.wic.bz2 image. it can not boot up the board?
so the below line in wks is wrong :
part u-boot --source rawcopy --sourceparams="imx-boot-imx8mqevk-sd.bin-flash_ddr4_em" --ondisk mmcblk --no-table --align 1
do I need to change to align 0?
let me try.
any help?
Thank you
Hi @jimmychan
and all
I read the kernel guide , how to write u-boot to SD card,
the command is
sudo dd if=imx-boot-imx8mqevk-sd.bin-flash_ddr4_em of=/dev/sdb bs=1k seek=33 conv=fsync
there is 33 for option seek, does it mean the data will write on the sd card from 33 *1024(33K) not from postion 0 ,right?
it works. when I use the command line.
so do I need change the wks file align to 33 ? right?
part u-boot --source rawcopy --sourceparams="imx-boot-imx8mqevk-sd.bin-flash_ddr4_em" --ondisk mmcblk --no-table --align 33 # not default 1 ??????
let me try.
any help?
hi @jimmychan
and all
finally, my u-boot code works!
need change align to 33 in wks file as below:
part u-boot --source rawcopy --sourceparams="imx-boot-imx8mqevk-sd.bin-flash_ddr4_em" --ondisk mmcblk --no-table --align 33
finished the first setp for rauc
Thank you
hi
I have more question about rauc and u-boot-fw-utils(fw_printenv, fw_setenv), I post here
please have a look.
Thank you.