[ksh93-integration-discuss] Directory structure of ksh93 code inprototype05 & build

Roland Mainz roland.mainz at nrubsig.org
Tue Apr 24 18:02:13 PDT 2007


Hi!

----

Sorry for my late reply... I was more or less completely occupied with
other stuff... ;-(

G N S wrote:
> Can you please let me know how you have organised the ksh93(+test
> suite) code in the prototype 5 of the ksh93-integration code-base that
> has been released.
> 
> Going through the diff file isn't very helpful in getting to know how
> and on what basis the sources+testscripts are organised.

The newest webrev posting (see
http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2007-April/002519.html)
has a small "overview" (see "primary directories")

> I see that
> there are some differences in the way the original ast packages are
> organised (http://www.research.att.com/~gsf/download/viewpath.html)
> and the directory structure in ON.

The differences are not that big. Basically the mapping is:

* Platform-independent source mapping AST ----> OS/Net
src/lib/libast/ ----> usr/src/lib/libast/common/
src/lib/libpp/  ----> usr/src/lib/libpp/common/ [1]
src/lib/libdll/ ----> usr/src/lib/libdll/common/
src/lib/libcmd/ ----> usr/src/lib/libcmd/common/
src/cmd/ksh93/  ----> usr/src/lib/libshell/common/ [2][3]
src/cmd/msgcc/  ----> usr/src/cmd/ast/msgcc/ [1]

[1]=libpp and msgcc are from the AST "ast-open" package, not "ast-ksh"
[2]=Upstream location is more or less historical
[3]=OS/Net's usr/src/cmd/ksh/ has no real equivalent in the AST hieracy
and as no sources since it "only" builds ksh93 frontend which directly
calls into libshell (and grabs the matching AST source from
usr/src/lib/libshell/).

* Platform-specific source mapping looks like this:
- 32bit SPARC
arch/sol11.sun4/src/lib/libast/
        ----> usr/src/lib/libast/sparc/src/lib/libast/
arch/sol11.sun4/src/lib/libpp/  
        ----> usr/src/lib/libpp/sparc/src/lib/libpp/
arch/sol11.sun4/src/lib/libcmd/ 
        ----> usr/src/lib/libdll/sparc/src/lib/libdll/
arch/sol11.sun4/src/lib/libdll/ 
        ----> usr/src/lib/libcmd/sparc/src/lib/libcmd/
arch/sol11.sun4/src/cmd/ksh93/  
        ----> usr/src/lib/libshell/sparc/src/cmd/ksh93/
- 64bit SPARC
arch/sol11.sun4/src/lib/libast/ 
        ----> usr/src/lib/libast/sparcv9/src/lib/libast/
arch/sol11.sun4/src/lib/libpp/  
        ----> usr/src/lib/libpp/sparcv9/src/lib/libpp/
arch/sol11.sun4/src/lib/libcmd/ 
        ----> usr/src/lib/libdll/sparcv9/src/lib/libdll/
arch/sol11.sun4/src/lib/libdll/ 
        ----> usr/src/lib/libcmd/sparcv9/src/lib/libcmd/
arch/sol11.sun4/src/cmd/ksh93/  
        ----> usr/src/lib/libshell/sparcv9/src/cmd/ksh93/
- 32bit i386
arch/sol11.i386/src/lib/libast/ 
        ----> usr/src/lib/libast/i386/src/lib/libast/
arch/sol11.i386/src/lib/libpp/  
        ----> usr/src/lib/libpp/i386/src/lib/libpp/
arch/sol11.i386/src/lib/libcmd/ 
        ----> usr/src/lib/libdll/i386/src/lib/libdll/
arch/sol11.i386/src/lib/libdll/ 
        ----> usr/src/lib/libcmd/i386/src/lib/libcmd/
arch/sol11.i386/src/cmd/ksh93/  
        ----> usr/src/lib/libshell/i386/src/cmd/ksh93/
- 64bit AMD64
arch/sol11.i386/src/lib/libast/ 
        ----> usr/src/lib/libast/amd64/src/lib/libast/
arch/sol11.i386/src/lib/libpp/  
        ----> usr/src/lib/libpp/amd64/src/lib/libpp/
arch/sol11.i386/src/lib/libcmd/ 
        ----> usr/src/lib/libdll/amd64/src/lib/libdll/
arch/sol11.i386/src/lib/libdll/ 
        ----> usr/src/lib/libcmd/amd64/src/lib/libcmd/
arch/sol11.i386/src/cmd/ksh93/  
        ----> usr/src/lib/libshell/amd64/src/cmd/ksh93/

Additionally the library-specific includes are copied from
arch/${HOSTTYPE}/include/ast/ to
usr/src/lib/(libast|cmd|shell)/($(MACH)|$(MACH64))/include/ast/ (for
each of { 32bit SPARC, 64bit SPARC, 32bit i386, 64bit AMD64 } and later
processed at OS/Net build time by usr/src/lib/libast/Makefile.astinclude
to one unified set of includes (e.g. the 32bit and 64bit versions of the
includes are "merged" by "/usr/bin/diff -D" into one version which works
for both 32bit+64bit code)).

AFAIK the interesting sources for the busybox project are in
usr/src/lib/libcmd/common/ - that's where the various builtin versions
of the commands in libcmd reside. Adding new ones should be easy - you
add the sources there, add an entry in usr/src/lib/libcmd/Makefile.com
and usr/src/lib/libcmd/mapfile-vers and you're done.

> Also,
> The ON build(along with the shadow build) on my celeron system takes
> over 2 days !

My Ultra5 has a similar performance... ;-(

> Hence  I would like to build only ksh93 from
> prototype005 instead of usr/src as given in the announcement. Which
> source sub-trees do I need to build?
> I have built libast, libcmd, libdll & libshell.
> Need to check once I get back to my comp again late in the day.

AFAIK you can build ksh93 like this:
$ make setup 2>&1 | tee -a buildlog_setup.log
$ cd lib
$ (set -e -x ; for i in libast libpp libdll libcmd libshell ; do
  (cd "$i" ; make install) ; done
$ cd cmd
$ (cd isaexec ; make install)
$ (cd ksh ; make install)

That should work without problems (except that it doesn't build the
message catalogs in this case - AFAIK that requires a full build).

----

Bye,
Roland

P.S.: Setting reply-to: to the busybox-dev at opensolaris.org list

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the ksh93-integration-discuss mailing list