Skip to content

Latest commit

 

History

History
179 lines (102 loc) · 6.15 KB

getting_file_system_ready.rst

File metadata and controls

179 lines (102 loc) · 6.15 KB
Steps to make file system

As of now we have uboot and kernel ready for Aakash, the next step is to run few apps, to do so we need Linux file system. One can use any distribuition from here after. We will use ubuntu 12.10. Just for the record we have also tried Debian wheezy which also works well.

The main war is between desktop enviroments. With lot of testing and real world statistics we finally decided to go with LXDE. There is lot of scope for customization with LXDE and moreover its almost 50% lighter & twice as faster than any other desktop enviroment.

  1. Insert sdcard again, download the core ubuntu 12.10 image from this link and save it in say /tmp directory. Extract the tar file in your sdcard's ext4 partition :

    cd /media/<ext4 partition of sdcard>

    Now extract core ubuntu file system :

    sudo tar -xvpzhf /tmp/ubuntu-core-12.10-core-armhf.tar.gz 
  2. Copy the static qemu binary to mount arm fs in x86 architecture without invoking actual qemu emulator:

    sudo cp /usr/bin/qemu-arm-static /media/<ext4 partion of sdcard>/usr/bin/
  3. Open /media/<ext4 partition of sdcard>/etc/apt/sources.list in text editor and add universe & multiverse. A sample content is shown :

    deb http://ports.ubuntu.com/ubuntu-ports/ precise main universe multiverse restricted
    deb-src http://ports.ubuntu.com/ubuntu-ports/ precise main  universe multiverse restricted
  4. To use the internet in chroot environment (for apt-get installs etc.):

    cp /etc/resolv.conf /media/<ext4 partition of sdcard>/etc/resolv.conf
  5. Now set up chroot environment manually or use the ch-mount.sh script mentioned two steps later:

    sudo mount -t proc /proc /media/<ext4 partion of sdcard>/proc
    
    sudo mount -t sysfs /sys /media/<ext4 partion of sdcard>/sys
    
    sudo mount -o bind /dev /media/<ext4 partion of sdcard>/dev
    
    sudo mount -o bind /dev/pts /media/<ext4 partion of sdcard>/dev/pts
  6. chroot into the file system :

    sudo chroot /media/<ext4 partition of sdcard>/
  7. The above two steps can be combined together using a simple bash ch-mount.sh. From here onwards we will use this script to mount and un-mount fs. Please read this script to get any further help :

    sudo bash ch-mount.sh -m /media/<ext4 partition of sdcard>/
  8. Now we have a chroot environment with all proc, dev, sys, dev/pts mounted, so run update to fetch repository informations (as chroot has root prompt so no need to write sudo anymore) :

    apt-get update
  9. Now install english language pack to avoid locale related errors :

    apt-get install language-pack-en-base
  10. Now install minimal X environment to test our setup :

    apt-get install vim.tiny sudo ssh net-tools ethtool wireless-tools lxde \    
         xfce4-power-manager xinit xorg network-manager iputils-ping \
         python-gi-cairo onboard rsyslog alsa-utils gnome-mplayer \
  11. Few optional recommended packages for system utilities(lxtask, lxproxy and htop) :

    apt-get install bash-completion lxtask htop \ 
    python-central python-gobject-2 python-gtk2 synaptic\

    Download lxproxy and install using dpkg:

    dpkg -i lxproxy_0.1ubuntu3_all.deb
  12. Few more optional packages for office suite, arduino development and pcb designing (testing purpuse):

    apt-get install libreoffice python-gnome2 python-gconf python-serial\
    python-gtksourceview2 gcc-avr  binutils-avr  avr-libc avrdude python-xdg

    Download gnoduiono and install using dpkg:

    dpkg -i gnoduino_0.4.0-0pmjdebruijn4~precise_all.deb
  13. Add user and set permissions :

    # adduser aakash
    
    # addgroup aakash adm
    
    # addgroup aakash sudo
    
    # addgroup aakash audio
  14. Open /etc/hostname file in vim.tiny editor and give a hostname, for example write aakash-arm
  15. Similarly open /etc/hosts and remove its content and add these two lines:

    127.0.0.1    localhost
    127.0.1.1    aakash-arm
  16. Open /etc/modules file and append these two lines :

    gt811_ts
    rtlwifi
  17. Add these lines in /etc/rc.local to activate swap at boot time:

    # Added for Aakash, assuming the last partition will be swap in all future builds
    mkswap /dev/mmcblk0p3
    swapon /dev/mmcblk0p3
  18. To allow non root user to edit networking, change this file :

    /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
    
    look for this section:
    <action id="org.freedesktop.NetworkManager.settings.modify.sys tem">
    
    change <allow_active> to 'yes':
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
    </defaults>
    </action>
  19. Open /etc/lxdm/lxdm.conf and modify it for autologin. Change the autologin section in the top of the file to this :

    ## uncomment and set autologin username to enable autologin
    autologin=aakash
  20. Now open a new tab in your host Linux machine's terminal and copy /<path to linux kernel>/linux-sunxi/out/lib/modules/3.0.76+/ to your arm ubuntu setup :

    sudo cp -r /<path to linux kernel>/linux-sunxi/out/lib/modules/3.4.79*/ /media/<ext4 partition of sdcard>/lib/modules/
  21. Download rtl8192cufw.bin from this page, and create a directory as /lib/firmware/rtlwifi in ubuntu chroot, copy rtl8192cufw.bin inside rtlwifi directory
  22. By now we have basic elements set to give a trial run to our OS. Type exit in chroot environment to get back to Ubuntu x86 host prompt, now run un-mount script :

    sudo ch-mount.sh -u /media/<ext4 partition of sdcard>/

    unmount both the partitions (fat32 and ext4) from your machine, confirm with mount command to check nothing from sdcard is mounted

  23. Remove the sdcard and insert it in your tablet, power on to get ubuntu 12.10 lxde desktop

Back to main page