How do you run the code without external computer in BeagleBone Black just by powering it?
For Debian, see: Making Scripts Run at Boot_Time With Debian
(add script to /etc/init.d, run chmod 755 /etc/init.d/foobar.sh, then update-rc.d foobar.sh)

For Angstrom, see: Setting Up Boot Scripts For Beaglebone Angstrom