blackbox - convert modules into blackbox modules

yosys> help blackbox

blackbox [options] [selection]
Convert modules into blackbox modules (remove contents and set the blackbox
module attribute).