Difference between revisions of "Bering-uClibc 4.x - Developer Guide - Contents of the buildtool/tools/ Directory"

From bering-uClibc
Jump to: navigation, search
(Created initial skeleton)
 
m (make-patches.sh)
 
(19 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
| width="20%" align="left"  | [[Bering-uClibc 4.x - Developer Guide - Hints and Tips for using Git SCM|Prev]]
 
| width="20%" align="left"  | [[Bering-uClibc 4.x - Developer Guide - Hints and Tips for using Git SCM|Prev]]
 
! width="60%" align="center" | [[Bering-uClibc 4.x - Developer Guide]]
 
! width="60%" align="center" | [[Bering-uClibc 4.x - Developer Guide]]
| width="20%" align="right"  |  
+
| width="20%" align="right"  | [[Bering-uClibc 4.x - Developer Guide - Debugging Tools and Techniques|Next]]
 
|}
 
|}
 
----
 
----
Line 12: Line 12:
 
The <code class="filename">tools/</code> directory under <code class="filename">buildenv/</code> contains a number of utility scripts and template files used within the [[Bering-uClibc 4.x]] build toolchain.
 
The <code class="filename">tools/</code> directory under <code class="filename">buildenv/</code> contains a number of utility scripts and template files used within the [[Bering-uClibc 4.x]] build toolchain.
 
Over time, various obsolete files have been collected in this directory, and none of the developers have been ''quite'' sure of their purpose or even whether they are still required.
 
Over time, various obsolete files have been collected in this directory, and none of the developers have been ''quite'' sure of their purpose or even whether they are still required.
This page is intended to avoid that situation from recurring, by explaining the purpose of each of the files and directories within <code class="filename">tools/</code>.
+
This page is intended to prevent that situation from recurring, by explaining the purpose of each of the files and directories within the <code class="filename">tools/</code> directory.
  
As of February 2011 this is very much a work-in-progress. [[User:Davidmbrooke|Davidmbrooke]] 18:17, 21 February 2011 (UTC)
 
  
 +
==Important Files and Directories==
 +
The following files and directories are known to be actively used.
 +
 +
===<code class="filename">buildall.sh</code>===
 +
A Shell script used by automatically build all of the Packages defined in <code class="filename">sources.cfg</code>, taking account of the "<Requires>" definitions in order to build the Packages in the correct order to satisfy dependencies.
 +
 +
Generates an HTML file containing a table showing the success / failure status of the build for each Package, with links to the individual build log files for each Package.
 +
The HTML file is called <code class="filename">/tmp/''DD.MM.YYYY''/build.html</code> where ''<tt>DD.MM.YYYY</tt>'' is the build date.
 +
 +
===<code class="filename">dpatch</code>===
 +
A Shell script which processes <code class="filename">.dpatch</code> files.
 +
These are Debian-specific patch files, sometimes included in Debian "diff" files applied to upstream (<code class="filename">orig</code>) source distributions.
 +
 +
Variable <tt>$(BT_DPATCH)</tt>, set in file <code class="filename">MasterInclude.mk</code> references this script.
 +
That variable is used in <code class="filename">mawk/buildtool.mk</code>.
 +
 +
===<code class="filename">genpage.pl</code>===
 +
A Perl script written by Martin Hejl.
 +
This script parses the bin directory for packages in git (previously cvs) and generates an HTML file out of the package description, package date, packager plus a changelog for the latest changes (from the commit messages). The result can be used to populate the "Packages" link of the webpage [http://leaf.sourceforge.net/bering-uclibc/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=13&MMN_position=33:33].
 +
 +
See also [[Bering-uClibc 4.x - Developer Guide - Contents of the buildtool/tools/ Directory#packages.conf|<code class="filename">packages.conf</code>]].
 +
 +
===<code class="filename">getdep.sh</code>===
 +
A Shell script which is called from <code class="filename">initrd/buildtool.mk</code> in order to determine which kernel Modules are "dependencies" for the Modules specified on the command-line.
 +
 +
===<code class="filename">getdirname.pl</code>===
 +
A Perl script which takes the name of a compressed tar file as a command-line argument and reports the name of the first directory level in the tar archive.
 +
 +
This is used extensively within <code class="filename">buildtool.mk</code> files to automatically extract the name (including the version number) of the "source" archive, avoiding the need to hard-code the upstream version number in <code class="filename">buildtool.mk</code> as well as in <code class="filename">buildtool.cfg</code>.
 +
 +
Refer to [[Bering-uClibc 4.x - Developer Guide - Compiling Source Code]] for examples of usage.
 +
Note that the script is generally called by using variable <tt>$(BT_TGZ_GETDIRNAME)</tt> which is set in file <code class="filename">MasterInclude.mk</code>.
 +
 +
===<code class="filename">image/</code>===
 +
A directory containing further directories with template files used by <code class="filename">buildimage.pl</code>.
 +
 +
===<code class="filename">image/common/</code>===
 +
A directory containing template files common to all of the disk Images generated by <code class="filename">buildimage.pl</code>.
 +
 +
===<code class="filename">image/common/configdb.ser</code>===
 +
An LRP Package file which is used as an initial <code class="filename">configdb.lrp</code> when using a serial (RS-232) console.
 +
It contains a replacement <code class="filename">/etc/inittab</code> which is suitable for serial console access.
 +
 +
===<code class="filename">image/common/leaf.cfg</code>===
 +
The template for every disk Image's <code class="filename">/leaf.cfg</code> file.
 +
It contains search-and-replace strings (such as "<tt>{LRP}</tt>") which are substituted for Image-specific text based on the entries in the Image's <code class="filename">buildimage.cfg</code>.
 +
 +
===<code class="filename">image/common/readme</code>===
 +
The template for every disk Image's <code class="filename">/readme</code> file.
 +
It contains search-and-replace strings (such as "<tt>{VERSION}</tt>") which are substituted for Image-specific text based on the entries in the Image's <code class="filename">buildimage.cfg</code>.
 +
 +
===<code class="filename">image/isolinux/isolinux.cfg</code>===
 +
The template for an ISOLINUX disk Image's <code class="filename">/isolinux/isolinux.cfg</code> file.
 +
 +
===<code class="filename">image/isolinux/isolinux.dpy</code>===
 +
The template for an ISOLINUX disk Image's <code class="filename">/isolinux/isolinux.dpy</code> file.
 +
 +
===<code class="filename">image/pxelinux/pxelinux.cfg</code>===
 +
The template for a PXELINUX disk Image's <code class="filename">/tftpboot/bering-uclibc/4/pxelinux.cfg/default</code> file, used in cases where a serial (RS-232) console '''IS NOT''' being used.
 +
 +
===<code class="filename">image/pxelinux/pxelinux.dpy</code>===
 +
The template for a PXELINUX disk Image's <code class="filename">/tftpboot/bering-uclibc/4/pxelinux.dpy</code> file.
 +
 +
===<code class="filename">image/pxelinux/pxelinux.ser</code>===
 +
An alternative template template for a PXELINUX disk Image's <code class="filename">/tftpboot/bering-uclibc/4/pxelinux.cfg/default</code> file, used in cases where a serial (RS-232) console '''IS''' being used.
 +
 +
===<code class="filename">image/syslinux/syslinux.cfg</code>===
 +
The template for a SYSLINUX disk Image's <code class="filename">/syslinux/syslinux.cfg</code> file, used in cases where a serial (RS-232) console '''IS NOT''' being used.
 +
 +
===<code class="filename">image/syslinux/syslinux.dpy</code>===
 +
The template for a SYSLINUX disk Image's <code class="filename">/syslinux/syslinux.dpy</code> file.
 +
 +
===<code class="filename">image/syslinux/syslinux.ser</code>===
 +
An alternative template template for a SYSLINUX disk Image's <code class="filename">/syslinux/syslinux.cfg</code> file, used in cases where a serial (RS-232) console '''IS''' being used.
 +
 +
===<code class="filename">packages.conf</code>===
 +
This is a configuration file used by [[Bering-uClibc 4.x - Developer Guide - Contents of the buildtool/tools/ Directory#genpage.pl|<code class="filename">genpage.pl</code>]].
 +
 +
 +
==Files and Directories Believed to be Obsolete==
 +
The following files and directories are believed to be obsolete and will be deleted if nobody "claims" them.
 +
 +
===<strike><code class="filename">analyse-lrp-package.pl</code></strike>===
 +
A perl script written by Arne Bernin in the pre-buildtool days to alleviate transition from Bering to Bering-uClibc.
 +
Today it does not run, you'll see syntax errors...
 +
 +
Removed for Bering-uClibc 5.2
 +
 +
===<strike><code class="filename">busybox</code></strike>===
 +
 +
Removed for Bering-uClibc 5.2
 +
 +
===<strike><code class="filename">Busybox-1.00-static.config</code></strike>===
 +
 +
Removed for Bering-uClibc 5
 +
 +
 +
===<code class="filename">compileShellInit</code>===
 +
 +
===<code class="filename">compileShell.sh</code>===
 +
 +
===<strike><code class="filename">createimage.sh</code></strike>===
 +
This Shell script was used to build floppy disk Image files for [[Bering-uClibc 3.x]] and earlier.
 +
It has been replaced by <code class="filename">buildimage.pl</code>.
 +
 +
Removed for Bering-uClibc 5.2
 +
 +
 +
===<code class="filename">fakeroot_0.4.4-9.2.tar.gz</code>===
 +
 +
===<strike><code class="filename">geniso.sh</code></strike>===
 +
This Shell script was used to build CD-ROM disk Image files for [[Bering-uClibc 3.x]] and earlier.
 +
It has been replaced by <code class="filename">buildimage.pl</code>.
 +
 +
Removed for Bering-uClibc 5.2
 +
 +
 +
===<code class="filename">img-minimal</code>===
 +
 +
===<code class="filename">itrace-0.5c.patch</code>===
 +
 +
===<code class="filename">itrace-0.5c.tar.gz</code>===
 +
 +
===<code class="filename">lfs-bootscripts-20100124.tar.bz2</code>===
 +
 +
===<code class="filename">make-patches.sh</code>===
 +
'''Note:''' Variable <tt>$(BT_PATCHTOOL)</tt>, set in file <code class="filename">MasterInclude.mk</code> references this script.
 +
 +
===<strike><code class="filename">mfstool</code></strike>===
 +
mfstool allows you to manipulate Minix filesystem images as a normal (i.e. non-root) user.
 +
See [http://mfstool.sourceforge.net/ mfstool].
 +
Today we do not use a minix filesystem any longer.
 +
 +
Removed for Bering-uClibc 5.2
 +
 +
===<strike><code class="filename">mfstool-0.5-fixed.tgz</code></strike>===
 +
Source package for mfstoool. See above.
 +
 +
Removed for Bering-uClibc 5.2
 +
 +
===<code class="filename">prepareimagefiles.sh</code>===
 +
 +
===<strike><code class="filename">README.itrace</code></strike>===
 +
 +
Removed for LEAF Bering-uClibc 5.2
 +
 +
===<code class="filename">udev-config-20100128.tar.bz2</code>===
 +
 +
===<strike><code class="filename">upx-3.04-i386_linux</code></strike>===
 +
 +
Removed for LEAF Bering-uClibc 5
 +
 +
===<strike><code class="filename">upx-3.04-i386_linux.tar.bz2</code></strike>===
 +
This is referenced within <code class="filename">kernel/buildtool.mk</code> which unpacks this file into the directory listed above.
 +
Suspect this is no longer required.
 +
This also explains hidden file <code class="filename">.upxunpack</code>
 +
 +
Removed for LEAF Bering-uClibc 5.
  
 
----
 
----
Line 21: Line 178:
 
| width="40%" align="left"  | [[Bering-uClibc 4.x - Developer Guide - Hints and Tips for using Git SCM|Prev]]
 
| width="40%" align="left"  | [[Bering-uClibc 4.x - Developer Guide - Hints and Tips for using Git SCM|Prev]]
 
| width="20%" align="center" | [[Bering-uClibc 4.x - Developer Guide|Up]]
 
| width="20%" align="center" | [[Bering-uClibc 4.x - Developer Guide|Up]]
| width="40%" align="right"  |  
+
| width="40%" align="right"  | [[Bering-uClibc 4.x - Developer Guide - Debugging Tools and Techniques|Next]]
 
|}
 
|}
  
 
[[Category:Bering-uClibc 4.x]]
 
[[Category:Bering-uClibc 4.x]]
 
[[Category:Developer Guide]]
 
[[Category:Developer Guide]]

Latest revision as of 18:26, 10 August 2014

Contents of the buildtool/tools/ Directory
Prev Bering-uClibc 4.x - Developer Guide Next


Introduction

The tools/ directory under buildenv/ contains a number of utility scripts and template files used within the Bering-uClibc 4.x build toolchain. Over time, various obsolete files have been collected in this directory, and none of the developers have been quite sure of their purpose or even whether they are still required. This page is intended to prevent that situation from recurring, by explaining the purpose of each of the files and directories within the tools/ directory.


Important Files and Directories

The following files and directories are known to be actively used.

buildall.sh

A Shell script used by automatically build all of the Packages defined in sources.cfg, taking account of the "<Requires>" definitions in order to build the Packages in the correct order to satisfy dependencies.

Generates an HTML file containing a table showing the success / failure status of the build for each Package, with links to the individual build log files for each Package. The HTML file is called /tmp/DD.MM.YYYY/build.html where DD.MM.YYYY is the build date.

dpatch

A Shell script which processes .dpatch files. These are Debian-specific patch files, sometimes included in Debian "diff" files applied to upstream (orig) source distributions.

Variable $(BT_DPATCH), set in file MasterInclude.mk references this script. That variable is used in mawk/buildtool.mk.

genpage.pl

A Perl script written by Martin Hejl. This script parses the bin directory for packages in git (previously cvs) and generates an HTML file out of the package description, package date, packager plus a changelog for the latest changes (from the commit messages). The result can be used to populate the "Packages" link of the webpage [1].

See also packages.conf.

getdep.sh

A Shell script which is called from initrd/buildtool.mk in order to determine which kernel Modules are "dependencies" for the Modules specified on the command-line.

getdirname.pl

A Perl script which takes the name of a compressed tar file as a command-line argument and reports the name of the first directory level in the tar archive.

This is used extensively within buildtool.mk files to automatically extract the name (including the version number) of the "source" archive, avoiding the need to hard-code the upstream version number in buildtool.mk as well as in buildtool.cfg.

Refer to Bering-uClibc 4.x - Developer Guide - Compiling Source Code for examples of usage. Note that the script is generally called by using variable $(BT_TGZ_GETDIRNAME) which is set in file MasterInclude.mk.

image/

A directory containing further directories with template files used by buildimage.pl.

image/common/

A directory containing template files common to all of the disk Images generated by buildimage.pl.

image/common/configdb.ser

An LRP Package file which is used as an initial configdb.lrp when using a serial (RS-232) console. It contains a replacement /etc/inittab which is suitable for serial console access.

image/common/leaf.cfg

The template for every disk Image's /leaf.cfg file. It contains search-and-replace strings (such as "{LRP}") which are substituted for Image-specific text based on the entries in the Image's buildimage.cfg.

image/common/readme

The template for every disk Image's /readme file. It contains search-and-replace strings (such as "{VERSION}") which are substituted for Image-specific text based on the entries in the Image's buildimage.cfg.

image/isolinux/isolinux.cfg

The template for an ISOLINUX disk Image's /isolinux/isolinux.cfg file.

image/isolinux/isolinux.dpy

The template for an ISOLINUX disk Image's /isolinux/isolinux.dpy file.

image/pxelinux/pxelinux.cfg

The template for a PXELINUX disk Image's /tftpboot/bering-uclibc/4/pxelinux.cfg/default file, used in cases where a serial (RS-232) console IS NOT being used.

image/pxelinux/pxelinux.dpy

The template for a PXELINUX disk Image's /tftpboot/bering-uclibc/4/pxelinux.dpy file.

image/pxelinux/pxelinux.ser

An alternative template template for a PXELINUX disk Image's /tftpboot/bering-uclibc/4/pxelinux.cfg/default file, used in cases where a serial (RS-232) console IS being used.

image/syslinux/syslinux.cfg

The template for a SYSLINUX disk Image's /syslinux/syslinux.cfg file, used in cases where a serial (RS-232) console IS NOT being used.

image/syslinux/syslinux.dpy

The template for a SYSLINUX disk Image's /syslinux/syslinux.dpy file.

image/syslinux/syslinux.ser

An alternative template template for a SYSLINUX disk Image's /syslinux/syslinux.cfg file, used in cases where a serial (RS-232) console IS being used.

packages.conf

This is a configuration file used by genpage.pl.


Files and Directories Believed to be Obsolete

The following files and directories are believed to be obsolete and will be deleted if nobody "claims" them.

analyse-lrp-package.pl

A perl script written by Arne Bernin in the pre-buildtool days to alleviate transition from Bering to Bering-uClibc. Today it does not run, you'll see syntax errors...

Removed for Bering-uClibc 5.2

busybox

Removed for Bering-uClibc 5.2

Busybox-1.00-static.config

Removed for Bering-uClibc 5


compileShellInit

compileShell.sh

createimage.sh

This Shell script was used to build floppy disk Image files for Bering-uClibc 3.x and earlier. It has been replaced by buildimage.pl.

Removed for Bering-uClibc 5.2


fakeroot_0.4.4-9.2.tar.gz

geniso.sh

This Shell script was used to build CD-ROM disk Image files for Bering-uClibc 3.x and earlier. It has been replaced by buildimage.pl.

Removed for Bering-uClibc 5.2


img-minimal

itrace-0.5c.patch

itrace-0.5c.tar.gz

lfs-bootscripts-20100124.tar.bz2

make-patches.sh

Note: Variable $(BT_PATCHTOOL), set in file MasterInclude.mk references this script.

mfstool

mfstool allows you to manipulate Minix filesystem images as a normal (i.e. non-root) user. See mfstool. Today we do not use a minix filesystem any longer.

Removed for Bering-uClibc 5.2

mfstool-0.5-fixed.tgz

Source package for mfstoool. See above.

Removed for Bering-uClibc 5.2

prepareimagefiles.sh

README.itrace

Removed for LEAF Bering-uClibc 5.2

udev-config-20100128.tar.bz2

upx-3.04-i386_linux

Removed for LEAF Bering-uClibc 5

upx-3.04-i386_linux.tar.bz2

This is referenced within kernel/buildtool.mk which unpacks this file into the directory listed above. Suspect this is no longer required. This also explains hidden file .upxunpack

Removed for LEAF Bering-uClibc 5.


Prev Up Next