ECE472/572 (UCLX) Assignment 2 - version for BeagleBone

Prepare for the lab

Answer these questions while doing this lab – they will help you understand the procedure and better prepare for the tests.

Activity (30pts.)

This installation assumes that you are running a Linux, or preferably Debian Linux such as Ubuntu booted from a HD or a Virtual Machine. It may be possible to do it while running from a Live CD but the amount of data to be saved temporarily on a RAM disk might be prohibitive.

  1. This exercise is based on documentation posted at http://downloads.angstrom-distribution.org/demo/beaglebone/ and the software repository located at http://beagleboard.org/latest-images. It puts emphasis on performing steps manually one by one rather than running automated scripts for the sake of learning media partitioning and formatting operations.
  2. cd
  3. script hw2bb.txt
  4. sudo apt-get install wget xz-utils
  5. ls -l /dev/*
  6. ls -l /dev/sd*
  7. Insert a 4GB or larger SD card (4GB and 8GB cards were tested)
  8. ls -l /dev/sd*
  9. Check for a new disk device name. It will be in the format of /dev/sdx .
  10. sudo mount
  11. df -h
  12. sudo umount /dev/sdx?
    Note: this should unmount /dev/sdx1 and /dev/sdx2, and produce an error message for /dev/sdx as the latter was never mounted.
  13. Do not proceed with this media name if the command above produced an error indicating that the media unmounting failed because the media is in use. You might be trying to format your hard drive instead of the SD card!
  14. Inspect what kind of partition system was already present on your SD card:
    sudo sfdisk -l /dev/sdx
  15. cd
  16. mkdir bb_angstrom
  17. cd bb_angstrom
  18. pwd
  19. wget https://debian.beagleboard.org/images/bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img.xz
  20. ls -l
  21. Extract the compressed file using xv to pipe, and read from that pipe by dd run as root that writes data sector by sector to Sd card "hard drive":
    xz -dc bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img.xz | sudo dd bs=4M of=/dev/sdx
  22. Try this: open another terminal and occasionally type:
    sudo pkill -USR1 -n -x dd
    and then inspect the original terminal window. Please note that the size of the .XZ file (about 1GB) is after compression. We are unpacking and copying much higher volume of data that is almost 4GB.
  23. sync
  24. Inspect what kind of partition system was written to your SD card:
    sudo sfdisk -l /dev/sdx
  25. Remove the SD card and insert it into your RaspberryPi. Make sure that the SD card reader LED stopped flashing before ejecting the card. Otherwise, you may have to restart the process from the step where you copy the image file to the SD card using dd.
  26. Connect the BeagleBone to your 4-pin USB to serial adapter connected as instructed. If you are using older BeagleBone the USB on-the-go would work as a USB to serial adapter. It most likely will not work that way on BeagleBone Black (depending on version.)
  27. If you are using BeagleBone Black, depress the boot button before connecting the USB adapter to your computer. Keep it depressed for some ten more seconds. That will ensure that you boot it from your SD card and not from the internal flash memory.
  28. Within a minute the board shall come "alive", it's LED shall start pulsing, your computer shall detect four USB devices including USB to serial, and mass storage device
  29. Run a HyperTerminal (from Windows or Linux) On windows you may use an open source software called PUTTY from http://www.putty.org/
    1. connect to the BeagleBone. The connection parameters are 115000 bits per second, 8-bit, no parity, 1 stop bit
    2. login as root (no password)
    3. set root password using passwd command. Set the password to ee00
    4. check if you are connected to Ethernet
      • verify that the RJ45 connector is active (LED on the connector lights up)
      • check what is your IP address using ifconfig
      • Ignore the 127.0.0.1 address as it is a local address of the board for testing purposes (Local Loopback).
      • If the IP address starts with 10..... that means that the Ethernet port is initialized but DHCP client for IP v.4 was not run.
      • If you are running a home router with network address translation firewall the address should most likely start with 192.168....
    5. if you are connected do attempt to update the board contents. Since you are using the most recent image very little updates should be available
      sudo apt-get update
      sudo apt-get upgrade
    6. More packages that may be useful one day:
      sudo apt-get install binutils bzip2 gettext git libtool make patch sed wget
      sudo apt-get install gcc g++ libgcc-dev task-native-sdk
      sudo apt-get install fakeroot
      sudo apt-get install kernel-module-ftdi-sio
      Comment: It is not our intention to develop software directly on the board. The industry does use cross-compiling technology for embedded system development. However, this board is powerful enough to allow for local compilation of simple programs directly on the board. It is possible to do all further lab work except #5, #6 (system speed and SD card speed and size limit), and #13 (not applicable) directly on this board.
    7. just in case run sync
  30. Connect to the board using SSH:
    ssh 123.456.789.012 -l root
  31. This is an alternative connection to using the UART console. However, you must find out the board IP address before connecting. Note: typing exit will log you out back to the local terminal window.
  32. exit
    This will end the script session. Submit the file hw2bb.txt if requested.

assignment submission

Take a photographs (phone camera is OK) of the board and a HyperTerminal window showing that you connected to it.
Type uname -a in the console to show which version of system is running. make sure that the outcome of uname command is legible in the screen shot or the photograph. ZIP files together if you are submitting multiple files.

Only if requested: Drop the file with the information collected during the exercise as instructed in the corresponding assignment drop box on Sakai. Peoria area students only: label your SD card with your name or use an envelope and hand it to the instructor by the end of the lecture the day the assignment is due. Your disk will be returned after grading.

Thank you

web site front local main page local list page general bookmarks software bookmarks go back copyright info