Yes, itâs possible to âpre-installâ something before flash with ether. Here is the hack:
sudo apt-get install gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools
sudo apt-get install bc python dosfstools
sudo apt-get install binfmt-support qemu-user-static cpio gdisk
Now mount the gpt image, 134217728 is the start of the rootfs.
sudo mount -o loop,offset=134217728 rockpi4b-ubuntu-bionic-minimal-20190104_2101-gpt.img /mnt/
sudo chroot /mnt
Now you are in the ârockpi rootfsâ,
root# apt-get install ssh
root# exit
umount the image
sudo umount /mnt
sudo sync
Write the image with etcher.