user16096: I bought an Arduino Due, and I noticed unlike the other boards, the onboard LED does not flash after reset. I prefer this behavior, so I want to modify the bootloader to do this behavior when it starts. I have burnt bootloaders before, but I never modified one before.
How can I do this?

user13432: The Arduino Due bootloader is built-in. If you check the Arduino SAM core there are no bootloader files. There is a firmware file for the ATmega16u2 on the Programming Port. You might be able to modify this to do that (given that there is a LED to flash). 
The alternative solution to a modified bootloader is modifing the init() of the Arduino SAM core. Please see https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/cores/arduino/main.cpp#L36 or https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/variants/arduino_due_x/variant.cpp#L372. Blink code as proposed by Majenko could be added there. 
Cheers!

user4143: You cannot.
The SAM3X's bootloader is hard-coded into ROM and can never be changed.
Ever.
Yes, I know, it sucks, doesn't it?
However, the bootloader only executes if the flash is empty (bit of an odd choice if you ask me, but there you go) so you could "emulate" the operation by flashing an LED as the first thing in your sketch.
pinMode(13, OUTPUT);
for (int i = 0; i < 5; i++) {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
    delay(100);
}
pinMode(13, INPUT); // This will "reset" the pin to default.


16096: <p>I bought an Arduino Due, and I noticed unlike the other boards, the onboard LED does not flash after reset. I prefer this behavior, so I want to modify the bootloader to do this behavior when it starts. I have burnt bootloaders before, but I never modified one before.</p>

<p>How can I do this?</p>
 13432: <p>The Arduino Due bootloader is built-in. If you check the Arduino SAM core there are no bootloader files. There is a firmware file for the ATmega16u2 on the Programming Port. You might be able to modify this to do that (given that there is a LED to flash). </p>

<p>The alternative solution to a modified bootloader is modifing the init() of the Arduino SAM core. Please see <a href="https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/cores/arduino/main.cpp#L36" rel="nofollow">https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/cores/arduino/main.cpp#L36</a> or <a href="https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/variants/arduino_due_x/variant.cpp#L372" rel="nofollow">https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/variants/arduino_due_x/variant.cpp#L372</a>. Blink code as proposed by Majenko could be added there. </p>

<p>Cheers!</p>
 4143: <p>You cannot.</p>

<p>The SAM3X's bootloader is hard-coded into ROM and can never be changed.</p>

<p>Ever.</p>

<p>Yes, I know, it sucks, doesn't it?</p>

<p>However, the bootloader only executes if the flash is empty (bit of an odd choice if you ask me, but there you go) so you could "emulate" the operation by flashing an LED as the first thing in your sketch.</p>

<pre><code>pinMode(13, OUTPUT);
for (int i = 0; i &lt; 5; i++) {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
    delay(100);
}
pinMode(13, INPUT); // This will "reset" the pin to default.
</code></pre>
