Difference between revisions of "ECE497 Project: Multiple Partitions via U-boot"

From eLinux.org
Jump to: navigation, search
Line 19: Line 19:
 
<pre>
 
<pre>
 
host$ git clone git@github.com:albertlee5/project.git
 
host$ git clone git@github.com:albertlee5/project.git
 +
host$ cd project/
 
</pre>
 
</pre>
  
Line 31: Line 32:
  
 
<pre>
 
<pre>
host$ make
+
host:/project$ make
 
</pre>
 
</pre>
  
(Note, we are having trouble configuring the make settings).
+
If make fails with an error such as "System not Configured" or the like, there are several commands you will have to run to fix this.  This is caused because the copy on the repository may contain some temporary files that were native to the editors host machine, but will not work with your configuration.  We will have to remove several files so that make will re-generate them for your machine.  In the terminal type:
 +
 
 +
</pre>
 +
host:/project$ rm -rf include/autoconf.mk
 +
host:/project$ rm -rf include/autoconf.mk.dep
 +
</pre>
 +
 
 +
This removes some auto-configuration files from the include directory.  We will also need to remove a number of .depend files created by make.  (Note that simply typing make clean will not remove these since they were not created with your Makefile).  The following commands perform a batch remove of these files, and then check to see if the removal was successful:
 +
 
 +
</pre>
 +
host:/project$ find . -name .depend | xargs rm -rf
 +
host:/project$ find . -name .depend.* | xargs rm -rf
 +
host:/project$ find . -name .depend
 +
host:/project$ find . -name .depend.*
 +
</pre>
 +
 
 +
The last two commands should return no output.  Now try using make to compile U-boot.
 +
 
  
 
Next copy the resulting MLO, uboot.img, and uboot.bin to the boot partition of your mmc-card and rename the corresponding existing files so they don't interfere at startup.  The beagle should now boot with our modified bootloader.
 
Next copy the resulting MLO, uboot.img, and uboot.bin to the boot partition of your mmc-card and rename the corresponding existing files so they don't interfere at startup.  The beagle should now boot with our modified bootloader.

Revision as of 13:19, 15 February 2012


Team members: Michael J. Yuhas, Jack Ma

Executive Summary

The goal of this project is to give the U-boot boot-loader the ability to mount different partitions on start-up. This would allow the user to dual-boot the beagle board by controlling the boot sequence with a user button or RS-232 link.

Currently we have discovered how to create mmc-cards with multiple partitions, and discovered a way to mount the different partitions as root during start-up using built in U-boot commands. Currently we are developing a command to allow the user to select the partitions from which to boot.

Plans for the duration of the project includes finishing development of the multiboot command and modification of the boot script to allow partition selection using the user button. We would also like to discover how to create a FAT boot partition from scratch. Finally, if time permits, we also intend to research booting from USB devices.

Installation Instructions

If you do not yet have git installed see the instruction on EBC Exercise 07.

Open a terminal on your host machine and pull our git repository:

host$ git clone git@github.com:albertlee5/project.git
host$ cd project/

To compile the code for our project you will have to source two shell scripts that set certain environmental variables:

host$ source ~/.oe/environment-oecore
host$ source ~/.oe/crossCompileEnv.sh

Now you should be able to run make to compile U-boot.

host:/project$ make

If make fails with an error such as "System not Configured" or the like, there are several commands you will have to run to fix this. This is caused because the copy on the repository may contain some temporary files that were native to the editors host machine, but will not work with your configuration. We will have to remove several files so that make will re-generate them for your machine. In the terminal type:

host:/project$ rm -rf include/autoconf.mk host:/project$ rm -rf include/autoconf.mk.dep

This removes some auto-configuration files from the include directory. We will also need to remove a number of .depend files created by make. (Note that simply typing make clean will not remove these since they were not created with your Makefile). The following commands perform a batch remove of these files, and then check to see if the removal was successful:

host:/project$ find . -name .depend | xargs rm -rf host:/project$ find . -name .depend.* | xargs rm -rf host:/project$ find . -name .depend host:/project$ find . -name .depend.*

The last two commands should return no output. Now try using make to compile U-boot.


Next copy the resulting MLO, uboot.img, and uboot.bin to the boot partition of your mmc-card and rename the corresponding existing files so they don't interfere at startup. The beagle should now boot with our modified bootloader.

User Instructions

Not yet available

Highlights

Not yet availble

Theory of Operation

The current plan of attack for our project is to write a script that will run automatically in U-boot, allowing the user to select between different partitions.

Work Breakdown

Task Completion Date User
Create Project Page Jan 23, 2012 Yuhas
Research loading multiple partitions / u-boot scripting language Feb 6, 2012 Yuhas & Ma
Determine schedule for project Feb 6, 2012 Yuhas & Ma
Create SD card with multiple root partitions Feb 7, 2012 Yuhas & Ma
Test U-boot to multiboot using command-line Feb 7, 2012 Ma

Conclusions

Not yet available.