Beagle Board - beagleboard.org

Angtrom Demo from Windows

This page seeks to describe steps to make use of the pre-built Angstrom distribution mentioned in Koen's blog, but using only Windows. This is due to the fact that many people trying Beagle and Angstrom for the first time have not previously used Linux.

Use existing dd image to write the SD card

  1. Download dd for Windows from http://www.chrysocome.net/downloads/dd-0.5.zip
  2. Download compressed dd image from http://s3.amazonaws.com/beagle/angstrom-demo-20080917.img.gz
  3. Use gunzip or zcat to decompress the image and dd to write the image to the SD card
  4. From the Beagle u-boot prompt, setup u-boot for booting kernel from uImage file on the first partition of the SD card and rootfs on the second partition on the SD card
    setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait video=omapfb:vram:2M,vram:4M nohz=off'
    setenv bootcmd 'mmcinit;fatload mmc 0 84000000 uImage;bootm 84000000'
    saveenv

Resize dd image to use the rest of the card (currently broken)

  • Boot ramdisk
    setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/ram0 rw ramdisk_size=32768 initrd=0x81600000,32M nohz=off'
    setenv bootcmd 'mmcinit;fatload mmc 0 80300000 uImage;fatload mmc 0 81600000 angstrom-console-rd.gz;bootm 80300000'
    saveenv
    Hold user button and press reset
  • Resize ext3 partition
    root@beagleboard:~# umount /media/mmcblk0p1/
    root@beagleboard:~# umount /media/mmcblk0p2/
    root@beagleboard:~# fdisk /dev/mmcblk0
    
    Command (m for help): p
    
    Disk /dev/mmcblk0: 4026 MB, 4026531840 bytes
    255 heads, 63 sectors/track, 489 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk0p1   *           1          15      120456   c Win95 FAT32 (LBA)
    /dev/mmcblk0p2              16          62      377527+ 83 Linux
    
    Command (m for help): d
    Partition number (1-4): 2
    
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 2
    First cylinder (16-489, default 16): Using default value 16
    Last cylinder or +size or +sizeM or +sizeK (16-489, default 489): Using default
    value 489
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table
     mmcblk0: p1 p2
    root@beagleboard:~# kjournald starting.  Commit interval 5 seconds
    EXT3 FS on mmcblk0p2, internal journal
    EXT3-fs: mounted filesystem with ordered data mode.
    
    root@beagleboard:~# opkg install e2fsprogs e2fsprogs-e2fsck
    
    root@beagleboard:~# fsck.ext3 -f /dev/mmcblk0p2
    e2fsck 1.38 (30-Jun-2005)
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    /dev/mmcblk0p2: 21678/94752 files (1.2% non-contiguous), 346421/377524 blocks
    
    root@beagleboard:~# resize2fs /dev/mmcblk0p2
    resize2fs 1.38 (30-Jun-2005)
    Resizing the filesystem on /dev/mmcblk0p2 to 3807404 (1k) blocks.
    
    root@beagleboard:~# resize2fs -d 1 -p /dev/mmcblk0p2
    resize2fs 1.38 (30-Jun-2005)
    Resizing the filesystem on /dev/mmcblk0p2 to 3807404 (1k) blocks.
    Begin pass 1 (max = 418)
    Extending the inode table     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Segmentation fault

Build the 'dd' image if you don't already have it

  • Download MLO, u-boot.bin, uImage, the latest *.rootfs.tar.bz2, and README.txt from http://www.angstrom-distribution.org/demo/beagleboard/
  • Download a working 32MB ramdisk image from http://jkridner.s3.amazonaws.com/angstrom-console-rd.gz
  • Search for other packages you might want to use at http://www.angstrom-distribution.org/repo/
  • Use HP utility to format the SD card. Details found at http://code.google.com/p/beagleboard/wiki/BeagleBootHwSetup
    Be sure to copy the MLO file first, then to copy over u-boot.bin, then all of the other downloaded files.
  • Setup u-boot for booting kernel from the uImage file on the SD card and rootfs from the ramdisk (angstrom-console-rd.gz) on the SD card
    setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/ram0 rw ramdisk_size=32768 initrd=0x81600000,32M nohz=off'
    setenv bootcmd 'mmcinit;fatload mmc 0 80300000 uImage;fatload mmc 0 81600000 angstrom-console-rd.gz;bootm 80300000'
    saveenv
  • Copy files over to flash so that you have a copy after erasing the contents of the SD card:
    opkg install ./mtd*
    flash_eraseall /dev/mtd4
    mount -t jffs2 /dev/mtdblock4 /media/hdd
    cp /media/mmcblk0p1/* /media/hdd/
  • Re-partition the SD card
    Command (m for help): p
    
    Disk /dev/mmcblk0: 4026 MB, 4026531840 bytes
    255 heads, 63 sectors/track, 489 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk0p1   *           1         490     3932128+  c Win95 FAT32 (LBA)
    Partition 1 has different physical/logical endings:
         phys=(488, 254, 63) logical=(489, 135, 30)
    
    Command (m for help): d
    Selected partition 1
    
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-489, default 1): Using default value 1
    Last cylinder or +size or +sizeM or +sizeK (1-489, default 489): 15
    
    Command (m for help): a
    Partition number (1-4): 1
    
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 2
    First cylinder (16-489, default 16): 16
    Last cylinder or +size or +sizeM or +sizeK (16-489, default 489): Using default
    value 489
    
    Command (m for help): t
    Partition number (1-4): 1
    Hex code (type L to list codes): c
    Changed system type of partition 1 to c (Win95 FAT32 (LBA))
    
    Command (m for help): p
    
    Disk /dev/mmcblk0: 4026 MB, 4026531840 bytes
    255 heads, 63 sectors/track, 489 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk0p1   *           1          15      120456   c Win95 FAT32 (LBA)
    /dev/mmcblk0p2              16          62      377527+ 83 Linux
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table
     mmcblk0: p1 p2
    root@beagleboard:/media/hdd# FAT: bogus number of reserved sectors
    VFS: Can't find a valid FAT filesystem on dev mmcblk0p2.
    
    umount /dev/mmcblk0p1
    umount /dev/mmcblk0p2
  • Format the partitions on the SD card
    root@beagleboard:/media/hdd# opkg update; opkg install dosfstools
    root@beagleboard:/media/hdd# root@beagleboard:/media/hdd# mkfs.vfat -F 32 /dev/mmcblk0p1 -n SDCARD_X
    mkfs.msdos 2.11 (12 Mar 2005)
    root@beagleboard:/media/hdd# opkg install e2fsprogs-mke2fs
    root@beagleboard:/media/hdd# mkfs.ext3 /dev/mmcblk0p2
  • Copy files onto SD card
    root@beagleboard:/media/hdd# mount /dev/mmcblk0p1/ /media/mmcblk0p1/
    root@beagleboard:/media/hdd# cp mlo /media/mmcblk0p1/MLO
    root@beagleboard:/media/hdd# cp u-boot.bin /media/mmcblk0p1/
    root@beagleboard:/media/hdd# cp uImage /media/mmcblk0p1/
    root@beagleboard:/media/hdd# mkdir /media/mmcblk0p2
    root@beagleboard:/media/hdd# mount /dev/mmcblk0p2 /media/mmcblk0p2
    kjournald starting.  Commit interval 5 seconds
    EXT3 FS on mmcblk0p2, internal journal
    EXT3-fs: mounted filesystem with ordered data mode.
    root@beagleboard:/media/hdd# cd /media/mmcblk0p2
    root@beagleboard:/media/mmcblk0p2# tar xvjf /media/hdd/Angstrom-Beagleboard-demo-image
    -glibc-ipk-2008.1-test-20080917-beagleboard.rootfs.tar.bz2
    root@beagleboard:/media/mmcblk0p2# cd /media/hdd
    root@beagleboard:/media/hdd# sync
  • Setup u-boot for booting kernel from uImage file on the first partition of the SD card and rootfs on the second partition on the SD card
    setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait video=omapfb:vram:2M,vram:4M nohz=off'
    setenv bootcmd 'mmcinit;fatload mmc 0 84000000 uImage;bootm 84000000'
    saveenv
  • Install useful apps
    opkg update
    opkg install vim screen tar bash
    opkg install mtd-utils e2fsprogs e2fsprogs-e2fsck e2fsprogs-mke2fs dosfstools
    opkg install git curl task-native-sdk cpp imagemagick
    opkg install quake2 sugar smbfs
  • C:\>dd --list
    rawwrite dd for windows version 0.5.
    Written by John Newbigin 
    This program is covered by the GPL.  See copying.txt for details
    Win32 Available Volume Information
    \\.\Volume{f2d19eb4-23f6-11db-a984-806d6172696f}\
      link to \\?\Device\HarddiskVolume1
      fixed media
      Mounted on \\.\c:
    
    \\.\Volume{1bba7385-4935-11dd-80e5-00059a3c7800}\
      link to \\?\Device\Harddisk1\DP(1)0-0+b
      removeable media
      Mounted on \\.\j:
    
    C:\>dd if=\\.\Volume{1bba7385-4935-11dd-80e5-00059a3c7800} of=angstrom-dd.img --size
    rawwrite dd for windows version 0.5.
    Written by John Newbigin 
    This program is covered by the GPL.  See copying.txt for details
    240912+0 records in
    240912+0 records out

Last updated by blog.hangerhead.com on Tue Nov 04 2008 14:45:21 GMT-0000 (UTC).