Skip to contentSkip to conversation

How to submit a U-Boot patch

U-Boot-Users Jarrod Wood 3 participants 3 messages Jun 21, 2006

lore
Share & tools
lore
#0 lore raw

Hello all,

I have modified a function in the U-Boot source code and would like to contribute it back. However, I have never submitted a patch before and therefore unfamiliar with the process. I have read the README file which gives some details about verifying the patch works with all boards, but seems to lack details about where and how to create and submit the patch.

I have modified the common/cmd_elf.c:load_elf_image function to support loading ELF images via reading the program headers instead of the section headers, which according to the TIS ELF standard is the correct method. This was modified due to errors loading various ELF images such as the INTEGRITY RTOS. In addition, the current version also does not check to see if the ELF headers will be overwritten when the program sections are extracted, resulting in a machine check when reading the next section. The modified version moves the ELF image out of the way.

I believe these changes would be valuable to others and any information on how to submit these would be appreciated.

Best Regards,

Jarrod Wood
Sandia National Laboratories

#1 lore raw
Quoted 7 lines · In message <[email protected]> you…

I have modified a function in the U-Boot source code and would like to contribute it back. However, I have never submitted a patch before and therefore unfamiliar with the process. I have read the README file which gives some details about verifying the patch works with all boards, but seems to lack details about where and how to create and submit the patch.

Which exact part of the README, section "Submitting Patches" was not clear enough?

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Chapter 1 -- The story so  far:
In the beginning the Universe was created. This has  made  a  lot  of
people very angry and been widely regarded as a bad move.
#2 lore raw
In reply to Jarrod Wood

Jarrod,

Quoted 5 lines · Jarrod Wood

However, I have never submitted a patch before and
therefore unfamiliar with the process. I have read the README file which gives some details about verifying the patch works with all boards, but seems to lack details about where and how to create and submit the patch.

I'm no expert, and fully expect to be called on this, but anyway...

The first thing to do is make sure you have the latest source from the git repository. Here's how:

http://www.denx.de/en/Software/GIT

Now, make your changes, additions, etc.
If you're adding new files, you need to add them to your local repository with:

git-add <file name>

Then commit all changes:

git-commit -a

Then create the patch file

git-diff master^ > <patch file>

The README is pretty clear on submitting the patch, but I do see people doing two things that aren't mentioned:

1. put [PATCH] in the subject
2. Send e-mail to u-boot-patches at denx.de in addition to this mailing list. I'm guessing that this automatically enters the submission into the shiny new patch tracking system, since such submissions are always followed by an automatically generated [DNX...] e-mail. I don't know if this system is still in the testing phase or whether it's available for widespread use. *** SOMEBODY PLEASE CLARIFY ***. It's quite possible that this is all on the denx.de TWIKI and I'll be told to RTFM, but if so it's not obvious.

Hope this helps.

regards,
Ben