[FE training-materials-updates] Buildroot lab: use the latest stable version
Michael Opdenacker
michael.opdenacker at free-electrons.com
Thu Oct 31 07:16:47 CET 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=231254962a9b82d799f726a8263dfd46d0dfbed4
>---------------------------------------------------------------
commit 231254962a9b82d799f726a8263dfd46d0dfbed4
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Thu Oct 31 04:14:27 2013 +0100
Buildroot lab: use the latest stable version
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
231254962a9b82d799f726a8263dfd46d0dfbed4
...in-wrapper-fix-paths-if-executable-was-re.patch | 56 --------------------
labs/sysdev-buildroot/sysdev-buildroot.tex | 9 ++--
2 files changed, 3 insertions(+), 62 deletions(-)
diff --git a/lab-data/sysdev/buildroot/data/0001-ext-toolchain-wrapper-fix-paths-if-executable-was-re.patch b/lab-data/sysdev/buildroot/data/0001-ext-toolchain-wrapper-fix-paths-if-executable-was-re.patch
deleted file mode 100644
index cbd142e..0000000
--- a/lab-data/sysdev/buildroot/data/0001-ext-toolchain-wrapper-fix-paths-if-executable-was-re.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 51698d4f81138f0b2ab33a069af9a7346f199094 Mon Sep 17 00:00:00 2001
-From: Patrick Ziegler <patrick.ziegler at fh-kl.de>
-Date: Wed, 29 May 2013 11:41:19 +0200
-Subject: [PATCH] ext-toolchain-wrapper: fix paths if executable was resolved
- by PATH
-
-If ext-toolchain-wrapper or any symbolic link to it was resolved by PATH,
-the wrapper takes the working directory to calculate the relative paths.
-
-Now '/proc/self/exe' is used to resolve the absolute path to the toolchain
-directory if the wrapper was called neither with a relative nor an absolute
-path.
-
-Signed-off-by: Patrick Ziegler <patrick.ziegler at fh-kl.de>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
----
- .../toolchain-external/ext-toolchain-wrapper.c | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
-index 9a2fc70..e71a90a 100644
---- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
-+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
-@@ -61,7 +61,7 @@ int main(int argc, char **argv)
- char *relbasedir, *absbasedir;
- char *progpath = argv[0];
- char *basename;
-- int ret;
-+ int ret, i, count = 0;
-
- /* Calculate the relative paths */
- basename = strrchr(progpath, '/');
-@@ -77,7 +77,19 @@ int main(int argc, char **argv)
- absbasedir = realpath(relbasedir, NULL);
- } else {
- basename = progpath;
-- absbasedir = realpath("../..", NULL);
-+ absbasedir = malloc(PATH_MAX + 1);
-+ ret = readlink("/proc/self/exe", absbasedir, PATH_MAX);
-+ if (ret < 0) {
-+ perror(__FILE__ ": readlink");
-+ return 2;
-+ }
-+ for (i = ret; i > 0; i--) {
-+ if ('/' == absbasedir[i]) {
-+ absbasedir[i] = '\0';
-+ if (3 == ++count)
-+ break;
-+ }
-+ }
- }
- if (absbasedir == NULL) {
- perror(__FILE__ ": realpath");
---
-1.7.9.5
-
diff --git a/labs/sysdev-buildroot/sysdev-buildroot.tex b/labs/sysdev-buildroot/sysdev-buildroot.tex
index f80c47b..9fe8d25 100644
--- a/labs/sysdev-buildroot/sysdev-buildroot.tex
+++ b/labs/sysdev-buildroot/sysdev-buildroot.tex
@@ -12,12 +12,9 @@ kernel image.
\section{Get Buildroot and explore the source code}
The official Buildroot website is available at
-\url{http://buildroot.org/}. Download the stable 2013.02 version which
-we have tested for this lab. Uncompress the tarball and go inside the
-buildroot directory. Apply the
-\code{0001-ext-toolchain-wrapper-fix-paths-if-executable-was-re.patch}
-patch from this lab's \code{data} directory. It fixes a bug in
-Buildroot's external toolchain logic.
+\url{http://buildroot.org/}. Download the latest stable 2013.08.x
+version which we have tested for this lab. Uncompress the tarball
+and go inside the Buildroot source directory.
Several subdirectories or files are visible, the most important ones
are:
More information about the training-materials-updates
mailing list