Open source project in Linux porting to QNX

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

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

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

-seanb

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

The make file in the source packge is as follows:

[code]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
[/code]
I have changed the cross compiler to qcc, but have no idea how the KERNEL_PATH should be set here.

This is most probably a kernel driver and will not compile on QNX. Its simply not source capatible at that level. Youll need to understand what the linux is driver, understand how to write a USB driver under QNX and build a bridge between them :slight_smile: