[FE training-materials-updates] Merge branch 'master' into jelly-bean

Maxime Ripard maxime.ripard at free-electrons.com
Tue Oct 29 11:37:04 CET 2013


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

On branch  : jelly-bean
Link       : http://git.free-electrons.com/training-materials/commit/?id=56d7a23d5c55a5991a9d315de5f94d4585e74ffb

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

commit 56d7a23d5c55a5991a9d315de5f94d4585e74ffb
Merge: 1e633c7 95bb527
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Fri Oct 25 09:59:31 2013 +0100

    Merge branch 'master' into jelly-bean
    
    Conflicts:
    	labs/android-new-board/android-new-board.tex



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

56d7a23d5c55a5991a9d315de5f94d4585e74ffb
 Makefile                                           |   73 +-
 agenda/beagleboneblack.png                         |  Bin 0 -> 119235 bytes
 agenda/kernel-agenda.tex                           |  366 ++---
 common/android-title.tex                           |    2 +-
 common/beamerthemeFreeElectrons.sty                |   22 +-
 common/labs.sty                                    |    7 +-
 kernel-labs-todo.txt                               |  116 ++
 kernel-slides-todo.txt                             |    3 +
 lab-data/linux/block/data/buildroot-2009.08.config |  749 ----------
 lab-data/linux/block/data/busybox-1.14.x.config    |  880 -----------
 lab-data/linux/block/data/linux-2.6.30.6.config    | 1103 --------------
 lab-data/linux/block/nfsroot.tar.xz                |  Bin 444352 -> 0 bytes
 lab-data/linux/bootloader/beaglebone-black/MLO     |  Bin 0 -> 96736 bytes
 .../linux/bootloader/beaglebone-black/README.txt   |   22 +
 .../linux/bootloader/beaglebone-black/u-boot.img   |  Bin 0 -> 304872 bytes
 lab-data/linux/character/nfsroot.tar.xz            |  Bin 645400 -> 0 bytes
 lab-data/linux/debugging/nfsroot.tar.xz            |  Bin 148232 -> 0 bytes
 .../linux/modules/data/buildroot-2013.08.1.config  | 1133 ++++++++++++++
 ...busybox-1.15.3.config => busybox-1.21.x.config} |  881 ++++++-----
 lab-data/linux/modules/nfsroot.tar.xz              |  Bin 147604 -> 2592360 bytes
 lab-data/linux/networking/data/rootfs.arm.jffs2    |  Bin 2621440 -> 0 bytes
 lab-data/linux/networking/module/Makefile          |   11 -
 lab-data/linux/networking/module/netdrv.c          |   15 -
 ...2-am335x-bone-add-DT-for-BeagleBone-Black.patch |  562 +++++++
 ...isc-assign-file-private_data-in-all-cases.patch |   43 +
 lab-data/sysdev/bootloader/data/MLO                |  Bin 0 -> 43772 bytes
 lab-data/sysdev/bootloader/data/u-boot.img         |  Bin 0 -> 292664 bytes
 lab-data/sysdev/fs/data/linux-2.6.29.config        | 1186 ---------------
 lab-data/sysdev/fs/data/rootfs.tar.xz              |  Bin 330168 -> 0 bytes
 labs/android-source-code/android-source-code.tex   |    2 +-
 .../beaglebone-black-connectors.jpg                |  Bin 0 -> 107753 bytes
 labs/kernel-board-setup/kernel-board-setup.tex     |  265 ++++
 .../network-config-1.png                           |  Bin 40480 -> 40480 bytes
 .../network-config-2.png                           |  Bin 24584 -> 24584 bytes
 .../network-config-3.png                           |  Bin 50383 -> 50383 bytes
 .../host-vs-target.dia                             |    0
 .../kernel-compiling-and-nfs-booting.tex           |  218 +++
 labs/kernel-debugging/kernel-debugging.tex         |   41 +-
 labs/kernel-git/kernel-git.tex                     |   28 +-
 .../kernel-i2c-communication.tex                   |  188 +++
 .../bbb-connect-nunchuk.svg                        |  172 +++
 .../kernel-i2c-device-model.tex                    |  141 ++
 labs/kernel-i2c-device-model/nunchuk-pinout.svg    |  359 +++++
 .../kernel-i2c-input-interface.tex                 |  248 +++
 labs/kernel-locking/kernel-locking.tex             |    5 +-
 .../kernel-module-environment.tex                  |  319 ----
 labs/kernel-module-simple/kernel-module-simple.tex |   89 +-
 .../kernel-power-management.tex                    |  130 --
 labs/kernel-serial-driver/kernel-serial-driver.tex |  409 -----
 .../kernel-serial-interrupt.tex                    |  192 +--
 labs/kernel-serial-iomem/kernel-serial-iomem.tex   |  345 +++--
 labs/kernel-serial-output/kernel-serial-output.tex |  171 ++-
 .../kernel-sources-download.tex                    |  103 ++
 .../kernel-sources-exploring.tex                   |   71 +
 labs/kernel-sources/kernel-sources.tex             |   89 --
 labs/setup/setup.tex                               |   17 +-
 .../sysdev-application-debugging.tex               |   10 +-
 .../sysdev-block-filesystems.tex                   |   20 +-
 .../sysdev-flash-filesystems.tex                   |    4 +-
 labs/sysdev-kernel-cross-compiling/flash-map.dia   |  216 ++-
 .../sysdev-kernel-cross-compiling.tex              |   93 +-
 .../sysdev-kernel-fetch-and-patch.tex              |   29 +-
 labs/sysdev-real-time/sysdev-real-time.tex         |    4 +-
 labs/sysdev-tinysystem/sysdev-tinysystem.tex       |    8 +-
 labs/sysdev-toolchain/sysdev-toolchain.tex         |   24 +-
 labs/sysdev-u-boot/sysdev-u-boot.tex               |   55 +-
 slides/android-adb-use/android-adb-use.tex         |    6 +-
 slides/calao-board/calao-board.tex                 |   20 -
 slides/calao-board/calao-usb9263.png               |  Bin 38712 -> 0 bytes
 .../kernel-backup-slides-title.tex                 |    1 +
 slides/kernel-beagleboneblack/beagleboneblack.png  |  Bin 0 -> 119235 bytes
 .../kernel-beagleboneblack.tex                     |   24 +
 ...ard-setup-kernel-compiling-and-booting-labs.tex |   17 +
 slides/kernel-contribution/kernel-contribution.tex |  259 ++++
 .../kernel-development-process-title.tex           |    2 +
 .../driver-architecture.dia                        |  106 +-
 .../kernel-device-model/dt-inheritance.dia         |  426 +++---
 .../kernel-device-model.tex}                       |  690 ++++-----
 .../recursive-model.dia                            |    0
 .../usb-bus.dia                                    |    0
 .../usb-detection.dia                              |    0
 .../usb-registering.dia                            |    0
 ...kernel-driver-development-character-drivers.tex |  636 --------
 .../kernel-driver-development-concurrency.tex      |    2 +-
 .../jtag.dia}                                      |  438 +++---
 .../kernel-driver-development-debugging.tex        |   98 +-
 .../kernel-driver-development-general-apis.tex     |    2 +-
 .../kernel-driver-development-interrupts.tex       |   56 +-
 .../kernel-driver-development-io-memory.tex        |    6 +-
 .../kernel-driver-development-lab-io-memory.tex    |   12 +-
 .../kernel-driver-development-memory.tex           |    5 +-
 .../kernel-driver-development-mmap.tex             |    2 +-
 .../kernel-driver-development-modules.tex          |   33 +-
 .../kernel-driver-development-processes.tex        |    2 +
 .../copy-to-from-user.dia                          |    0
 .../driver-architecture.dia                        |  106 +-
 .../frameworks.dia                                 |    0
 slides/kernel-frameworks/kernel-frameworks.tex     |  667 +++++++++
 .../link-structures-imx.dia                        |    0
 .../link-structures-netdev.dia                     |    0
 .../user-kernel-exchanges.dia                      |    0
 slides/kernel-git-content/kernel-git-content.tex   |  187 ---
 slides/kernel-git-lab/kernel-git-lab.tex           |    2 +-
 slides/kernel-git-title/kernel-git-title.tex       |    2 +-
 .../i2c-bus.dia}                                   |  490 +++---
 slides/kernel-i2c/kernel-i2c.tex                   |  399 +++++
 .../input-subsystem-diagram.dia}                   |  947 ++++++------
 slides/kernel-input/kernel-input.tex               |  216 +++
 .../kernel-linux-intro-sources.tex                 |   98 ++
 .../kernel-misc-subsystem.tex                      |  104 ++
 .../misc-subsystem-diagram.dia}                    | 1150 +++++++-------
 .../kernel-pinmuxing/allwinner-example.dia         |  497 +++---
 slides/kernel-pinmuxing/kernel-pinmuxing.tex       |  159 ++
 .../pin-muxing-principle.dia}                      | 1226 ++++++++-------
 .../pinctrl-subsystem.dia}                         | 1575 ++++++++++----------
 slides/kernel-porting-content/crystalfontz.jpg     |  Bin 0 -> 1274188 bytes
 .../kernel-porting-content.tex                     |  723 +++++----
 .../kernel-power-management-content.tex            |   24 +-
 .../kernel-power-management-lab.tex                |    8 -
 .../kernel-resources-advice.tex                    |   88 --
 .../kernel-resources-references.tex                |    2 -
 .../kernel-resources-title.tex                     |    2 +-
 .../kernel-source-code-download-lab.tex            |    7 +
 .../kernel-source-code-drivers.tex                 |    5 +-
 .../kernel-source-code-exploring-lab.tex           |    8 +
 .../kernel-source-code-lab-module.tex              |   10 -
 .../kernel-source-code-lab-source-code.tex         |   10 -
 .../kernel-source-code-layout.tex                  |   47 +-
 .../setup-lab.tex}                                 |    0
 .../sysdev-bootloaders-sequence.tex                |    2 +-
 slides/sysdev-busybox/sysdev-busybox.tex           |    2 +-
 .../sysdev-dev-environment.tex                     |   10 -
 .../sysdev-embedded-linux.tex                      |    4 +-
 .../sysdev-linux-intro-compilation.tex             |    2 +
 .../sysdev-linux-intro-configuration.tex           |   15 +-
 .../sysdev-linux-intro-cross-compilation.tex       |   49 +
 .../inside-linux-kernel.dia}                       |  499 +++----
 .../sysdev-linux-intro-features.tex                |   36 +-
 .../sysdev-linux-intro-sources.tex                 |   76 +-
 .../sysdev-linux-intro-versioning.tex              |   72 +-
 slides/sysdev-realtime/sysdev-realtime.tex         |    2 +-
 141 files changed, 11860 insertions(+), 11750 deletions(-)

diff --cc labs/android-new-board/android-new-board.tex
index 982991f,6c15b0b..005ae4e
--- a/labs/android-new-board/android-new-board.tex
+++ b/labs/android-new-board/android-new-board.tex
@@@ -154,6 -183,128 +154,6 @@@ you wish to exit \code{picocom}, press 
  Once you inserted the SD card, you can boot the board by holding the
  \code{boot} key while switching the board on. On the serial port, you
  should see Android going through its boot process, until you finally
 -have a shell on the serial link.
 -
 -However, as you may have seen, the system boots, but you have no
 -display at all. We are going to fix this.
 -
 -\section{Fix the blank screen}
 -
 -The first problem we see is that the display remains blank the whole
 -time. This is because of the generated U-Boot being targeted for the
 -BeagleBoard and not for the DevKit8000. In the Android build system,
 -all the hardware related configuration is set in the file
 -\code{BoardConfig.mk}. In the BeagleBoard product definition, find
 -where the U-boot config file to use is set.
 -
 -Modify the \code{BoardConfig.mk} file to use the default U-boot
 -configuration for the DevKit8000 board (\code{devkit8000_config}).
 -
 -To avoid rebuild errors, you should remove the directory where U-boot
 -was built:
 -
 -\begin{verbatim}
 -rm -r out/target/product/beagleboard/obj/u-boot
 -\end{verbatim}
 +have a shell on the serial link and the screen working properly.
  
- \section{TODO: Fix the screen resolution}
 -Now, compile and test your changes.
 -
 -Don't be surprised if Android takes several minutes to boot. Android
 -has some work to do the first time it's booted.
 -
 -You should now see the display working, while it has a major glitch:
 -it prints only a portion of the screen.
 -
 -\section{Fix the resolution}
 -
 -The actual resolution is bigger than the screen size, which 
 -is only 480x272. This kind of adjustment is mostly done
 -through the kernel command line. On the SD card's \code{boot}
 -partition, you will find a file named \code{boot.txt}, which is a
 -U-Boot script setting all the parameters needed to boot the board
 -properly, including the kernel command line.
 -
 -Change the \code{omapfb.mode} properties so that the board uses
 -the LCD instead of the DVI output and configures the LCD with the 
 -correct resolution.
 -
 -You can find some documentation for this option in the
 -\code{kernel/Documentation/arm/OMAP/DSS} file, in the
 -\code{Kernel boot arguments} section.
 -
 -You will then have to generate from this \code{boot.txt} file a
 -\code{boot.scr} file using the following command:
 -
 -\code{mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute uImage.bin' -d boot.txt boot.scr}
 -\footnote{This command puts the \code{boot.txt} file contents into a
 -  special container, allowing U-boot to know that the \code{boot.scr}
 -  file is a script, and telling it how to handle this file. All the
 -  files handled by U-boot should be put in such a container.}
 - 
 -Once this is done, test your changes by booting the board. You should
 -see the display working correctly now.
 -
 -\section{Fix the touchscreen}
 -
 -If you test the touchscreen with the previous Android build you made,
 -you should see that it is almost unusable, while the system receives
 -some inputs. This mean that the kernel has the driver for the
 -touchscreen controller, but it returns bogus values. If you pay
 -attention however, you will find that the touchscreen doesn't have the
 -same orientation as the display.
 -
 -Get back to the OMAP DSS documentation to find an option that might
 -address this problem.
 -
 -\section{Bring it all together}
 -
 -These tweaks are not persistent because the \code{boot.scr} file is
 -overwritten every time by the \code{linaro-android-media-create}
 -script.
 -
 -However, the build system can help us here. Use the
 -\code{BOARD_KERNEL_CMDLINE} variable to set these new values. It will
 -be processed by the build system and then used when it generates the
 -boot image. Since this variable is related to the hardware, this
 -variable should be in \code{BoardConfig.mk}
 -
 -You can also add \code{no_console_suspend} to the bootargs as Android
 -by default suspends the shell on the serial line after a minute or so,
 -making it pretty hard to use it properly.
 -
 -\section{Add the Buttons}
 -
 -If you happen to launch an application, you will find that you cannot
 -get back to the home screen, as no button is mapped to the \code{back}
 -and \code{home} keys.
 -
 -Button mapping is done in two steps. First, in the kernel, the board
 -should define the available buttons. In this case, we will use the
 -small black buttons right next to the screen on the DevKit8000. These
 -buttons are handled by the \code{gpio-keys} driver, and defined in the
 -devkit8000 board file in the kernel, in the \code{arch/arm/mach-omap2}
 -folder.
 -
 -If you look into that file, you will see that only one button is
 -defined, the one corresponding to the button labeled \code{user key}
 -on the board.
 -
 -We will map this button to the \code{back} key in Android. In the
 -\code{gpio_keys_button} structure, there is a \code{code} field. The
 -value of this field defines the keycode sent to the input subsystem
 -when you press that button, and will be later dispatched to the
 -userspace. Replace the current keycode by \code{KEY_EXIT} and look up its
 -value in the \code{include/linux/input.h} file.
 -
 -The Android input system loads keymaps and key layouts for each loaded
 -input driver. To load these properly, it uses the same name as the
 -input driver, with an extension. In our case, the input driver being
 -\code{gpio-keys}, we will need to modify the \code{gpio-keys.kl} file.
 -
 -This file consists of a list of entries, corresponding to what actions
 -every keycode should trigger in the system. Add a new entry to this
 -file for the back button, which should be like:
 -\code{key <keycode> BACK}
 -
 -Once you're done, rebuild the system, boot it, and you should be able
 -to use the \code{back} key now!
++\section{TODO: Fix the screen resolution}
diff --cc labs/android-source-code/android-source-code.tex
index 5e06196,4f4cbcd..9cb3e2d
--- a/labs/android-source-code/android-source-code.tex
+++ b/labs/android-source-code/android-source-code.tex
@@@ -83,9 -83,9 +83,9 @@@ to compile Android and its components f
  \begin{verbatim}
  sudo apt-get install xsltproc gnupg flex bison gperf build-essential \
       zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
-      x11proto-core-dev libx11-dev lib32readline6-dev lib32z-dev \
+      x11proto-core-dev libx11-dev lib32readline6-dev lib32z1-dev \
       libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
 -     libxml2-utils openjdk-6-jdk
 +     libxml2-utils
  sudo apt-get clean
  \end{verbatim}
  



More information about the training-materials-updates mailing list