<h3>Contribution description</h3>
<p>This PR attempts to fix the first part of <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="480069739" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/12003" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/12003/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/12003">#12003</a></p>
<blockquote>
<ul>
<li>Introduced by <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/RIOT-OS/RIOT/commit/bb71e979f3a425f18b36334d794d47634ddd9f9a/hovercard" href="https://github.com/RIOT-OS/RIOT/commit/bb71e979f3a425f18b36334d794d47634ddd9f9a"><tt>bb71e97</tt></a>
<ul>
<li>the file use when flashing is not the bootloader firmware but an extended bootloader with a slot0 bootloader. So <code>riotboot/flash-bootloader</code> would overwrite <code>slot0</code> and <code>slot1</code> header.</li>
</ul>
</li>
</ul>
</blockquote>
<p>With the pseudomodule we can specify that the bootloader application is using to <code>bootloader</code> itself, and normal applications aren't, they are just using <code>riotboot</code> modules or functionality.</p>
<p>This allows defining FLASHFILE as a regular <code>ELFFILE</code> for the bootloader and keeping the current behavior where we wan't it, i.e. flashing an application + boot-loader using <code>riotboot</code>.</p>
<p>All boards providing riotboot now provide <code>riotboot_bootloader</code>.</p>
<h3>Testing procedure</h3>
<ul>
<li>Verify this fixes the issue:</li>
</ul>
<pre><code>BOARD=iotlab-m3 make --no-print-directory -C bootloaders/riotboot/ info-debug-variable-FLASHFILE
/home/francisco/workspace/RIOT/bootloaders/riotboot/bin/iotlab-m3/riotboot.elf
</code></pre>
<ul>
<li>Previous behavior is kept</li>
</ul>
<pre><code>BOARD=iotlab-m3 make --no-print-directory -C tests/riotboot/ info-debug-variable-FLASHFILE
/home/francisco/workspace/RIOT/tests/riotboot/bin/iotlab-m3/tests_riotboot-slot0-extended.bin
</code></pre>
<h3>Issues/PRs references</h3>
<p>Addresses <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="480069739" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/12003" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/12003/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/12003">#12003</a><br>
Related to <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="498149858" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/12302" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/12302/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/12302">#12302</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/12307'>https://github.com/RIOT-OS/RIOT/pull/12307</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>riotboot: add riotboot_bootloader pseudomudule</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-0">boards/b-l072z-lrwan1/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-1">boards/b-l475e-iot01a/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-2">boards/common/iotlab/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-3">boards/common/kw41z/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-4">boards/common/nrf52/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-5">boards/common/saml1x/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-6">boards/frdm-k64f/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-7">boards/lsn50/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-8">boards/nucleo-f207zg/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-9">boards/nucleo-f302r8/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-10">boards/nucleo-f303k8/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-11">boards/nucleo-f303re/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-12">boards/nucleo-f303ze/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-13">boards/nucleo-f334r8/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-14">boards/nucleo-f446re/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-15">boards/nucleo-f722ze/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-16">boards/nucleo-f746zg/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-17">boards/nucleo-f767zi/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-18">boards/nucleo-l073rz/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-19">boards/nucleo-l152re/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-20">boards/nucleo-l432kc/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-21">boards/nucleo-l433rc/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-22">boards/nucleo-l452re/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-23">boards/nucleo-l476rg/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-24">boards/nucleo-l496zg/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-25">boards/nucleo-l4r5zi/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-26">boards/pba-d-01-kw2x/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-27">boards/same54-xpro/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-28">boards/saml21-xpro/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-29">boards/samr21-xpro/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-30">boards/stm32f429i-disc1/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-31">boards/stm32l476g-disco/Makefile.features</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-32">bootloaders/riotboot/Makefile</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12307/files#diff-33">makefiles/boot/riotboot.mk</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12307.patch'>https://github.com/RIOT-OS/RIOT/pull/12307.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12307.diff'>https://github.com/RIOT-OS/RIOT/pull/12307.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12307?email_source=notifications&email_token=ABE7WYF4A4VSGSE2NC4ZC2LQLSWEJA5CNFSM4I2ZSXJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HN4CZTA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYFETTYMP4GW6BDOA5TQLSWEJANCNFSM4I2ZSXJQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYHWDTTAAOWKPWWJNMDQLSWEJA5CNFSM4I2ZSXJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HN4CZTA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12307?email_source=notifications\u0026email_token=ABE7WYF4A4VSGSE2NC4ZC2LQLSWEJA5CNFSM4I2ZSXJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HN4CZTA",
"url": "https://github.com/RIOT-OS/RIOT/pull/12307?email_source=notifications\u0026email_token=ABE7WYF4A4VSGSE2NC4ZC2LQLSWEJA5CNFSM4I2ZSXJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HN4CZTA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>