[FE training-materials-updates] Minor font improvement
michael.opdenacker at free-electrons.com
michael.opdenacker at free-electrons.com
Fri Jun 15 15:37:29 CEST 2012
- Log -----------------------------------------------------------------
http://git.free-electrons.com/training-materials/commit/?id=ba42c4335f1e77bfebb9803b0a06212b76a4000d
commit ba42c4335f1e77bfebb9803b0a06212b76a4000d
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Fri Jun 15 15:36:35 2012 +0200
U-boot: minor font improvements
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index a66b983..6c777ab 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -371,12 +371,13 @@ company network).
\includegraphics[width=8cm]{labs/sysdev-u-boot/network-config-3.png}
\end{center}
-You can use 255.255.255.0 as the {\em Netmask}, and leave the {\em
- Gateway} field untouched (if you click on the {\em Gateway} box, you
+You can use \code{255.255.255.0} as \code{Netmask}, and leave the
+\code{Gateway} field untouched (if you click on the \code{Gateway} box, you
will have to type a valid IP address, otherwise you won't be apply to
-click on the Apply button).
+click on the \code{Apply button).
-Now, configure the network on the board in U-Boot by setting the ipaddr and serverip environment variables:
+Now, configure the network on the board in U-Boot by setting the \code{ipaddr}
+and \code{serverip} environment variables:
\begin{verbatim}
setenv ipaddr 192.168.0.100
http://git.free-electrons.com/training-materials/commit/?id=6d2f350d192c6718b3381cb6f678dc3ec2e03c35
commit 6d2f350d192c6718b3381cb6f678dc3ec2e03c35
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Fri Jun 15 15:26:32 2012 +0200
Replace fdisk by cfdisk
diff --git a/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex b/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
index 18b4a28..5105053 100644
--- a/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
+++ b/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
@@ -29,7 +29,10 @@ used in this previous lab.\footnote{If you didn't do or complete the
\section{Add partitions to the MMC card}
-Using fdisk, add two additional partitions to the MMC card (in
+Using \code{cfdisk}
+\footnote{Now that one partition already exists, you don't have to specify
+headers and sectors again. Just run \code{cfdisk /dev/sdx}},
+add two additional partitions to the MMC card (in
addition to the existing \code{boot} partition created in the
bootloaders lab):
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index e1fd65a..a66b983 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -35,7 +35,7 @@ Go to the \code{/home/<user>/felabs/sysdev/u-boot/} directory.
The ROM monitor can read files from a FAT filesystem on the MMC/SD
card. However, the MMC/SD card must be carefully partitionned, and the
filesystem carefully created in order to be recognized by the ROM
-monitor. Here are the special instructions to format an MMC/SD card
+monitor. Here are special instructions to format an MMC/SD card
for the OMAP-based platforms.
First, connect your card reader to your workstation, with the MMC/SD
@@ -82,94 +82,17 @@ $ sudo dd if=/dev/zero of=/dev/sdb bs=1M count=256
\end{verbatim}
As we explained earlier, the TI OMAP rom monitor needs special partition geometry settings
-to read partition contents. The MMC/SD card must have 255 heads, 63 sectors and a number
-of 512 byte cylinders corresponding to the card capacity. As this is very specific
-to OMAP CPUs, we will just run a command that enforces these settings:
+to read partition contents. The MMC/SD card must have 255 heads and 63 sectors.
-\code{sudo utils/omap-mmc-geometry /dev/sdb}
+Let's use the \code{cfdisk} command to create a first partition with these settings:
-We can now create and modify partitions in an ordinary way with \code{fdisk},
-which is the standard utility to manipulate partitions in GNU/Linux.
+\code{cfdisk -h 255 -s 63 /dev/sdb}
-\begin{verbatim}
-$ sudo fdisk /dev/sdb
-\end{verbatim}
-
-Display the on-line help by pressing the \code{m} key:
-
-\begin{verbatim}
-Command (m for help): m
-Command action
- a toggle a bootable flag
- b edit bsd disklabel
- c toggle the dos compatibility flag
- d delete a partition
- l list known partition types
- m print this menu
- n add a new partition
- o create a new empty DOS partition table
- p print the partition table
- q quit without saving changes
- s create a new empty Sun disklabel
- t change a partition's system id
- u change display/entry units
- v verify the partition table
- w write table to disk and exit
- x extra functionality (experts only)
-\end{verbatim}
-
-Print the current partition table typing \code{p}:
-
-\begin{verbatim}
-Disk /dev/sdb: 3959 MB, 3959422976 bytes
-255 heads, 63 sectors/track, 481 cylinders, total 7733248 sectors
-Units = sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / 512 bytes
-Disk identifier: 0x00000000
-
- Device Boot Start End Blocks Id System
-/dev/sde1 63 7727264 3863601 83 Linux
-\end{verbatim}
-
-Delete the default partition (filling all the MMC/SD card space) with the \code{d} command.
-We will create a small one, which will be our boot partition.
-
-Now, let's create the boot partition:
-
-\begin{verbatim}
-Command (m for help): n
-Command action
- e extended
- p primary partition (1-4)
-p
-Partition number (1-4): 1
-First sector (2048-7733247, default 2048): 1
-Last sector, +cylinders or +size{K,M,G} (2048-7733247, default 7733247): +64M
-\end{verbatim}
-
-Mark it bootable:
-
-\begin{verbatim}
-Command (m for help): a
-Partition number (1-4): 1
-\end{verbatim}
-
-Then we change its type to FAT32:
+In the \code{cfdisk} interface, create a first primary partition, starting from the beginning,
+with a 64 MB size, a \code{Bootable} type and a \code{0C} type (\code{W95 FAT32 (LBA)}).
+Press \code{Write} when you are done.
-\begin{verbatim}
-Command (m for help): t
-Selected partition 1
-Hex code (type L to list codes): c
-Changed system type of partition 1 to c (W95 FAT32 (LBA))
-\end{verbatim}
-
-Now write your changes and exit:
-
-\begin{verbatim}
-Command (m for help): w
-The partition table has been altered!
-\end{verbatim}
+If you used \code{fdisk} before, you should find \code{cfdisk} much more convenient!
Format this new partition in FAT32, with the \code{boot} label (name):
http://git.free-electrons.com/training-materials/commit/?id=314da3790066d488922dea1b99e9fe23a9ae372d
commit 314da3790066d488922dea1b99e9fe23a9ae372d
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Fri Jun 15 14:46:18 2012 +0200
Add more details
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index 3a82f29..e1fd65a 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -171,7 +171,7 @@ Command (m for help): w
The partition table has been altered!
\end{verbatim}
-Format this new partition:
+Format this new partition in FAT32, with the \code{boot} label (name):
\begin{verbatim}
sudo mkfs.vfat -n boot -F 32 /dev/sdb1
@@ -194,6 +194,7 @@ repository:\footnote{We are using an old version of X-Loader, because
moment on most embedded platforms.}
\begin{verbatim}
+sudo apt-get install git
git clone git://git.igep.es/pub/scm/x-loader.git
cd x-loader
git checkout v1.4.4-3
@@ -222,12 +223,14 @@ In order to compile the X-loader, you need to:
\end{itemize}
-The resulting file is stored in the x-loader main directory as
+The resulting file is stored in the \code{x-loader} main directory as
\code{x-load.bin}. This file must be {\em signed}\footnote{In fact,
for a General Purpose (GP) device, the signature only consists of
adding a âTable of Contentsâ at the beginning of the image,
- explaining which program to execute.} in order to be executed by the
-processor. Using the \code{signGP} tool in the \code{contrib/}
+ explaining which program to execute. Signatures are using in variants
+ of the OMAP CPUs that implement some security features, which will refuse
+ to load an X-loader image that wasn't signed with an authorized key.}
+ in order to be executed by the processor. Using the \code{signGP} tool in the \code{contrib/}
subdirectory, sign the \code{x-load.bin} file:
\begin{verbatim}
@@ -254,7 +257,7 @@ cat ../u-boot-2011.12-igep-nand-support.patch | patch -p1
\end{verbatim}
Get an understanding of its configuration and compilation steps by
-reading the README file, and specifically the {\em Building the
+reading the \code{README} file, and specifically the {\em Building the
software} section.
Basically, you need to:
@@ -271,7 +274,7 @@ Basically, you need to:
how a U-Boot configuration file is written;
\item Finally, run \code{make}\footnote{You can speed up the compiling
- by using the -jX option with make. Where X is the number of parallel
+ by using the \code{-jX} option with \code{make}, where X is the number of parallel
jobs used for compiling. Twice the number of CPU cores is a good
value.}, which should build U-Boot.
@@ -297,7 +300,7 @@ serial communication program, such as \code{picocom}:
sudo apt-get install picocom
\end{verbatim}
-Run \code{picocom -b 115200 /dev/ttyUSB0}, to start serial
+Run \code{sudo picocom -b 115200 /dev/ttyUSB0}, to start serial
communication on \code{/dev/ttyUSB0}, with a baudrate of 115200. If
you wish to exit picocom, press \code{[Ctrl][a]} followed by
\code{[Ctrl][x]}.
http://git.free-electrons.com/training-materials/commit/?id=669c1de0dea481a0b6628aa13166a5fdab882ce9
commit 669c1de0dea481a0b6628aa13166a5fdab882ce9
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Fri Jun 15 13:26:05 2012 +0200
Simplify MMC/SD geometry manipulations
diff --git a/lab-data/sysdev/u-boot/mkcard.txt b/lab-data/sysdev/u-boot/mkcard.txt
deleted file mode 100755
index 743b36d..0000000
--- a/lab-data/sysdev/u-boot/mkcard.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-#! /bin/sh
-# mkcard.sh v0.5
-# (c) Copyright 2009 Graeme Gregory <dp at xora.org.uk>
-# Licensed under terms of GPLv2
-#
-# Parts of the procudure base on the work of Denys Dmytriyenko
-# http://wiki.omap.com/index.php/MMC_Boot_Format
-
-export LC_ALL=C
-
-if [ $# -ne 1 ]; then
- echo "Usage: $0 <drive>"
- exit 1;
-fi
-
-DRIVE=$1
-
-dd if=/dev/zero of=$DRIVE bs=1024 count=1024
-
-SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'`
-
-echo DISK SIZE - $SIZE bytes
-
-CYLINDERS=`echo $SIZE/255/63/512 | bc`
-
-echo CYLINDERS - $CYLINDERS
-
-{
-echo ,9,0x0C,*
-echo ,,,-
-} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
-
-sleep 1
-
-
-if [ -x `which kpartx` ]; then
- kpartx -a ${DRIVE}
-fi
-
-# handle various device names.
-# note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1
-# won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572
-
-PARTITION1=${DRIVE}1
-if [ ! -b ${PARTITION1} ]; then
- PARTITION1=${DRIVE}p1
-fi
-
-DRIVE_NAME=`basename $DRIVE`
-DEV_DIR=`dirname $DRIVE`
-
-if [ ! -b ${PARTITION1} ]; then
- PARTITION1=$DEV_DIR/mapper/${DRIVE_NAME}p1
-fi
-
-PARTITION2=${DRIVE}2
-if [ ! -b ${PARTITION2} ]; then
- PARTITION2=${DRIVE}p2
-fi
-if [ ! -b ${PARTITION2} ]; then
- PARTITION2=$DEV_DIR/mapper/${DRIVE_NAME}p2
-fi
-
-
-# now make partitions.
-if [ -b ${PARTITION1} ]; then
- umount ${PARTITION1}
- mkfs.vfat -F 32 -n "boot" ${PARTITION1}
-else
- echo "Cant find boot partition in /dev"
-fi
-
-if [ -b ${PARITION2} ]; then
- umount ${PARTITION2}
- mke2fs -j -L "Angstrom" ${PARTITION2}
-else
- echo "Cant find rootfs partition in /dev"
-fi
-
diff --git a/lab-data/sysdev/u-boot/utils/omap-mmc-geometry b/lab-data/sysdev/u-boot/utils/omap-mmc-geometry
new file mode 100644
index 0000000..90ae342
--- /dev/null
+++ b/lab-data/sysdev/u-boot/utils/omap-mmc-geometry
@@ -0,0 +1,8 @@
+#! /bin/sh
+# Enforces correct geometry settings for OMAP rom monitor
+DRIVE=$1
+SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'`
+CYLINDERS=`echo $SIZE/255/63/512 | bc`
+sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
+;
+EOF
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index 783dcc0..3a82f29 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -20,11 +20,11 @@ very specific to the hardware platform. There are usually two cases:
\end{itemize}
-The IGEPv2 board, which uses the DM3730 or the OMAP3530, falls into
-the second category. The monitor integrated in the ROM reads the SD
+The IGEPv2 board, which uses the DM3730 or the OMAP3530 processors, falls into
+the second category. The monitor integrated in the ROM reads the MMC/SD
card to search for a valid bootloader before looking at the internal
-NAND flash for a bootloader. Therefore, by using a SD card, we can
-start up a OMAP3-based without having anything installed on it.
+NAND flash for a bootloader. Therefore, by using an MMC/SD card, we can
+start up a OMAP3-based board without having anything installed on it.
\section{Setup}
@@ -32,8 +32,8 @@ Go to the \code{/home/<user>/felabs/sysdev/u-boot/} directory.
\section{MMC/SD card setup}
-The ROM monitor can read files from a FAT filesystem on the SD
-card. However, the SD card must be carefully partitionned, and the
+The ROM monitor can read files from a FAT filesystem on the MMC/SD
+card. However, the MMC/SD card must be carefully partitionned, and the
filesystem carefully created in order to be recognized by the ROM
monitor. Here are the special instructions to format an MMC/SD card
for the OMAP-based platforms.
@@ -52,7 +52,7 @@ Caution: read this carefully before proceeding. You could destroy
existing partitions on your PC!
Do not make the confusion between the device that is used by your
-board to represent your MMC disk (probably \code{/dev/sda}), and the device
+board to represent your MMC/SD disk (probably \code{/dev/sda}), and the device
that your workstation uses when the card reader is inserted (probably
\code{/dev/sdb}).
@@ -61,9 +61,8 @@ your workstation. People have already destroyed their Windows
partition by making this mistake.}
\end{minipage}}
-
You can also run \code{cat /proc/partitions} to list all block devices
-in your system. Again, make sure to distinguish the SD card from the
+in your system. Again, make sure to distinguish the SD/MMC card from the
hard drive of your development workstation!
Type the \code{mount} command to check your currently mounted
@@ -75,14 +74,22 @@ $ sudo umount /dev/sdb2
...
\end{verbatim}
-Now, clear possible SD card contents remaining from previous training
+Now, clear possible MMC/SD card contents remaining from previous training
sessions:
\begin{verbatim}
$ sudo dd if=/dev/zero of=/dev/sdb bs=1M count=256
\end{verbatim}
-In a terminal open the block device with \code{fdisk}:
+As we explained earlier, the TI OMAP rom monitor needs special partition geometry settings
+to read partition contents. The MMC/SD card must have 255 heads, 63 sectors and a number
+of 512 byte cylinders corresponding to the card capacity. As this is very specific
+to OMAP CPUs, we will just run a command that enforces these settings:
+
+\code{sudo utils/omap-mmc-geometry /dev/sdb}
+
+We can now create and modify partitions in an ordinary way with \code{fdisk},
+which is the standard utility to manipulate partitions in GNU/Linux.
\begin{verbatim}
$ sudo fdisk /dev/sdb
@@ -109,53 +116,24 @@ Command action
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
-Print the current partition table typing p:
-Command (m for help): p
-
-Disk /dev/sdb: 1967 MB, 1967128576 bytes
-\end{verbatim}
-
-Write down the total size.
-
-Let's enter the expert mode for geometry settings:
-
-\begin{verbatim}
-Command (m for help): x
-\end{verbatim}
-
-We must set the geometry to 255 heads, 63 sectors and calculate the
-number of cylinders corresponding to your MMC card.
-
-\begin{verbatim}
-Expert command (m for help) : h
-Number of heads (1-256, default 4): 255
-
-Expert command (m for help) : s
-Number of sectors (1-63, default 62): 63
-Warning : setting sector offset for DOS compatibility
-\end{verbatim}
-
-Now for the number of cylinders, we consider the global size
-(1967128576 bytes in our example, the size is reported
-at the top of the \code{fdisk} output)
-then divide it by (255*63*512) which gives around
-239.16 cylinders. We must round it down to 239.
-
-\begin{verbatim}
-Expert command (m for help) : c
-Number of cylinders (1-1048576, default 4): 239
\end{verbatim}
-After these geometry settings, exit expert mode ('r' command) then
-print the partition table again to check geometry:
+Print the current partition table typing \code{p}:
\begin{verbatim}
-Command (m for help): p
+Disk /dev/sdb: 3959 MB, 3959422976 bytes
+255 heads, 63 sectors/track, 481 cylinders, total 7733248 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000000
-Disk /dev/sdb: 1967 MB, 1967128576 bytes
+ Device Boot Start End Blocks Id System
+/dev/sde1 63 7727264 3863601 83 Linux
\end{verbatim}
-If any partition exists, delete it ('d' command).
+Delete the default partition (filling all the MMC/SD card space) with the \code{d} command.
+We will create a small one, which will be our boot partition.
Now, let's create the boot partition:
@@ -166,8 +144,8 @@ Command action
p primary partition (1-4)
p
Partition number (1-4): 1
-First cylinder (1-239, default 1): 1
-Last cylinder, +cylinders or +size{K,M,G} (1-239, default 239): +64M
+First sector (2048-7733247, default 2048): 1
+Last sector, +cylinders or +size{K,M,G} (2048-7733247, default 7733247): +64M
\end{verbatim}
Mark it bootable:
@@ -177,7 +155,7 @@ Command (m for help): a
Partition number (1-4): 1
\end{verbatim}
-Then we change its type to FAT32
+Then we change its type to FAT32:
\begin{verbatim}
Command (m for help): t
http://git.free-electrons.com/training-materials/commit/?id=fb615a0f4f1db9592137a1264a272dd859c3566e
commit fb615a0f4f1db9592137a1264a272dd859c3566e
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Thu Jun 14 17:46:07 2012 +0200
Add mkcard.txt to format the SD card
diff --git a/lab-data/sysdev/u-boot/mkcard.txt b/lab-data/sysdev/u-boot/mkcard.txt
new file mode 100755
index 0000000..743b36d
--- /dev/null
+++ b/lab-data/sysdev/u-boot/mkcard.txt
@@ -0,0 +1,79 @@
+#! /bin/sh
+# mkcard.sh v0.5
+# (c) Copyright 2009 Graeme Gregory <dp at xora.org.uk>
+# Licensed under terms of GPLv2
+#
+# Parts of the procudure base on the work of Denys Dmytriyenko
+# http://wiki.omap.com/index.php/MMC_Boot_Format
+
+export LC_ALL=C
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <drive>"
+ exit 1;
+fi
+
+DRIVE=$1
+
+dd if=/dev/zero of=$DRIVE bs=1024 count=1024
+
+SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'`
+
+echo DISK SIZE - $SIZE bytes
+
+CYLINDERS=`echo $SIZE/255/63/512 | bc`
+
+echo CYLINDERS - $CYLINDERS
+
+{
+echo ,9,0x0C,*
+echo ,,,-
+} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
+
+sleep 1
+
+
+if [ -x `which kpartx` ]; then
+ kpartx -a ${DRIVE}
+fi
+
+# handle various device names.
+# note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1
+# won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572
+
+PARTITION1=${DRIVE}1
+if [ ! -b ${PARTITION1} ]; then
+ PARTITION1=${DRIVE}p1
+fi
+
+DRIVE_NAME=`basename $DRIVE`
+DEV_DIR=`dirname $DRIVE`
+
+if [ ! -b ${PARTITION1} ]; then
+ PARTITION1=$DEV_DIR/mapper/${DRIVE_NAME}p1
+fi
+
+PARTITION2=${DRIVE}2
+if [ ! -b ${PARTITION2} ]; then
+ PARTITION2=${DRIVE}p2
+fi
+if [ ! -b ${PARTITION2} ]; then
+ PARTITION2=$DEV_DIR/mapper/${DRIVE_NAME}p2
+fi
+
+
+# now make partitions.
+if [ -b ${PARTITION1} ]; then
+ umount ${PARTITION1}
+ mkfs.vfat -F 32 -n "boot" ${PARTITION1}
+else
+ echo "Cant find boot partition in /dev"
+fi
+
+if [ -b ${PARITION2} ]; then
+ umount ${PARTITION2}
+ mke2fs -j -L "Angstrom" ${PARTITION2}
+else
+ echo "Cant find rootfs partition in /dev"
+fi
+
http://git.free-electrons.com/training-materials/commit/?id=70ec16082eb43508c9269759a38d9d517e1c6216
commit 70ec16082eb43508c9269759a38d9d517e1c6216
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Thu Jun 14 17:24:41 2012 +0200
ct-ng 1.15 updates, font improvements
diff --git a/labs/sysdev-toolchain/sysdev-toolchain.tex b/labs/sysdev-toolchain/sysdev-toolchain.tex
index c489e63..6379961 100644
--- a/labs/sysdev-toolchain/sysdev-toolchain.tex
+++ b/labs/sysdev-toolchain/sysdev-toolchain.tex
@@ -20,16 +20,15 @@ Make sure you have at least 2 GB of free disk space.
Install the packages needed for this lab:
\begin{verbatim}
-sudo apt-get install autoconf automake libtool libexpat1-dev
-sudo apt-get install libncurses5-dev bison flex patch curl
-sudo apt-get install cvs texinfo build-essential
-sudo apt-get install subversion gawk python-dev
+sudo apt-get install autoconf automake libtool libexpat1-dev \
+ libncurses5-dev bison flex patch curl cvs texinfo \
+ build-essential subversion gawk python-dev gperf
sudo apt-get clean
\end{verbatim}
\section{Getting Crosstool-ng}
-Get the latest 1.13.x release of Crosstool-ng at
+Get the latest 1.15.x release of Crosstool-ng at
\url{http://crosstool-ng.org}. Expand the archive right in the current
directory, and enter the Crosstool-ng source directory.
@@ -41,7 +40,7 @@ solution. As documented in
\code{docs/2\ -\ Installing\ crosstool-NG.txt}, do:
\begin{verbatim}
-./configure --local
+./configure --enable-local
make
make install
\end{verbatim}
@@ -74,31 +73,30 @@ Then, to refine the configuration, let's run the menuconfig interface:
./ct-ng menuconfig
\end{verbatim}
-In Path and misc options:
+In \code{Path and misc options}:
\begin{itemize}
-\item Change Prefix directory to
+\item Change \code{Prefix directory} to
\code{/usr/local/xtools/${CT_TARGET}}. This is the place where
the toolchain will be installed.
-\item Set Number of parallel jobs to 2 times the number of CPU cores
- in your workstation. Building your toolchain will be faster.
-\item Change the logging level to ''DEBUG'' so that we can have more
- detail on what is happening during the build in case something is
- going wrong.
+\item Set \code{Number of parallel jobs} to 2 times the number of CPU cores
+ in your workstation\footnote{You can find this number by running \code{cat /proc/cpuinfo}}. Building your toolchain will be faster.
+\item Change \code{Maximum log level to see} to \code{DEBUG} so that we can have more
+ details on what happened during the build in case something went wrong.
\end{itemize}
-In Toolchain options:
+In \code{Toolchain options}:
\begin{itemize}
-\item Set Tuple's alias to \code{arm-linux}. This way, we will be able
+\item Set \code{Tuple's alias} to \code{arm-linux}. This way, we will be able
to use the compiler as \code{arm-linux-gcc} instead of
\code{arm-unknown-linux-uclibcgnueabi-gcc}, which is much longer.
\end{itemize}
-In Debug facilities:
+In \code{Debug facilities}:
\begin{itemize}
\item Enable \code{gdb}, \code{strace} and \code{ltrace}. Remove the
- other options (\code{dmalloc} and \code{duma}). In gdb options, make
- sure that the Cross gdb and Build a static gdbserver options are
+ other options (\code{dmalloc} and \code{duma}). In \code{gdb} options, make
+ sure that the \code{Cross-gdb} and \code{Build a static gdbserver} options are
enabled; the other options are not needed.
\end{itemize}
-----------------------------------------------------------------------
More information about the training-materials-updates
mailing list