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