[Scratchbox-users] how to access host machine file system
Hi , I am using Scratchbox 1.0. I have a question: Can I access the host machine (Linux) file system when I am inside the scratchbox ? If yes, How do I do that? thanks! Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] how to access host machine file system
I tried to run "mount", but it is not available inside the scratchbox. Did I miss something? [sbox-N770: ~] > mount bash: mount: command not found Thanks. On Sun, Sep 7, 2008 at 12:28 AM, Kalle Vahlman <[EMAIL PROTECTED]> wrote: > 2008/9/7 Han <[EMAIL PROTECTED]>: >> Hi , >> >> I am using Scratchbox 1.0. I have a question: >> >> Can I access the host machine (Linux) file system when I am inside the >> scratchbox ? If yes, How do I do that? > > The only way to do that is to bind-mount[1] the directory you want > under some place visible under the scratchbox chroot. For example > under /scratchbox/users/$USER/ which is / inside. > > > [1] mount -o bind /from/here /to/here > > -- > Kalle Vahlman, [EMAIL PROTECTED] > Powered by http://movial.fi > Interesting stuff at http://syslog.movial.fi > ___ > Scratchbox-users mailing list > Scratchbox-users@lists.scratchbox.org > http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users > ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
[Scratchbox-users] cannot find GtkScaleButton support using Scratchbox 1.0
Hi, I am using Scratchbox 1.0 to cross-compile my GTK+2.0 code. But it seems the gtk 2.0 under Scratchbox does not support GtkScaleButton? error: `GtkScaleButton' undeclared (first use in this function) does Scratchbox 1.0 support GtkScaleButton? (btw, I have been using other GTK widgets with Scratchbox 1.0 and they are okay.) thanks. Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
[Scratchbox-users] scratchbox2: usages questions
Dear all, I am a happy user, using scratchbox2 (1.99.0.27) to cross compile applications. My target is an arm platform running Debian squeeze and my host is a amd64 Ubuntu9.04. After some configuration time it works really nicely. But I have a couple of usages questions. How to get pkgconfig work "automatically"? How to use "make install" or "checkinstall" within the scratchbox2 environment? My directory setup is as follows: 1) /home/myname/arm-2009q3/ 2) /home/myname/armrootfs 3) /home/myname/sourcecode 4) /usr/cross-pkg/xxx/ (the xxx is something like "armel-linux-eabi" but I forgot what it exactly is..) The codesoucery toolchain resides in directory (1) I have the root file system of my target in directory (2). I can do this in two ways: I mount with nfs the actually root file system of my target as readonly or I untar under (2) a copy of the root file system in that directory. With nfs I really use the right file system but I cannot write to it. And if I untar the file then is the owner not correct (myname and not root). Both work during the compiling phase, but give a problem when I like to install something. What would be the best/most common approach? In directory (3) I do my development work. I install the needed development libraries with apt-cross in directory (4) which makes them accessible for everybody working on the machine. I used sb2-init inside of my armrootfs(2) directory and I added in the sb2.config file of my target the relevant directories of (4) with means of -L and -I options for the compiler. This works very well; I can compile anything I like within the sb2 shell and it works on the target (when I install the right not-dev libraries as well on the target.) But when the "make" file tries to use pkgconfig is it not working directly. pkgconfig is looking in my target rootfs (2) and not in the additional library directories(4). I have to use "export PKG_CONFIG_PATH=/usr/cross-pkg/x/usr/lib/pkconfig" and then it is working again. Is it possible to add "TARGET_PKG_CONFIG_PATH" to the sb2.config file in such way that this environment variable is automatically set when I go into the sb2 shell? The next step that is going wrong is when I use "make install" or "checkinstall" within the sb2 shell then the intention is that the relevant files get installed into the armrootfs(2) directory and with the second command I should also get a debian package that I can install on my target. But this is not working: it looks like if "make install" tries to install the files onto the root of my host and not the target. I can solve this of course by using --PREFIX=/home/myname/armroofs during the ./configure phase, but in that case is it not really easily possible to install the debian package on my target. (By the way when I had mounted my real target root filesystem with nfs as read only is this anyhow not working.) How do other users install the just compiled files onto their target? Is there a way to make "make install" or preferably "checkinstall" work? Or is it just a matter of copying the files by hand to the right directories on the target? I hope someone can explain to me what the most common approach is. Many thanks in advance! Kind regards, Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
[Scratchbox-users] Re: scratchbox2: usages questions
Dear all, I was able to answer my questions myself (Except for the "PKG_CONFIG_PATH" ) I should have read the Meamo SDK documentation before I asked my questions last week. I have now installed the rootfs in my home directory. (I had to "Seed" my rootfs with the correct packages of debian squeeze and the correct locale settings to get it working.) And now I can do the same things with apt-get and dpkg-buildpackage as mentioned in the meamo SDK manual but than for a debian squeeze on a SheevaPlug. Basically I do not need to use the apt-cross any more, which in its own way also solves my PKG_CONFIG_PATH "problem". The only issue I saw is that /bin/rm in the "sb -eR" mode was not working correctly because it needs some kernel function and that does not work in the simulated case. It is not a big deal when I use "dpkg-buildpackage" but "checkinstall" or "make install" gives some problems. I have to look into this more, maybe I should just try to install the latest version of scratchbox2 first. Scratchbox2 is really a nice piece of work!! My compliments!! Kind regards, Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] scratchbox2: usages questions
For scratchbox2 is this basically not so difficult, but I need a bit more information from you about what kind tool chain to answer your question completely. The basic procedure is as follows: cd rootfs_target sb2-init -c qemu-target target_name /the/path/to/the/bin/of/the/toolchain/bin/gcc "-c qemu-target" is needed when qemu is used to simulate the target I have no clue how to use sbrsh (never tried). I use "-c qemu-arm" "target_name" can be any name, probably no space allowed, just choose something easy "/the/path/to/the/bin/of/the/toolchain/bin/gcc" should be the absolute path to the gcc compiler of the toolchain you want to use. Normally is this something like "/home/myname/arm-2009q3/bin/arm-none-linux-gnueabi-gcc" I do not know how to do this with scratchbox 1. Greetings, Han On Fri, Jan 8, 2010 at 9:21 PM, Kartik Natarajan wrote: > Hi, > > I have a tool chain which has come along with my device. I want to use it > inside the scratch box, can anyone let me know how can we add a tool chain > to scratchbox. > > It will be really helpful. Many thanks. > > > > ___ > Scratchbox-users mailing list > Scratchbox-users@lists.scratchbox.org > http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users > > ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] Re: Re: [Scratchbox-devel] Strange things on Scratchbox 2
On Sat, Jan 9, 2010 at 10:25 PM, Claudio Scordino wrote: > Claudio Scordino ha scritto: > >> Claudio Scordino ha scritto: >> >>> Hi all, >>> >>> I'm using the latest Scratchbox on git repository with a CodeSourcery >>> toolchain (arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2) >>> and a Maemo rootstrap (I tried both 4.01 and 4.1). >>> >>> I have the following issues: >>> >>> 1) If I type: >>> >>> sb2 -e apt-get install libncurses5-dev >>> >>> I get >>> >>> Reading package lists... Done >>> Building dependency tree... Done >>> The following NEW packages will be installed: >>> libncurses5-dev >>> 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. >>> Need to get 0B/1055kB of archives. >>> After unpacking 5386kB of additional disk space will be used. >>> WARNING: The following packages cannot be authenticated! >>> libncurses5-dev >>> Install these packages without verification [y/N]? y >>> /bin/sh: line 1: /usr/sbin/dpkg-preconfigure: No such file or directory >>> dpkg: requested operation requires superuser privilege >>> E: Sub-process /usr/bin/dpkg returned an error code (2) >>> >>> Do I need fakeroot on my rootfs ? Can I use the fakeroot on my machine >>> (i.e. the one out of sb2) ? >>> >>> Does "sb2 -eR apt-get install libncurses5-dev" work? The "R" gives a root permission which should solve the "dpkg: requested operation requires superuser privilege" messages. Is dpkg-preconfigure installed on your target root file system? And is it installed on the host root file system? (I do not use Maemo but a debian squeeze target root file system; I can probalby not help so much...) Greetings, Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] Compiling kernel with scratchbox2
Dear Aaron, I am not really an expert on this but I think that the problem is not directly Scratchbox2; for some reason is the make process asking for the usages of the host C-compiler and in that case is always the host libc is used. (Even when it is too old.) On Thu, Jan 21, 2010 at 2:44 AM, Aaron Brice wrote: > > make[1]: Entering directory `/scratch/kernel/linux-2.6' > ... > CC init/initramfs.o > CC init/calibrate.o > LD init/built-in.o > HOSTCC usr/gen_init_cpio > Here is the make process asking for the HOSTCC in that case would scratchbox2 step back and give access to the normal /usr/bin/gcc of the host and you end up with the wrong version. I see a couple of possible solutions: 1. Understand why the HOSTCC compiler is needed and fix the make file. (To be honest I do not understand why the host compiler is needed, I believe that this is just an error in the Make file or Config file. In case of a "make menuconfig" is the host compiler needed to make the menu to show on the host) 2. Try to compile it completely on the target buy using : sb2 -eR make (In that case you will need a compiler installed on the target rootfs. 3. Use the native method to cross compile the target: "make ARCH=arm CROSS_COMPILE=/path/to/compiler" (search internet for more information.) I hope this helps you forward... Kind regards, Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
[Scratchbox-users] [Scratchbox2] How to use "python setup.py build" under scratchbox
Dear all, I try to "compile" some python files for the ARM platform. (Actually kaa of the freevo media player (http://freevo.sourceforge.net/) I doubt actually if pure python needs this, but my source has also a couple of C files which do need to be compiled for the target. Normally would the python-distutils take care of this but under scratchbox2 is this for me not directly working. if I do "sb2 -m devel python setup.py build" I get the following errors: hansan@mediachan:~/freevo_src/kaa/base$ sb2 -m devel python setup.py build sh: /dev/null: Read-only file system - Python headers not found; please install python development package. kaa.db, shm and inotify support will be unavailable - Traceback (most recent call last): File "setup.py", line 158, in namespace_packages = ['kaa'] File "/home/hansan/freevo_src/kaa/base/src/distribution/core.py", line 595, in setup f = open('src/version.py', 'w') IOError: [Errno 30] Read-only file system: 'src/version.py' >From this I guess the following: 1) my development directory is from within scratchbox mapped as read-only... 2) also /dev/null of the host is mapped read-only 3) I do have my python headers installed on my target but I am for some reason not mapping this. What is the normal way to work with python from within scratchbox? I try this on a debian Wheezy distribution and I use scratchbox 2.2.1 and my root file system and development tools are of angstrom distribution (openembedded related distribution) Kind regards, Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
[Scratchbox-users] [Scratchbox2] How to use "python setup.py build" under scratchbox
Dear all / lauri, (This is a resend: the log files were to big to make it to the list the first time.) It looks if the mapping is indeed not correct everything is mapped to the host. I have put my answers more or less inline On Thu, Mar 10, 2011 at 10:04 PM, Lauri T. Aarnio wrote: > > On Mar 10, 2011, at 1:14 PM, ext Han Hartgers wrote: > > > > 3) I do have my python headers installed on my target but I am for some >> reason not mapping this. >> > > You can check the effect of path mappings by e.g. "sb2 -m devel sb2-show > path /usr/include/foobar.h". > > hansan@mediachan:~/freevo_src/kaa$ sb2 -m devel sb2-show path /usr/include/foobar.h /usr/include/foobar.h => /usr/include/foobar.h (readonly) But the simple mode does the correct mapping: hansan@mediachan:~/freevo_src/kaa$ sb2 sb2-show path /usr/include/foobar.h /usr/include/foobar.h => /home/hansan/Beagelboard/angstrom_rootfs/usr/include/foobar.h > >> Please check that the tools are mapped properly; for example, does "sb2 -m > devel sb2-show path /bin/sh" map to your tools collection, and not to host's > /bin/sh? > > This looks to be mapped to the host as well. shansan@mediachan:~/freevo_src/kaa$ sb2 -m devel sb2-show path /bin/sh /bin/sh => /bin/bash (readonly) The simple mode makes it not readonly but the location is the same as in the devel mode. hansan@mediachan:~/freevo_src/kaa$ sb2 -m simple sb2-show path /bin/sh /bin/sh => /bin/bash > > Also, checking how the target was configured could reveal something: Please > run "sb2-init" without parameters and send those lines that refer to your > target. > > This is the relevant (?) output of the sb2-init command. configured at 2011-03-10_17:38:35 by user 'hansan', with command ( cd /home/hansan/Beagelboard/angstrom_rootfs; sb2-init beagle_angstrom /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc ) I tried to do the above steps with the git version as with version 2.2.0 and that gives the same output as with the 2.2.1 version. But there is something strange when I try to compile a simple "hello world" test program. hansan@mediachan:~/freevo_src$ sb2 -m devel sb2-show path gcc gcc => gcc (readonly) hansan@mediachan:~/freevo_src$ sb2 -m devel sb2-show path test.c test.c => test.c (readonly) hansan@mediachan:~/freevo_src$ sb2 -m devel gcc test.c -o test Exit reason and status: signal 6 It looks if I map to my host GCC and it does not work in the devel mode but it does function in the normal mode. hansan@mediachan:~/freevo_src$ sb2 gcc test.c -o test hansan@mediachan:~/freevo_src$ sb2 file ./test ./test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped hansan@mediachan:~/freevo_src$ sb2 -e ./test Hello, World! hansan@mediachan:~/freevo_src$ ./test -bash: ./test: cannot execute binary file There must be something wrong with how I do the setup of the system. I have installed it as follows: hansan@mediachan:~/Beagelboard/scratchbox2$ ./autogen.sh hansan@mediachan:~/Beagelboard/scratchbox2$ ./configure --prefix=$HOME/sb2 hansan@mediachan:~/Beagelboard/scratchbox2$ make install prefix=$HOME/sb2 > Mycompile.log 2>&1 (The configure step is actually not needed because the make install would do this as well. But now I have a configure.log) I have added the log files to this email. I hope someone can spot my mistake. Many thanks in advance! Han config.log.gz Description: GNU Zip compressed data Mycompile.log.gz Description: GNU Zip compressed data ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] [Scratchbox2] How to use "python setup.py build" under scratchbox
Dear Lauri, Many thanks for the explanation. I did read about the tools root, but disregarded that as unimportant. Can you be a bit more specific about what this tools root should include? Should this file system include the same libraries and header files as the target rootfs? I can fairly easy generate a similar root file system for my beagleboard as for a i686 architecture and use the beagleboard one as target root file system and the i686 one as tool root. When they are both of the same version then I expect them to have the same files but different architectures. I will try how this goes and let you know. Greetings, Han On Tue, Mar 15, 2011 at 11:35 PM, Lauri T. Aarnio wrote: > > On Mar 14, 2011, at 4:41 AM, ext Han Hartgers wrote: > >> >> This is the relevant (?) output of the sb2-init command. >> configured at 2011-03-10_17:38:35 by user 'hansan', with command >> ( cd /home/hansan/Beagelboard/angstrom_rootfs; >> sb2-init beagle_angstrom >> /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc ) >> > > I think that the problem is in the way how your target has been > initialized; "devel" needs a separate tools root. There is something about > it on the manual page, but maybe the description is too brief, and in any > case, the fact that it is possible to use "sb2 -m devel" also when > "sb2-init" was executed without the "-t" option can be classified as a bug. > > This is the relevant part from the man page ("man sb2"): > > The other two development modes, "accel" and "devel" have more complete > support for different tools, but these are not necessarily as easy to set > up as the "simple" mode is. Both "accel" and "devel" are intended to be > used with a separate "tools root" directory, consisting of host-compatible > binaries of the same programs that exist in the target file system as > foreign binaries (e.g. target root can contain arm binaries, whereas > tools > root has x86 binaries of the exactly versions of the same programs). This > is configured with the -t option of sb2-init(1). > > >Lauri > ___ > Scratchbox-users mailing list > Scratchbox-users@lists.scratchbox.org > http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users > ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] [Scratchbox2] How to use "python setup.py build" under scratchbox
Dear all, I have now generated a tools root but I think I have done something wrong because now is the sb2-init command not working correctly. I generated a qemux86 image with the angstrom online build system (Narcissus) this image should be basically the same as the image I have for my beagleboard but then for the i686 architecture. * hansan@mediachan:~/Beagelboard/angstrom_rootfs$ sb2-init -m devel -t /home/hansan/Beagelboard/i86_rootfs/ beagle_angstrom2 /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc Using /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc to detect target architecture: Reading mode-specific settings.. Finished writing sb2.gcc.config gcc configured. sb2-init: Target architecture is 'arm' sb2-init: Host architecture is 'i[3456]86' Reading mode-specific settings.. Finished writing sb2.config sb2-init: Creating Debian build system settings for this target: /bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory /bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory sb2-init: configuring libtool for this target: /bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory Running /home/hansan/sb2/bin/sb2-build-libtool failed You can run this manually later, otherwise your sb2 environment is correctly setup and ready to use* Probably there is something wrong with my tools root. I am also not able to call sb2 /home/hansan/sb2/bin/sb2-build-libtool successfully. *hansan@mediachan:~/Beagelboard/angstrom_rootfs$ sb2 /home/hansan/sb2/bin/sb2-build-libtool /bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory* I think that the problem is that my tools root fs expect to be a real root fs and does not expect to reside in a directory. Probably that breaks some paths to libraries... Some idea how to fix this, or some tips on how to get a decent tools root. Kind regards, Han On Wed, Mar 16, 2011 at 12:12 PM, Han Hartgers wrote: > Dear Lauri, > > Many thanks for the explanation. I did read about the tools root, but > disregarded that as unimportant. > Can you be a bit more specific about what this tools root should include? > Should this file system include the same libraries and header files as the > target rootfs? > > I can fairly easy generate a similar root file system for my beagleboard as > for a i686 architecture and use the beagleboard one as target root file > system and the i686 one as tool root. > When they are both of the same version then I expect them to have the same > files but different architectures. > > I will try how this goes and let you know. > > Greetings, > > Han > > > > On Tue, Mar 15, 2011 at 11:35 PM, Lauri T. Aarnio < > lauri.t.aar...@nokia.com> wrote: > >> >> On Mar 14, 2011, at 4:41 AM, ext Han Hartgers wrote: >> >>> >>> This is the relevant (?) output of the sb2-init command. >>> configured at 2011-03-10_17:38:35 by user 'hansan', with command >>> ( cd /home/hansan/Beagelboard/angstrom_rootfs; >>> sb2-init beagle_angstrom >>> /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc ) >>> >> >> I think that the problem is in the way how your target has been >> initialized; "devel" needs a separate tools root. There is something about >> it on the manual page, but maybe the description is too brief, and in any >> case, the fact that it is possible to use "sb2 -m devel" also when >> "sb2-init" was executed without the "-t" option can be classified as a bug. >> >> This is the relevant part from the man page ("man sb2"): >> >> The other two development modes, "accel" and "devel" have more complete >> support for different tools, but these are not necessarily as easy to set >> up as the "simple" mode is. Both "accel" and "devel" are intended to be >> used with a separate "tools root" directory, consisting of host-compatible >> binaries of the same programs that exist in the target file system as >> foreign binaries (e.g. target root can contain arm binaries, whereas >> tools >> root has x86 binaries of the exactly versions of the same programs). This >> is configured with the -t option of sb2-init(1). >> >> >>Lauri >> ___ >> Scratchbox-users mailing list >> Scratchbox-users@lists.scratchbox.org >> http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users >> > > ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] [Scratchbox2] How to use "python setup.py build" under scratchbox
On Thu, Mar 17, 2011 at 1:05 AM, Lauri T. Aarnio wrote: > > On Mar 16, 2011, at 5:12 AM, ext Han Hartgers wrote: > > Many thanks for the explanation. I did read about the tools root, but >> disregarded that as unimportant. >> > > long time ago it was possible to use "devel" without a separate tools root, > I think. But obviously that haven't been tested lately, and on the other > hand, it is a feature which isn't really useful anyway, as we have learned. > > I'll try to explain the history of these more complex mapping modes, > "devel" and "accel", hopefully that clarifies something: > Removed a lot of text > So, a built-in requirement of "accel" is that the set of tools is built > from the exactly same sources that you are using in the target. Which is the > only configuration that can be recommended anyway, as we have learned. > Alternatively, "devel" can be used, but it should not offer any advantages > over "accel". (In fact, because I don't know any cases where "accel" would > be worse than "devel" if the same-codebase-for-both requirement is met, I'm > planning to drop the aging "devel" mode from the next major version of SB2) > > BTW, sb2 will be using the dynamic linker/loader (ld.so = ld-linux.so.*) > from the tools root in "accel" and "devel" modes. There are some things that > work better if you apply the patches that are shipped with SB2 and rebuild > glibc; see external_patches/README for details. > > Many thanks for your extensive explanation. Maybe it would be nice to add this explanation to the wiki / website for future reference. I will have to recompile my tools root to get the patches included. This should be not too complictated by using the openembedded / angstrom build system. Kind regards, Han ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users