Hi Stephen,

On 30/11/2023 01:13, Stephen Graf wrote:
Is the attached patch file going in the right direction?

yes, thanks, the change itself looks alright, but it needs to be:
- in a separate email, with a descriptive subject, prefixed by [PATCH]
- have the diff inline, not as an attachment (to allow easy commenting in an email thread) - have a Signed-off-by: tag with your name and email address. This is to signify that the change is an original one made by you and you are happy to submit this under the (GPL) license conditions. - an explanation *why* this change is required (mtd_debug write being not reliable, etc)
- sent to the U-Boot list and the maintainer (me)

Look at the U-Boot mailing list (archive) for examples.
"git format-patch" creates everything in the right format (mbox), and "git send-email" will send this via an SMTP server you point it to. Or you import this into your client.

If you could try this (with the Signed-off-by being the most important change), I am happy to submit this with the next push.

Thanks,
Andre


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@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

Reply via email to