Showing posts with label ARM/Linux. Show all posts
Showing posts with label ARM/Linux. Show all posts

9/03/2011

How to transfer Ununtu11.04/Pandaboard to USB HDD

The pre-built Ubuntu 11.04/Pandaboard image is designed to be installed on a SD card. It could be transfer to the USB HDD with some extra efforts. Typically, a bootable OMAP4/Ubuntu SD card contains two partitions: boot and rootfs. Only rootfs should immigrate to a USB drive since Pandaboard requires booting form SD card.
  1. Prepares a bootable Ubuntu11.04 SD card. howto
  2. Create a ext3/4 partition on a USB HDD labeled "ubuntu".
  3. # /dev/sdXX should be the partition to be formatted,
    # for example /dev/sdc2
    $ sudo mkfs.ext3 -L ubuntu /dev/sdXX
    
  4. Copy rootfs on the SD card to USB HDD
  5. # Suppose USB is mounted on /mnt/ubuntu
    # and rootfs of SD is on /mnt/sd
    $ cd /mnt/ubuntu
    $ sudo cp -a /mnt/sd/* .
    
  6. Boot from SD card
  7. In order to mount USB HDD as rootfs, It'd update parameters that passed to the kernel. The configuration file is located at /boot/boot.script
    $ sudo vi /boot/boot.script
    
    You'd find bootargs have something like this:
    root=UUID=XXXX-XXXX-XXXX-XXXX
    
    Replace it to
    root=LABEL=ubuntu
    
    Then update boot.scr for uboot using:
    $ sudo flash-kernel
    
  8. Reboot it and Ubuntu should use USB HDD as root filesystem. :)

8/31/2011

To install Ubuntu 11.04 on PandaBoard

1. Download a prebuilt Ubuntu 11.04 image from here.
2. Create a bootable SD card(capacity >= 4GB).
    zcat ubuntu-11.04-preinstalled-netbook-armel+omap4.img.gz | \
    sudo dd of=/dev/sdX
    ## sdX should be the actual device node of SD card
3. Bring up PandaBoard with the SD card and enjoy it.

6/28/2011

To cross-compile glib to arm-linux-gnueabi platform

Some variables should be given during configuration stage in order to cross-compile glib to ARM/linux platform using the tool chain(s) that come from Linaro or CodeSourcery.
> export glib_cv_stack_grows=no; \
  export glib_cv_uscore=no; \
  export ac_cv_func_posix_getpwuid_r=no; \
  export ac_cv_func_posix_getgrgid_r=no; \
  CFLAGS=-I$(TARGET_DIR)/usr/include \
  LDFLAGS=-L$(TARGET_DIR)/usr/lib \
  ./configure --host=arm-linux-gnueabi --prefix=$(TARGET_DIR)/usr

More information can be found at here.