How it is done ?The removal of non-Free bits from the kernel Linux is accomplished with the script deblob-main, that in turn uses deblob- and deblob-check. deblob- is inspired in gNewSense's scripts, later customized for BLAG by Jeff Moe, and then further improved as part of the linux-libre project.
http://www.fsfla.org/ikiwiki/selibre/linux-libre/