remove duplicated code in bootreceiver

Signed-off-by: Grarak <williye97@gmail.com>