Building your AIOS application
From AlwaysInnovating
Building your own AIOS application for the Touch Book is not really more complicated than on a standard Linux PC. Although you can develop your app on the Touch Book itself, we recommend that you develop on a usual x86 Linux PC. That way you can take benefits of the power of your machine, and easily build a package for your app, making it easier to deploy. So all you will have to do is (i) setup an OpenEmbedded environment, (ii) write your own code as usual, (iii) use bitbake to cross-compile it for the device, (iv) install your app and run it on the Touch Book.
Contents |
Setting Up your Building Environment
It mainly consists in getting the needed tools as well as the AIOS openembedded tree. To do this, just follow the same steps explained in the AIOS compilation page
Writing your code
Create your source files like you would do for any PC app.
Cross-compiling your application
Like you use a makefile to compile for your PC, you will have to use a 'bitbake recipe' to compile for the Touch Book. Please follow the excellent bitbake tutorial on the Gumstix page to learn how to do it. You can also take examples from the numerous recipes available in your /OE/ai.openembedded.dev/recipes directory. You should then put your recipe along with your source files in the /OE/ai.openembedded.dev/recipes/your_package_name folder. To launch the cross-compilation:
cd /OE/build source source-me.txt bitbake your_package_name
Look carefully at the output: when some errors occur, you will have to read the more detailed log in a specific folder in the bitbake working directory. There you will find the usual compiling output telling you what's wrong with your build process.
Installing your application on your Touch Book
The build process should end with the creation of an .ipk package beginning with your_package_name in the /OE/build/tmp/deploy/glibc/ipk/armv7a folder. Copy the file on your Touch Book (for example using a USB drive or with scp), then open a Terminal on your Touch Book and type:
sudo -s ipkg install your_package.ipk
Then run your app: that's it!
Lastly, don't forget to share your work with the community: a quick page on this wiki is a good way to keep records of your work. Add an Always Innovating OS and Applications category tag to it, and link it to the software portal page so that it will be findable and not lost among the numerous wiki pages. And if you think it's worth it to add it to the AIOS image, let us know!
Getting trouble?
For any trouble, please report it and get help in the forums and the IRC chatroom.
