[FE training-materials-updates] android: Use the same repo tree for both AOSP and Linaro downloads

Maxime Ripard maxime.ripard at free-electrons.com
Thu Aug 22 14:48:43 CEST 2013


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=fa316f29f9edd544875946bf0edfd67a0fcecfb4

>---------------------------------------------------------------

commit fa316f29f9edd544875946bf0edfd67a0fcecfb4
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Thu Aug 22 12:41:52 2013 +0200

    android: Use the same repo tree for both AOSP and Linaro downloads
    
    This will allow to reduce significantly the second download time.
    
    While we're doing this, remove the redundant folders names we had on a
    few areas.
    
    Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>


>---------------------------------------------------------------

fa316f29f9edd544875946bf0edfd67a0fcecfb4
 lab-data/android/{aosp => source}/.empty           |    0
 labs/android-adb/android-adb.tex                   |    2 +-
 labs/android-boot/android-boot.tex                 |   10 ++++----
 .../android-first-compilation.tex                  |    6 ++---
 labs/android-new-board/android-new-board.tex       |   26 +++++++++++---------
 labs/android-source-code/android-source-code.tex   |    2 +-
 6 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/lab-data/android/aosp/.empty b/lab-data/android/source/.empty
similarity index 100%
copy from lab-data/android/aosp/.empty
copy to lab-data/android/source/.empty
diff --git a/labs/android-adb/android-adb.tex b/labs/android-adb/android-adb.tex
index dff7885..7063bc9 100644
--- a/labs/android-adb/android-adb.tex
+++ b/labs/android-adb/android-adb.tex
@@ -10,7 +10,7 @@ After this lab, you will be able to use ADB to:
 
 \section{Setup}
 
-Stay in the the \code{$HOME/felabs/android/linaro/src} directory.
+Stay in the the \code{$HOME/felabs/android/source} directory.
 
 \section{Get ADB}
 
diff --git a/labs/android-boot/android-boot.tex b/labs/android-boot/android-boot.tex
index 1561545..a53c87c 100644
--- a/labs/android-boot/android-boot.tex
+++ b/labs/android-boot/android-boot.tex
@@ -9,7 +9,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/android/kernel} directory.
+Go to the \code{$HOME/felabs/android/} directory.
 
 \section{Compile a kernel for the Android emulator}
 
@@ -38,7 +38,7 @@ Now that we have kernel sources, we now need a toolchain to compile
 the kernel. Fortunately, Android provides one. First, add the
 toolchain from the previous lab to your \code{PATH}.
 
-\code{PATH=$HOME/felabs/android/aosp/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH}
+\code{PATH=$HOME/felabs/android/source/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH}
 
 Now, configure the kernel for the target platform
 
@@ -58,7 +58,7 @@ have to restore the environment that you had after building Android
 from sources. This is needed every time you reboot your workstation,
 and every time you work with a new terminal.
 
-Go back to \code{$HOME/felabs/android/aosp/android/}.
+Go back to \code{$HOME/felabs/android/source}.
 
 All you need to do is source the environment and run the \code{lunch}
 command to specify which product you're working with
@@ -77,7 +77,7 @@ To run the emulator with your own kernel, you can use the
 \code{-kernel} option:
 
 \begin{verbatim}
-emulator -kernel $HOME/felabs/android/kernel/kernel/arch/arm/boot/zImage
+emulator -kernel $HOME/felabs/android/kernel/arch/arm/boot/zImage
 \end{verbatim}
 
 Once again, check the kernel version in the Android settings. Make
@@ -85,7 +85,7 @@ sure that the kernel was built today.
 
 \section{Generate a patchset from the Android Kernel}
 
-Go back to the \code{$HOME/felabs/android/kernel/kernel} directory.
+Go back to the \code{$HOME/felabs/android/kernel} directory.
 
 To compare the Android kernel sources with the official kernel ones,
 we need to fetch the latter sources too, allowing us to see which
diff --git a/labs/android-first-compilation/android-first-compilation.tex b/labs/android-first-compilation/android-first-compilation.tex
index 5ede337..e134e6c 100644
--- a/labs/android-first-compilation/android-first-compilation.tex
+++ b/labs/android-first-compilation/android-first-compilation.tex
@@ -8,7 +8,7 @@ During this lab, you will:
 
 \section{Setup}
 
-Stay in the \code{$HOME/felabs/android/aosp/android} directory.
+Stay in the \code{$HOME/felabs/android/source} directory.
 
 \section{Build environment}
 
@@ -43,7 +43,7 @@ Let's apply these patches (stay in the \code{android} directory to run
 the below command):
 
 \begin{verbatim}
-cat ../patches/*.patch | patch -p1
+cat $HOME/felabs/android/aosp/patches/*.patch | patch -p1
 \end{verbatim}
 
 \section{Fixes for Ubuntu 12.10}
@@ -108,7 +108,7 @@ Now, look at the \code{PATH} environment variable again.
 You can see that it contains:
 \begin{itemize}
 \item
-  \code{$HOME/felabs/android/aosp/android/out/host/linux-x86/bin/}.
+  \code{$HOME/felabs/android/source/out/host/linux-x86/bin/}.
   That's where new utilities have just been compiled.
 \item Prebuilt executables, in particular the ARM cross-compiling
   toolchain, which was already present in the repositories fetched by
diff --git a/labs/android-new-board/android-new-board.tex b/labs/android-new-board/android-new-board.tex
index c895ac5..e2e0b69 100644
--- a/labs/android-new-board/android-new-board.tex
+++ b/labs/android-new-board/android-new-board.tex
@@ -10,7 +10,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/android/linaro} directory.
+Go to the \code{$HOME/felabs/android/source} directory.
 
 Install packages needed for this lab:
 
@@ -36,7 +36,16 @@ Moreover, the exact same kernel can be used to boot both boards.
 For these reasons, we will use this distribution as a
 starting point for the rest of the labs.
 
-First, we need to download the source code. We will use the Linaro
+\code{repo} allows to download a new Android tree in a smart way,
+downloading only the differences between the new manifest we would
+give him and the current code we have. To do so, we first need to
+revert the patches we applied previously.
+
+\begin{verbatim}
+repo forall build frameworks/base -c "git reset --hard HEAD"
+\end{verbatim}
+
+Then, we need to download the source code. We will use the Linaro
 Android 11.11 release, which is based on Android 2.3 Gingerbread and
 Linux 3.1.1
 \footnote{At the time of this writing, Linaro doesn't support Android
@@ -46,8 +55,6 @@ Linux 3.1.1
   most stable version for our hardware.}.
 
 \begin{verbatim}
-mkdir src
-cd src
 repo init \
  -u git://git.free-electrons.com/android/linaro/platform/manifest.git \
  -b linaro-android-11.11-release
@@ -57,8 +64,7 @@ Note that we're using a Free Electrons mirror of Linaro Android. This
 was needed as some git repositories that the Linaro Android 11.11 manifest
 specified disappeared or were moved. 
 
-Take a look at the \code{.repo/manifest.xml} file and compare it with
-the one in \code{$HOME/felabs/android/aosp/android/}. You can see that
+Take a look at the \code{.repo/manifest.xml} file. You can see that
 Linaro took full advantage of the capabilities of the manifest file,
 using multiple git servers instead of a unique one, and replacing some
 of the components (like Dalvik and Bionic, for example) by its own
@@ -69,17 +75,13 @@ Now, let's run the big download job:
 repo sync -j4
 \end{verbatim}
 
-Once again, even with a fast Internet connection, the \code{repo sync}
-command can take more than one hour. Your instructor will keep you
-busy with other things during these downloads.
-
 In the mean time, you should also download and extract the associated
 Linaro toolchain: \footnote{The real URL is
   \url{http://free-electrons.com/labs/tools/android-toolchain-eabi-linaro-4.6-2011.11-4-2011-11-15_12-22-49-linux-x86.tar.xz},
   corresponding to a toolchain no longer available on the Linaro
   website. We wanted to give you something much shorter to type.}
 \begin{verbatim}
-cd ..
+cd ../linaro
 wget --trust-server-names http://j.mp/SJOCH8
 tar axf android-toolchain-*
 \end{verbatim}
@@ -89,7 +91,7 @@ fetch it from \url{http://free-electrons.com/labs/tools/}.
 
 \section{Build Android for the BeagleBoard}
 
-Get back to the \code{src} directory.
+Get back to the \code{source} directory.
 
 As we said earlier, the DevKit8000 is very similar to the BeagleBoard,
 so we will first compile a build for the BeagleBoard. The command to
diff --git a/labs/android-source-code/android-source-code.tex b/labs/android-source-code/android-source-code.tex
index d9b6bd2..528e27a 100644
--- a/labs/android-source-code/android-source-code.tex
+++ b/labs/android-source-code/android-source-code.tex
@@ -10,7 +10,7 @@ During this labs, you will:
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/android/aosp} directory.
+Go to the \code{$HOME/felabs/android/source} directory.
 
 \section{Install needed packages}
 



More information about the training-materials-updates mailing list