import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"ChibiOS Upgrade Procedure","description":"","frontmatter":{},"headers":[],"relativePath":"chibios_upgrade_instructions.md","filePath":"chibios_upgrade_instructions.md","lastUpdated":null}');
const _sfc_main = { name: "chibios_upgrade_instructions.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="chibios-upgrade-procedure" tabindex="-1">ChibiOS Upgrade Procedure <a class="header-anchor" href="#chibios-upgrade-procedure" aria-label="Permalink to &quot;ChibiOS Upgrade Procedure&quot;">​</a></h1><p>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.</p><h2 id="getting-chibios" tabindex="-1">Getting ChibiOS <a class="header-anchor" href="#getting-chibios" aria-label="Permalink to &quot;Getting ChibiOS&quot;">​</a></h2><ul><li><code>svn</code> Initialization: <ul><li>Only needed to be done once</li><li>You might need to separately install <code>git-svn</code> package in your OS&#39;s package manager</li><li><code>git svn init --stdlayout --prefix=&#39;svn/&#39; http://svn.osdn.net/svnroot/chibios/</code></li><li><code>git remote add qmk git@github.com:qmk/ChibiOS.git</code></li></ul></li><li>Updating: <ul><li><code>git svn fetch</code></li><li>First time around this will take several hours</li><li>Subsequent updates will be incremental only</li></ul></li><li>Tagging example (work out which version first!): <ul><li><code>git tag -a ver20.3.4 -m ver20.3.4 svn/tags/ver20.3.4</code></li><li><code>git push qmk ver20.3.4</code></li><li><code>git tag -a develop_YYYY_qN -m develop_YYYY_qN svn/tags/ver20.3.4</code></li><li><code>git push qmk develop_YYYY_qN</code></li></ul></li></ul><h2 id="getting-chibios-contrib" tabindex="-1">Getting ChibiOS-Contrib <a class="header-anchor" href="#getting-chibios-contrib" aria-label="Permalink to &quot;Getting ChibiOS-Contrib&quot;">​</a></h2><ul><li><code>git</code> Initialization: <ul><li><code>git clone git@github.com:qmk/ChibiOS-Contrib</code></li><li><code>git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib</code></li><li><code>git checkout -b chibios-20.3.x upstream/chibios-20.3.x</code></li></ul></li><li>Updating: <ul><li><code>git fetch --all --tags --prune</code></li><li><code>git checkout chibios-20.3.x</code></li><li><code>git pull --ff-only</code></li><li><code>git push origin chibios-20.3.x</code></li><li><code>git tag -a develop_YYYY_qN -m develop_YYYY_qN chibios-20.3.x</code></li><li><code>git push origin develop_YYYY_qN</code></li></ul></li></ul><h2 id="updating-submodules" tabindex="-1">Updating submodules <a class="header-anchor" href="#updating-submodules" aria-label="Permalink to &quot;Updating submodules&quot;">​</a></h2><ul><li>Update the submodules <ul><li><code>cd $QMK_FIRMWARE</code></li><li><code>git checkout develop</code></li><li><code>git pull --ff-only</code></li><li><code>git checkout -b chibios-version-bump</code></li><li><code>cd lib/chibios</code></li><li><code>git fetch --all --tags --prune</code></li><li><code>git checkout develop_YYYY_qN</code></li><li><code>cd ../chibios-contrib</code></li><li><code>git fetch --all --tags --prune</code></li><li><code>git checkout develop_YYYY_qN</code></li></ul></li><li>Update ChibiOS configs within QMK <ul><li><code>cd $QMK_FIRMWARE</code></li><li><code>./util/chibios_conf_updater.sh</code></li></ul></li><li>Build everything <ul><li><code>cd $QMK_FIRMWARE</code></li><li><code>qmk mass-compile -j 4</code></li><li>Make sure there are no errors</li></ul></li><li>Push to the repo <ul><li><code>git commit -am &#39;Update ChibiOS to 99.9.9&#39;</code></li><li><code>git push --set-upstream origin chibios-version-bump</code></li></ul></li><li>Make a PR to qmk_firmware with the new branch</li></ul><h2 id="when-merging-a-pr-containing-an-upgrade-of-chibios-chibios-contrib" tabindex="-1">When merging a PR containing an upgrade of ChibiOS/ChibiOS-Contrib: <a class="header-anchor" href="#when-merging-a-pr-containing-an-upgrade-of-chibios-chibios-contrib" aria-label="Permalink to &quot;When merging a PR containing an upgrade of ChibiOS/ChibiOS-Contrib:&quot;">​</a></h2><ul><li>Update the target branch if the merge target was <code>master</code>: <ul><li><code>git checkout qmk-master</code></li><li><code>git reset --hard develop_YYYY_qN</code></li><li><code>git push origin qmk-master --force-with-lease</code></li></ul></li><li>Update the target branch if the merge target was <code>develop</code>: <ul><li><code>git checkout qmk-develop</code></li><li><code>git reset --hard develop_YYYY_qN</code></li><li><code>git push origin qmk-develop --force-with-lease</code></li></ul></li></ul><p>Note that when merging <code>develop</code> to <code>master</code>, the first workflow should still be followed.</p>', 11);
const _hoisted_12 = [
  _hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return openBlock(), createElementBlock("div", null, _hoisted_12);
}
const chibios_upgrade_instructions = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
  __pageData,
  chibios_upgrade_instructions as default
};
