Ubuntu rootfs

From OMAPpedia

Jump to: navigation, search
Ubuntu logo small.jpg
How to get started with Ubuntu using pre-built binaries on your OMAP Platform
Overview Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9

   

Step 4


Contents

[edit] Ubuntu file-system step 1: minimal file system generation

The current easiest way to get a Ubuntu file-system, is to generate it using the 'rootstock' tool.

The raw process (which is described in more details here after) is in 2 steps: > Generate a basic image using the rootstock Ubuntu tool > Boot on this basic file-system and install additional packages

The 1st step is discussed in this chapter.

Rootstock is a tool running on a Ubuntu host, relying on qemu, that permits to generate Ubuntu FS.

(Pre-requisites to generate Lucid images: Ubuntu workstation connected to internet with Karmic (09.10) or more recent Ubuntu release installed.)

sudo apt-get install rootstock
sudo rootstock -d lucid -f ubuntu -l ubuntu -p ubuntu --serial ttyO2 --locale en_US.UTF-8 -s ubuntu-minimal,openssh-server,nano

Note that openssh-server and nano packages are just added for convenience.

=> will generate a tgz images containing a basic FS.

[edit] SD card preparation

Examples commands to achieve this, assuming the SD card is seen as /dev/sdc on your Ubuntu workstation (and the script to prepare the SD card is called 'mkcard.sh'):

sudo mkcard.sh /dev/sdc
sudo mkdir /mnt/mmc1
sudo mount /dev/sdc1 /mnt/mmc1
sudo mkdir /mnt/mmc2
sudo mount /dev/sdc2 /mnt/mmc2
sudo cp MLO /mnt/mmc1/
sudo cp u-boot.bin /mnt/mmc1/
sudo cp uImage /mnt/mmc1/
cd /mnt/mmc2
sudo tar xzf 
sudo cp  /home/ubuntu
cd -
sudo umount /mnt/mmc1
sudo umount /mnt/mmc2

[edit] Boot the board

At this stage, the SD card can be plugged into the OMAP4 board. Also connect the USB for serial console and terminal: this USB connector provides access to 4 serial ports. The 3rd one is used for the console/terminal.

Now switch-on the board. You shall get to the u-boot prompt and get a chance to interrupt the countdown.

The default bootargs embedded into u-boot may not enable you to boot directly from SD cardand for a ubuntu file-system. You shall set some u-boot environment variables to fix this. Type the following at the u-boot prompt:

setenv bootargs console=ttyO2,115200n8 noinitrd mem=512M root=/dev/mmcblk0p2 rootdelay=1 ip=dhcp
mmcinit 0; fatload mmc 0 0x80500000 uImage; bootm 80500000

Notes:

Once booted, you can log in console using user: ubuntu / password: ubuntu.

[edit] Ubuntu file-system step 2: Install packages + customization

At this stage, a minimal Ubuntu filesystem is already up and running. It can be used as any Ubuntu running device (same commands set and setup).

This last step shows how to install the UI, and some useful customizations.

[edit] Image customization tips

[edit] Add multiverse to the repository list

Update packages repository list: add 'multiverse' at the end of the line in /etc/apt/sources.list, and then sudo apt-get update


[edit] proxy setting

If you connect behind a firewall, you may want to setup going through a proxy:

http_proxy=""
no_proxy="localhost"
 Defaults        env_reset
+Defaults        env_keep="http_proxy no_proxy ftp_proxy https_proxy"


[edit] Ubuntu Netbook Edition file system creation

The UNE file-system cannot be installed directly from rootstock, this is why we need to install it in this 2nd step. Basically, it consists in upgrading the minimal file-system by installing the UNE package.

Moreover, it is not possible today to boot a UNE file-system over NFS (boot over NFS is possible with non-graphical file-systems).

sudo apt-get install ubuntu-netbook

This can be quite long as many package are installed.

[daemon]
AutomaticLogin=ubuntu
AutomaticLoginEnable=true

(If you created your file-system with a different user-name, replace 'ubuntu' by this user name)

load-module module-console-kit

Type the following command on the target:

sudo gconftool-2 --direct  --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /apps/gnome-screensaver/lock_enabled false

or ensure the file /etc/gconf/gconf.xml.mandatory/%gconf-tree.xml contains at least the following entry:



        
                
                        
                
        

From the host, insert the SD card hosting the root file-system, and mount the partition hosting the root file-system. Go to the FS root and type:

sudo tar c . | gzip -c > .tar.gz



Left arrow1.png Ubuntu logo small.jpg Right arrow1.png
Previous Home Next
Personal tools
Namespaces
Variants
Views
  • Read
  • Edit
  • View history
Actions
Navigation
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version