maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Set up sb2 with armel debootstrap (https://talk.maemo.org/showthread.php?t=83713)

tuxor 2012-04-17 17:12

Set up sb2 with armel debootstrap
 
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...

jackburton 2012-04-18 15:14

Re: Set up sb2 with armel debootstrap
 
I think you need to bind mount the real /dev to $ROOTFS/dev

See how the easy-debian scripts do it.

tuxor 2012-04-18 16:36

Re: Set up sb2 with armel debootstrap
 
I posed the same question on the scratchbox-users mailing list and sb2 developer Lauri had a few useful answers for me:

http://lists.scratchbox.org/pipermai...il/001768.html

Scratchbox2 is not supposed to remap the /dev directory, but instead commands like mknod. The latest developer edition fixes this partially: http://lists.scratchbox.org/pipermai...il/001776.html

Looks like this is worked on :)

By the way. Where can I find the source code of the "easy-debian scripts". And what do they have to do with debootstrap and scratchbox2?

jecxjo 2012-11-09 14:23

Re: Set up sb2 with armel debootstrap
 
@tuxor Thanks for pointing out the missing piece to my tutorial. I'll be sure to update it.

Also, as a side note, I'm in the process of getting rid of my old domain at biffengineering.com I'm trying to get the Google Search results moved over but for anyone who comes here in the future and the link to biffengineering doesn't work I've moved the info to

http://jecxjo.motd.org/code/blosxom....er_environment


All times are GMT. The time now is 16:18.

vBulletin® Version 3.8.8