Boot from SD

I want to be able to write a c program (.exe), upload it to an SD card (and add the relevent boot files to the SD card) and then get the beaglebone to boot up from the SD card and run the program on startup.
Can anyone help?

I want to be able to write a c program (.exe), upload it to an SD card (and
add the relevent boot files to the SD card) and then get the beaglebone to
boot up from the SD card and run the program on startup.

First compile the executable(hello.o suppose) with the arm toolchain you
have.
Copy the executable in /etc/init.d
Change the permissions of the file (chmod +x)
Go to the /etc/rc5.d directory
Execute ln -s /etc/init.d/hello.o S99hello
Reboot and check whether on startup it is getting execute or not

P.S.- I am also a newbie. This is how I did this. Not knowing whether this
is the only method

Regards,
Saket Sinha

I want to be able to write a c program (.exe), upload it to an SD card (and
add the relevent boot files to the SD card) and then get the beaglebone to
boot up from the SD card and run the program on startup.

First compile the executable(hello.o suppose) with the arm toolchain you
have.
Copy the executable in /etc/init.d
Change the permissions of the file (chmod +x)
Go to the /etc/rc5.d directory
Execute ln -s /etc/init.d/hello.o S99hello
Reboot and check whether on startup it is getting execute or not

Some of the things you mention here are Linux-distro-specific.

Do you need Linux for what you are doing?

Do you need the Linux distro to organize things the way you've laid them out?

If you are happy using the Angstrom Distribution software that ships
with the boards, you might take a look at
Creating Ångström System Services on BeagleBone - Matt Richardson, Creative Technologist, which is a nice
write-up on getting applications to run on boot.

Another question: do you need X11?

If not, you might consider 'systemctl disable gdm' to disable the
Gnome Desktop Manager and avoid booting into X11. If you have a
full-screen framebuffer-based application, that'll enable you to take
over the whole screen without wasting additional resources.

Do you need Linux for what you are doing?

Do you need the Linux distro to organize things the way you've laid them
out?

We need Linux for the driver support since I do not want to write the all

the drivers from scratch.

If you are happy using the Angstrom Distribution software that ships
with the boards, you might take a look at
mattrichardson.com/BeagleBone-System-Services/, which is a nice
write-up on getting applications to run on boot.

Another question: do you need X11?

If not, you might consider 'systemctl disable gdm' to disable the
Gnome Desktop Manager and avoid booting into X11. If you have a
full-screen framebuffer-based application, that'll enable you to take
over the whole screen without wasting additional resources.

Just curious. Are there any more alternatives?

Regards,
Saket Sinha