You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Many instructions here are mirrored from Toby Schneider's instructions at http://gobysoft.org/wiki/InstallOnGumstixOvero.  

Root filesystem preparation

Follow these steps to create a debian wheezy root filesystem.  In this section we will use # host to indicate commands run on the host machine, and # chroot for commands commands run inside the chroot filesystem.  

  1. Install dependencies:

    # host
    sudo apt-get install multistrap qemu-user-static
  2. Pick a working folder, in this case ~/duovero
     
  3. Create a directory to hold the root filesystem:

    # host
    cd ~/duovero
    mkdir rootfs
  4. Create a configuration file debian.conf in ~/duovero and paste in the following.  Additional packages can be included here or installed later using apt-get.  

    [General]
    arch=armel
    directory=~/duovero/rootfs
    retainsources=~/duovero/sources
    cleanup=true
    noauth=true
    unpack=true
    bootstrap=Wheezy Net Utils
    aptsources=Wheezy
    
    [Wheezy]
    packages=apt locales udev adduser sudo nano build-essential less
    source=http://debian.lcs.mit.edu/debian
    suite=wheezy
    
    [Net]
    packages=netbase ifupdown iproute net-tools iputils-ping ntp
    source=http://debian.lcs.mit.edu/debian
    
    [Utils]
    packages=wget
    source=http://debian.lcs.mit.edu/debian
  5. Run multistrap to create the root filesystem.  

    # host
    sudo multistrap -a armel -d ~/duovero/rootfs -f debian.conf

    In ubuntu 14.04 you may need to remove $forceyes from /usr/sbin/multistrap at line 989

  6. Copy the QEMU ARM emulator into the new root filesystem so it is on the path when we chroot in.  

    # host
    sudo cp /usr/bin/qemu-arm-static ~/duovero/rootfs/usr/bin/
  7. (Optional) If you need /dev/random (for installing openssh-server for example), mount /dev in the chroot.  

    # host
    sudo mount -o bind /dev ~/duovero/rootfs/dev
  8. Chroot into the new filesystem.  

    # host
    sudo chroot ~/duovero/rootfs /bin/bash
  9. Finish setting up packages 

    # chroot
    dpkg --configure -a

    Answer "no" when prompted to use "dash" as "/bin/sh".  If any packages fail to configure (possibly ifupdown), just run dpkg again.  

  10. Set the root user password.

    # chroot
    passwd
  11. (Optional) Add a new user and give it sudo permissions 

    # chroot
    adduser mit
    printf "mit     ALL=(ALL) ALL" >> /etc/sudoers
  12. Configure locales.  Choose 138 for en_US.UTF-8.  

    # chroot
    dpkg-reconfigure locales
  13. Add a DNS server 

    # chroot
    printf "nameserver 8.8.8.8" > /etc/resolv.conf
  14. Add a static network entry for eth0 (install the isc-dhcp-client package for dhcp support) 

    # chroot
    nano /etc/network/interfaces
     
    auto eth0
    iface eth0 inet static
    address 192.168.1.102
    netmask 255.255.255.0
    gateway 192.168.1.1
  15. Restart networking to apply the new interface. 

    # chroot
    /etc/init.d/networking restart

    This might yield an error, but try pinging something anyways and it should work.  

  16. Update the apt repositories 

    # chroot
    apt-get update
  17. Assign a hostname and update the hosts file 

    # chroot
    printf "nostromo" > /etc/hostname
    printf "127.0.0.1   nostromo\n" >> /etc/hosts
  18. Add the serial console (specific to gumstix overo and duovero) 

    # chroot
    printf "T0:2345:respawn:/sbin/getty -L 115200 ttyO2 vt102\n" >> /etc/inittab
  19. Add a proc filesystem to fstab 

    # chroot
    nano /etc/fstab
     
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0

Using the root filesystem

After setting up the root filesystem, chroot should now log you in as root by default.  To log in as a different user, use chroot with the --userspec option.  You'll need to provide the user and group id, not name though.  To find the id, chroot in as root and look in /etc/passwd

# host
sudo chroot ~/duovero/rootfs
 
# chroot
cat /etc/passwd
 
root:x:0:0:root:/root:/bin/bash
...                                                                                              
mit:x:1000:1000:,,,:/home/mit:/bin/bash

Now to login as the user mit: 

# host
sudo chroot --userspec=1000:1000 ~/duovero/rootfs

To avoid permission issues, you should use your user account (not the root account) to check out subversion or git repos.  Sudo may not work in the chroot environment, so you may still need to use the root account for operations that require root access.  

Kernel Preparation

sudo apt-get install u-boot-tools g++-arm-linux-gnueabi  # currently defaults to 4.7
cd duovero/kernel-dev
git clone git://github.com/gumstix/linux.git linux -b omap-3.6
cp config linux/.config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage -j2
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules -j2
make ARCH=arm modules_install INSTALL_MOD_PATH=~/duovero/rootfs/ 

uImage should be build in arch/arm/boot/uImage

Software setup

 

Deploy to SD card

 

  • No labels