It turns out cubieboards are unstable at higher CPU load. Cubian desktop from my prior post kept crashing on me. When I tried fancier stunts like auto-login and auto-execute programs, it would crash beyond repair. After several re-installs, I determined I had to go with a different operating system.
Not wanting a completely bare-bones version of Linux, nor a fancy Desktop X with all the bells and whistles, I went with something called cubieez. Written for cubieboards, it is lightweight, stable, and has a graphical user interface.
The steps required to get the hardware pins (GPIOS) to work were slightly different than my previous post, so I’m going to document them here.
- Install cubeez (SD version)
- Set load to desktop: no
- Set up auto-login
- Install sunxi-tools
- Edit FEX file
- install gcc
- Write, compile and test c code
- Auto-execute your c program
Buy an SD card and a way to attach it to your Windows PC
Using Win32DiskImager, write the cubieez image to the SD card. Put SD card in cubieboard and turn it on.
Right click anywhere or use the main menu and open a terminal.
Type in Cubie-config and find the settings to turn off the desktop. From here.
This is just changing one line in /etc/inittab. Read here.
Sudo apt-get install sunxi-tools (for bin2fex and fex2bin programs)
sudo apt-get install gcc build-essential
in /etc/profile, add 2 lines at the bottom:
(where test is the name of your c program)
sudo reboot) and your c program should automatically execute
Saving your work
I was sick of re-installing and losing all my code, so if you want to save your code in case of a crash or wipe, you can save everything online in a GIT repository.
Go to github.com and make an account. Login and create a repository (choose to automatically use the default readme). Get the link to your new repository (for example, mine was this: https://github.com/paj006/cubieboard.git)
On your cubieboard install git if not installed (
Sudo apt-get install git), then type these commands:
git config --global user.name "YOUR NAME" (use account name)
git config --global user.email "YOUR EMAIL" (use account email)
mkdir git-repo “LINK TO REPOSITORY”
Copy your code to the repository folder with
cp /root/test.c .
cp /root/test .
(where test is the name of your file)
Add it to your project, commit it, and push it online
git add .
git commit -m "a message"
git push origin master
(From here and here).
Your code is now saved online and can by copied back to your computer by doing
git clone "LINK TO REPOSITORY"
You can view all my code here