Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need not chroot after initializing scratchbox2!. What you expect can be achieved using the following procedure: </p> <p>Make sure you have a cross compiling tools set up on the host system. Assuming you are on a linux host (Ubuntu), you can install one by using:<br> <code>sudo apt-get install gcc-arm-linux-gnueabihf</code> (hard float) OR<br> <code>sudo apt-get install gcc-arm-linux-gnueabi</code> </p> <p>If you are on a different host machine or you have a different tool-chain for cross compiling like codesourcery's toolchain, just make sure you install the appropriate version (hardfloat/soft float) and export the path of the compiler to the $PATH and note down the name (prefix). </p> <p>Make sure you have Qemu installed.<br> Since you have already installed scratchbox2, assuming the path to the copy of your Rapberrypi's rootfs on the host pc is stored in the variable $raspirootfs,<br> <code>cd $raspirootfs</code><br> Now initialise sb2 using:<br> <code>sb2-init raspberrypi arm-linux-gnueabi-gcc</code><br> Where <code>raspberrypi</code> is just a name for the target configuration. replace <code>arm-linux-gnuabi-gcc</code> with your cross compiler prefix.<br> If this is your first target configuration (if this is the first time your are running sb2-init), you can start sb2 with the default target configuration by entering:<br> <code>sb2 -eR</code><br> This should give you a prompt like:<br> <code>[SB2 emulate raspberrypi] user@pc #</code><br> Now the sb2 is in emulate mode and not in normal mode and it will try to stay away from your host binaries and executes the binaries in your $raspirootfs using qemu.<br> Enter <code>sb2-show path /etc/apt</code> in the terminal to see how /etc/apt is mapped. It should show something like <code>/etc/apt --&gt; $raspirootfs/etc/apt</code> (and not the host system's /etc/apt).<br> <strong>To Install into emulated system:</strong><br> Just do as you would on you host system. Example:<br> <code>apt-get install build-essential</code><br> <strong>To cross compile some source:</strong><br> <code>cd sourcedir</code><br> <code>sb2 ./configure</code><br> <code>sb2 make -jN</code><br> <code>sb2 make install DESTDIR=$raspirootfs</code> </p> <p>For those of you trying to set up a cross compiling environment using scratchbox2, I have made a post here :<a href="http://praveenp.com/setting-up-a-cross-compiling-environment-to-build-linux-applications-for-embedded-targets/" rel="nofollow noreferrer">http://praveenp.com/setting-up-a-cross-compiling-environment-to-build-linux-applications-for-embedded-targets/</a> . For cross compiling using chroot, you can refer to this post :<a href="http://praveenp.com/setting-up-an-environment-using-chroot-for-developing-applications-for-embedded-targets/" rel="nofollow noreferrer">http://praveenp.com/setting-up-an-environment-using-chroot-for-developing-applications-for-embedded-targets/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload