(Cheat Sheet) Developing without a Netbook -- Using the chroot


This is a cheat sheet for Developing without a Netbook -- Using the chroot
  1. Download Moblin 2.1 development image from moblin.org
  2. Create chroot using the Moblin 2.1 development image First time: $ sudo moblin-chroot -s <destination path> <image file> After first time: $ sudo moblin-chroot <destination path>  (Optional) Change color of the chroot prompt
  3. (From desktop) Map desktop dbus to the chroot dbus $ sudo mount --bind <desktop dbus dir>  <chroot dbus dir>
  4. (From chroot, First time only) Create a "src" directory for your application source $ mkdir /root/src 
  5. (From desktop) Mount your source directory into the chroot $ sudo mount --bind <desktop source dir> <chroot source dir>
  6. (From desktop) Allow applications started in the chroot terminal to display output on the desktop $ xhost +SI:localuser:root
  7. (From chroot) Build, Run, Debug
    $ gcc helloworld.c -o helloworld
    $ ./helloworld
    $ gdb ...