Running Puppy ARM for Raspberry Pi without Raspberry Pi
This HOWTO is dedicated to those who wants to help Barry with sap6 ((Debian) Squeeze Arm Puppy for ARMv6) but do not own a Rasberry Pi (Raspi for short).
- Familiarity with terminal; all the commands are run in terminal.
- Recent puppies that support xz compression (unxz command is available, unsquashfs supports xz) (e.g. Slacko 5.3 as of the time of writing)
- 6 GB of freespace
- A relatively powerful machine, emulation is slow ...
- Qemu with arm emulation (qemu-system-arm)
- Barry's sap6 http://distro.ibiblio.org/quirky/arm/test/raspi-sap6-5.91-pre-alpha/raspi-sd-4gb-sap6-5.91.img.xz
- sap6-compatible linux kernel http://xecdesign.com/downloads/linux-qemu/kernel-qemu
- Optional - sap6 devx http://distro.ibiblio.org/quirky/arm/test/raspi-sap6-5.91-pre-alpha/devx_sap6_5.91.sfs
- Get all the ingredients. Especially for qemu - get it from your favorite repository,
if it is not available there, pester your favorite pet maker to make one for you :)
Note for pet maker: All that is needed
--target-list="arm-softmmu"--- this will speed-up compilation of qemu by telling it to create only the
qemu-system-armbinary, which is all that is needed.
Note: qemu-0.14.txz from Slackware repository doesn't work, I don't know where to find the missing libbluetooth.so.3.
- Install qemu pet.
- Move the rest of the ingredients into a directory (e.g. /mnt/sda10/raspi)
- Open terminal within that directory.
- expand the sap6 disk image:
- Start sap6 like this:
qemu-system-arm -M versatilepb -cpu arm1176 -hda raspi-sd-4gb-sap6-5.91.img -kernel kernel-qemu -m 256 -append "root=/dev/sda2" -serial stdio -redir tcp:2222::22
Try this instead:
qemu-system-arm -M versatilepb -cpu arm1136-r2 -hda raspi-sd-4gb-sap6-5.91.img -kernel kernel-qemu -m 256 -append "root=/dev/sda2" -serial stdio -redir tcp:2222::22
Optional Steps - Making the Screen larger
- Inside sap6, do the following.
- Use geany to edit /etc/X11/xorg.conf.armsystem
- Add the following at the end of line:
Section "Screen" Identifier "Default Screen" SubSection "Display" Depth 16 Modes "800×600" "640×480" EndSubSection EndSection
- Copy that file over to /etc/X11/xorg.conf (Basically, /etc/X11/xorg.conf.armsystem and /etc/X11/xorg.conf must be identical and have the added content as above)
- Restart X server. You should get the system running
Optional Steps - installing devx
- From within sap6
- Open terminal
nc -lp 22 | tar -xvf - -C /
- From within the host system
- Goto where the devx is stored
- Extract it
unsquashfs devx_sap6_5.91.sfs cd squashfs-root tar -cvf - * | nc localhost 2222
- Be patient until the process finished.
- Test that devx is installed successfully: from within sap6 type in terminal
make. You should not see anything that says "command not found".
Data transferHow to transfer data to/from the emulated sap? There are hard ways, and there are easy ways. For the easy way, follow the direction:
On sap6 machine (real/emulated)
- From within sap6, download dropbear-sftp-arm.pet (shouldn't be a problem that 5.95 now comes with proper web browser)
- Install it (from terminal:
- Once installed, type
dropbearin terminal to start the dropbear SSH server.
- If you want to stop the server, just type
killall dropbearfrom terminal.
On PC (host machine)
- Start gFTP (available from Network menu), or just type
- Enter localhost for Host, enter 2222 for Port, enter root for User, and enter woofwoof for Pass (or whatever you set sap6's root password), and lastly set the transfer type as SSH2.
- Click the big computer icon on the leftmost of the toolbar.
- If asked to verify the keys etc - click Yes.
- You are connected. You can upload/download files to/from your sap6.
- When done, just close gftp.
The pet and this instruction should also work on the real Raspi. Instead of "localhost" and port "2222", use the real Pi's IP address and port "22". Everything else is the same.
- Sound does not work because Qemu currently does not emulate any sound device for arm.
- HOWTO tested and confirmed to with Barry's latest Squeeze Puppy Alpha 1 too http://murga-linux.com/puppy/viewtopic.php?p=637338#637338 Just get the image from http://distro.ibiblio.org/quirky/arm/test/raspi-sap-5.95-alpha1/raspi-sd-4gb-sap6-5.95.img.xz instead. The rest remains the same.
- The dropbear binary comes from landley.net (of Aboriginal Linux fame) here: http://landley.net/aboriginal/downloads/binaries/extras/dropbearmulti-armv6l
- The sftp-server binary comes from Debian Squeeze armel openssh-server package here: http://packages.debian.org/squeeze/armel/openssh-server/download