[ptxdist] Guru guide online again

2017-07-14 Thread Robert Schwebel
Hi,

as several people have asked, I've re-added the old guru guide on the
webside again. Please follow the "old documentation" link on

http://www.pengutronix.de/en/software/ptxdist.html

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 5/5] doc: css: use more ptxdist-like colors for admonitions

2017-07-14 Thread Roland Hieber
The old colors for note blocks and important blocks didn't go well with
the PTXdist logo, so use colors from the logo instead. Screenshots:

Before:
  
https://gist.github.com/rohieb/87e5d527c283a42e0919d07a44af3641/raw/8f1612b8f2c9d10f484e54f3f23dff5edbd6e473/29237df2-688d-11e7-be43-cfe49cbb0ea2.png
  
https://gist.github.com/rohieb/87e5d527c283a42e0919d07a44af3641/raw/8f1612b8f2c9d10f484e54f3f23dff5edbd6e473/fd2ff4f6-688b-11e7-beb0-dfc6959582bc.png

After:
  
https://gist.github.com/rohieb/87e5d527c283a42e0919d07a44af3641/raw/8f1612b8f2c9d10f484e54f3f23dff5edbd6e473/cca5934e-688c-11e7-b185-376b499e80bb.png
  
https://gist.github.com/rohieb/87e5d527c283a42e0919d07a44af3641/raw/8f1612b8f2c9d10f484e54f3f23dff5edbd6e473/b581da92-688c-11e7-8fb3-8792133838e3.png

Signed-off-by: Roland Hieber 
---
 doc/_static/css/custom.css | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css
index ee2c545e7..0efa6f92c 100644
--- a/doc/_static/css/custom.css
+++ b/doc/_static/css/custom.css
@@ -95,3 +95,17 @@ nav.wy-nav-side #menu-resize .fa {
 nav.wy-nav-side #menu-resize .fa:not(:first-child) {
 margin-left: 0.25em;
 }
+
+.important {
+   background-color: #fff4dd !important;
+}
+.important .admonition-title {
+   background-color: #ff9b00 !important;
+}
+
+.note {
+   background-color: #f2f9e5 !important;
+}
+.note .admonition-title {
+   background-color: #83983e !important;
+}
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v2 4/5] doc: faq: copy editing, small rewrites for more clarity

2017-07-14 Thread Roland Hieber
Signed-off-by: Roland Hieber 

---
v2: fix reference to ptx_dev_manual
---
 doc/faq.rst | 69 +
 1 file changed, 37 insertions(+), 32 deletions(-)

diff --git a/doc/faq.rst b/doc/faq.rst
index 19dd5ad30..e05287815 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -6,12 +6,15 @@ PTXdist does not support to generate some files in a way I 
need them. What can I
 Answer:
   Everything PTXdist builds is controlled by “package rule files”,
   which in fact are Makefiles (``rules/*.make``). If you modify such a
-  file you can change it’s behaviour in a way you need. It is generally
-  no good idea to modify the generic package rule files installed by
+  file you can change its behaviour in a way you need. It is generally
+  not a good idea to modify the generic package rule files installed by
   PTXdist, but it is always possible to copy one of them over into the
-  ``rules/`` directory of a project. Package rule files in the project
+  ``rules/`` directory of your project. Package rule files in the project
   will precede global rule files with the same name.
 
+  Read the section :ref:`ptx_dev_manual` in the Developer’s Manual to get
+  more information.
+
 How can I stop PTXdist to build in parallel?
 
 Question:
@@ -36,16 +39,16 @@ Question:
 Answer:
   Yes, this error message is confusing. But it usually only means
   that you should check the following (!) lines for missing backslashes
-  (line separators).
+  (line continuation).
 
 I got a message similar to “package  is empty. not generating.” What 
does it mean?
 

 Answer:
-  The ’ipkg’ tool was advised to generate a new ipkg-packet, but the
-  folder was empty. Sometime it means a typo in the package name when
+  The ``ipkg`` tool was advised to generate a new ipkg archive, but the
+  folder was empty. Sometimes this is just a typo in the package name when
   the ``install_copy`` macro was called. Ensure all these macros are using
-  the same package name. Or did you disable a menuentry and now nothing
-  will be installed?
+  the same package name. Or did you disable a menu entry and now nothing
+  is installed?
 
 How do I download all required packages at once?
 
@@ -55,8 +58,8 @@ Answer:
   $ ptxdist make get
 
   This starts to download all required packages in one run. It does
-  nothing if the archives are already present in the source path. (run
-  “PTXdist setup” first).
+  nothing if the archives are already present in the source path. Run
+  ``ptxdist setup`` first to set up the desired source folder.
 
 I want to backup all source archives for my BSP
 ~~~
@@ -71,7 +74,7 @@ Answer:
   $ ptxdist export_src 
 
   It copies all archives from where are your source archives stored to
-   which can be your backup media.
+  the path  which can be on your backup media.
 
 OSELAS toolchain fails to start due to missing libraries
 
@@ -82,12 +85,14 @@ Question:
   failing to start due to missing libraries.
 
 Answer:
-  This happens when the toolchain was copied without regarding to
-  retain links. There are archive programs around that convert links
+  This happens when the toolchain was copied without regard to
+  retaining symlinks. There are archive programs around that convert links
   into real files. When you are using such programs to create a
   toolchain archive this toolchain will be broken after extracting it
-  again. Solution: Use archive programs that retain links as they are
-  (tar for example). Here an example for a broken toolchain::
+  again.
+  
+  Solution: Use archive programs that retain symlinks as they are
+  (tar for example). Here is an example of a broken toolchain::
 
   $ ll `find . -name "libcrypt*"`
   -rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt-2.5.so*
@@ -130,27 +135,27 @@ Using more than one kernel version per BSP
 ~~
 Question:
   I want to use more than one kernel revision in my BSP. How can I
-  avoid maintaining one ptxconfig per kernel?
+  avoid maintaining one platformconfig per kernel?
 
 Answer:
   One solution could be to include the kernel revision into the name
-  of the kernel config file. Instead of the default kernelconfig.target
-  name you should use ``kernelconfig-.target``. In the kernel
-  config file menu entry you should enter
-  ``kernelconfig-$PTXCONF_KERNEL_VERSION.target``. Whenever you change
-  the linux kernel Version menu entry now, this will ensure using a
-  different kernel config file, too.
+  of the kernel config file. Instead of the default ``kernelconfig``
+  name you could use ``kernelconfig-`` instead. In ``ptxdist
+  menuconfig platform`` under *Linux kernel → patching & con

[ptxdist] [PATCH v2 2/5] doc: promote faq to own section

2017-07-14 Thread Roland Hieber
Signed-off-by: Roland Hieber 
---
 doc/daily_work_section.rst | 1 -
 doc/{faq.inc => faq.rst}   | 0
 doc/index.rst  | 1 +
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename doc/{faq.inc => faq.rst} (100%)

diff --git a/doc/daily_work_section.rst b/doc/daily_work_section.rst
index daec36dca..0e4e6e767 100644
--- a/doc/daily_work_section.rst
+++ b/doc/daily_work_section.rst
@@ -5,4 +5,3 @@ Various Aspects of Daily Work
 .. include:: nfsroot.inc
 .. include:: working_with_git_sources.inc
 .. include:: including_bsp_doc.inc
-.. include:: faq.inc
diff --git a/doc/faq.inc b/doc/faq.rst
similarity index 100%
rename from doc/faq.inc
rename to doc/faq.rst
diff --git a/doc/index.rst b/doc/index.rst
index 9aad6cddb..7ab42d4c7 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -17,6 +17,7 @@ Welcome to the PTXdist Universe
dev_manual
ref_manual
daily_work_section
+   faq
getting_help
 
 * :ref:`search`
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v2 3/5] doc: faq: apply more structure

2017-07-14 Thread Roland Hieber
Give the FAQ section some more structure by inserting one heading per
FAQ item, and separate questions and answers visible. This also causes
the questions to appear in the table of contents. Both should lead to
more readability of the FAQ section.

Signed-off-by: Roland Hieber 

---
v2:
 - fix warnings about ` in section headers
---
 doc/faq.rst | 330 +---
 1 file changed, 181 insertions(+), 149 deletions(-)

diff --git a/doc/faq.rst b/doc/faq.rst
index 952705883..19dd5ad30 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -1,157 +1,189 @@
 Frequently Asked Questions (FAQ)
 
 
-Q: PTXdist does not support to generate some files in a way I need them. What 
can I do?
-A: Everything PTXdist builds is controlled by “package rule files”,
-which in fact are Makefiles (``rules/*.make``). If you modify such a
-file you can change it’s behaviour in a way you need. It is generally
-no good idea to modify the generic package rule files installed by
-PTXdist, but it is always possible to copy one of them over into the
-``rules/`` directory of a project. Package rule files in the project
-will precede global rule files with the same name.
-
-Q: My kernel build fails. But I cannot detect the correct position,
-due to parallel building. How can I stop PTXdist to build in parallel?
-A: Force PTXdist to stop building in parallel which looks somehow
-like:
-
-::
-
-$ ptxdist -j1 go
-
-Q: I made my own rule file and now I get error messages like
-
-::
-
-my_project/rules/test.make:30: *** unterminated call to function `call': 
missing `)'.  Stop.
-
-But line 30 only contains ``@$(call targetinfo, $@)`` and it seems all
-right. What does it mean?
-A: Yes, this error message is confusing. But it usually only means
-that you should check the following (!) lines for missing backslashes
-(line separators).
-
-Q: I got a message similar to “package  is empty. not
-generating.” What does it mean?
-A: The ’ipkg’ tool was advised to generate a new ipkg-packet, but the
-folder was empty. Sometime it means a typo in the package name when
-the ``install_copy`` macro was called. Ensure all these macros are using
-the same package name. Or did you disable a menuentry and now nothing
-will be installed?
-
-Q: How do I download all required packages at once?
-A: Run this command prior the build:
-
-::
-
-$ ptxdist make get
-
-This starts to download all required packages in one run. It does
-nothing if the archives are already present in the source path. (run
-“PTXdist setup” first).
-
-Q: I want to backup the source archives my PTXdist project relys on.
-How can I find out what packages my project requires to build?
-A: First build your PTXdist project completely and then run the
-following command:
-
-::
-
-$ ptxdist export_src 
-
-It copies all archives from where are your source archives stored to
- which can be your backup media.
-
-Q: To avoid building the OSELAS toolchain on each development host, I
-copied it to another machine. But on this machine I cannot build any
-BSP with this toolchain correctly. All applications on the target are
-failing to start due to missing libraries.
-A: This happens when the toolchain was copied without regarding to
-retain links. There are archive programs around that convert links
-into real files. When you are using such programs to create a
-toolchain archive this toolchain will be broken after extracting it
-again. Solution: Use archive programs that retain links as they are
-(tar for example). Here an example for a broken toolchain:
-
-::
-
-$ ll `find . -name "libcrypt*"`
--rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt-2.5.so*
--rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt.so.1*
--rw-r--r-- 1 mkl ptx 63K 2007-07-25 14:54 ./usr/lib/libcrypt.a
--rw-r--r-- 1 mkl ptx 64K 2007-07-25 14:54 ./usr/lib/libcrypt_p.a
--rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./usr/lib/libcrypt.so*
-
-And in contrast, this one is intact:
-
-::
-
-$ ll `find . -name "libcrypt*"`
--rwxr-xr-x 1 mkl ptx 55K 2007-11-03 13:30 ./lib/libcrypt-2.5.so*
-lrwxrwxrwx 1 mkl ptx  15 2008-02-20 14:52 ./lib/libcrypt.so.1 -> 
libcrypt-2.5.so*
--rw-r--r-- 1 mkl ptx 63K 2007-11-03 13:30 ./usr/lib/libcrypt.a
--rw-r--r-- 1 mkl ptx 64K 2007-11-03 13:30 ./usr/lib/libcrypt_p.a
-lrwxrwxrwx 1 mkl ptx  23 2008-02-20 14:52 ./usr/lib/libcrypt.so -> 
../../lib/libcrypt.so.1*
-
-Q: I followed the instructions how to integrate my own plain source
-project into PTXdist. But when I try to build it, I get:
-
-::
+PTXdist does not support to generate some files in a way I need them. What can 
I do?
+
+Answer:
+  Everything PTXdist builds is controlled by “package rule files”,
+  which in fact are Makefiles (``rules/*.make``). If you modify such a
+  file you can change it’s behaviour in a way you need. It is ge

[ptxdist] [PATCH v2 1/5] doc: document git patch workflow

2017-07-14 Thread Roland Hieber
Signed-off-by: Roland Hieber 

---
v2:
 - expanded warning about git option in ptxdist setup
 - foo-0.1 -> foo-1.1.0 everywhere
 - mention quilt manpage
 - separate quilt and git sections further and give more explanation
---
 doc/dev_manual.rst | 53 ++---
 1 file changed, 50 insertions(+), 3 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index a54888b43..b99296894 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -1223,7 +1223,6 @@ Creating Patches for a Package
 PTXdist uses the utilities *git*, *patch* or *quilt* to work with
 patches or patch series. We recommend *git*, as it can manage patch
 series in a very easy way.
-For this manual and the example we use *quilt* instead.
 
 Creating a Patch Series for a Package
 ^
@@ -1231,6 +1230,9 @@ Creating a Patch Series for a Package
 To create a patch series for the first time, we can run the following
 steps. We are still using our *foo-1.1.0* example package here:
 
+Using quilt
+"""
+
 We create a special directory for the patch series in the local project
 directory:
 
@@ -1263,11 +1265,56 @@ present in ``patches/foo-1.1.0`` and can be used the 
next time we
 extract the package again.
 
 All we have to do now is to do the modification we need to make the
-package work. We change into the build directory and use *quilt* to
+package work. We change into the build directory and use quilt_ to
 create new patches, add files to respective patches, modify these files
 and refresh the patches to save our changes.
+See the *quilt* documentation (``man 1 quilt``) for more information.
+
+.. _quilt: http://savannah.nongnu.org/projects/quilt
+
+Using Git
+"
+
+Create the patch directory like above for *quilt*,
+but only add an empty series file::
+
+$ mkdir -p patches/foo-1.1.0
+$ touch patches/foo-1.1.0/series
+
+Then extract the package with an additional command line switch:
+
+::
+
+$ ptxdist --git extract foo
+
+The empty series file makes PTXdist create a Git repository in the
+respective package build directory,
+and import the package source as the first commit.
+
+.. note:: Optionally, you can enable the setting *Developer Options →
+  use git to apply patches* in `ptxdist setup` to get this behaviour
+  as a default for every package.
+  However, note that this setting is still experimental and can lead to
+  failures for some packages.
+
+Then you can change into the package build directory
+(``platform-/build-target/foo-1.1.0``),
+patch the required source files,
+and make Git commits on the way.
+The Git history should now look something like this:
+
+::
+
+$ git log --oneline --decorate
+* df343e821851 (HEAD -> master) Makefile: don't build the tests
+* 65a360c2bd60 strfry.c: frobnicate the excusator
+* fdc315f6844c (tag: foobar-1.1.0, tag: base) initial commit
+
+Finally, call ``git ptx-patches`` to regenerate the patch series in the
+``patches/foo-1.1.0`` folder.
+This way they don't get lost when cleaning the package.
 
-We recommend this way when modifying source files. But this way is
+We recommend working with patches when modifying source files. But this way is
 improper when an autotools based buildsystem itself needs modifications.
 Refer to section :ref:`configure_rebuild` on how PTXdist can
 handle this special task.
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH 1/4] doc: document git patch workflow

2017-07-14 Thread Michael Olbrich
On Fri, Jul 14, 2017 at 12:57:12PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber 
> ---
>  doc/dev_manual.rst | 40 +---
>  1 file changed, 37 insertions(+), 3 deletions(-)
> 
> diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
> index a54888b43..3fe64a343 100644
> --- a/doc/dev_manual.rst
> +++ b/doc/dev_manual.rst
> @@ -1223,7 +1223,6 @@ Creating Patches for a Package
>  PTXdist uses the utilities *git*, *patch* or *quilt* to work with
>  patches or patch series. We recommend *git*, as it can manage patch
>  series in a very easy way.
> -For this manual and the example we use *quilt* instead.
>  
>  Creating a Patch Series for a Package
>  ^
> @@ -1248,6 +1247,9 @@ and an empty ``patch`` file.
>  $ touch patches/foo-1.1.0/dummy
>  $ echo dummy > patches/foo-1.1.0/series
>  
> +Using quilt
> +"""
> +
>  Next is to extract the package (if already done, we must remove it
>  first):
>  
> @@ -1263,11 +1265,43 @@ present in ``patches/foo-1.1.0`` and can be used the 
> next time we
>  extract the package again.
>  
>  All we have to do now is to do the modification we need to make the
> -package work. We change into the build directory and use *quilt* to
> +package work. We change into the build directory and use quilt_ to
>  create new patches, add files to respective patches, modify these files
>  and refresh the patches to save our changes.
> +See the *quilt* documentation for more information.

Maybe put the link into the sentence that mentions the docs?

> +
> +.. _quilt: http://savannah.nongnu.org/projects/quilt
> +
> +Using Git
> +"
> +
> +After touching the series file like above, apply an additional command line
> +switch to extract the package into a Git repository:
> +
> +::
> +
> +$ ptxdist --git extract foo
> +
> +.. note:: Optionally, you can enable the setting *Developer Options → use 
> git to
> +  apply patches* in `ptxdist setup` to enable this permanently.
> +  However, note that this setting is still experimental.
> +
> +Then, change into the package build directory, patch the required files, and
> +make Git commits on the way.
> +The Git history should now look something like this:
> +
> +::
> +
> +$ git log --oneline --decorate
> +* df343e821851 (HEAD -> master) Makefile: don't build the tests
> +* 65a360c2bd60 strfry.c: frobnicate the excusator
> +* fdc315f6844c (tag: foobar-1.1.0, tag: base) initial commit
> +
> +After commit your patches, call ``git ptx-patches`` to regenerate the patches
> +and the series file in the ``patches/foo-0.1`` folder, so they don't get lost
> +when cleaning the package.

Add something like this:

Note: PTXdist will only create a git repository for packages with patches.
To use git to generate the first patch, creates an empty series file
``patches/foobar-1.1.0/series`` before extracting the packages. This will
tell PTXdist to use git anyways and ``git ptx-patches`` will put the
patches there.

Michael

>  
> -We recommend this way when modifying source files. But this way is
> +We recommend working with patches when modifying source files. But this way 
> is
>  improper when an autotools based buildsystem itself needs modifications.
>  Refer to section :ref:`configure_rebuild` on how PTXdist can
>  handle this special task.
> -- 
> 2.11.0
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH 3/4] doc: faq: apply more structure

2017-07-14 Thread Michael Olbrich
On Fri, Jul 14, 2017 at 12:57:14PM +0200, Roland Hieber wrote:
> Give the FAQ section some more structure by inserting one heading per
> FAQ item, and separate questions and answers visible. This also causes
> the questions to appear in the table of contents. Both should lead to
> more readability of the FAQ section.
> 
> Signed-off-by: Roland Hieber 
> ---
>  doc/faq.rst | 330 
> +---
>  1 file changed, 181 insertions(+), 149 deletions(-)
> 
> diff --git a/doc/faq.rst b/doc/faq.rst
> index 952705883..2ebbba17c 100644
> --- a/doc/faq.rst
> +++ b/doc/faq.rst
> @@ -1,157 +1,189 @@
>  Frequently Asked Questions (FAQ)
>  
>  
> -Q: PTXdist does not support to generate some files in a way I need them. 
> What can I do?
> -A: Everything PTXdist builds is controlled by “package rule files”,
> -which in fact are Makefiles (``rules/*.make``). If you modify such a
> -file you can change it’s behaviour in a way you need. It is generally
> -no good idea to modify the generic package rule files installed by
> -PTXdist, but it is always possible to copy one of them over into the
> -``rules/`` directory of a project. Package rule files in the project
> -will precede global rule files with the same name.
> -
> -Q: My kernel build fails. But I cannot detect the correct position,
> -due to parallel building. How can I stop PTXdist to build in parallel?
> -A: Force PTXdist to stop building in parallel which looks somehow
> -like:
> -
> -::
> -
> -$ ptxdist -j1 go
> -
> -Q: I made my own rule file and now I get error messages like
> -
> -::
> -
> -my_project/rules/test.make:30: *** unterminated call to function `call': 
> missing `)'.  Stop.
> -
> -But line 30 only contains ``@$(call targetinfo, $@)`` and it seems all
> -right. What does it mean?
> -A: Yes, this error message is confusing. But it usually only means
> -that you should check the following (!) lines for missing backslashes
> -(line separators).
> -
> -Q: I got a message similar to “package  is empty. not
> -generating.” What does it mean?
> -A: The ’ipkg’ tool was advised to generate a new ipkg-packet, but the
> -folder was empty. Sometime it means a typo in the package name when
> -the ``install_copy`` macro was called. Ensure all these macros are using
> -the same package name. Or did you disable a menuentry and now nothing
> -will be installed?
> -
> -Q: How do I download all required packages at once?
> -A: Run this command prior the build:
> -
> -::
> -
> -$ ptxdist make get
> -
> -This starts to download all required packages in one run. It does
> -nothing if the archives are already present in the source path. (run
> -“PTXdist setup” first).
> -
> -Q: I want to backup the source archives my PTXdist project relys on.
> -How can I find out what packages my project requires to build?
> -A: First build your PTXdist project completely and then run the
> -following command:
> -
> -::
> -
> -$ ptxdist export_src 
> -
> -It copies all archives from where are your source archives stored to
> - which can be your backup media.
> -
> -Q: To avoid building the OSELAS toolchain on each development host, I
> -copied it to another machine. But on this machine I cannot build any
> -BSP with this toolchain correctly. All applications on the target are
> -failing to start due to missing libraries.
> -A: This happens when the toolchain was copied without regarding to
> -retain links. There are archive programs around that convert links
> -into real files. When you are using such programs to create a
> -toolchain archive this toolchain will be broken after extracting it
> -again. Solution: Use archive programs that retain links as they are
> -(tar for example). Here an example for a broken toolchain:
> -
> -::
> -
> -$ ll `find . -name "libcrypt*"`
> --rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt-2.5.so*
> --rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt.so.1*
> --rw-r--r-- 1 mkl ptx 63K 2007-07-25 14:54 ./usr/lib/libcrypt.a
> --rw-r--r-- 1 mkl ptx 64K 2007-07-25 14:54 ./usr/lib/libcrypt_p.a
> --rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./usr/lib/libcrypt.so*
> -
> -And in contrast, this one is intact:
> -
> -::
> -
> -$ ll `find . -name "libcrypt*"`
> --rwxr-xr-x 1 mkl ptx 55K 2007-11-03 13:30 ./lib/libcrypt-2.5.so*
> -lrwxrwxrwx 1 mkl ptx  15 2008-02-20 14:52 ./lib/libcrypt.so.1 -> 
> libcrypt-2.5.so*
> --rw-r--r-- 1 mkl ptx 63K 2007-11-03 13:30 ./usr/lib/libcrypt.a
> --rw-r--r-- 1 mkl ptx 64K 2007-11-03 13:30 ./usr/lib/libcrypt_p.a
> -lrwxrwxrwx 1 mkl ptx  23 2008-02-20 14:52 ./usr/lib/libcrypt.so -> 
> ../../lib/libcrypt.so.1*
> -
> -Q: I followed the instructions how to integrate my own plain source
> -project into PTXdist. But when I try to build it, I get:
> -
> -::
> +PTXdist does not support to generate some files in a way I need them. What 
> can I do?
> +~~~

Re: [ptxdist] [PATCH 4/4] doc: faq: copy editing, small rewrites for more clarity

2017-07-14 Thread Michael Olbrich
On Fri, Jul 14, 2017 at 12:57:15PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber 
> ---
>  doc/faq.rst | 69 
> +
>  1 file changed, 37 insertions(+), 32 deletions(-)
> 
> diff --git a/doc/faq.rst b/doc/faq.rst
> index 2ebbba17c..e194dd914 100644
> --- a/doc/faq.rst
> +++ b/doc/faq.rst
> @@ -6,12 +6,15 @@ PTXdist does not support to generate some files in a way I 
> need them. What can I
>  Answer:
>Everything PTXdist builds is controlled by “package rule files”,
>which in fact are Makefiles (``rules/*.make``). If you modify such a
> -  file you can change it’s behaviour in a way you need. It is generally
> -  no good idea to modify the generic package rule files installed by
> +  file you can change its behaviour in a way you need. It is generally
> +  not a good idea to modify the generic package rule files installed by
>PTXdist, but it is always possible to copy one of them over into the
> -  ``rules/`` directory of a project. Package rule files in the project
> +  ``rules/`` directory of your project. Package rule files in the project
>will precede global rule files with the same name.
>  
> +  Read the section :ref:`_ptx_dev_manual` in the Developer’s Manual to get

This produces an error. I think, this should be ':ref:`ptx_dev_manual`'.

Michael

> +  more information.
> +
>  How can I stop PTXdist to build in parallel?
>  
>  Question:
> @@ -36,16 +39,16 @@ Question:
>  Answer:
>Yes, this error message is confusing. But it usually only means
>that you should check the following (!) lines for missing backslashes
> -  (line separators).
> +  (line continuation).
>  
>  I got a message similar to “package  is empty. not generating.” What 
> does it mean?
>  
> 
>  Answer:
> -  The ’ipkg’ tool was advised to generate a new ipkg-packet, but the
> -  folder was empty. Sometime it means a typo in the package name when
> +  The ``ipkg`` tool was advised to generate a new ipkg archive, but the
> +  folder was empty. Sometimes this is just a typo in the package name when
>the ``install_copy`` macro was called. Ensure all these macros are using
> -  the same package name. Or did you disable a menuentry and now nothing
> -  will be installed?
> +  the same package name. Or did you disable a menu entry and now nothing
> +  is installed?
>  
>  How do I download all required packages at once?
>  
> @@ -55,8 +58,8 @@ Answer:
>$ ptxdist make get
>  
>This starts to download all required packages in one run. It does
> -  nothing if the archives are already present in the source path. (run
> -  “PTXdist setup” first).
> +  nothing if the archives are already present in the source path. Run
> +  ``ptxdist setup`` first to set up the desired source folder.
>  
>  I want to backup all source archives for my BSP
>  ~~~
> @@ -71,7 +74,7 @@ Answer:
>$ ptxdist export_src 
>  
>It copies all archives from where are your source archives stored to
> -   which can be your backup media.
> +  the path  which can be on your backup media.
>  
>  OSELAS toolchain fails to start due to missing libraries
>  
> @@ -82,12 +85,14 @@ Question:
>failing to start due to missing libraries.
>  
>  Answer:
> -  This happens when the toolchain was copied without regarding to
> -  retain links. There are archive programs around that convert links
> +  This happens when the toolchain was copied without regard to
> +  retaining symlinks. There are archive programs around that convert links
>into real files. When you are using such programs to create a
>toolchain archive this toolchain will be broken after extracting it
> -  again. Solution: Use archive programs that retain links as they are
> -  (tar for example). Here an example for a broken toolchain::
> +  again.
> +  
> +  Solution: Use archive programs that retain symlinks as they are
> +  (tar for example). Here is an example of a broken toolchain::
>  
>$ ll `find . -name "libcrypt*"`
>-rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt-2.5.so*
> @@ -130,27 +135,27 @@ Using more than one kernel version per BSP
>  ~~
>  Question:
>I want to use more than one kernel revision in my BSP. How can I
> -  avoid maintaining one ptxconfig per kernel?
> +  avoid maintaining one platformconfig per kernel?
>  
>  Answer:
>One solution could be to include the kernel revision into the name
> -  of the kernel config file. Instead of the default kernelconfig.target
> -  name you should use ``kernelconfig-.target``. In the kernel
> -  config file menu entry you should enter
> -  ``kernelconfig-$PTXCONF_KERNEL_VERSION.target``. 

Re: [ptxdist] [PATCH 1/4] doc: document git patch workflow

2017-07-14 Thread Roland Hieber

On 14.07.2017 14:21, Bastian Stender wrote:

+.. note:: Optionally, you can enable the setting *Developer Options →
use git to
+  apply patches* in `ptxdist setup` to enable this permanently.
+  However, note that this setting is still experimental.


Maybe we should mention that this can lead to unexpected side effects. I
remember debugging a package configured with autoconf and AX_IS_RELEASE:

  https://www.gnu.org/software/autoconf-archive/ax_is_release.html

This lead to treating warnings as errors with "use git to apply patches"
and thus compilation failed.


Yes, I remembered something like that, but I couldn't reproduce the 
exact error so I just formulated it generally.



+After commit your patches, call ``git ptx-patches`` to regenerate the
patches
+and the series file in the ``patches/foo-0.1`` folder, so they don't
get lost
+when cleaning the package.


This should be consistent, so ``patches/foo-1.1.0``.


Oh, I changed it afterwards and overlooked that one. Thanks, will send v2.

 - Roland

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH 1/4] doc: document git patch workflow

2017-07-14 Thread Bastian Stender

Hey,

On 07/14/2017 12:57 PM, Roland Hieber wrote:

Signed-off-by: Roland Hieber 
---
 doc/dev_manual.rst | 40 +---
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index a54888b43..3fe64a343 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -1223,7 +1223,6 @@ Creating Patches for a Package
 PTXdist uses the utilities *git*, *patch* or *quilt* to work with
 patches or patch series. We recommend *git*, as it can manage patch
 series in a very easy way.
-For this manual and the example we use *quilt* instead.

 Creating a Patch Series for a Package
 ^
@@ -1248,6 +1247,9 @@ and an empty ``patch`` file.
 $ touch patches/foo-1.1.0/dummy
 $ echo dummy > patches/foo-1.1.0/series

+Using quilt
+"""
+
 Next is to extract the package (if already done, we must remove it
 first):

@@ -1263,11 +1265,43 @@ present in ``patches/foo-1.1.0`` and can be used the 
next time we
 extract the package again.

 All we have to do now is to do the modification we need to make the
-package work. We change into the build directory and use *quilt* to
+package work. We change into the build directory and use quilt_ to
 create new patches, add files to respective patches, modify these files
 and refresh the patches to save our changes.
+See the *quilt* documentation for more information.
+
+.. _quilt: http://savannah.nongnu.org/projects/quilt
+
+Using Git
+"
+
+After touching the series file like above, apply an additional command line
+switch to extract the package into a Git repository:
+
+::
+
+$ ptxdist --git extract foo
+
+.. note:: Optionally, you can enable the setting *Developer Options → use git 
to
+  apply patches* in `ptxdist setup` to enable this permanently.
+  However, note that this setting is still experimental.


Maybe we should mention that this can lead to unexpected side effects. I 
remember debugging a package configured with autoconf and AX_IS_RELEASE:


  https://www.gnu.org/software/autoconf-archive/ax_is_release.html

This lead to treating warnings as errors with "use git to apply patches" 
and thus compilation failed.



+
+Then, change into the package build directory, patch the required files, and
+make Git commits on the way.
+The Git history should now look something like this:
+
+::
+
+$ git log --oneline --decorate
+* df343e821851 (HEAD -> master) Makefile: don't build the tests
+* 65a360c2bd60 strfry.c: frobnicate the excusator
+* fdc315f6844c (tag: foobar-1.1.0, tag: base) initial commit
+
+After commit your patches, call ``git ptx-patches`` to regenerate the patches
+and the series file in the ``patches/foo-0.1`` folder, so they don't get lost
+when cleaning the package.


This should be consistent, so ``patches/foo-1.1.0``.



-We recommend this way when modifying source files. But this way is
+We recommend working with patches when modifying source files. But this way is
 improper when an autotools based buildsystem itself needs modifications.
 Refer to section :ref:`configure_rebuild` on how PTXdist can
 handle this special task.



Bastian

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 4/4] doc: faq: copy editing, small rewrites for more clarity

2017-07-14 Thread Roland Hieber
Signed-off-by: Roland Hieber 
---
 doc/faq.rst | 69 +
 1 file changed, 37 insertions(+), 32 deletions(-)

diff --git a/doc/faq.rst b/doc/faq.rst
index 2ebbba17c..e194dd914 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -6,12 +6,15 @@ PTXdist does not support to generate some files in a way I 
need them. What can I
 Answer:
   Everything PTXdist builds is controlled by “package rule files”,
   which in fact are Makefiles (``rules/*.make``). If you modify such a
-  file you can change it’s behaviour in a way you need. It is generally
-  no good idea to modify the generic package rule files installed by
+  file you can change its behaviour in a way you need. It is generally
+  not a good idea to modify the generic package rule files installed by
   PTXdist, but it is always possible to copy one of them over into the
-  ``rules/`` directory of a project. Package rule files in the project
+  ``rules/`` directory of your project. Package rule files in the project
   will precede global rule files with the same name.
 
+  Read the section :ref:`_ptx_dev_manual` in the Developer’s Manual to get
+  more information.
+
 How can I stop PTXdist to build in parallel?
 
 Question:
@@ -36,16 +39,16 @@ Question:
 Answer:
   Yes, this error message is confusing. But it usually only means
   that you should check the following (!) lines for missing backslashes
-  (line separators).
+  (line continuation).
 
 I got a message similar to “package  is empty. not generating.” What 
does it mean?
 

 Answer:
-  The ’ipkg’ tool was advised to generate a new ipkg-packet, but the
-  folder was empty. Sometime it means a typo in the package name when
+  The ``ipkg`` tool was advised to generate a new ipkg archive, but the
+  folder was empty. Sometimes this is just a typo in the package name when
   the ``install_copy`` macro was called. Ensure all these macros are using
-  the same package name. Or did you disable a menuentry and now nothing
-  will be installed?
+  the same package name. Or did you disable a menu entry and now nothing
+  is installed?
 
 How do I download all required packages at once?
 
@@ -55,8 +58,8 @@ Answer:
   $ ptxdist make get
 
   This starts to download all required packages in one run. It does
-  nothing if the archives are already present in the source path. (run
-  “PTXdist setup” first).
+  nothing if the archives are already present in the source path. Run
+  ``ptxdist setup`` first to set up the desired source folder.
 
 I want to backup all source archives for my BSP
 ~~~
@@ -71,7 +74,7 @@ Answer:
   $ ptxdist export_src 
 
   It copies all archives from where are your source archives stored to
-   which can be your backup media.
+  the path  which can be on your backup media.
 
 OSELAS toolchain fails to start due to missing libraries
 
@@ -82,12 +85,14 @@ Question:
   failing to start due to missing libraries.
 
 Answer:
-  This happens when the toolchain was copied without regarding to
-  retain links. There are archive programs around that convert links
+  This happens when the toolchain was copied without regard to
+  retaining symlinks. There are archive programs around that convert links
   into real files. When you are using such programs to create a
   toolchain archive this toolchain will be broken after extracting it
-  again. Solution: Use archive programs that retain links as they are
-  (tar for example). Here an example for a broken toolchain::
+  again.
+  
+  Solution: Use archive programs that retain symlinks as they are
+  (tar for example). Here is an example of a broken toolchain::
 
   $ ll `find . -name "libcrypt*"`
   -rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt-2.5.so*
@@ -130,27 +135,27 @@ Using more than one kernel version per BSP
 ~~
 Question:
   I want to use more than one kernel revision in my BSP. How can I
-  avoid maintaining one ptxconfig per kernel?
+  avoid maintaining one platformconfig per kernel?
 
 Answer:
   One solution could be to include the kernel revision into the name
-  of the kernel config file. Instead of the default kernelconfig.target
-  name you should use ``kernelconfig-.target``. In the kernel
-  config file menu entry you should enter
-  ``kernelconfig-$PTXCONF_KERNEL_VERSION.target``. Whenever you change
-  the linux kernel Version menu entry now, this will ensure using a
-  different kernel config file, too.
+  of the kernel config file. Instead of the default ``kernelconfig``
+  name you could use ``kernelconfig-`` instead. In ``ptxdist
+  menuconfig platform`` under *Linux kernel → patching & configuration*,
+  change the entry *kernel

[ptxdist] [PATCH 2/4] doc: promote faq to own section

2017-07-14 Thread Roland Hieber
Signed-off-by: Roland Hieber 
---
 doc/daily_work_section.rst | 1 -
 doc/{faq.inc => faq.rst}   | 0
 doc/index.rst  | 1 +
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename doc/{faq.inc => faq.rst} (100%)

diff --git a/doc/daily_work_section.rst b/doc/daily_work_section.rst
index daec36dca..0e4e6e767 100644
--- a/doc/daily_work_section.rst
+++ b/doc/daily_work_section.rst
@@ -5,4 +5,3 @@ Various Aspects of Daily Work
 .. include:: nfsroot.inc
 .. include:: working_with_git_sources.inc
 .. include:: including_bsp_doc.inc
-.. include:: faq.inc
diff --git a/doc/faq.inc b/doc/faq.rst
similarity index 100%
rename from doc/faq.inc
rename to doc/faq.rst
diff --git a/doc/index.rst b/doc/index.rst
index 9aad6cddb..7ab42d4c7 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -17,6 +17,7 @@ Welcome to the PTXdist Universe
dev_manual
ref_manual
daily_work_section
+   faq
getting_help
 
 * :ref:`search`
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 3/4] doc: faq: apply more structure

2017-07-14 Thread Roland Hieber
Give the FAQ section some more structure by inserting one heading per
FAQ item, and separate questions and answers visible. This also causes
the questions to appear in the table of contents. Both should lead to
more readability of the FAQ section.

Signed-off-by: Roland Hieber 
---
 doc/faq.rst | 330 +---
 1 file changed, 181 insertions(+), 149 deletions(-)

diff --git a/doc/faq.rst b/doc/faq.rst
index 952705883..2ebbba17c 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -1,157 +1,189 @@
 Frequently Asked Questions (FAQ)
 
 
-Q: PTXdist does not support to generate some files in a way I need them. What 
can I do?
-A: Everything PTXdist builds is controlled by “package rule files”,
-which in fact are Makefiles (``rules/*.make``). If you modify such a
-file you can change it’s behaviour in a way you need. It is generally
-no good idea to modify the generic package rule files installed by
-PTXdist, but it is always possible to copy one of them over into the
-``rules/`` directory of a project. Package rule files in the project
-will precede global rule files with the same name.
-
-Q: My kernel build fails. But I cannot detect the correct position,
-due to parallel building. How can I stop PTXdist to build in parallel?
-A: Force PTXdist to stop building in parallel which looks somehow
-like:
-
-::
-
-$ ptxdist -j1 go
-
-Q: I made my own rule file and now I get error messages like
-
-::
-
-my_project/rules/test.make:30: *** unterminated call to function `call': 
missing `)'.  Stop.
-
-But line 30 only contains ``@$(call targetinfo, $@)`` and it seems all
-right. What does it mean?
-A: Yes, this error message is confusing. But it usually only means
-that you should check the following (!) lines for missing backslashes
-(line separators).
-
-Q: I got a message similar to “package  is empty. not
-generating.” What does it mean?
-A: The ’ipkg’ tool was advised to generate a new ipkg-packet, but the
-folder was empty. Sometime it means a typo in the package name when
-the ``install_copy`` macro was called. Ensure all these macros are using
-the same package name. Or did you disable a menuentry and now nothing
-will be installed?
-
-Q: How do I download all required packages at once?
-A: Run this command prior the build:
-
-::
-
-$ ptxdist make get
-
-This starts to download all required packages in one run. It does
-nothing if the archives are already present in the source path. (run
-“PTXdist setup” first).
-
-Q: I want to backup the source archives my PTXdist project relys on.
-How can I find out what packages my project requires to build?
-A: First build your PTXdist project completely and then run the
-following command:
-
-::
-
-$ ptxdist export_src 
-
-It copies all archives from where are your source archives stored to
- which can be your backup media.
-
-Q: To avoid building the OSELAS toolchain on each development host, I
-copied it to another machine. But on this machine I cannot build any
-BSP with this toolchain correctly. All applications on the target are
-failing to start due to missing libraries.
-A: This happens when the toolchain was copied without regarding to
-retain links. There are archive programs around that convert links
-into real files. When you are using such programs to create a
-toolchain archive this toolchain will be broken after extracting it
-again. Solution: Use archive programs that retain links as they are
-(tar for example). Here an example for a broken toolchain:
-
-::
-
-$ ll `find . -name "libcrypt*"`
--rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt-2.5.so*
--rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./lib/libcrypt.so.1*
--rw-r--r-- 1 mkl ptx 63K 2007-07-25 14:54 ./usr/lib/libcrypt.a
--rw-r--r-- 1 mkl ptx 64K 2007-07-25 14:54 ./usr/lib/libcrypt_p.a
--rwxr-xr-x 1 mkl ptx 55K 2007-07-25 14:54 ./usr/lib/libcrypt.so*
-
-And in contrast, this one is intact:
-
-::
-
-$ ll `find . -name "libcrypt*"`
--rwxr-xr-x 1 mkl ptx 55K 2007-11-03 13:30 ./lib/libcrypt-2.5.so*
-lrwxrwxrwx 1 mkl ptx  15 2008-02-20 14:52 ./lib/libcrypt.so.1 -> 
libcrypt-2.5.so*
--rw-r--r-- 1 mkl ptx 63K 2007-11-03 13:30 ./usr/lib/libcrypt.a
--rw-r--r-- 1 mkl ptx 64K 2007-11-03 13:30 ./usr/lib/libcrypt_p.a
-lrwxrwxrwx 1 mkl ptx  23 2008-02-20 14:52 ./usr/lib/libcrypt.so -> 
../../lib/libcrypt.so.1*
-
-Q: I followed the instructions how to integrate my own plain source
-project into PTXdist. But when I try to build it, I get:
-
-::
+PTXdist does not support to generate some files in a way I need them. What can 
I do?
+
+Answer:
+  Everything PTXdist builds is controlled by “package rule files”,
+  which in fact are Makefiles (``rules/*.make``). If you modify such a
+  file you can change it’s behaviour in a way you need. It is generally
+  no good idea to modify the generic packag

[ptxdist] [PATCH 1/4] doc: document git patch workflow

2017-07-14 Thread Roland Hieber
Signed-off-by: Roland Hieber 
---
 doc/dev_manual.rst | 40 +---
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index a54888b43..3fe64a343 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -1223,7 +1223,6 @@ Creating Patches for a Package
 PTXdist uses the utilities *git*, *patch* or *quilt* to work with
 patches or patch series. We recommend *git*, as it can manage patch
 series in a very easy way.
-For this manual and the example we use *quilt* instead.
 
 Creating a Patch Series for a Package
 ^
@@ -1248,6 +1247,9 @@ and an empty ``patch`` file.
 $ touch patches/foo-1.1.0/dummy
 $ echo dummy > patches/foo-1.1.0/series
 
+Using quilt
+"""
+
 Next is to extract the package (if already done, we must remove it
 first):
 
@@ -1263,11 +1265,43 @@ present in ``patches/foo-1.1.0`` and can be used the 
next time we
 extract the package again.
 
 All we have to do now is to do the modification we need to make the
-package work. We change into the build directory and use *quilt* to
+package work. We change into the build directory and use quilt_ to
 create new patches, add files to respective patches, modify these files
 and refresh the patches to save our changes.
+See the *quilt* documentation for more information.
+
+.. _quilt: http://savannah.nongnu.org/projects/quilt
+
+Using Git
+"
+
+After touching the series file like above, apply an additional command line
+switch to extract the package into a Git repository:
+
+::
+
+$ ptxdist --git extract foo
+
+.. note:: Optionally, you can enable the setting *Developer Options → use git 
to
+  apply patches* in `ptxdist setup` to enable this permanently.
+  However, note that this setting is still experimental.
+
+Then, change into the package build directory, patch the required files, and
+make Git commits on the way.
+The Git history should now look something like this:
+
+::
+
+$ git log --oneline --decorate
+* df343e821851 (HEAD -> master) Makefile: don't build the tests
+* 65a360c2bd60 strfry.c: frobnicate the excusator
+* fdc315f6844c (tag: foobar-1.1.0, tag: base) initial commit
+
+After commit your patches, call ``git ptx-patches`` to regenerate the patches
+and the series file in the ``patches/foo-0.1`` folder, so they don't get lost
+when cleaning the package.
 
-We recommend this way when modifying source files. But this way is
+We recommend working with patches when modifying source files. But this way is
 improper when an autotools based buildsystem itself needs modifications.
 Refer to section :ref:`configure_rebuild` on how PTXdist can
 handle this special task.
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] changing fakeroot-1.14.4/configure file for ptxdist-2015.05.0

2017-07-14 Thread Roland Hieber
On 13.07.2017 18:55, Alexander Dahl wrote:
> IIRC there's also a chapter about patch management in the
> documentation.

Yes, see here:

http://testbed.ptxdist.org/doc/dev_manual.html#creating-patches-for-a-package

 - Roland

___
ptxdist mailing list
ptxdist@pengutronix.de