Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
September 09, 2010, 07:43:19 AM
News: Welcome to GLomation peer support forum
Pages: [1]
Topic Tools  
Read January 14, 2010, 08:10:35 AM #0
admin

chroot to Debian based file system on USB/SD for native development

Although the desktop offer much faster speed for program development sometimes cross compiling can be cumbersome.  A USB/SD based native development environment can offer convenience for small to medium application development.

The Glomation SBC can be configured to boot to the file system installed on the USB or SD but it requires change of the U-boot boot environment setting.  The chroot method offers easy switch over from the embedded file system to a Debian file system without needing the change of any of the system settings.

First prepare the USB/SD storage by make an ext2/3 file system using mkfs.ext2/mkfs.ext3 command, for example
          mkfs.ext2 /dev/sda1.

Boot the SBC with the embedded file system with USB/SD inserted.

Mount the USB/SD to /mnt directory
          mount /dev/sda1 /mnt
or
          mount /dev/mmcblk0p1 /mnt

Then untar the Debian file system available at http://www.glomationinc.com/download/debian-etch-arm-base.tar.gz to the USB/SD.
          cd /mnt
          wget http://www.glomationinc.com/download/debian-etch-arm-base.tar.gz
          tar zxf debian-etch-arm-base.tar.gz

Create a chroot proc directory in /mnt if it does not exist
          mkdir -p /mnt/proc

The above steps only need to be done once to prepare the USB/SD storage.

To chroot to the Debian file system on USB/SD
          mount -t proc proc /mnt/proc
          chroot /mnt /bin/sh

Do development, testing, etc

After leaving the chroot env:
umount /mnt/proc

« Last Edit: January 14, 2010, 09:37:07 PM by admin »
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re