[FE training-materials-updates] sysdev-application-development: various enhancements

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Oct 5 11:16:31 CEST 2012


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

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

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

commit 10a9f5dc6a889daf2f7c6a6d81703b13defee621
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Fri Oct 5 11:13:47 2012 +0200

    sysdev-application-development: various enhancements
    
     * Provide a pre-existing qemu-ifup script in the lab data, and make
       our run_qemu script use it. This avoids the need to modify the
       system-wide /etc/qemu-ifup script.
    
     * Adjust the instructions to take into account the fact that we no
       longer create the "output" symlink, but instead use the normal
       Buildroot location.
    
     * Adjust the instructions to take into account the fact that passing
       the PKG_CONFIG_PATH and PKG_CONFIG_SYSROOT_DIR environment
       variables are no longer needed, since thanks to the PATH being
       exported, we use Buildroot pkg-config, and this pkg-config has been
       compiled to have the correct values by default.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


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

10a9f5dc6a889daf2f7c6a6d81703b13defee621
 lab-data/sysdev/appdev/qemu-ifup                   |    2 ++
 lab-data/sysdev/appdev/run_qemu                    |    2 +-
 .../sysdev-application-development.tex             |   17 +++++------------
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/lab-data/sysdev/appdev/qemu-ifup b/lab-data/sysdev/appdev/qemu-ifup
new file mode 100755
index 0000000..77b20d8
--- /dev/null
+++ b/lab-data/sysdev/appdev/qemu-ifup
@@ -0,0 +1,2 @@
+#!/bin/sh
+ifconfig $1 172.20.0.1
diff --git a/lab-data/sysdev/appdev/run_qemu b/lab-data/sysdev/appdev/run_qemu
index 4f2f780..952ff1b 100755
--- a/lab-data/sysdev/appdev/run_qemu
+++ b/lab-data/sysdev/appdev/run_qemu
@@ -1,2 +1,2 @@
 #!/bin/sh
-sudo qemu-system-arm -m 32 -M versatilepb -kernel ../buildroot/data/zImage -append "root=/dev/nfs ip=172.20.0.2 nfsroot=172.20.0.1:$HOME/felabs/sysdev/appdev/qemu-rootfs/" -net nic -net tap
+sudo qemu-system-arm -m 32 -M versatilepb -kernel ../buildroot/data/zImage -append "root=/dev/nfs ip=172.20.0.2 nfsroot=172.20.0.1:$HOME/felabs/sysdev/appdev/qemu-rootfs/" -net nic -net tap,script=./qemu-ifup
diff --git a/labs/sysdev-application-development/sysdev-application-development.tex b/labs/sysdev-application-development/sysdev-application-development.tex
index 341dd47..e56638d 100644
--- a/labs/sysdev-application-development/sysdev-application-development.tex
+++ b/labs/sysdev-application-development/sysdev-application-development.tex
@@ -17,13 +17,6 @@ uncompress the tarball generated by Buildroot in the previous lab (in
 the \code{output/images/} directory). Don't forget to extract the
 archive as \code{root} since the archive contains device files.
 
-First, if you haven't done it yet in the manual cross-compiling lab,
-modify the \code{/etc/qemu-ifup} script so that it just contains 2 lines:
-\begin{verbatim}
-#!/bin/sh
-/sbin/ifconfig $1 172.20.0.1
-\end{verbatim}
-
 Then, adapt the \code{run_qemu} script to your configuration, and
 verify that the system works as expected.
 
@@ -39,9 +32,12 @@ since those wrappers pass some mandatory flags (especially the
 headers and libraries).
 
 Let's add this directory to our PATH:
+
+\footnotesize
 \begin{verbatim}
-export PATH=/home/<user>/felabs/sysdev/buildroot/output/host/usr/bin:$PATH
+export PATH=/home/<user>/felabs/sysdev/buildroot/buildroot-XXXX.YY/output/host/usr/bin:$PATH
 \end{verbatim}
+\normalsize
 
 Let's try to compile the application:
 
@@ -55,11 +51,8 @@ use \code{pkg-config} to query the {\em pkg-config} database about the
 location of the header files and the list of libraries needed to build
 an application against DirectFB:
 
-\small
+\footnotesize
 \begin{verbatim}
-export BUILDROOT_OUTPUT=/home/<user>/felabs/sysdev/buildroot/output/
-export PKG_CONFIG_PATH=$BUILDROOT_OUTPUT/staging/usr/lib/pkgconfig
-export PKG_CONFIG_SYSROOT_DIR=$BUILDROOT_OUTPUT/staging/
 arm-linux-gcc -o app app.c $(pkg-config --libs --cflags directfb)
 \end{verbatim}
 \normalsize



More information about the training-materials-updates mailing list