[okl4-developer] hello_world on gumstix

Kevin Lloyd klloyd at sierrawireless.com
Wed Jul 16 10:06:21 EST 2008


Hello all,

I am a first time user of OKL4 & OK Linux and have been able to successfully compile the latest OK Linux & OKL4 to run on the gumstix environment (via skyeye). I am now trying to compile & run a program in addition to the default OK Linux setup (targeting the gumstix architecture). I have followed the steps in wiki article "Tutorial: Develop an OK Linux Application" (http://wiki.ok-labs.com/DevelopOKLinuxApp) with one change; my build command specified 'machine=gumstix'.

Everything compiled okay however when I execute 'hello' I get the following error: /bin/hello: 1: Syntax error: "(" unexpected.
Furthermore I have tried executing the compiled hello program on my laptop's native environment (Ubuntu 8.04 x86) and it actually worked. This leads me to think that the hello program is not being cross compiled and instead being compiled for my native system.

I tried to figure out how to properly change the SConscript and/or Makefiles to support cross-compiling with the ARM toolchain however I could not.

Anyone have any thoughts or hints?

Thank you,
 Kevin

Source of Make and SConscript:

# cat Makefile
all: hello
install:
        install hello $(PREFIX)/bin

#cat linux/apps/hello/SConscript
Import("*")
import os
build_dir = Dir(env.builddir + "/hello").abspath
inst_dir = Dir(env.builddir + "/install").abspath
def b(file_name):
    return os.path.join(build_dir, file_name)
def i(file_name):
    return os.path.join(inst_dir, file_name)
env.scons_env["MAKE"] = "make"
hello = env.Command(b("hello"),
                    [] ,
                    "PREFIX=%s ZLIB=no $MAKE -j %d -C linux/apps/hello"
                    %(inst_dir, GetOption('num_jobs')))
hello_install = env.Command(i("bin/hello"),
                            hello,
                            "PREFIX=%s $MAKE -C linux/apps/hello install"
                                         % (inst_dir))
Return("hello_install")


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080715/b0c33dd1/attachment-0001.htm 


More information about the Developer mailing list