On Tue, Sep 30, 2008 at 7:04 AM, E Robertson <[EMAIL PROTECTED]> wrote: > Hi all, > > Could someone shed some light on using sb2-init? What is the mapping_mode (-m > option) for? How is this used?
The mapping mode controls how the various paths are translated at runtime for the different tools. There are three or four interesting ones, namely: maemo, simple, emulate and install maemo does a lot of stuff, it basically re-creates SB1 level of functionality for SB2. I somewhat disagree with its design goals, in my opinion SB2 should do as little as possible, but that's the strength of having configurable modes, if someone needs SB2 to deal with everything, it's possible. simple is the bare minimum necessary to be able to cross-compile autotooled software. emulate provides a target emulation configuration which executes everything from the target binaries, very useful for running apt/dpkg/etc for the target to install packages. It can be used as a true target emulation environment (Nokia is doing that even if I'd wish they wouldn't) with the benefit of being able to access select files from the true host. install is being worked on to provide a nice mapping mode for running "make install", basically to be able to just do: sb2 ./configure --prefix=/usr sb2 -i make install simple or maemo modes would try to write directly to your true host's /usr, install mode would handle that differently. The mapping modes are defined as lua scripts, it's easy to add new ones, just take a look at the files under lua_scripts/pathmaps, they are installed under $prefix/share/scratchbox2/lua_scripts/pathmaps sb2-init -m modename will configure the target to use that mode by default, when no mode is explicitly given to sb2 on the command line. > At the beginning of sb2-init help is says > "sb2-init is expected to be run in the directory you want > to use as scratchbox 2 target root." > > Does that mean that when I set up a target, the current directory will be that > target root directory? Yes. > Is their a way to set up sb2 such that a "make install" will install to the > target root instead of taking care of doing it during configure? See above. regards, Lauri _______________________________________________ Scratchbox-devel mailing list [email protected] http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-devel
