To enable custom firmware on Android mobiles, you need an unlocked boot loader. Samsung have always had the OEM Unlock option in the hidden Developer Options menu (About Phone / Software / Build Number / Tap 5 times then press back arrow twice). With Android 8, Oreo, OEM Unlock isn’t immediately available. Don’t panic, chill out & wait. Wait for a week, without restarting your phone. After 168 hours Up time (About Phone / Status) the missing OEM Unlock option will appear. Now you can do your Rooting/Recovery/Firmware.