This method has the fewest shortcuts.
This part gets you the qemu installed, including hte 'static' package to allow chroot much later.
- Download a debian VM image for VMware player. I got osboxes 8.5
- su root
- apt-get install qemu binfmt-support qemu-user-static
- dpkg --add-architecture armel
- apt-get update
- apt-get install libc6:armel
Now starting with Part 2 of this post>>
http://blog.troyastle.com/2010/07/bu...n-vm-with.html
This will install a armel VM onto your vmware VM
- wget http://http.us.debian.org/debian/dis....0-4-versatile
- wget http://http.us.debian.org/debian/dis...boot/initrd.gz
- qemu-img create -f raw armdisk.img 2G
- qemu-system-arm -m 256 -M versatilepb -kernel vmlinuz-3.16.0-4-versatile -initrd initrd.gz -hda armdisk.img -append "root=/dev/ram"
That last command actually runs the installer - I chose not to install X and Gnome etc, but I wish I had -- This took many hours, because its running an emulator on an emulator.
After your install is done, you have to go back to the command line, and Kill the process with ctrl+C.
I was planning on using the chroot method, so I set up some paths, but you can pick you own paths.
This next step gets the boot loader out of the installation, for qemu to use.
the fdisk command wil have ouptut like this, s o I did 2048*512 for my start offset.
Quote:
$ sudo fdisk -l armdisk.img
...
Units: sectors of 1 * 512 = 512 bytes
...
Device Boot Start End Sectors Size Id Type
armdisk.img1 2048 3913727 3911680 1.9G 83 Linux
...
|
- mkdir -p /chroots/armel-jessie/
- fdisk -l armdisk.img; # To find the sector offset of where it was installed in the .img
- mount -o loop,offset=1048576 armdisk.img /chroots/armel-jessie/
- cp /chroots/armel-jessie/boot/initrd.img-3.16.0-4-versatile .
- umount /chroots/armel-jessie/
At this point above, while the image is mounted, you can copy your kindle ssh key into the directory somewhere, so that one you run ssh on the instance, you'll be able to put it in place.
Now to finally boot into that, and use it to compile for the kindle.
- qemu-system-arm -m 256 -M versatilepb -kernel vmlinuz-3.16.0-4-versatile -initrd initrd.img-3.16.0-4-versatile -hda armdisk.img -append "root=/dev/sda1" -redir tcp:2222::22
The -redir flag lets me ssh from my Windows 10 install into the emulated emulator, without fighting with ip addresses, since my qemu running doesnt have a well resizable window.
Now that you are booted into the qemu instance - or SSH into it, you can install the libraries needed.
- apt-get install libtool build-essential ccache automake
- apt-get install xorg
- apt-get install libxtst-dev
In there wherever you find convenietn (prob
From there I grabbed something that needed to lik to libX11 and libXtst, and pushed it to my PW3 and it worked.
From here - now that everything is installed, it is time to start using the combination of qemu-arm-static and chroot.
qemu-arm-static lets you run crosscompiled code on your own computer, that's why we installed it in the first aprt commands.
- sudo mount -o loop,offset=1048576 armdisk.img /chroots/armel-jessie/
- sudo cp /usr/bin/qemu-arm-static /chroots/armel-jessie/usr/bin/
- sudo chroot /chroots/armel-jessie/
- gcc mouseturn.c -lX11 -lXtst
- scp a.out 192.168.2.57:/mnt/us
- ssh 192.168.2.57
Quote:
# [root@kindle us]# cd /mnt/us
# [root@kindle us]# ./a.out /dev/input/event3 1:1,1
button: 272, point -1 -1
button: 273, point -1 -1
|
it looks like this works too - now I don't need to use qemu.