What better way to celebrate the fourth of May, than with this tutorial that shows you how to play “The Imperial March” theme from Star Wars on our APU single board computer?
Follow along step-by-step to create a musical server that’s sure to impress any Star Wars fan.
Note: This script can be used on any PC with a speaker to create the same effect.
Step 1. Create a bootable USB drive
Create a bootable USB drive for the APU.
Step 2. Connect to the serial console
Connect to the serial console and boot your APU using your newly-created USB stick.
Step 3. Install the “beep” package
At the console, type:
apt-get install beep
Step 4. Set up the Star Wars music file
Copy the file starwars.bpy (see below) onto the USB stick using scp, or use vi to create the file locally.
To create the file using vi, type:
To go into insert mode, type:
Paste the contents of the starwars.bpy file, by copying it to your paste buffer and using ‘right click’ or ALT+V.
To exit insert mode, press:
To save and quit the editor, type:
Step 5. Finish the configuration
Change the execution flags on the file to make it executable:
chmod +x starwars.bpy
Lastly, change the operating system back into read-only mode:
Step 6. Play the tune
To play the tune, go to the directory where you created the starwars.bpy file, and type:
You should get something like this:
And may the force be with you.
Adapted from: http://zeldor.biz/2010/08/star-wars-anthem-pc-speaker/