# Download and Install Virtual Box https://www.virtualbox.org/ # Download this Ubuntu 10.04 RaspberryPi VM image # (this is NOT the RISC emulator) # wget RaspberryPi.VirtualBox.zip wget http://rpi.descartes.co.uk/sim-emu/RaspberryPi.VirtualBox.zip # Load the image into Virtual Box # through the "Import Appliance" menu # Start the RaspberryPi Ubuntu VM # Login with: rpi/password # Open the LXTerminal # Install ssh ub-shell> sudo apt-get install ssh # Download the debian6.tar.gz QEMU ARMv6 image ub-shell> wget http://rpi.descartes.co.uk/sim-emu/debian6.tar.gz # Unpack the image ub-shell> tar xvzf debian6.tar.gz # Edit the startup script # by inserting at end of command # the following option: -redir tcp:2222::22 ub-shell> cd debian6 ub-shell> vi launchDebian # After editing, start the qemu emulator ub-shell> ./launchDebian # You can watch the startup by launching xtightvncviewer # The server connection should be to 'localhost' or '127.0.0.1' # You can log into this connection with # the username and password pi/suse, # but I prefer a ssh terminal login. # Networking seems to be off when running the qemu in a VirtualBox VM # on top of the real host. I spent a short while trying to untangle # that nested mess before deciding to move on. TBD. Instead, download # the needed files on the Ubuntu VM and secure copy them to # the Debian6 ARM emulator. # User and password: pi/suse. # Also, the keyboard mapping is a bit off. # I haven't looked into remapping yet. # For now, know that the quote _"_ maps to _@_ # wget openmpi-1.5.4.tar.bz2 ub-shell> wget http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.4.tar.bz2 ub-shell> scp -P 2222 openmpi-1.5.4.tar.bz2 pi@localhost: # Open a ssh terminal to the Debian6 emulator, # user and password: pi/suse ub-shell> ssh -p 2222 pi@localhost # On the Debian6 ARMv6 emulator, # Unpack the openmpi tarball deb-shell> bunzip2 openmpi-1.5.4.tar.bz2 deb-shell> tar xvf openmpi-1.5.4.tar deb-shell> cd openmpi-1.5.4 # You have to make 3 changes to the standard distribution # 1) Delete all references to the RISC instruction 'dmb' # 2) Modify the 'configure' file to include an 'armv6' option # 3) Compile with CFLAGS=-march=armv6 ## 1) Using 'vi', make the following edits to these three files deb-shell> vi ./opal/asm/generated/atomic-local.s # delete all dmb instructions deb-shell> vi ./opal/asm/base/ARM.asm # delete all dmb instructions deb-shell> vi ./opal/include/opal/sys/arm/atomic.h # change the lines: #if OPAL_WANT_SMP_LOCKS #define MB() __asm__ __volatile__ ("dmb" : : : "memory") #define RMB() __asm__ __volatile__ ("dmb" : : : "memory") #define WMB() __asm__ __volatile__ ("dmb" : : : "memory") #else #define MB() #define RMB() #define WMB() #endif # to read: #define MB() #define RMB() #define WMB() ## 2) Using 'vi', # add the following to the 'configure' file at line 26946 of 171183 deb-shell> vi configure # goto line 26946, # there should be an 'alpha-' section above # and an 'armv7' below # insert the following # armv6*) # ompi_cv_asm_arch="ARM" # OPAL_ASM_SUPPORT_64BIT=0 # OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)' # ;; ## 3) compile and install with the following CFLAGS deb-shell> CFLAGS=-march=armv6 deb-shell> ./configure CFLAGS=-march=armv6 deb-shell> make deb-shell> sudo make install