You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.7 KiB

  1. # ChibiOS Upgrade Procedure
  2. ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a branch tied to the ChibiOS version in use and should not be mixed with different versions.
  3. ## Getting ChibiOS
  4. * `svn` Initialization:
  5. * Only needed to be done once
  6. * You might need to separately install `git-svn` package in your OS's package manager
  7. * `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/`
  8. * `git remote add qmk git@github.com:qmk/ChibiOS.git`
  9. * Updating:
  10. * `git svn fetch`
  11. * First time around this will take several hours
  12. * Subsequent updates will be incremental only
  13. * Tagging example (work out which version first!):
  14. * `git tag -a ver20.3.4 -m ver20.3.4 svn/tags/ver20.3.4`
  15. * `git push qmk ver20.3.4`
  16. * `git tag -a develop_YYYY_qN -m develop_YYYY_qN svn/tags/ver20.3.4`
  17. * `git push qmk develop_YYYY_qN`
  18. ## Getting ChibiOS-Contrib
  19. * `git` Initialization:
  20. * `git clone git@github.com:qmk/ChibiOS-Contrib`
  21. * `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib`
  22. * `git checkout -b chibios-20.3.x upstream/chibios-20.3.x`
  23. * Updating:
  24. * `git fetch --all --tags --prune`
  25. * `git checkout chibios-20.3.x`
  26. * `git pull --ff-only`
  27. * `git push origin chibios-20.3.x`
  28. * `git tag -a develop_YYYY_qN -m develop_YYYY_qN chibios-20.3.x`
  29. * `git push origin develop_YYYY_qN`
  30. ## Updating submodules
  31. * Update the submodules
  32. * `cd $QMK_FIRMWARE`
  33. * `git checkout develop`
  34. * `git pull --ff-only`
  35. * `git checkout -b chibios-version-bump`
  36. * `cd lib/chibios`
  37. * `git fetch --all --tags --prune`
  38. * `git checkout develop_YYYY_qN`
  39. * `cd ../chibios-contrib`
  40. * `git fetch --all --tags --prune`
  41. * `git checkout develop_YYYY_qN`
  42. * Update ChibiOS configs within QMK
  43. * `cd $QMK_FIRMWARE`
  44. * `./util/chibios_conf_updater.sh`
  45. * Build everything
  46. * `cd $QMK_FIRMWARE`
  47. * `qmk mass-compile -j 4`
  48. * Make sure there are no errors
  49. * Push to the repo
  50. * `git commit -am 'Update ChibiOS to 99.9.9'`
  51. * `git push --set-upstream origin chibios-version-bump`
  52. * Make a PR to qmk_firmware with the new branch
  53. ## When merging a PR containing an upgrade of ChibiOS/ChibiOS-Contrib:
  54. * Update the target branch if the merge target was `master`:
  55. * `git checkout qmk-master`
  56. * `git reset --hard develop_YYYY_qN`
  57. * `git push origin qmk-master --force-with-lease`
  58. * Update the target branch if the merge target was `develop`:
  59. * `git checkout qmk-develop`
  60. * `git reset --hard develop_YYYY_qN`
  61. * `git push origin qmk-develop --force-with-lease`
  62. Note that when merging `develop` to `master`, the first workflow should still be followed.