123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- // -*- mode:doc -*- ;
- [[outside-adk-custom]]
- Keeping customizations outside OpenADK
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The OpenADK project recommends and encourages upstreaming to the
- official OpenADK version the packages and board support that are
- written by developers. However, it is sometimes not possible or
- desirable because some of these packages or board support are highly
- specific or proprietary.
- In this case, OpenADK users are offered following choice using
- here own git repository.
- * Initialize your project
- Personalize your Git environment via:
- ---------------------
- $ git config --global user.name "Waldemar Brodkorb"
- $ git config --global user.email wbx@openadk.org
- ---------------------
- Get the latest version of OpenADK via anonymous git:
- ---------------------
- $ git clone --bare git://openadk.org/git/openadk myadk.git
- ---------------------
- Use git-daemon to make the repository public to your developers. After that clone your new shared project repository:
- ---------------------
- $ git clone git+ssh://myserver.com/git/myadk.git
- $ cd myadk
- ---------------------
- Configure OpenADK remote git repository:
- ---------------------
- $ git remote add openadk git://openadk.org/git/openadk
- ---------------------
- * Create your firmware
- Now you can either start with the latest version or use some older version:
- ---------------------
- $ git checkout -b stable_1_0 $sha1
- ---------------------
- You can find $sha1 via git log. $sha1 is the hash after the keyword “commit”.
- Now build a firmware image for your target and test it. Fix bugs in the build
- environment or add new stuff. You can use the “extra” directory to add local
- unpackaged binaries and/or configuration files to overwrite packaged stuff.
- Check your uncommitted changes:
- ---------------------
- $ git status
- $ git diff --cached
- $ git diff
- ---------------------
- Commit your git-added changes:
- ---------------------
- $ git commit
- ---------------------
- Or just commit all changes:
- ---------------------
- $ git commit -a
- ---------------------
- It is a good style to make a lot of small atomic commits.
- Push your changes back to your git repository.
- For new local branches:
- ---------------------
- $ git push origin stable_1_0
- ---------------------
- Or in regulary usage via:
- ---------------------
- $ git push
- ---------------------
- * Working together with OpenADK
- You can generate patches from all your changes against the remote master:
- ---------------------
- $ git format-patch -s origin
- ---------------------
- Send all relevant patches to OpenADK author via eMail.
- Update your master with changes from OpenADK:
- ---------------------
- $ git checkout master
- $ git pull openadk master
- ---------------------
- If you want you can merge all changes to your branch:
- ---------------------
- $ git checkout stable_1_0
- $ git merge master
- ---------------------
- Or just cherry-pick some of the commits:
- ---------------------
- $ git cherry-pick $sha1
- ---------------------
- * Releasing
- Tag your tested stable branch:
- ---------------------
- $ git tag -a stable_1.0
- ---------------------
- Push your tag to your repository:
- ---------------------
- $ git push origin stable_1.0
- ---------------------
- Checkout your tag and build your firmware:
- ---------------------
- $ git clone git+ssh://myserver.com/git/myadk.git mytag
- $ cd mytag
- $ git checkout stable_1.0
- ---------------------
- * Deleting unused branches
- Deleting branches remotely:
- ---------------------
- $ git branch -r
- $ git push origin :branchname
- ---------------------
- Deleting branches locally:
- ---------------------
- $ git branch
- $ git branch -D branchname
- ---------------------
|