qemu: Move qfw kernel setup into a common file