View Single Post
Posts: 2 | Thanked: 0 times | Joined on Apr 2012
#1
My question is not related to development for N900 etc, but only to usage of scratchbox2 in general.

I can't setup a debian armel deboostrap with sb2, because it won't remap the /dev directory. And that's astonishing. In all tutorials on the internet everybody seems to leave out this detail, e.g. see here:

http://www.daimi.au.dk/~cvm/sb2.pdf
http://biffengineering.com/wiki/inde...ileEnvironment

You initiate the debootstrap with the following command:

Code:
$ fakeroot /usr/sbin/debootstrap --verbose --arch armel --foreign wheezy $ROOTFS http://ftp.debian.org/debian
(Adding --variant=scratchbox to it, doesn't make a significant difference here.) After sb2-init you would now want to run second-stage in order to get the rest of the packages like apt-get. But this command will fail in general:

Code:
$ sb2 -eR ./debootstrap/debootstrap --second-stage
The reason, why this will fail, can be found in ./debootstrap/debootstrap.log. Here we see, that in second-stage debootstrap tries to modify some entries in /dev. But of course "mknod" and "utime" will all fail due to missing permission:

Code:
tar: dev/kmem: Cannot mknod: Permission denied
tar: dev/mem: Cannot mknod: Permission denied
tar: dev/core: Cannot open: File exists
tar: dev/null: Cannot utime: Operation not permitted
scratchbox2 is not remapping the directory "/dev" to "$ROOTFS/dev"! You can check this with:

Code:
$ sb2 -eR sb2-show path /dev
/dev => /dev
Is there a way around this? With this limitation, sb2 seems to be entirely unusable to me...