Difference between revisions of "EBC Exercise 08 Installing Development Tools 3.8"

From eLinux.org
Jump to: navigation, search
m (The 3.8 Kernel: Added my workaround for the Failed dependency check)
m (Updating to a new version of the kernel: Added pointer to http://rcn-ee.net/deb/precise-armhf/)
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:ECE497]]
 
[[Category:ECE497]]
 
{{YoderHead}}
 
{{YoderHead}}
 +
{{EBC3.8}}See [[EBC Exercise 08 Installing Development Tools 3.2]] if you are working with the 3.2 kernel.
  
Early in the class most of the exercises we will do will all run on the BeagleBoard. You'll be able to edit ([http://projects.gnome.org/gedit/ gedit]), compile ([http://gcc.gnu.org/ gcc]) and run all on the Beagle.  Later, when we start compiling the kernel [http://www.kernel.org/] or the boot loader, ([http://www.denx.de/wiki/U-Boot U-boot]) you will need to cross compile on a Linux machine and copy the results to the Beagle.
+
Early in the class most of the exercises we will do will all run on the BeagleBoard. You'll be able to edit ([http://projects.gnome.org/gedit/ gedit]), compile ([http://gcc.gnu.org/ gcc]) and run all on the Beagle.  Later, when we start compiling the [http://www.kernel.org/ kernel] or the boot loader, ([http://www.denx.de/wiki/U-Boot U-boot]) you will need to cross compile on a Linux machine and copy the results to the Beagle.
  
 
The purpose of this exercise is to install all the tools needed for compiling on your host so they will be ready when you need them.
 
The purpose of this exercise is to install all the tools needed for compiling on your host so they will be ready when you need them.
Line 11: Line 12:
  
 
== The 3.8 Kernel ==
 
== The 3.8 Kernel ==
{{EBC3.8}}
+
{{EBC3.8}}Make sure you installed the cross compiler ([[EBC Exercise 08a Cross-Compiling]]) before doing this exercise.
  
Note taken from [http://www.youtube.com/watch?v=HJ9nUqYMjqs Beaglebone: Adding USB Wi-Fi & Building a Linux Kernel] starting around 4 minutes and ending around 21 minutes.  Uses kernel from [http://eewiki.net/display/linuxonarm/BeagleBone Robert C. Nelson's BeagleBone] page.
+
=== Getting the 3.8 Kernel ===
 +
 
 +
These notes taken from [http://www.youtube.com/watch?v=HJ9nUqYMjqs&t=4m10s Beaglebone: Adding USB Wi-Fi & Building a Linux Kernel] starting around 4 minutes and ending around 21 minutes.  Uses kernel from [http://eewiki.net/display/linuxonarm/BeagleBone+Black Robert C. Nelson's BeagleBone Black] page.
  
 
  host$ '''git clone git://github.com/RobertCNelson/linux-dev.git'''
 
  host$ '''git clone git://github.com/RobertCNelson/linux-dev.git'''
  host$ '''git git checkout origin/am33x-v3.8 -b am33x-v3.8'''
+
  host$ '''cd linux-dev.git'''
 +
host$ '''git checkout origin/am33x-v3.8 -b am33x-v3.8'''
 
  host$ '''time git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'''  (21 minutes)
 
  host$ '''time git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'''  (21 minutes)
  host$ '''cp system.sh.sample system.sh.sample'''
+
  host$ '''cp system.sh.sample system.sh'''
 +
Now make the following changes to '''system.sh'''.  The <code>></code> shows what's in system.sh.sample. The <code><</code> shows what you should change it to.
 
  host$ '''diff system.sh*'''
 
  host$ '''diff system.sh*'''
 
  15c15
 
  15c15
Line 32: Line 37:
 
  ---
 
  ---
 
  > #ZRELADDR=0x80008000
 
  > #ZRELADDR=0x80008000
  host$ '''sudo apt-get install -y uboot-tools ccache libncurses5-dev'''
+
 
  host$ '''sudo apt-get install build-essential'''
+
Now build the kernel.
  host$ '''sudo apt-get install device-tree-compiler lzop u-boot-tools ia32-libs'''
+
  host$ '''./build_kernel.sh'''
 +
+ Detected build host [Ubuntu 12.04.3 LTS]
 +
+ host: [x86_64]
 +
+ git HEAD commit: [6a8557f75f5b35a79729308379adc13b43535806]
 +
Debian/Ubuntu/Mint: missing dependicies, please install:
 +
-----------------------------
 +
  sudo apt-get update
 +
  sudo apt-get install build-essential device-tree-compiler fakeroot lzma lzop u-boot-tools libncurses5-dev ia32-libs  
 +
-----------------------------
 +
* Failed dependency check
 +
 
 +
The build script is telling you what you need to install.  Do the installs and rerun the build command.
 
  host$ '''./build_kernel.sh'''
 
  host$ '''./build_kernel.sh'''
 
  + Detected build host [Ubuntu 12.04.2 LTS]
 
  + Detected build host [Ubuntu 12.04.2 LTS]
Line 43: Line 59:
 
  -----------------------------
 
  -----------------------------
 
  * Failed dependency check
 
  * Failed dependency check
I fixed this error by editing <code>linux-dev/tools/host_det.sh</code> and commenting out the line:
+
If you don't get this error, move to the next step. I fixed this error by editing <code>linux-dev/tools/host_det.sh</code> and commenting out the line:
 
  # dpkg -l | grep libncurses5-dev | grep ${deb_arch} >/dev/null || deb_pkgs="${deb_pkgs}libncurses5-dev "
 
  # dpkg -l | grep libncurses5-dev | grep ${deb_arch} >/dev/null || deb_pkgs="${deb_pkgs}libncurses5-dev "
 
It was looking for amd64 in the <code>dpkg -l</code> listing and it wasn't appearing.
 
It was looking for amd64 in the <code>dpkg -l</code> listing and it wasn't appearing.
  
== The 3.2 Kernel ==
+
=== Building the 3.8 Kernel ===
{{EBC3.2}}These instructions have been tested for the 3.2.25 kernel.
 
  
=== download ===
+
Rerun the kernel build
These are notes are based on [https://github.com/beagleboard/kernel/blob/6682025752d0b807119c1e363a0b1b9bfe2ab453/README.md Beagleboard kernel git site].
+
host$ '''./build_kernel.sh'''
 +
At some point you will see
 +
[[File:KernelConfiguration.png]]
 +
[http://www.youtube.com/watch?v=HJ9nUqYMjqs&t=13m30s Go back to the video above and forward to 13:30].  Here you will see how to configure the kernel. Once you've exited the configuration tool the kernel will start compiling.  If you have a multicore machine you will see all the cores busy.  It's only a few more minutes before it is done.
  
First download the tools needed to compile the kernel.  This took about 25 seconds.
+
=== Installing the 3.8 Kernel on Your Black Bone ===
host$ '''sudo apt-get install -y git lzop gcc-arm-linux-gnueabi uboot-mkimage'''
 
  
Next download the tools to get the kernel and the patches needed to make it run on the beagle.  (2.5 seconds)
+
==== Updating and running off the eMMC ====
host$ '''cd ~/BeagleBoard'''
+
[[EBC_Exercise_23_Configuring_the_Kernel#Making_and_Installing_the_kernel]] has instructions for copying the correct files to the eMMC to update the kernel.
host$ '''git clone git://github.com/beagleboard/kernel.git'''
 
host$ '''cd kernel'''
 
host$ '''git checkout 6a7c4284a16fed3dae87f4aef78b59c902e4da84 -b beaglebone-3.2'''
 
  
Next download the kernel and the patches.  Before running '''./patch/sh''', take a look at it.  Can you figure out what it's doing?  Also look at '''patch_script.sh''', it's where the details are. The downloading/patching process takes some 39 minutes.
+
==== Booting off the SD card ====
host$ '''less patch.sh patch_script.sh'''
+
Here are some '''optional''' instructions for booting off the SD card rather than the eMMC.
host$ '''./patch.sh'''
 
host$ '''cp patches/beaglebone/defconfig kernel/arch/arm/configs/beaglebone_defconfig
 
host$ '''wget http://arago-project.org/git/projects/?p=am33x-cm3.git\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O kernel/firmware/am335x-pm-firmware.bin'''
 
host$ '''md5sum kernel/firmware/am335x-pm-firmware.bin'''  
 
17d6a4c24d3cb720aa9ed4522cb891fc  kernel/firmware/am335x-pm-firmware.bin
 
  
=== compile ===
+
So far you'be been running everything off the onboard 2G flash. You can continue to do so, but when installing a new kernel there is a good chance you mess up your image and it will be another 45 minutes to reflash itInstead go back to [[EBC_Exercise_03_Installing_a_Beagle_OS]] an instead of installing the eMMC flasher image from [http://beagleboard.org/latest-images], install the '''BeagleBone (Runs on BeagleBone Black as well without flashing the eMMC)''' image (first list).  
Once patched you are ready to compile the kernel.  The first time takes a while.  Mine tool 4 minutes, but I was running on 8 coresSet the '''-j''X'' ''' to match the number of cores you have. '''uImage''' is the kernel!
 
host$ '''cd kernel'''
 
  host$ '''make beaglebone_defconfig'''
 
  
Now that you know it's working, let's compile it. First set the paths to find the cross-compiles. Put the following in a file, call it ~/.oe/'''crossCompile.sh'''.
+
This time when you plug in the SD and boot the bone will boot from the SD card (rather than copying a new image to the 2G builting flash). I suggest programming 2 or 3 SD cards with this image. That way if you really mess up one you can always switch to a another card and keep going.
  
export ARCH=arm
+
Also, if you are booting from the SD and mess up something, you can plug the messed up card into your host computer and fix things and try it again.
export CROSS_COMPILE=arm-linux-gnueabi-
 
Do the above once
 
  
Now ''source'' the file.
+
==== Copying to the SD Card ====
  host$ '''source ~/.oe/crossCompileEnv.sh'''
+
Now install by inserting the SD to be installed on into your host machine and run:
Do the above once per terminal session.
+
  host$ ./tools/install_kernel.sh
  
host$ '''make -j9'''
+
Mine failed because there wasn't enough space on the VFAT partition for uImage, however uImage isn't needed there, so I just editted <code>install_kernel.sh</code> and commented out line '''160'''
  host$ '''make uImage'''
+
  # mmc_partition_discover
Do the above every time you recompile the kernel
+
This keeps it from installing on the VFAT partition.
  
You also need all the kernel modules.  Here we create a directory to install them in. (a few seconds)
+
=== Updating to a new version of the kernel ===
host$ '''mkdir ../rootfs'''
 
host$ '''make INSTALL_MOD_PATH=../rootfs modules_install'''
 
  
=== install ===
+
When you build your kernel the uImage file has some version information in the nameFor example '''uImage-3.8.13-bone20'''. The '''3.8.13''' is the version of the kernel and the '''bone20''' is the version of the patches applied to the kernel for the BeagleBone.  Over time new patches will be posted. These instructions show how to get the latest version.
Copy the kernel and the modules to the Beagle(a minute or so)
 
host$ '''cd ..'''
 
  host$ '''scp kernel/arch/arm/boot/uImage root@beagle:/boot/uImage-3.2.25+
 
host$ '''cd rootfs'''
 
host$ '''find -H -depth | cpio -o -H crc | ssh root@beagle 'cd /; cpio -id' '''
 
  
Now log into the beagle and move some things around.
+
How do you know if you have the latest version?  Run
  host$ '''ssh root@beagle
+
beagle$ '''uname -a'''
 +
  Linux yoder-black-bone '''3.8.13-bone28''' #1 SMP Wed Oct 16 15:32:18 EDT 2013 armv7l GNU/Linux
 +
to see what version you are running. [http://rcn-ee.net/deb/precise-armhf/ This site lists many different versions].  See if yours is the newest, if not continue on.
  
This will copy the kernel to the ext4 partition.
+
This [https://groups.google.com/forum/#!topic/beagleboard/D3wRnulVE1I post to the Google Group] lists the steps as "You need to recheckout master, delete your old branch and re-pull"Here's how you do it.
  beagle$ '''cd /boot'''
 
beagle$ '''rm uImage'''
 
beagle$ '''ln -s uImage-3.2.25+ uImage'''
 
  
This will copy to the FAT partition.
+
  host$ '''cd linux-dev'''
  beagle$ '''mkdir /media/mmcblk0p1'''
+
  host$ '''git checkout master'''
  beagle$ '''mount /dev/mmcblk0p1 /media/mmcblk0p1'''
+
  error: Your local changes to the following files would be overwritten by checkout:
  beagle$ '''cp /boot/uImage-3.2.25+ /media/uImage'''
+
patches/defconfig
 +
Please, commit your changes or stash them before you can switch branches.
 +
Aborting
 +
Hmm.... something has changed.  See what it is.
 +
host$ '''git diff patches/defconfig'''
 +
diff --git a/patches/defconfig b/patches/defconfig
 +
index d903776..3268287 100644
 +
--- a/patches/defconfig
 +
+++ b/patches/defconfig
 +
@@ -2041,6 +2041,7 @@ CONFIG_JHD629_I2C=y
 +
  # CONFIG_SERIAL_NONSTANDARD is not set
 +
  # CONFIG_N_GSM is not set
 +
  # CONFIG_TRACE_SINK is not set
 +
+CONFIG_LPD8806=m
 +
  CONFIG_DEVKMEM=y
 +
 
 +
  #
 +
It looks like some configuration setting have changed.  Since we are getting a new version of the kernel, let's revert back to the previous file and try again.
  
=== reboot ===
+
host$ '''git checkout patches/defconfig'''
Make sure screen is running on your host so you can see the shutdown and boot processes.
+
  host$ '''git checkout master'''
  host$ '''screen /dev/ttyUSB1 115200'''
+
Switched to branch 'master'
 
+
Success, now step 2.
If you get an error try changing making yourself the owner of /dev/ttyUSB1.
+
  host$ '''git branch -d am33x-v3.8'''
  host$ '''sudo chown ''yoder:yoder'' /dev/ttyUSB1'''
+
warning: deleting branch 'am33x-v3.8' that has been merged to
  host$ '''screen /dev/ttyUSB1 115200'''
+
          'refs/remotes/origin/am33x-v3.8', but not yet merged to HEAD.
 
+
Deleted branch am33x-v3.8 (was 3fc8a73).
Then restart you beagle
+
Now repull
  beagle$ '''shutdown -r now'''
+
  host$ '''git pull'''
 
+
Then start over again
If all goes well you will boot into your new kernel.
+
  host$ '''git checkout origin/am33x-v3.8 -b am33x-v3.8'''
  beagle$ '''uname -a'''
+
Branch am33x-v3.8 set up to track remote branch am33x-v3.8 from origin.
Linux beaglebone 3.2.25+ #1 Fri Oct 19 11:05:28 EDT 2012 armv7l GNU/Linux
+
Switched to a new branch 'am33x-v3.8'
 +
Your '''system.sh''' file should be unchanged, so start building
 +
  host$ '''./build_kernel.sh'''
 +
Mine took some 26 minutes on an 8 core machine.
  
 
== DAS U-boot ==
 
== DAS U-boot ==
These instructions came from [http://www.eewiki.net/display/linuxonarm/Home eewiki].
+
These instructions came from [http://www.eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader Robert C Nelson's eewiki.net].
  
 
=== download ===
 
=== download ===
While we're at it, let's get the boot loader we'll be using.  It takes some 3 minutes.
+
While we're at it, let's get the boot loader we'll be using.  It takes some 40 seconds.
  
 
  host$ '''cd ~/BeagleBoard'''
 
  host$ '''cd ~/BeagleBoard'''
 
  host$ '''git clone git://git.denx.de/u-boot.git'''
 
  host$ '''git clone git://git.denx.de/u-boot.git'''
 
  host$ '''cd u-boot/'''
 
  host$ '''cd u-boot/'''
  host$ '''git checkout v2012.10-rc2 -b tmp'''
+
  host$ '''git checkout v2013.07 -b tmp'''
 +
 
 +
=== U-Boot Patches ===
 +
host$ '''wget https://raw.github.com/eewiki/u-boot-patches/master/v2013.07/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch'''
 +
host$ '''patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch'''
  
 
=== compile ===
 
=== compile ===
Now configure and build.  The first time takes some 4 minutes.  After that it's only 5 seconds or so. (Replace '''am335x_evm_config''' with '''omap3_beagle_config''' if you are compiling for the xM.)
+
Now configure and build.  The first time takes some 1.5 minutes.  After that it's only 5 seconds or so.
  host$ '''make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_evm_config'''
+
host$ '''source ~/crossCompileEnv.sh'''  
  host$ '''make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-'''
+
host$ '''make distclean'''
 +
  host$ '''make am335x_evm_config'''
 +
  host$ '''make'''
  
 
=== install ===
 
=== install ===
  
 
  host$ '''scp u-boot.img root@beagle:.'''
 
  host$ '''scp u-boot.img root@beagle:.'''
  beagle$ '''mkdir /media/mmcblk0p1'''
+
  beagle$ '''mkdir /media/BONE'''
  beagle$ '''mount /dev/mmcblk0p1 /media/mmcblk0p1'''
+
  beagle$ '''mount /dev/mmcblk0p1 /media/BONE'''
  beagle$ '''cd /media/mmcblk0p1'''
+
  beagle$ '''cd /media/BONE'''
 
  beagle$ '''mv u-boot.img u-boot.img.orig'''  # Save the working u-boot
 
  beagle$ '''mv u-boot.img u-boot.img.orig'''  # Save the working u-boot
 
  beagle$ '''cp ~/u-boot.img u-boot.img.new'''
 
  beagle$ '''cp ~/u-boot.img u-boot.img.new'''
 
  beagle$ '''cp u-boot.img.new u-boot.img'''
 
  beagle$ '''cp u-boot.img.new u-boot.img'''
 +
 
Once installed you are ready for u-boot work.
 
Once installed you are ready for u-boot work.
 +
 +
== Recovering ==
 +
If your Beagle fails to boot, follow the [[EBC_Exercise_22_Recovering]] instructions to recover.
  
 
{{YoderFoot}}
 
{{YoderFoot}}

Revision as of 08:28, 17 October 2013

thumb‎ Embedded Linux Class by Mark A. Yoder


3.8 Kernel

See EBC Exercise 08 Installing Development Tools 3.2 if you are working with the 3.2 kernel.

Early in the class most of the exercises we will do will all run on the BeagleBoard. You'll be able to edit (gedit), compile (gcc) and run all on the Beagle. Later, when we start compiling the kernel or the boot loader, (U-boot) you will need to cross compile on a Linux machine and copy the results to the Beagle.

The purpose of this exercise is to install all the tools needed for compiling on your host so they will be ready when you need them.

Instructions for building Ångström are given here; however there are a few changes you have to make. Here's what I did.

Tip: Run this exercise using a wired connection if you can. The Ubuntu wireless driver can be finicky, and if it stops working you'll have to restart some of this.

The 3.8 Kernel

3.8 Kernel

Make sure you installed the cross compiler (EBC Exercise 08a Cross-Compiling) before doing this exercise.

Getting the 3.8 Kernel

These notes taken from Beaglebone: Adding USB Wi-Fi & Building a Linux Kernel starting around 4 minutes and ending around 21 minutes. Uses kernel from Robert C. Nelson's BeagleBone Black page.

host$ git clone git://github.com/RobertCNelson/linux-dev.git
host$ cd linux-dev.git
host$ git checkout origin/am33x-v3.8 -b am33x-v3.8
host$ time git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git  (21 minutes)
host$ cp system.sh.sample system.sh

Now make the following changes to system.sh. The > shows what's in system.sh.sample. The < shows what you should change it to.

host$ diff system.sh*
15c15
< CC=arm-linux-gnueabi-
---
> #CC=arm-linux-gnueabi-
21c21
< LINUX_GIT=~/BeagleBoard/linux-stable/
---
> #LINUX_GIT=/home/user/linux-stable/
31c31
< ZRELADDR=0x80008000
---
> #ZRELADDR=0x80008000

Now build the kernel.

host$ ./build_kernel.sh
+ Detected build host [Ubuntu 12.04.3 LTS]
+ host: [x86_64]
+ git HEAD commit: [6a8557f75f5b35a79729308379adc13b43535806]
Debian/Ubuntu/Mint: missing dependicies, please install:
-----------------------------
sudo apt-get update
sudo apt-get install build-essential device-tree-compiler fakeroot lzma lzop u-boot-tools libncurses5-dev ia32-libs 
-----------------------------
* Failed dependency check

The build script is telling you what you need to install. Do the installs and rerun the build command.

host$ ./build_kernel.sh
+ Detected build host [Ubuntu 12.04.2 LTS]
Debian/Ubuntu/Mint: missing dependicies, please install:
-----------------------------
sudo apt-get update
sudo apt-get install libncurses5-dev 
-----------------------------
* Failed dependency check

If you don't get this error, move to the next step. I fixed this error by editing linux-dev/tools/host_det.sh and commenting out the line:

#	dpkg -l | grep libncurses5-dev | grep ${deb_arch} >/dev/null || deb_pkgs="${deb_pkgs}libncurses5-dev "

It was looking for amd64 in the dpkg -l listing and it wasn't appearing.

Building the 3.8 Kernel

Rerun the kernel build

host$ ./build_kernel.sh

At some point you will see KernelConfiguration.png Go back to the video above and forward to 13:30. Here you will see how to configure the kernel. Once you've exited the configuration tool the kernel will start compiling. If you have a multicore machine you will see all the cores busy. It's only a few more minutes before it is done.

Installing the 3.8 Kernel on Your Black Bone

Updating and running off the eMMC

EBC_Exercise_23_Configuring_the_Kernel#Making_and_Installing_the_kernel has instructions for copying the correct files to the eMMC to update the kernel.

Booting off the SD card

Here are some optional instructions for booting off the SD card rather than the eMMC.

So far you'be been running everything off the onboard 2G flash. You can continue to do so, but when installing a new kernel there is a good chance you mess up your image and it will be another 45 minutes to reflash it. Instead go back to EBC_Exercise_03_Installing_a_Beagle_OS an instead of installing the eMMC flasher image from [1], install the BeagleBone (Runs on BeagleBone Black as well without flashing the eMMC) image (first list).

This time when you plug in the SD and boot the bone will boot from the SD card (rather than copying a new image to the 2G builting flash). I suggest programming 2 or 3 SD cards with this image. That way if you really mess up one you can always switch to a another card and keep going.

Also, if you are booting from the SD and mess up something, you can plug the messed up card into your host computer and fix things and try it again.

Copying to the SD Card

Now install by inserting the SD to be installed on into your host machine and run:

host$ ./tools/install_kernel.sh

Mine failed because there wasn't enough space on the VFAT partition for uImage, however uImage isn't needed there, so I just editted install_kernel.sh and commented out line 160

#			mmc_partition_discover

This keeps it from installing on the VFAT partition.

Updating to a new version of the kernel

When you build your kernel the uImage file has some version information in the name. For example uImage-3.8.13-bone20. The 3.8.13 is the version of the kernel and the bone20 is the version of the patches applied to the kernel for the BeagleBone. Over time new patches will be posted. These instructions show how to get the latest version.

How do you know if you have the latest version? Run

beagle$ uname -a
Linux yoder-black-bone 3.8.13-bone28 #1 SMP Wed Oct 16 15:32:18 EDT 2013 armv7l GNU/Linux

to see what version you are running. This site lists many different versions. See if yours is the newest, if not continue on.

This post to the Google Group lists the steps as "You need to recheckout master, delete your old branch and re-pull". Here's how you do it.

host$ cd linux-dev
host$ git checkout master
error: Your local changes to the following files would be overwritten by checkout:
	patches/defconfig
Please, commit your changes or stash them before you can switch branches.
Aborting

Hmm.... something has changed. See what it is.

host$ git diff patches/defconfig
diff --git a/patches/defconfig b/patches/defconfig
index d903776..3268287 100644
--- a/patches/defconfig
+++ b/patches/defconfig
@@ -2041,6 +2041,7 @@ CONFIG_JHD629_I2C=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_N_GSM is not set
 # CONFIG_TRACE_SINK is not set
+CONFIG_LPD8806=m
 CONFIG_DEVKMEM=y
 
 #

It looks like some configuration setting have changed. Since we are getting a new version of the kernel, let's revert back to the previous file and try again.

host$ git checkout patches/defconfig
host$ git checkout master
Switched to branch 'master'

Success, now step 2.

host$ git branch -d am33x-v3.8
warning: deleting branch 'am33x-v3.8' that has been merged to
         'refs/remotes/origin/am33x-v3.8', but not yet merged to HEAD.
Deleted branch am33x-v3.8 (was 3fc8a73).

Now repull

host$ git pull

Then start over again

host$ git checkout origin/am33x-v3.8 -b am33x-v3.8
Branch am33x-v3.8 set up to track remote branch am33x-v3.8 from origin.
Switched to a new branch 'am33x-v3.8'

Your system.sh file should be unchanged, so start building

host$ ./build_kernel.sh

Mine took some 26 minutes on an 8 core machine.

DAS U-boot

These instructions came from Robert C Nelson's eewiki.net.

download

While we're at it, let's get the boot loader we'll be using. It takes some 40 seconds.

host$ cd ~/BeagleBoard
host$ git clone git://git.denx.de/u-boot.git
host$ cd u-boot/
host$ git checkout v2013.07 -b tmp

U-Boot Patches

host$ wget https://raw.github.com/eewiki/u-boot-patches/master/v2013.07/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
host$ patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

compile

Now configure and build. The first time takes some 1.5 minutes. After that it's only 5 seconds or so.

host$ source ~/crossCompileEnv.sh 
host$ make distclean
host$ make am335x_evm_config
host$ make

install

host$ scp u-boot.img root@beagle:.
beagle$ mkdir /media/BONE
beagle$ mount /dev/mmcblk0p1 /media/BONE
beagle$ cd /media/BONE
beagle$ mv u-boot.img u-boot.img.orig  # Save the working u-boot
beagle$ cp ~/u-boot.img u-boot.img.new
beagle$ cp u-boot.img.new u-boot.img

Once installed you are ready for u-boot work.

Recovering

If your Beagle fails to boot, follow the EBC_Exercise_22_Recovering instructions to recover.




thumb‎ Embedded Linux Class by Mark A. Yoder