This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359: Unable to load DTB file using flashcp command

Part Number: AM3359

Tool/software:

In our custom hardware based on the am3359 (SDK version: 4.19.59 for Linux).

The following table outlines the details of the flash partitions.

Flash Used Partition Number Partition Name Size (MB) Size (KB)
NOR 0 SPI_NOR.fpga_img 15 0
1 SPI_NOR.test_part 16 0
NAND 2 MLO 0 128
3 Uboot 1 0
4 Uboot env 0 256
5 Uboot redundant env 0 256
6 User DTS 0 256
7 User Kernel 32 0
8 User RootFS 96 0
9 Reserved 8 0
10 Golden DTS 0 256
11 Golden Kernel 32 0
12 Golden RootFS 84 0
13 Test Partition 1 0

When I run the flashcp command for zImage and rootFS, it operates as expected.

Additionally, the FPGA bin file is also being updated, which is present in the NOR flash.

However, when I attempt to use flashcp for the DTB file, the following errors occur.

root@RCU:~#
root@RCU:~# tftp -g 169.254.117.143 -r zImage
root@RCU:~# flashcp -v zImage /dev/mtd7
Erasing blocks: 130/130 (100%)
Writing data: 16516k/16516k (100%)
Verifying data: 16516k/16516k (100%)
root@RCU:~# tftp -g 169.254.117.143 -r my_am33xx.dtb
root@RCU:~# flashcp -v my_am33xx.dtb /dev/mtd6
Erasing blocks: 1/1 (100%)
Writing data: 35k/35k (100%)
While writing data to 0x001A0000-0x001DFFFF on /dev/mtd6: Invalid argument

Note: Everything is functioning correctly. I am able to flash all the files at uboot. All functionalities are operating as expected. However, the flashcp is not working for the dtb file.

I would appreciate your assistance in resolving this issue.

Thank you...

  • Hi Madhan,

    SDK 4.19 (6.3) is very old and no longer support supported on this forum.

    You might want to get the mtdutil source code for the version used in SDK6.3 and debug the flashcp program to understand what causes the "Invalid argument" problem.

  • Hi Bin,

    Could you please tell me the reason for this error?
    It is functioning with other images, but not with DTB.
    Does the partition size have any significance in this context?

  • Hi Madhan,

    I don't know the reason. That is why I asked you to debug it.

    I didn't use flashcp and I am not aware of anyone else used it. Typically kernel zImage and dtb files are stored within the Linux rootfs. But you seem to store them in raw format in their dedicated partitions, I am not aware of anyone else did similar design either, so I am not sure what caused the error in this scenario.