In the i.MX Yocto Project User's guide I only see SD images mentioned. Is there an easy way to get an image for uuu to write via USB to the NAND?
解決済! 解決策の投稿を見る。
So digging further, I decided to dump the u-boot image and look at U-Boot environment. I finally found this in my source for my build which says to me that we are using five MTD partitions:
https://source.codeaurora.org/external/imx/uboot-imx/tree/include/configs/mx6ul_14x14_evk.h?h=imx_v2...
So the first partition is U-Boot, the 2nd is the kernel, the 3rd is the device tree, the 4th is opt-tee, and the 5th/remainder is root.
So the kernel is a zImage (image=zImage),which says we are not using uImages.
I finally found this, which I think is related to what I am trying to do:
I have a flash with a page size of 4096 bytes + 256 byte OOB.
It is single level cell (SLC).
The erase size is 64 pages. I am assuming -p option includes the OOB.
UBOOT_CONFIG = "nand"
IMAGE_FSTYPES = "tar.gz ubi"
MKUBIFS_ARGS = "-m 4096 -e 262144 -c 1000"
UBINIZE_ARGS = "-p 278528 -m 4096 -s 4096"
I seem to have the output files I need:
imx-image-core-imx6ull14x14evk-20201222170355.rootfs.ubi
imx-image-core-imx6ull14x14evk-20201222170355.rootfs.ubifs
and U-Boot:
u-boot-nand-2020.04-r0.imx
So do I need to combine the two images together for UUU somehow? I suppose I should see how U-Boot is configured, and where it will look for the root file system and kernel.
So digging further, I decided to dump the u-boot image and look at U-Boot environment. I finally found this in my source for my build which says to me that we are using five MTD partitions:
https://source.codeaurora.org/external/imx/uboot-imx/tree/include/configs/mx6ul_14x14_evk.h?h=imx_v2...
So the first partition is U-Boot, the 2nd is the kernel, the 3rd is the device tree, the 4th is opt-tee, and the 5th/remainder is root.
So the kernel is a zImage (image=zImage),which says we are not using uImages.
I have board MCIMX6ULL-EVK which supports NAND boot. I was able to adjust the U-Boot and Kernel builds to use the correct device trees and configuration files for NAND boot, but the Yocto build was still making the SD card image. U-boot.imx is fine, but how to get the uImage build and mkfs.ubifs working. I really need Yocto images to work, since we will be making changes for our final board. I was hoping for changes either to conf/machine, or local.conf to make the correct images.
Hi,
after compilation is done, you can get imx6ul-14x14-evk-gpmi-weim.dtb file. so you can use it.
[note]
L4.1.4x BSP or upper version, MLC NAND is not supported by ubi file system. Only SLC NAND can be used. so please pay attention to this.
Have a nice day!
B.R,
weidong
Hello JohnKlug,
Actually, whether supporting NAND image is determined by the EVK board you are using. If the EVK you are using supports NAND FLASH, what you need to do is to change bootloader and kernel deivce tree in DEMO IMAGE.
For example, IMX8MMD4-EVK supports DDR4 + NAND Flash, you can follow these steps:
1. Downloading DEMO images from our website, and decompress it on windows.
2. compiling bootloader of IMX8MMD4-EVK, and get it's booloader(flash.bin)
3. compiling kernel, get the dtb file with NAND of iMX8MMD4-EVK,
4. copy flash.bin and kernel dtb file with NAND to DEMO IMAGE directory.
5. using demo_image/samples/example_kernel_nand.uuu
you can edit example_kernel_nand.uuu file , change images' name to yours.
6. using the comand to program images into flash on board.
> uuu example_kernel_nand.uuu
[in addition]
you can also setup the Yocto environment of linux bsp according to the steps in i.MX_Yocto_Project_User's_Guide.pdf on ubuntu platform, and compile related images of EVK to get images that supports NAND flash.
Hope this information is helpful to you.
Have a nice day!
B.R,
weidong
I mentioned in my prior post that I was able to modify the configuration for building ubifs images. I am building imx6ull14x14evk with nand (GPMI).
I have no idea where to look for sample images. I have an SD card that came with my MCIMX6ULL-EVK. I have built new images from Yocto using SD options, and it works, but I am interested in raw NAND.
Where is the device tree placed? I suppose I need to research the build steps and logs to see if the kernel image includes a device tree in the reference design. I looked at the SD card, and /boot has only the kernel image, no device tree.
I see this in the UUU PDF:
Burn Image into Nand flash | uboot(1), linux kernel\initramfs\uboot\dtb |
I looked here, and found no .uuu files at all (not sure where to look):
git clone https://github.com/NXPmicro/mfgtools.git
So how following the reference design do I create the kernel+initramfs+uboot+dtb image?
Is that done with Yocto?
Here are some of the images in my built/tmp/deploy/images/:
imx-image-core-imx6ull14x14evk-20201222170355.rootfs.ubi
imx-image-core-imx6ull14x14evk-20201222170355.rootfs.ubifs
mtcap3-imx6ull14x14evk.dtb
u-boot-nand-2020.04-r0.imx
The zImage is in /boot directory according to the file imx-image-core-imx6ull14x14evk-20201222170355.rootfs.tar.gz.