mdt_debug write
Stephen Graf
stephen.graf at gmail.com
Thu Nov 30 02:13:42 CET 2023
Is the attached patch file going in the right direction?
On 2023-11-29 3:57 p.m., Andre Przywara wrote:
> Hi Stephen,
>
> On 28/11/2023 20:07, Stephen Graf wrote:
>> Below is the console log from trying to use mtd_debug write. It
>> returned immediately with a strange success message.
>>
>> root at orangepizero3:~# mtd_debug write /dev/mtd0 0 0xf0000
>> /home/sysadmin/u-boot-sunxi-with-spl.bin
>> file_to_flash: fread, size 0xf0000, n 0xf0000
>> fread(): Success
>
> interesting, I was under the impression that "mtd_debug write" would be
> the way to write to flash. In hindsight, the "debug" in that name should
> have probably put me off. Anyway, "cat" is probably not a good choice,
> "dd" is better, but it looks like "flashcp" (also part of mtdutils) is
> the go-to tool, since it does the required erasing automatically and
> also reportedly does some error detection. Can you please test this?
> # flashcp u-boot-sunxi-with-spl.bin /dev/mtd0
> I would test this on my end ASAP as well.
>
> Do you feel like sending a patch to the U-Boot documentation to get this
> changed then?
>
> Thanks,
> Andre
>
-------------- next part --------------
--- doc/board/allwinner/sunxi.rst 2023-11-28 21:31:06.844607403 -0800
+++ doc/board/allwinner/sunxi.rst_updated 2023-11-29 16:48:03.682352328 -0800
@@ -251,8 +251,7 @@
# apt-get install mtd-utils
# mtdinfo
- # mtd_debug erase /dev/mtdX 0 0xf0000
- # mtd_debug write /dev/mtdX 0 0xf0000 u-boot-sunxi-with-spl.bin
+ # flashcp -v u-boot-sunxi-with-spl.bin /dev/mtdX
``/dev/mtdX`` needs to be replaced with the respective device name, as listed
in the output of ``mtdinfo``.
More information about the U-Boot
mailing list