Difference between revisions of "EBC Exercise 03 Installing a Beagle OS"

From eLinux.org
Jump to: navigation, search
m (Initial page)
 
m (Kernel 3.8: Added link to Koen's image site.)
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:ECE497]]
 
[[Category:ECE497]]
 +
{{YoderHead}}
  
In this class we run [http://www.angstrom-distribution.org/ The Ångström Distribution] on the BeagleBoard. Ångström is a stable and userfriendly distribution if Linux for embedded devices like handhelds, set top boxes and network-attached storage devices and the BeagleBoard.
+
In this class we run [http://www.angstrom-distribution.org/ The Ångström Distribution] on the BeagleBoard. Ångström is a stable and user-friendly distribution of Linux for embedded devices like handhelds, set top boxes and network-attached storage devices and the BeagleBoard.
  
 
Here's how to load the Ångström image we'll be using on an SD card.  First get a microSD card that holds at least 4G.
 
Here's how to load the Ångström image we'll be using on an SD card.  First get a microSD card that holds at least 4G.
 +
== Kernel 3.8 ==
 +
{{EBC3.8}}This is the kernel used for the Fall 2013 class.
  
== Download a copy of the Ångström image ==
+
Follow these [http://beagleboard.org/Getting%20Started#update instructions] for setting up your Bone to run the latest OS. When following these instructions you'll want to download the eMMC Flasher image from the [http://beagleboard.org/latest-images latest shipping images] page. (The really brave can get the latest latest image from [http://dominion.thruhere.net/koen/angstrom/beaglebone/?C=M;O=D Koen's site], but I haven't tested against it.)
  
Download a copy of the image [http://www.rose-hulman.edu/~yoder/Beagle/ here].  You see several files listed here.  You want to download '''FIE2011.img.bz2''' and '''FIE2011.img.bz2.md5'''.  The first is some 1.4G, so it will take a while.  The second is a check sum file for the first.   
+
It does indeed take some 45 minutes to flash Black Bone!
 +
 
 +
Once you've successfully updated your Bone, post a note on the ECE497 Google Group.
 +
 
 +
== Kernel 3.2 ==
 +
{{EBC3.2}}This is the kernel used for the Fall 2012 class.
 +
 
 +
=== Download and write a copy of the Ångström image ===
 +
==== bone ====
 +
 
 +
I'm presently running the SD image that comes with [http://circuitco.com/support/index.php?title=BeagleBone_A6A_Image_08.14.2012 BeagleBone Rev A6A]. Here are the [http://circuitco.com/support/index.php?title=BeagleBone_A6A_Image_08.14.2012 Release Notes].
 +
 
 +
If you are on campus do
 +
 
 +
host$ '''cd Downloads'''
 +
host$ '''wget http://www.rose-hulman.edu/~yoder/Beagle/BeagleBone_Rev_A6A_Production_08_14_2012.7z'''
 +
host$ '''wget http://www.rose-hulman.edu/~yoder/Beagle/BeagleBone_Rev_A6A_Production_08_14_2012.md5'''
 +
 
 +
If you are off campus
 +
 
 +
host$ '''cd Downloads'''
 +
host$ '''wget http://circuitco.com/support/files/BeagleBone-A6A/BeagleBone_Rev_A6A_Production_08_14_2012.7z'''
 +
host$ '''wget http://circuitco.com/support/files/BeagleBone-A6A/BeagleBone_Rev_A6A_Production_08_14_2012.md5'''
 +
 
 +
The first  '''wget''' command gets the disk image.  The second gets the checksum. Uncompress the image and verify that it was downloaded correctly.
 +
 
 +
host$ '''sudo apt-get install p7zip-full'''
 +
host$ '''7z e BeagleBone_Rev_A6A_Production_08_14_2012.7z'''  (takes about 2.5 minutes)
 +
host$ '''cat BeagleBone_Rev_A6A_Production_08_14_2012.md5'''
 +
# MD5 checksums generated by MD5summer (http://www.md5summer.org)
 +
# Generated 8/27/2012 10:37:00 AM
 +
 +
8e9a97f73c26fdc5746862c5a447e652 *BeagleBone_Rev_A6A_Production_08_14_2012.7z
 +
4de07c7f0023ac063854be67752ce066 *BeagleBone_Rev_A6A_Production_08_14_2012.img
 +
 +
beagle$ '''md5sum BeagleBone_Rev_A6A_Production_08_14_2012.7z'''
 +
8e9a97f73c26fdc5746862c5a447e652  BeagleBone_Rev_A6A_Production_08_14_2012.7z
 +
 
 +
If the numbers from the '''cat''' command match the numbers from the '''md5sum''' command, then you have a good image. Insert your microSD card in a reader/writer and find the path to it by running '''System:Administration:Disk Utility'''.  You will see
 +
 
 +
[[File:Screenshot-Disk_Utility.png| 400x293px]]
 +
 
 +
The path is in the upper right.
 +
 
 +
Then enter (if you're using Ubuntu, note the use of the '''sudo''' command):
 +
 
 +
host$ '''sudo dd if=BeagleBone_Rev_A6A_Production_08_14_2012.img of=/dev/sd''X'' bs=8M''' 
 +
 
 +
Where <code>/dev/sd''X''</code> is the path to your SD card.  This may take 10 minutes.  Mine took about 7.5.
 +
 
 +
Plug the card into your BeagleBone and boot.  Try the following commands.
 +
 
 +
beagle$ '''uname -a'''
 +
Linux beaglebone 3.2.18 #1 Thu Jun 14 23:26:20 CEST 2012 armv7l GNU/Linux
 +
beagle$ '''cat /proc/cmdline'''
 +
console=ttyO0,115200n8 run_hardware_tests quiet root=/dev/mmcblk0p2 ro
 +
rootfstype=ext4 rootwait ip=none
 +
 
 +
==== xM ====
 +
Download a copy of the image [http://www.rose-hulman.edu/~yoder/Beagle/ here].  You'll see several files here.  You want to download '''ETC2012.img.bz2''' and '''ETC2012.img.bz2.md5'''.  The first is some 1.5G, so it will take a while.  The second is a check sum file for the first.   
  
 
Once you have the two files and the card, what you do with them depends on what OS you are running.
 
Once you have the two files and the card, what you do with them depends on what OS you are running.
  
=== Writing an SD card via Linux ===
+
host$ '''md5sum ETC2012.img.bz2'''
 +
host$ '''cat ETC2012.img.bz2.md5'''
  
If you are running Linux type:
 
<pre>
 
$ md5sum FIE2011.img.bz2
 
$ cat FIE2011.img.bz2.md5
 
</pre>
 
 
The two command should show the same thing
 
The two command should show the same thing
  c33cf12aede2109017530b2c2ad4cc36 FIE2011.img.bz2
+
  6610e1ea35febc5e9016734213bdba68 ETC2012.img.bz2
  
If your results match you have successfully downloaded the image and can move on.  If they don't match, try downloading again.  If that doesn't work, contact me.
+
If your results match you have successfully downloaded the image and can move on.  If they don't match, try downloading again.
  
 
Next uncompress the image.   
 
Next uncompress the image.   
  $ bunzip2 -k FIE2011.img.bz2  
+
  host$ '''bunzip2 -k ETC2012.img.bz2'''
 
The '''-k''' says to keep the compressed file.  This will take a few minutes.   
 
The '''-k''' says to keep the compressed file.  This will take a few minutes.   
  
Insert your microSD card in a reader/writre and find the path to it by running '''System:Administration:Disk Utility'''.  You will see
+
Insert your microSD card in a reader/writer and find the path to it by running '''System:Administration:Disk Utility'''.  You will see
  
 
[[File:Screenshot-Disk_Utility.png| 400x293px]]
 
[[File:Screenshot-Disk_Utility.png| 400x293px]]
Line 33: Line 91:
 
The path is in the upper right.
 
The path is in the upper right.
  
Then enter:
+
Then enter (if you're using Ubuntu, note the use of the '''sudo''' command):
  
  $ dd if=FIE2011.img  of=/dev/sd''X'' bs=8M
+
  host$ '''sudo dd if=ETC2012.img  of=/dev/sd''X'' bs=256M'''
  $ sync
+
  host$ '''sync'''
  
 
Where <code>/dev/sd''X''</code> is the path to your SD card.  This may take 10 minutes.  Mine took about 7.5.
 
Where <code>/dev/sd''X''</code> is the path to your SD card.  This may take 10 minutes.  Mine took about 7.5.
 +
 +
During this time the cursor may merely blink, don't worry, its not frozen. This command is rather basic and simply doesn't provide any feed back until completion.
 +
 +
An alternative recipe is to uncompress and write the content to your SD card all in one move (again, if you're using Ubuntu, note the need for '''sudo'''):
 +
 +
host$ '''bunzip2 -c ETC2012.img.bz2 | sudo dd of=/dev/sd''X'' bs=256M'''
 +
 +
so that you don't have to uncompress the image file first.
  
 
=== Writing an SD card via Windows ===
 
=== Writing an SD card via Windows ===
Line 48: Line 114:
 
# Download and install [https://wiki.ubuntu.com/Win32DiskImager Ubuntu's Win32DiskImager] (also known as the [https://launchpad.net/win32-image-writer/ win32-image-writer]).
 
# Download and install [https://wiki.ubuntu.com/Win32DiskImager Ubuntu's Win32DiskImager] (also known as the [https://launchpad.net/win32-image-writer/ win32-image-writer]).
 
# Download and install [http://www.7-zip.org/ 7-zip compression software]. (Or use winRAR)
 
# Download and install [http://www.7-zip.org/ 7-zip compression software]. (Or use winRAR)
# Decompress '''FIE2011.img.bz2''' image file using 7-zip (or winRAR).
+
# Decompress '''ETC2012.img.bz2''' image file using 7-zip (or winRAR).
 
# Insert >=4GB SD card into the reader/writer.
 
# Insert >=4GB SD card into the reader/writer.
 
# Start the Win32DiskImager.
 
# Start the Win32DiskImager.
# Select '''FIE2011.img''' and correct SD card location.
+
# Select '''ETC2012.img''' and correct SD card location.
 
# Click on '''Write'''.
 
# Click on '''Write'''.
 
After the image writing is done (this will take some 10 minutes), eject the SD card.
 
After the image writing is done (this will take some 10 minutes), eject the SD card.
  
== Boot your Beagle ==
+
{{YoderFoot}}
 
 
You should now have a functioning SD card image. Plug it into your BeagleBoard and boot it up.
 
 
 
The root password is '''test'''.
 

Revision as of 07:31, 24 September 2013

thumb‎ Embedded Linux Class by Mark A. Yoder


In this class we run The Ångström Distribution on the BeagleBoard. Ångström is a stable and user-friendly distribution of Linux for embedded devices like handhelds, set top boxes and network-attached storage devices and the BeagleBoard.

Here's how to load the Ångström image we'll be using on an SD card. First get a microSD card that holds at least 4G.

Kernel 3.8

3.8 Kernel

This is the kernel used for the Fall 2013 class.

Follow these instructions for setting up your Bone to run the latest OS. When following these instructions you'll want to download the eMMC Flasher image from the latest shipping images page. (The really brave can get the latest latest image from Koen's site, but I haven't tested against it.)

It does indeed take some 45 minutes to flash Black Bone!

Once you've successfully updated your Bone, post a note on the ECE497 Google Group.

Kernel 3.2

3.2 Kernel‎

This is the kernel used for the Fall 2012 class.

Download and write a copy of the Ångström image

bone

I'm presently running the SD image that comes with BeagleBone Rev A6A. Here are the Release Notes.

If you are on campus do

host$ cd Downloads
host$ wget http://www.rose-hulman.edu/~yoder/Beagle/BeagleBone_Rev_A6A_Production_08_14_2012.7z
host$ wget http://www.rose-hulman.edu/~yoder/Beagle/BeagleBone_Rev_A6A_Production_08_14_2012.md5

If you are off campus

host$ cd Downloads
host$ wget http://circuitco.com/support/files/BeagleBone-A6A/BeagleBone_Rev_A6A_Production_08_14_2012.7z
host$ wget http://circuitco.com/support/files/BeagleBone-A6A/BeagleBone_Rev_A6A_Production_08_14_2012.md5

The first wget command gets the disk image. The second gets the checksum. Uncompress the image and verify that it was downloaded correctly.

host$ sudo apt-get install p7zip-full
host$ 7z e BeagleBone_Rev_A6A_Production_08_14_2012.7z  (takes about 2.5 minutes)
host$ cat BeagleBone_Rev_A6A_Production_08_14_2012.md5 
# MD5 checksums generated by MD5summer (http://www.md5summer.org)
# Generated 8/27/2012 10:37:00 AM

8e9a97f73c26fdc5746862c5a447e652 *BeagleBone_Rev_A6A_Production_08_14_2012.7z
4de07c7f0023ac063854be67752ce066 *BeagleBone_Rev_A6A_Production_08_14_2012.img

beagle$ md5sum BeagleBone_Rev_A6A_Production_08_14_2012.7z 
8e9a97f73c26fdc5746862c5a447e652  BeagleBone_Rev_A6A_Production_08_14_2012.7z

If the numbers from the cat command match the numbers from the md5sum command, then you have a good image. Insert your microSD card in a reader/writer and find the path to it by running System:Administration:Disk Utility. You will see

Screenshot-Disk Utility.png

The path is in the upper right.

Then enter (if you're using Ubuntu, note the use of the sudo command):

host$ sudo dd if=BeagleBone_Rev_A6A_Production_08_14_2012.img of=/dev/sdX bs=8M  

Where /dev/sdX is the path to your SD card. This may take 10 minutes. Mine took about 7.5.

Plug the card into your BeagleBone and boot. Try the following commands.

beagle$ uname -a
Linux beaglebone 3.2.18 #1 Thu Jun 14 23:26:20 CEST 2012 armv7l GNU/Linux
beagle$ cat /proc/cmdline
console=ttyO0,115200n8 run_hardware_tests quiet root=/dev/mmcblk0p2 ro
rootfstype=ext4 rootwait ip=none

xM

Download a copy of the image here. You'll see several files here. You want to download ETC2012.img.bz2 and ETC2012.img.bz2.md5. The first is some 1.5G, so it will take a while. The second is a check sum file for the first.

Once you have the two files and the card, what you do with them depends on what OS you are running.

host$ md5sum ETC2012.img.bz2
host$ cat ETC2012.img.bz2.md5

The two command should show the same thing

6610e1ea35febc5e9016734213bdba68  ETC2012.img.bz2

If your results match you have successfully downloaded the image and can move on. If they don't match, try downloading again.

Next uncompress the image.

host$ bunzip2 -k ETC2012.img.bz2 

The -k says to keep the compressed file. This will take a few minutes.

Insert your microSD card in a reader/writer and find the path to it by running System:Administration:Disk Utility. You will see

Screenshot-Disk Utility.png

The path is in the upper right.

Then enter (if you're using Ubuntu, note the use of the sudo command):

host$ sudo dd if=ETC2012.img  of=/dev/sdX bs=256M
host$ sync

Where /dev/sdX is the path to your SD card. This may take 10 minutes. Mine took about 7.5.

During this time the cursor may merely blink, don't worry, its not frozen. This command is rather basic and simply doesn't provide any feed back until completion.

An alternative recipe is to uncompress and write the content to your SD card all in one move (again, if you're using Ubuntu, note the need for sudo):

host$ bunzip2 -c ETC2012.img.bz2 | sudo dd of=/dev/sdX bs=256M

so that you don't have to uncompress the image file first.

Writing an SD card via Windows

The following instructions come from here.

To initialize your card under Windows, you can do the following:

  1. Download and install Ubuntu's Win32DiskImager (also known as the win32-image-writer).
  2. Download and install 7-zip compression software. (Or use winRAR)
  3. Decompress ETC2012.img.bz2 image file using 7-zip (or winRAR).
  4. Insert >=4GB SD card into the reader/writer.
  5. Start the Win32DiskImager.
  6. Select ETC2012.img and correct SD card location.
  7. Click on Write.

After the image writing is done (this will take some 10 minutes), eject the SD card.




thumb‎ Embedded Linux Class by Mark A. Yoder