The whole source is 1.4G, of which you’ll only need 16M, so you may just want to use the sources installed by the IDE. On Ubuntu, see /usr/share/arduino. I recommend making a copy as you’ll need to make some changes. Change to the ./hardware/arduino/bootloaders/optiboot directory...