Re: New developer - lots of questions

2007-11-22 Thread Andrea Grandi
Hi,

  1) Is it possible to have both Maemo 3.x and Maemo 4.x SDKs
  installed at the same time on one machine? If so, any HOWTO's for
  that? Any gotchas?

 Yes, it's possible. Just install scratchbox and then install each
 SDK. You don't need any HOWTO nor special steps to follow.

 In fact I installed Maemo 2, 3 and 4 in the same machine without any
 problems.

I'm having a little problem. Following the howto on this page:
http://tablets-dev.nokia.com/3.1/INSTALL.txt

I used the script to install the SDK, but when I run it I get this
error: http://pastebin.ca/793543

Maybe I'm missing something in Scratchbox? N.b: I already have
Scratchbox + Maemo SDK 4.0 installed and working fine.

Thanks for your support!

-- 
Andrea Grandi
email: [EMAIL PROTECTED]
website: http://www.ptlug.org
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-22 Thread Andrea Grandi
Hi

 Yes you are missing something.. I presume you have installed scratchbox by
 following the instructions for maemo 4.0 SDK.. that installs just the
 toolchains it needs and not the older Bora toolchains. You are missing those.

 You can get them from here as debian packages:

 http://www.scratchbox.org/download/files/sbox-releases/apophis/deb/
   scratchbox-toolchain-cs2005q3.2-glibc-arm_1.0.5_i386.deb
   scratchbox-toolchain-cs2005q3.2-glibc-i386_1.0.5_i386.deb

DOH! I think I've just created something unstable on my system :(
I modified the Maemo-SDK-3.1 installer script in this way:

18,19c18,19
 __target_toolchain=cs2005q3.2-glibc
 __target_prefix=SDK
---
 __target_toolchain=cs2005q3.2-glibc2.5
 __target_prefix=BORA

so, now the BORA_* targets are using cs2005q3.2-glibc2.5 instead of
cs2005q3.2-glibc.
I try to fix things :)

See ya later ;)

-- 
Andrea Grandi
email: [EMAIL PROTECTED]
website: http://www.ptlug.org
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-19 Thread Mohammed Hassan
On Fri, 2007-11-16 at 21:49 +0200, ext Igor Stoppa wrote:
[snip]
 If disk space is not an issue for you, maybe you can do like me and
 use
 a chrooted environment for each sdk (i use it because I have a full
 64bit system, but scratchbox is only 32 bit). I prefer this solution
 since it makes it quite easy to experiment: install your chrooted
 system, make a copy of it and feel free to trash it after
 experimenting.

I'm running amd64 on my home laptop (Debian lenny) and scratchbox runs
fine without any chroots.

-- 
Localization Engineer
OSSO - Nokia Multimedia

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-18 Thread Ville Syrjälä
On Fri, Nov 16, 2007 at 02:25:35PM -0500, [EMAIL PROTECTED] wrote:
 
 Ive been using the 770 and N800 for years, and finally decided to get into 
 developing software for these things (I have experience in C and various 
 scripting languages). But I have some (probably noob) questions:
 
 2) Anyone using Gentoo for development system?

I'm using a 64bit Gentoo system for maemo development at work and I have
32bit and 64bit Gentoo systems at home which also have the SDK installed.
There's no need for a 32bit chroot as the 32bit scratchbox binaries work
just fine on a 64bit Gentoo system. The scratchbox ebuilds I'm using were
originally made by Priit Laes (IIRC) and I've made some small modifications
and kept them updated with new scratchbox releases. I've attached the
ebuilds in case someone wants to take a look.

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_P=scratchbox-`echo ${PV} | cut -d '.' -f 1-2`
MY_CODENAME=apophis
MY_PV=${PV}-i386

SBOX_GROUP=sbox
RESTRICT=strip

DESCRIPTION=Scratchbox is a cross-compilation toolkit designed to make 
embedded Linux application development easier.
HOMEPAGE=http://www.scratchbox.org/;
SRC_URI=http://scratchbox.org/download/files/sbox-releases/${MY_CODENAME}/tarball/scratchbox-core-${MY_PV}.tar.gz
 
http://scratchbox.org/download/files/sbox-releases/${MY_CODENAME}/tarball/scratchbox-libs-${MY_PV}.tar.gz
 
http://scratchbox.org/download/files/sbox-releases/${MY_CODENAME}/tarball/scratchbox-toolchain-host-gcc-${MY_PV}.tar.gz;

LICENSE=GPL-2
SLOT=0
KEYWORDS=amd64 x86
IUSE=

DEPEND=
RDEPEND=

TARGET_DIR=/opt/scratchbox

S=${WORKDIR}/scratchbox

src_install() {
cd ${S}
dodir ${TARGET_DIR}
# doins doesn't work with symlinks, getting file not found with doins
cp -pRP ./* ${D}/${TARGET_DIR}
dosym opt/scratchbox scratchbox

# Create scratchbox command
dodir /usr/bin || die Directory creation failed
dosym /opt/scratchbox/login /usr/bin/scratchbox || die Symlink 
creation failed

# Create scratchbox service loader
newinitd ${FILESDIR}/scratchbox.rc scratchbox || die Initscript 
installation failed

# group already created
echo ${SBOX_GROUP}  ${D}/${TARGET_DIR}/.run_me_first_done
}

pkg_preinst() {
einfo Creating group sbox
enewgroup ${SBOX_GROUP} || die adding group '${SBOX_GROUP}' failed
}

pkg_postinst() {
elog
elog You need to run:
elog \emerge --config =${CATEGORY}/${PF}\
elog to set permissions and setup scratchbox users
elog
elog For further documentation about how to setup
elog scratchbox for your development needs have a look at
elog http://scratchbox.org/documentation/user/scratchbox-${MY_P}/;
elog
elog Also note that when you reboot you should run:
elog /etc/init.d/scratchbox start
elog before trying to run scratchbox.
elog You can also add it to the default runlevel:
elog rc-update add scratchbox default
elog
elog Type /opt/scratchbox/login to start scratchbox.
elog
}

pkg_postrm() {
elog
elog To remove all traces of scratchbox you will need to remove the 
file
elog /etc/init.d/scratchbox. Don't forget to delete the sbox group.
elog
}

pkg_config() {
if [ `id -u` != 0 ]; then
ewarn Must be root to run this
die not root
fi

einfo Do you want to configure scratchbox? [Yes/No]
einfo Note: This will set permissions and copy files from the system 
into the scratchbox
read choice
echo
case $choice in
y*|Y*|)
${TARGET_DIR}/sbin/sbox_configure no ${SBOX_GROUP} 
|| die sbox_configure failed
;;
*)
;;
esac

mkdir -p ${TARGET_DIR}/scratchbox/users

while true; do
einfo Existing users:
einfo $(ls ${TARGET_DIR}/users)
echo

einfo Create new user (leave empty to skip): 
read newuser
case $newuser in
)
break;
;;
*)
einfo Note: users have to be in the 
'${SBOX_GROUP}' to be able to login into the Scratchbox
${TARGET_DIR}/sbin/sbox_adduser ${newuser} || 
die sbox_adduser failed
;;
esac
done

einfo Configuration finished. Make sure you run 
'/etc/init.d/scratchbox start' before logging in.
}
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $


Re: New developer - lots of questions

2007-11-18 Thread Fred
[EMAIL PROTECTED] a écrit :
 On Sun, 18 Nov 2007, Ville Syrjälä wrote:
 
 I'm using a 64bit Gentoo system for maemo development at work and I have
 32bit and 64bit Gentoo systems at home which also have the SDK installed.
 There's no need for a 32bit chroot as the 32bit scratchbox binaries work
 just fine on a 64bit Gentoo system.
 
 But what if I wanted both Maemo 3.x and 4.x?

you can use something like :

in configure AC

# Hildon library dependsncies
PKG_CHECK_MODULES(HILDON, hildon-1 hildon-fm-2 hildon-help conbtdialogs, \
 AC_DEFINE(HILDON, 2008, [Version of hildon libraries]), \
 [AC_DEFINE(HILDON, 2007, [Version of hildon libraries]) \
 PKG_CHECK_MODULES(HILDON, hildon-libs = 0.9.50 
hildon-fm libossohelp)])
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)

and
in your c|h files
#if HILDON == 2008
...

 
 The scratchbox ebuilds I'm using were
 originally made by Priit Laes (IIRC) and I've made some small modifications
 and kept them updated with new scratchbox releases. I've attached the
 ebuilds in case someone wants to take a look.
 
 Thanks!
 
 Are these patches/modifications likely to make there way into the Sunrise 
 overlays?
 
 

Fred
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-18 Thread Ville Syrjälä
On Sun, Nov 18, 2007 at 01:01:18PM -0500, [EMAIL PROTECTED] wrote:
 On Sun, 18 Nov 2007, Ville Syrjälä wrote:
 
  I'm using a 64bit Gentoo system for maemo development at work and I have
  32bit and 64bit Gentoo systems at home which also have the SDK installed.
  There's no need for a 32bit chroot as the 32bit scratchbox binaries work
  just fine on a 64bit Gentoo system.
 
 But what if I wanted both Maemo 3.x and 4.x?

I haven't tried using the free SDKs in parallel but AFAICS it should
work. You simple have different targets for each SDK. One somewhat
nasty issue with this arrangement is that you can't use more than one
target simultaneosly. Sometimes that is rather frustrating when you're
working on something in one target with multiple sessions open and then 
you need to switch to another target just for a quick test (or
something). In that case you need to close all scratchbox sessions before
you can actually switch the target. The chrooted way should probably
allow more than one active target. Another way would be to create
additional users on the host system but that isn't really a nice solution
since it creates additional hassles with file permissions and whatnot.

  The scratchbox ebuilds I'm using were
  originally made by Priit Laes (IIRC) and I've made some small modifications
  and kept them updated with new scratchbox releases. I've attached the
  ebuilds in case someone wants to take a look.
 
 Thanks!
 
 Are these patches/modifications likely to make there way into the Sunrise 
 overlays?

I don't use any overlays nor have I submitted the ebuilds to anyone for
inclusion. I wouldn't even know who to contact actually. If someone wants
to do that they can have my blessing :)

If memory serves the actual modifications I made include (at least):
- Rename the ebuilds to include -bin in the name
- Add the host-gcc toolchain to the scratchbox-bin ebuild
- Additional ebuilds for new scractbox packages

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-18 Thread Fred
[EMAIL PROTECTED] a écrit :
 On Sun, 18 Nov 2007, Ville Syrjälä wrote:
 
 I'm using a 64bit Gentoo system for maemo development at work and I have
 32bit and 64bit Gentoo systems at home which also have the SDK installed.
 There's no need for a 32bit chroot as the 32bit scratchbox binaries work
 just fine on a 64bit Gentoo system.
 
 But what if I wanted both Maemo 3.x and 4.x?

you can use something like :

in configure AC

# Hildon library dependsncies
PKG_CHECK_MODULES(HILDON, hildon-1 hildon-fm-2 hildon-help conbtdialogs, \
 AC_DEFINE(HILDON, 2008, [Version of hildon libraries]), \
 [AC_DEFINE(HILDON, 2007, [Version of hildon libraries]) \
 PKG_CHECK_MODULES(HILDON, hildon-libs = 0.9.50
hildon-fm libossohelp)])
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)

and
in your c|h files
#if HILDON == 2008
...

 
 The scratchbox ebuilds I'm using were
 originally made by Priit Laes (IIRC) and I've made some small modifications
 and kept them updated with new scratchbox releases. I've attached the
 ebuilds in case someone wants to take a look.
 
 Thanks!
 
 Are these patches/modifications likely to make there way into the Sunrise 
 overlays?
 
 

Fred
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-16 Thread maemo
On Fri, 16 Nov 2007, Igor Stoppa wrote:

 If disk space is not an issue for you

Nope, it isn't...

 , maybe you can do like me and use
 a chrooted environment for each sdk (i use it because I have a full
 64bit system, but scratchbox is only 32 bit). I prefer this solution
 since it makes it quite easy to experiment: install your chrooted
 system, make a copy of it and feel free to trash it after experimenting.

My development is also pure 64bit :-)

So, do you install a 32bit distro + scratchbox inside the chroot or just 
scratchbox? I already have a 32bit chroot installed already (mainly to run 
32bit plugins and codecs).

 The gotcha is that I have to do all the bindmounting that scratchbox
 would do from the outside. Apparently doing a double bindmount from
 chroot to sbox of a /dev or /proc directory doesn't work and at the
 second step you end up with an empty directory.

Could you explain this a bit more?


-- 
Aj.

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-16 Thread Erik Hovland
On Fri, Nov 16, 2007 at 02:25:35PM -0500, [EMAIL PROTECTED] wrote:
 2) Anyone using Gentoo for development system?

At least one person does:
http://plaes.org/blog/2007/02/15/maemo-sdk-on-gentoo/

I am in the middle of trying out the instructions mentioned at the moment.
So I can't say how good those instructions are.

E

-- 
Erik Hovland
mail: [EMAIL PROTECTED]
web: http://hovland.org/
PGP/GPG public key available on request

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-16 Thread Alberto Garcia
O Venres 16/11/2007 ás 14:25, [EMAIL PROTECTED] dicía...

 1) Is it possible to have both Maemo 3.x and Maemo 4.x SDKs
 installed at the same time on one machine? If so, any HOWTO's for
 that? Any gotchas?

Yes, it's possible. Just install scratchbox and then install each
SDK. You don't need any HOWTO nor special steps to follow.

In fact I installed Maemo 2, 3 and 4 in the same machine without any
problems.

A complete Debian system with all three SDKs in a QEMU compressed
image is ~1.2 GB

 3) Does each version of mamemo generate unique compiler symbols
 (maybe so I can use #ifdef in C to do conditional compiles)? How
 about if I want to write one set of code that can be built for both
 desktop and maemo device use? Any symbols could be used for that?

I don't know what is the standard way of detecting which version of
Maemo you're using, but you can do it using autoconf and checking the
versions of some basic libraries such as libosso and hildon.

-- 
Alberto García González
http://people.igalia.com/berto/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-16 Thread Alberto Garcia
O Venres 16/11/2007 ás 15:27, [EMAIL PROTECTED] dicía...

  I don't know what is the standard way of detecting which version
  of Maemo you're using, but you can do it using autoconf and
  checking the versions of some basic libraries such as libosso and
  hildon.
 
 Are there any symbols that simply detect Maemo or not Maemo?

That's what I use:

if pkg-config --exists libosso; then
   # Compiling for Maemo
else
   # Otherwise ...
fi

And to detect the Maemo version:

libossovers=`$PKG_CONFIG libosso --modversion | cut -d . -f 1`

if test $libossovers = 1; then
   # This is Maemo 2/3
elif test $libossovers = 2; then
   # This is Maemo 4
fi

-- 
Alberto García González
http://people.igalia.com/berto/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-16 Thread Igor Stoppa

On Fri, 2007-11-16 at 15:11 -0500, ext [EMAIL PROTECTED] wrote:
 On Fri, 16 Nov 2007, Igor Stoppa wrote:
 
  If disk space is not an issue for you
 
 Nope, it isn't...
 
  , maybe you can do like me and use
  a chrooted environment for each sdk (i use it because I have a full
  64bit system, but scratchbox is only 32 bit). I prefer this solution
  since it makes it quite easy to experiment: install your chrooted
  system, make a copy of it and feel free to trash it after experimenting.
 
 My development is also pure 64bit :-)
 
 So, do you install a 32bit distro + scratchbox inside the chroot or just 
 scratchbox? I already have a 32bit chroot installed already (mainly to run 
 32bit plugins and codecs).
 
  The gotcha is that I have to do all the bindmounting that scratchbox
  would do from the outside. Apparently doing a double bindmount from
  chroot to sbox of a /dev or /proc directory doesn't work and at the
  second step you end up with an empty directory.
 
 Could you explain this a bit more?

ok,

*I have the chroot environment in /var/chroot/maemo : you can follow the
instructions from the official debian howto; i use sid

*I have inside the main directory of my user, a directory for the same
user to be bindmounted in the chrooted
environment: /home/igor/maemo_home_igor

*Inside that I have also a directory that is used as home for the
scratchbox user: /home/igor/maemo_home_igor/sbox_home

here is the relevant part of my fstab:

# maemo chroot
/sys/var/chroot/maemo/sys  none bind  0   0
/tmp/var/chroot/maemo/tmp  none bind  0   0
/dev/var/chroot/maemo/dev  none bind  0   0  0   0
/dev/pts/var/chroot/maemo/dev/pts  none bind  0   0
/dev/shm/var/chroot/maemo/dev/shm  none bind  0   0
/proc   /var/chroot/maemo/proc none bind  0   0
/proc/sys/fs/binfmt_misc   /var/chroot/maemo/proc/sys/fs/binfmt_misc
none bind  0   0
/home/igor/maemo_home_igor /var/chroot/maemo/home/igor none bind 0
0
/home/igor/maemo_home_igor/sbox_home 
/var/chroot/maemo/scratchbox/users/igor/home/igor none bind00
/var/chroot/maemo/scratchbox /var/chroot/maemo/scratchbox/users/igor/scratchbox 
none bind00
/tmp /var/chroot/maemo/scratchbox/users/igor/tmp none bind00
/proc /var/chroot/maemo/scratchbox/users/igor/proc none bind00
/proc/sys/fs/binfmt_misc   
/var/chroot/maemo/scratchbox/users/igor/proc/sys/fs/binfmt_misc none bind  
0   0
/dev /var/chroot/maemo/scratchbox/users/igor/dev none bind00
/dev/pts /var/chroot/maemo/scratchbox/users/igor/dev/pts none bind0
0
/dev/shm /var/chroot/maemo/scratchbox/users/igor/dev/shm none bind0
0
/sys /var/chroot/maemo/scratchbox/users/igor/sys none bind00




I use this script to start everything:

#!/bin/bash
mount /var/chroot/maemo/sys
mount /var/chroot/maemo/tmp
mount /var/chroot/maemo/dev
mount /var/chroot/maemo/dev/pts
mount /var/chroot/maemo/dev/shm
mount /var/chroot/maemo/proc
mount /var/chroot/maemo/proc/sys/fs/binfmt_misc
mount /var/chroot/maemo/home/igor
mount /var/chroot/maemo/scratchbox/users/igor/home/igor
mount /var/chroot/maemo/scratchbox/users/igor/scratchbox
mount /var/chroot/maemo/scratchbox/users/igor/tmp
mount /var/chroot/maemo/scratchbox/users/igor/proc
mount /var/chroot/maemo/scratchbox/users/igor/proc/sys/fs/binfmt_misc
mount /var/chroot/maemo/scratchbox/users/igor/dev
mount /var/chroot/maemo/scratchbox/users/igor/dev/pts
mount /var/chroot/maemo/scratchbox/users/igor/dev/shm
mount /var/chroot/maemo/scratchbox/users/igor/sys

chroot /var/chroot/maemo /sb_run

umount /var/chroot/maemo/scratchbox/users/igor/sys
umount /var/chroot/maemo/scratchbox/users/igor/dev/shm
umount /var/chroot/maemo/scratchbox/users/igor/dev/pts
umount /var/chroot/maemo/scratchbox/users/igor/dev
umount /var/chroot/maemo/scratchbox/users/igor/proc/sys/fs/binfmt_misc
umount /var/chroot/maemo/scratchbox/users/igor/proc
umount /var/chroot/maemo/scratchbox/users/igor/tmp
umount /var/chroot/maemo/scratchbox/users/igor/scratchbox
umount /var/chroot/maemo/scratchbox/users/igor/home/igor
umount /var/chroot/maemo/home/igor
umount /var/chroot/maemo/proc/sys/fs/binfmt_misc
umount /var/chroot/maemo/proc
umount /var/chroot/maemo/dev/shm
umount /var/chroot/maemo/dev/pts
umount /var/chroot/maemo/dev
umount /var/chroot/maemo/tmp
umount /var/chroot/maemo/sys




*the sb_run script that is executed in the previous script lives
in /var/chroot/maemo and is the following:

#!/bin/bash
/scratchbox/sbin/register_misc_runner
sux - igor scratchbox
/scratchbox/sbin/register_misc_runner -d



Not exactly straightforward, but as I said I had some problem with
cascaded bindmounting and this in the end works for me; furthermore it
keeps the user data safe by removing all the bindomounts as soon as you
log out from scratchbox. As a nice sideeffect, the sbox daemon gets
killed as soon as you log out from the chroot. The combined effect of
these 2 features makes it safe to discard your 

Re: New developer - lots of questions

2007-11-16 Thread Graham Cobb
On Friday 16 November 2007 19:49:57 Igor Stoppa wrote:
 If disk space is not an issue for you, maybe you can do like me and use
 a chrooted environment for each sdk (i use it because I have a full
 64bit system, but scratchbox is only 32 bit). I prefer this solution
 since it makes it quite easy to experiment: install your chrooted
 system, make a copy of it and feel free to trash it after experimenting.

I am investigating doing this to move away from my current user-mode-linux 
setup.  The big disadvantage is that it has to run as root but, in my case, 
the increased speed from being able to run it on my 64-bit system may make it 
worthwhile.

 The gotcha is that I have to do all the bindmounting that scratchbox
 would do from the outside. Apparently doing a double bindmount from
 chroot to sbox of a /dev or /proc directory doesn't work and at the
 second step you end up with an empty directory.

It works for me!  What I do is to mount proc from outside and then run the 
scratchbox startup from inside.  Here is my shell script which does the work 
(ignore the stuff about the v directory and qemu-build -- that is for my 
build system).  Kmail has messed up the formatting but I think you will get 
the idea...

#!/bin/sh
#
# Build maemo packages using chroot
#
# Has to be run as root.  But the work is done in the chroot using qemu-build
#

prefix=/vranx-linux

# mount proc
[ -d $prefix/home/dbtest/proc/1 ] || \
 mount proc -t proc $prefix/home/dbtest/proc
# create scratchbox v directory
[ -d $prefix/home/dbtest/scratchbox/users/scratchbox/home/scratchbox/v ] || \
 mkdir $prefix/home/dbtest/scratchbox/users/scratchbox/home/scratchbox/v
# bind mount scratchbox v directory
[ -f 
$prefix/home/dbtest/scratchbox/users/scratchbox/home/scratchbox/v/qemu-build ] 
|| 
\
 mount -o bind $prefix/home/scratchbox-apophis/users/cobb/home/cobb \
 $prefix/home/dbtest/scratchbox/users/scratchbox/home/scratchbox/v

# Start scratchbox
chroot $prefix/home/dbtest/ /scratchbox/sbin/sbox_ctl start

# Run build
chroot $prefix/home/dbtest/ su - scratchbox -c scratchbox v/qemu-build $*

# Stop scratchbox
chroot $prefix/home/dbtest/ /scratchbox/sbin/sbox_ctl stop

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: New developer - lots of questions

2007-11-16 Thread Graham Cobb
On Friday 16 November 2007 20:11:33 [EMAIL PROTECTED] wrote:
 On Fri, 16 Nov 2007, Igor Stoppa wrote:
  , maybe you can do like me and use
  a chrooted environment for each sdk (i use it because I have a full
  64bit system, but scratchbox is only 32 bit). I prefer this solution
  since it makes it quite easy to experiment: install your chrooted
  system, make a copy of it and feel free to trash it after experimenting.

 My development is also pure 64bit :-)

 So, do you install a 32bit distro + scratchbox inside the chroot or just
 scratchbox? I already have a 32bit chroot installed already (mainly to run
 32bit plugins and codecs).

If you already have a 32-bit chroot you could use that.  Or you can create 
another one just for maemo builds: the advantage is that you can keep a 
separate one for each SDK version.  In any case, start off by installing a 
32-bit distro into the chroot.  Here are my notes of the remaining steps I 
did to install the chinook SDK (note that my chroot was in a directory 
called dbtest):

* mount proc -t proc dbtest/proc
* chroot dbtest/

Remaining commands are within the chroot...

* apt-get install python
* cd /root
* wget http://tablets-dev.nokia.com/4.0/maemo-scratchbox-install_4.0.sh
* chmod +x maemo-scratchbox-install_4.0.sh
* ./maemo-scratchbox-install_4.0.sh
* adduser scratchbox 
* su - scratchbox

The remaining commands are run as the scratchbox user (within the chroot)...

* wget http://tablets-dev.nokia.com/4.0/maemo-sdk-install_4.0.sh
* sh maemo-sdk-install_4.0.sh -d
* /scratchbox/login

  The gotcha is that I have to do all the bindmounting that scratchbox
  would do from the outside. Apparently doing a double bindmount from
  chroot to sbox of a /dev or /proc directory doesn't work and at the
  second step you end up with an empty directory.

 Could you explain this a bit more?

See my other email to see how I get scratchbox to run in the chroot.

Graham
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers