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

Subcommander l0r3zz l0r3zz at gmail.com
Sat Jan 26 04:26:14 EST 2008


On Jan 25, 2008 8:36 AM, Geoffrey Lee <glee at ok-labs.com> wrote:

> On Fri, Jan 25, 2008 at 07:29:17AM -0800, Subcommander l0r3zz wrote:
> > On Jan 25, 2008 1:47 AM, Geoffrey Lee <glee at ok-labs.com> wrote:
> >
> > > On Thu, Jan 24, 2008 at 10:07:21PM -0800, Subcommander l0r3zz wrote:
> > > > 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.
> > > >
> > >
> > >
> > > Hi
> > >
> > > Check your directory, default is in build/linux, and see if you see
> > > your build objects there.  For things to be populated onto the
> > > default RAM rootdisk they should be in the build/linux/install
> > > directory.  If you specify linux_apps=... it should do this for you.
> >
> >
> >
> > they are not there (which is why I'm writing to the list ;)
>
>
> Hi
>
>
> If I am not mistaken about the scsh that you are talking about the
> steps to build involve configure, make and make install.  Hence that
> fragment that you use is incorrect, because it does not reflect
> the build commands that you would otherwise use to build the scsh
> software.  If this is the case then the software never got built
> successfully in the first place and hence is not in the build output
> directory.




configure has already been run and what is in the directory is the resultant
makefile and source.
I tried to use pciutils as a template, but I guess I missed something.

>
>
> What is in the Sconsript should encapsulate the commands that you need
> to use to build the software.  While the fragment which you copy and
> pasted is right in the context of the software that it was intended for
> it needs to be adapted.  You have either the choice of
> calling out to the scsh build system from scons, or you can write
> a Sconstruct which builds the scsh software.



hmmm, I though that the SConstruct would do something like

PREFIX=/home/gwhite/okl4_release_1.5.2/build/linux/install/usr  make  -j 1
-C linux/apps/scsh


followed by

PREFIX=/home/gwhite/okl4_release_1.5.2/build/linux/install/usr  make  -j 1
-C linux/apps/scsh install

>
>
> If you don't mind including pre-built binaries you can stick it
> into the root filesystem using the rootfs package.  Take a look at the
> SConscript there on how to do that, there should already be some
> examples in there.
>


I see those examples but would like to get the build process working.

Is it a wrong assumption to assume that the variables scsh and scsh_install
should be set to appropriate build and install commands respectively?


Thanks for the help.


Geoff






>        -gl
>
> > >
> > >
> > > What release are you using and what command line did you use to invoke
> > > the build system?
> >
> >
> >
> > The current release 1.5.2 , you can see all of the info in the previous
> > e-mail (including the command I used)
> > Also right below...
> >
> >
> > >
> > >
> > > >
> > > > SuSE-Dev:/home/gwhite/okl4_release_1.5.2 # tools/build.py
> project=iguana
> > > inux_apps=scsh machine="ia32_pc9wombat="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")
> > > >
> > > >
> > > > --------------------------------
> > >
> > > > _______________________________________________
> > > > Developer mailing list
> > > > Developer at okl4.org
> > > > https://lists.okl4.org/mailman/listinfo/developer
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080125/f2dc43a1/attachment-0001.htm 


More information about the Developer mailing list