Before you do the porting, you should check if if the apps/libs are already ported in uClinux-dist (uclinux.org) or Blackfin uclinux-dist.
If none exist, you can add the apps/libs into uClinux-dist. The uClinux-dist uses the build system from Linux kernel, with Kconfig and Makefile. You will need to add an config entry in Kconfig, and a rule in Makefile. Please read about Kconfig in the file nios2-linux/linux-2.6/Documentation/kbuild/kconfig-language.txt.
Add hello apps to uClinux-dist
Take the hello apps example,
1. edit file user/Kconfig, add an entry after the line of menu "Miscellaneous Applications",
The hello example
2. add a line to user/Makefile , dir_$(CONFIG_USER_HELLO_HELLO) += hello
3. mkdir ~/uClinux-dist/user/hello
put hello.c in user/hello dir,
4. create Makefile in user/hello dir,
EXEC = hello
OBJS = hello.o
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
-rm -f $(EXEC) *.elf *.gdb *.o
Staging dir structure
In nios2 uclinux, a staging dir is created at built time, and libs/apps are installed to this dir. Then "make romfs" will copy them to "romfs" dir.
This is very similar to the staging dir of "buildroot".
You may take exmples from user/net-snmp, lib/libgmp.
In user/net-snmp, there are
In lib/libgmp, there are
The sources are located in a subdir, and a Makefile is added to build and install. You should take a look at the Makefile.
Community support is provided during standard business hours (Monday to Friday 7AM - 5PM PST). Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.