customize-outside-adk.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. // -*- mode:doc -*- ;
  2. [[outside-adk-custom]]
  3. Keeping customizations outside OpenADK
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. The OpenADK project recommends and encourages upstreaming to the
  6. official OpenADK version the packages and board support that are
  7. written by developers. However, it is sometimes not possible or
  8. desirable because some of these packages or board support are highly
  9. specific or proprietary.
  10. In this case, OpenADK users are offered following choice using
  11. here own git repository.
  12. * Initialize your project
  13. Personalize your Git environment via:
  14. ---------------------
  15. $ git config --global user.name "Waldemar Brodkorb"
  16. $ git config --global user.email wbx@openadk.org
  17. ---------------------
  18. Get the latest version of OpenADK via anonymous git:
  19. ---------------------
  20. $ git clone --bare git://openadk.org/git/openadk myadk.git
  21. ---------------------
  22. Use git-daemon to make the repository public to your developers. After that clone your new shared project repository:
  23. ---------------------
  24. $ git clone git+ssh://myserver.com/git/myadk.git
  25. $ cd myadk
  26. ---------------------
  27. Configure OpenADK remote git repository:
  28. ---------------------
  29. $ git remote add openadk git://openadk.org/git/openadk
  30. ---------------------
  31. * Create your firmware
  32. Now you can either start with the latest version or use some older version:
  33. ---------------------
  34. $ git checkout -b stable_1_0 $sha1
  35. ---------------------
  36. You can find $sha1 via git log. $sha1 is the hash after the keyword “commit”.
  37. Now build a firmware image for your target and test it. Fix bugs in the build
  38. environment or add new stuff. You can use the “extra” directory to add local
  39. unpackaged binaries and/or configuration files to overwrite packaged stuff.
  40. Check your uncommitted changes:
  41. ---------------------
  42. $ git status
  43. $ git diff --cached
  44. $ git diff
  45. ---------------------
  46. Commit your git-added changes:
  47. ---------------------
  48. $ git commit
  49. ---------------------
  50. Or just commit all changes:
  51. ---------------------
  52. $ git commit -a
  53. ---------------------
  54. It is a good style to make a lot of small atomic commits.
  55. Push your changes back to your git repository.
  56. For new local branches:
  57. ---------------------
  58. $ git push origin stable_1_0
  59. ---------------------
  60. Or in regulary usage via:
  61. ---------------------
  62. $ git push
  63. ---------------------
  64. * Working together with OpenADK
  65. You can generate patches from all your changes against the remote master:
  66. ---------------------
  67. $ git format-patch -s origin
  68. ---------------------
  69. Send all relevant patches to OpenADK author via eMail.
  70. Update your master with changes from OpenADK:
  71. ---------------------
  72. $ git checkout master
  73. $ git pull openadk master
  74. ---------------------
  75. If you want you can merge all changes to your branch:
  76. ---------------------
  77. $ git checkout stable_1_0
  78. $ git merge master
  79. ---------------------
  80. Or just cherry-pick some of the commits:
  81. ---------------------
  82. $ git cherry-pick $sha1
  83. ---------------------
  84. * Releasing
  85. Tag your tested stable branch:
  86. ---------------------
  87. $ git tag -a stable_1.0
  88. ---------------------
  89. Push your tag to your repository:
  90. ---------------------
  91. $ git push origin stable_1.0
  92. ---------------------
  93. Checkout your tag and build your firmware:
  94. ---------------------
  95. $ git clone git+ssh://myserver.com/git/myadk.git mytag
  96. $ cd mytag
  97. $ git checkout stable_1.0
  98. ---------------------
  99. * Deleting unused branches
  100. Deleting branches remotely:
  101. ---------------------
  102. $ git branch -r
  103. $ git push origin :branchname
  104. ---------------------
  105. Deleting branches locally:
  106. ---------------------
  107. $ git branch
  108. $ git branch -D branchname
  109. ---------------------