3

I'm using qemu as my raspberry pi emulator.

I use IDE for writing my codes in windows and I am having a hard time in transferring files every time from my windows to qemu.

I tried using winscp, but it did not allow me to connect using default credentials.

Is there anything I need to do or configure to use winscp for transferring files directly??

appsdownload
  • 751
  • 7
  • 20
  • What hostname or IP address is your QEMU instance using? You could try using the `redir` parameter when launching QEMU. – Retro Gamer Sep 13 '17 at 19:18
  • the ip is of the local host (127.0.0.1) which means I can't use winscp. Also, since I'm using windows, how can I use redir param as I'm starting the application from the UI? – appsdownload Sep 16 '17 at 18:23

2 Answers2

3
  1. Go to https://azeria-labs.com/emulate-raspberry-pi-with-qemu/

  2. $ qemu-system-arm -kernel ~/qemu_vms/<your-kernel-qemu> -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda ~/qemu_vms/<your-jessie-image.img> -redir tcp:5022::22 -no-reboot

  3. scp -P 5022<file_to_transfer> pi@127.0.0.1:~

alexander.polomodov
  • 5,396
  • 14
  • 39
  • 46
KingAmir
  • 41
  • 4
0

Another handy way: :)

  1. Mount .img file in your host (Use Disk Image Mounter in Linux , Don't forget to mount it in non read-only mode)
  2. Add your file to this img file (Don't add it in boot partition)
  3. Umount the img
  4. Load .img file in qemu and find your file in proper path
Bashid
  • 433
  • 5
  • 15