In order to add your own user application to uClinux-dist, do the following:
1. Create a sub-directory in .../uClinux-dist/user directory, this sub-directory is corresponding to your application.
2. Copy all your source files into the sub-directory, including .c, .h and Makefile. You can originize your files anyway you like within the sub-dir.
3. Edit and modify these 3 files:
uClinux-dist/user/Makefile ---- add make rule for your application
uClinux-dist/config/config.in ---- add configuration for your application
uClinux-dist/config/config.help ---- add configuration help for your app, this help will show up when you click on the "Help" button in "make xconfig" submenu.
4. Build new image (romfs)
make xconfig ---- customize user application settings and select your newly added apps.
make
Once the image.bin is built, downloaded and running in the target, you can find your apps in the /bin directory, along with other existing applications such as ping, web server, ftp, etc.
How to write/modify Makefile is key here, there are more to know about.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment