2021-08-28 22:38:06 +00:00
# ChibiOS Upgrade Procedure
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.
## Getting ChibiOS
2023-03-03 03:17:42 +00:00
* `svn` Initialization:
2021-08-28 22:38:06 +00:00
* Only needed to be done once
* You might need to separately install `git-svn` package in your OS's package manager
* `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/`
* `git remote add qmk git@github.com:qmk/ChibiOS.git`
* Updating:
* `git svn fetch`
* First time around this will take several hours
* Subsequent updates will be incremental only
* Tagging example (work out which version first!):
2021-11-28 00:12:20 +00:00
* `git tag -a ver20.3.4 -m ver20.3.4 svn/tags/ver20.3.4`
* `git push qmk ver20.3.4`
* `git tag -a develop_YYYY_qN -m develop_YYYY_qN svn/tags/ver20.3.4`
* `git push qmk develop_YYYY_qN`
2021-08-28 22:38:06 +00:00
## Getting ChibiOS-Contrib
2023-03-03 03:17:42 +00:00
* `git` Initialization:
2021-08-28 22:38:06 +00:00
* `git clone git@github.com:qmk/ChibiOS-Contrib`
* `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib`
* `git checkout -b chibios-20.3.x upstream/chibios-20.3.x`
* Updating:
* `git fetch --all --tags --prune`
* `git checkout chibios-20.3.x`
* `git pull --ff-only`
* `git push origin chibios-20.3.x`
2021-11-28 00:12:20 +00:00
* `git tag -a develop_YYYY_qN -m develop_YYYY_qN chibios-20.3.x`
* `git push origin develop_YYYY_qN`
2021-08-28 22:38:06 +00:00
## Updating submodules
* Update the submodules
* `cd $QMK_FIRMWARE`
* `git checkout develop`
* `git pull --ff-only`
* `git checkout -b chibios-version-bump`
* `cd lib/chibios`
* `git fetch --all --tags --prune`
2021-11-28 00:12:20 +00:00
* `git checkout develop_YYYY_qN`
2021-08-28 22:38:06 +00:00
* `cd ../chibios-contrib`
* `git fetch --all --tags --prune`
2021-11-28 00:12:20 +00:00
* `git checkout develop_YYYY_qN`
* Update ChibiOS configs within QMK
* `cd $QMK_FIRMWARE`
* `./util/chibios_conf_updater.sh`
2021-08-28 22:38:06 +00:00
* Build everything
* `cd $QMK_FIRMWARE`
2023-01-04 04:11:56 +00:00
* `qmk mass-compile -j 4`
2021-08-28 22:38:06 +00:00
* Make sure there are no errors
* Push to the repo
2021-11-28 00:12:20 +00:00
* `git commit -am 'Update ChibiOS to 99.9.9'`
2021-08-28 22:38:06 +00:00
* `git push --set-upstream origin chibios-version-bump`
2021-11-28 00:12:20 +00:00
* Make a PR to qmk_firmware with the new branch
2023-03-03 03:17:42 +00:00
## When merging a PR containing an upgrade of ChibiOS/ChibiOS-Contrib:
* Update the target branch if the merge target was `master` :
* `git checkout qmk-master`
* `git reset --hard develop_YYYY_qN`
* `git push origin qmk-master --force-with-lease`
* Update the target branch if the merge target was `develop` :
* `git checkout qmk-develop`
* `git reset --hard develop_YYYY_qN`
* `git push origin qmk-develop --force-with-lease`
Note that when merging `develop` to `master` , the first workflow should still be followed.