How to edit the Booting process on Beagleboard XM

I have posted this in combination with other threads recently with no help.

BACKGROUND:

I am building an audio amplifier with digital effects using Matlab and Simulink. This is a senior design project for UT and we need to have it finished by may 3.

PROBLEM:

I need to be able to access the uboot file or something and edit it to run my audio program automatically after the board boots.

As of right now I have to connect the board to my host computer and run the file but that will not be acceptible because the audio amplifier must be completely stand alone (obviously). I am very new to linux and programming so anyone who can help would be greatly appreciated. I have been looking everywhere for a tutorial that will help me but I can’t find one. I can access the board with putty but I don’t know how to find and edit the boot from there. Also, I plug the sd card into my host computer but I can not edit the uboot image because it is an image, not a text file. PLEASE HELP

Wes

There are several ways to run a script at bootup, also depending on
the distribution you use. If you want to run a script as user (not as
root) then you might want to add a crontab job:
# crontab -e
and then add a line:
@reboot /path/to/myscript >> /path/to/my.log 2>&1
For more information see man crontab.

Another way to add a bootscript is to to use sytemctl, see eg
http://stackoverflow.com/questions/11152657/angstrom-start-up-processes-beaglebone

Thank you for your response.

I am running simulink on the board which changes the firmware to ubuntu (whatever that is) so the angstrom boot will not do i don’t think. So what I gather I need to do is just type # crontab -e into the command window and @reboot /path/to/myscript >> /path/to/my.log 2>&1 somewhere into whatever shows up (replacing the myscript with whatever my scripts location is)? I’m really sorry but I’m not too good at this.

I am running simulink on the board which changes the firmware to ubuntu
(whatever that is) so the angstrom boot will not do i don't think.

Ubuntu (see ubuntu.com ) is another distribution of Linux. IMHO you
are still running Angstrom...

So what
I gather I need to do is just type # crontab -e into the command window and
@reboot /path/to/myscript >> /path/to/my.log 2>&1 somewhere into whatever
shows up (replacing the myscript with whatever my scripts location is)?

Yes!
Maybe you want first to read a bit about cron.
http://en.wikipedia.org/wiki/Cron is a quite good overview.
And maybe you start not first with @reboot but with a line like this one:
* * * * * date >> /path/to/my.log 2>&1
This cronjob will write every minute the actual time to my.log

HTH
Dieter

Ok, it didn’t seem to work. Here is what I entered

Login: ubuntu
pass: temppwd
and then this came up

ubuntu@rAMPage:~$

so I typed “# crontab -e” and the above line came up again

si I typed "@reboot /home/ubuntu/Combined_Effects

and it says "-bash: @reboot: command not found

so I typed “@reboot /hom/ubuntu/Combined_Effects >> /path/to/my.log 2>&1”

and it says no such file or directery for /path/to/my.log

Ok, it didn't seem to work. Here is what I entered

Login: ubuntu
pass: temppwd
and then this came up

ubuntu@rAMPage:~$

so I typed "# crontab -e" and the above line came up again

You have to type
crontab -e
without the #

Hey I’m sorry to keep bothering you but my time is running out. I got to crontab and entered in the following:

@reboot /home/ubuntu/Combined_Effects_rrt/MW/Combined_Effects &

and saved it and it still does not work. A guy from mathworks also helped me out with some of it and it still won’t work. I see around the internet that there is something to do with the init tab? Is there anything to this that you know of?

Thanks for all the help

Try running the script directly. If that doesn't work, then it's a problem in the script. Type:
     /home/ubuntu/Combined_Effects_rrt/MW/Combined_Effects

Also make sure your cron changes took effect by listing the schedule. You should see your script listed in the schedule. Type the following:
     crontab -l

I don't have a BeagleBoard yet (it was just shipped to me), so I don't know if @boot is supported, or any of its quirks.

Can you find a Linux guru to look over your shoulder when you are doing this? You may be making a very simple beginner's mistake of some sort.

Best of luck....