[okl4-developer] Building a Wombat app...

Subcommander l0r3zz l0r3zz at gmail.com
Fri Jan 25 17:07:21 EST 2008


Hi,
Trying to add an app  (scsh) into Wombat.
I found a post a while ago that outlined how to do it (illustrated by
pciutils)

I tried enabling pciutils and had success.  But when I try to include my
dire for scsh, it seems to read the SConscript file
(in that it prints out my enter - leave diag statements, but doesn't seem to
build or install anything.


SuSE-Dev:/home/gwhite/okl4_release_1.5.2 # tools/build.py project=iguana
linux_apps=scsh machine="ia32_pc99" wombat="True"
toolpref="i686-unknown-linux-gnu-" simulate
scons: Reading SConscript files ...
SERIAL_DRIVER is  l4kdb_uart
entering scsh build
leaving scsh build
scons: done reading SConscript files.


Here's my SConscript file...

Import("*")
import os

print "entering scsh build"

build_dir = Dir(env.builddir + "/scsh").abspath
inst_dir = Dir(env.builddir + "/scsh").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"

scsh = env.Command(b("scsh"),
                     [] ,
                      "PREFIX=%s/usr  $MAKE -j %d -C linux/apps/scsh" %
                      (inst_dir, GetOption('num_jobs')))

scsh_install = env.Command(i("bin/scsh"),
                              scsh,
                              "PREFIX=%s/usr $MAKE -C linux/apps/scsh
install" % (inst_dir))

print "leaving scsh build"

Return("scsh_install")

maybe scsh and scsh_install are not getting set? are these variables
supposed to contain strings that are essentially "make" and "make install"
commands with the appropriate prefix and destination set?



Here is the original post...

* recently I start porting L4 to our smdk2410, and hypus255(pxa255) board.

*>*
*>* and I want to know, how can I make an application that running on wombat.
*>*
*>* someone says , all I have to do is make a directory on Linux_apps
directory ,and  edit
build.py & SConstruct File.
*
Yes you need to make a directory in linux/apps/$name_of_your_app
Let's take as an example pciutils.
so we unpack the pciutils source tarball, then move and rename the

source tree
$ mv unpacked_pciuitls-version_source root_of_tree/linux/apps/pciutils

note that the name of the directory is significant, to build it later we
are going to add linux_apps=pciutils to the build command.


One way to get this done (which is probably not the best way, but is
reasonably straight forward) is to create a SConscript that wraps the
application's native build system (usually gnu make based)
This would go in the top level of pciutils, and might look something

like this:
--------------------------

Import("*")
import os
build_dir = Dir(env.builddir + "/pciutils").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"

pciutils = env.Command
(b("pciutils"),
                     [] ,
                      "PREFIX=%s/usr ZLIB=no $MAKE -j %d -C
linux/apps/pciutils" %
                      (inst_dir, GetOption('num_jobs')))


pciutils_install = env.Command(i("bin/pciutils"),
                              pciutils,
                              "PREFIX=%s/usr $MAKE -C
linux/apps/pciutils install" % (inst_dir))

Return("pciutils_install")


--------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080124/114a292f/attachment.htm 


More information about the Developer mailing list