View topic - Open source project in Linux porting to QNX

Open source project in Linux porting to QNX

anything that doesn't fit to other groups.

Open source project in Linux porting to QNX

Postby Ericxx » Fri Aug 06, 2010 4:44 pm

Dear all,

I am trying to import a open source project in Linux. The source package comes with the source code and make file. What modifications should i make to make it compilable under QNX? Many thanks.

Eric
Ericxx
Senior Member
 
Posts: 158
Joined: Mon Jun 09, 2008 1:38 pm

Postby Tim » Fri Aug 06, 2010 5:09 pm

Eric,

I'll assume you are porting to QNX 6 and not QNX 4.

I'd start with editing the Makefile(s) and replacing any gcc call with qcc (the QNX replacement for gcc). While you are editing the Makefile take a look and see if there is a 'configure' option. If there is you'll need to run the configure option (hard to tell you exactly what to select for the configure without knowing more about what you are porting).

After that, I typically just do a make and fix problems as they arise. Since I have no idea what kind of project you are porting (ie drivers) it's hard to give any concrete advice beyond that. In some cases the port literally involved nothing more than fixing some include/library paths. In other cases (drivers) I've had to rewrite some sections to use QNX functionality instead of Linux.

Depending on the version of QNX 6 you are using you may want to specifically specify a version of the compiler/libraries (you can defer this step till after you get everything compiling).

Tim
Tim
Senior Member
 
Posts: 1419
Joined: Wed Mar 10, 2004 12:28 am

Postby seanb » Fri Aug 06, 2010 9:00 pm

What package is it? Check pkgsrc to see if it isn't ported already.

-seanb
seanb
QNX Master
 
Posts: 133
Joined: Fri Jul 28, 2006 5:36 pm

Postby Ericxx » Thu Aug 26, 2010 2:13 pm

Sorry for late update. This camera driver used on gumstix overo: http://www.e-consystems.com/omapovero.asp.

The make file in the source packge is as follows:

Code: Select all
v4l2_driver-objs   :=   init_module.o isp.o omap_hwr_base.o sens_ov3640.o  v4l2_driver_base.o       \
            omap_camera_interface.o omap_v4l2_fops_base.o  isp.o omap_v4l2_ioctl_fops.o   \
            i2c.o lm3553_flash.o exit_module.o                   \
            resource/src/error.o resource/src/kernel/phy_mem.o

obj-m         +=v4l2_driver.o

#CROSS_COMPILE=<add_cross_compile_path_here>
#KERNEL_PATH=/media/disk/project/linux_camera/ov3640/omap/gumstix/v4l2/linux-2.6.30
#CROSS_COMPILE=/media/disk/gumstix/software/build/environment/overo-oe/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-

################################################
#
#   omap3 gumstix board configuration
#
################################################
omap:
   make -C $(KERNEL_PATH) M=$(PWD) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
clean:
   make -C $(KERNEL_PATH) M=$(PWD) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) clean

I have changed the cross compiler to qcc, but have no idea how the KERNEL_PATH should be set here.
Ericxx
Senior Member
 
Posts: 158
Joined: Mon Jun 09, 2008 1:38 pm

Postby mario » Thu Aug 26, 2010 4:41 pm

This is most probably a kernel driver and will not compile on QNX. It`s simply not source capatible at that level. You`ll need to understand what the linux is driver, understand how to write a USB driver under QNX and build a bridge between them :)
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron