Hi,
Actually i am new to this community. I have a imx 8m quad dev kit. I have succesfully flashed the image using uuu tool. I have applied uuu uuu.auto file. It flashed the kernel-5.10.72 image to board through emmc.
I have tried this link from yocto porting guide $ git clone https://source.codeaurora.org/external/imx/linux-imx. But there is no directory. Then i have downloaded manually and added my driver, device tree. Finally i have created the image, modules, dtbs using the make Image, make modules, make dtbs.
Now i am facing difficulties, how to flash this customized one, where we need to place the files.
Could you please direct me to the right direction?
Please share any related document.
Thanks.
Regards,
Kamalesh
Solved! Go to Solution.
Please refer to the patch I provided in my previous post.
Please continue to discuss the Linux driver porting problem in your new thread.
Thanks.
First of all, please deploy SD card with the following command.
$ sudo dd if=*.wic of=/dev/sdx bs=1M && sync
Please refer to the following procedure on your host PC to deploy your custom images.
1. Format partition 1 on the card as VFAT with this command:
$ sudo mkfs.vfat /dev/sdx1
2. Mount the formatted partition with this command:
$ mkdir mountpoint
$ sudo mount /dev/sdx1 mountpoint
3. Copy the Image and *.dtb files to the mountpoint by using cp. The device tree names should match the one used by the variable specified by U-Boot. Unmount the partition with this command:
$ sudo umount mountpoint
For Kernel module, please deploy them to rootfs partition.
$ mkdir /home/user/mountpoint
$ sudo mount /dev/sdx2 /home/user/mountpoint
$ cd /home/user/mountpoint
Then copy Kernel modules to folder lib/modules/6.12.3-lts-next-g24e49103b666/kernel/
Please refer to section "4.3.5 Copying the kernel image and DTB file" in https://www.nxp.com.cn/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf
If you are using emmc, you could did the above procedure on the target board.
Please use /dev/mmcblk0p1 to replace /dev/sdx1
Please use /dev/mmcblk0p2 to replace /dev/sdx2 in the above procedure.
As you mentioned previously, you have used UUU to program the pre-built .wic image to emmc on the target board. After booting up to Linux on the target board, you will find the following information after run command "fdisk -l" command.
Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x076c4a2a
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 16384 697957 681574 332.8M c W95 FAT32 (LBA)
/dev/mmcblk0p2 704512 19152713 18448202 8.8G 83 Linux
Hi,
I have checked in my imx8m quad dev kit. Two partition detected as your statement.
I have to do the all procedure in this development kit board right?
Regards,
kamalesh
You could deploy your custom images to emmc with the following procedure on the target board.
1. Mount the formatted partition with this command:
$ mkdir mnt
$ sudo mount /dev/mmcblk0p1 mnt
2. Copy the your Image and *.dtb files to the mnt folder by using cp. The device tree name should be same as the original. Unmount the partition with this command:
$ sudo umount mnt
For Kernel module, please deploy them to rootfs partition.
$ mkdir mnt
$ sudo mount /dev/mmcblk0p2 mnt
$ cd mnt
Then copy Kernel modules to folder lib/modules/*/kernel/
The SD card is just a good analogy to understand the situation on an eMMC. If you have a Linux PC and an SD card, you can program the SD card with the *.wic image like this:
$ sudo dd if=*.wic of=/dev/sdx bs=1M && sync
The wic file is a complete storage image, containg everything from the first to the last byte (a kind ISO file). So everything is written at once.
You can now inspect the structure and the content of the SD card on your Windows or Linux PC:
The boot image partition can be changed with low level utilities, the other two partitions have a file system (FAT and ext4) and can be changed easily form a Windows or Linux OS.
The same would apply to an eMMC if you would be able to connect it to a PC. It's fixed to the i.MX 8M Plus, so you can see the 8M Plus as the Linux PC which allows you to work on these three partitions. What I do for example:
You could do the same with the Linux kernel ( = Image).
Updating things in the root fs is working in the same way until you run out of space on the partition. For example if you wnat to have a test video in the home directory, take one from a PC and transfer it to the root fs using a USB stick.
In case you have no option to connect a USB stick, you could maybe realize a connection over ethernet.
Updating things on the first partition is more complicated, if you renew one of the components there (for example the LPDDR4 training firmware), then you need to re-package all involved components using the imx-mkimage utility.
Maybe you find one or the other interesting command in this article: https://www.emcraft.com/som/imx-8m/booting-linux-from-emmc
Regards,
Bernhard.
Would you please create a new thread to address your current problem?
Please describe your modification for Kernel and dts in details.
Please provide your Linux console log.
Yes, please also provide Linux Kernel booting up log.
What Linux driver do you use in your Kernel?
Would you please provide your Linux Kernel configuration file?
Have you add the device node in dts file?
Would you please describe your modification regarding Linux Kernel and dts in details?
Please build LT9211 driver into Linux Kernel rather than building it as a Kernel module.
In addition, please refer the this patch
If your problem persists, would you please create a new thread to discuss you Linux Kernel driver porting? It's not related with images deployment.
Hi,
Please find the attachment of kernel configuration file.
Thank you.
In Kernel configuration, please do the following modification, then rebuild Linux Kernel image.
CONFIG_VIDEO_LT9211C=m
=>
CONFIG_VIDEO_LT9211C=y
In your current environment, please try to insert Kernel module for LT9211C manually with "insmod *.ko".