diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-17 08:24:06 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-17 08:24:06 +0100 |
commit | 4ac8527c290ad1dd0fa622097e90b3858e42e847 (patch) | |
tree | ea8c7a980a5fcd92a9104fd2d99a8ccc0f1e5c80 | |
parent | 186c1bd82b6a6a1b0fcd64456088ca50e37784d5 (diff) | |
parent | a4d9f84daa3c1d5195daf4e85cdc5d2fc1a98d5e (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
81 files changed, 2680 insertions, 214 deletions
@@ -32,8 +32,7 @@ help: @echo ' kernelconfig - Modify the target kernel configuration' @echo '' @echo 'Cleaning targets:' - @echo ' clean - Remove bin and build_dir directories' - @echo ' cleantarget - Same as "clean", but also remove toolchain for target' + @echo ' clean - Remove firmware and build directories' @echo ' cleandir - Same as "clean", but also remove all built toolchains' @echo ' cleankernel - Remove kernel dir, useful if you changed any kernel patches' @echo ' distclean - Same as "cleandir", but also remove downloaded' @@ -100,10 +99,6 @@ cleandir dirclean: .prereq_done -@${GMAKE_INV} cleandir @-rm -f make.log .prereq_done -cleantarget targetclean: .prereq_done - -@${GMAKE_INV} cleantarget - @-rm -f make.log - cleantoolchain toolchainclean: .prereq_done -@${GMAKE_INV} cleantoolchain @@ -1,9 +1,16 @@ -- more output for initscripts on bootup (fancy OK/FAIL with color?) +- tzdata split + update +- getty + serial rework +- add daemon() function to functions.sh +- add printing of OK/FAIL (optional verbose bootup) +- fixup rework libgcc --export-symbols +- libgcc static? +- remove 32 bit kernel for 64 bit targets +- static toolchain support +- toolchain in /usr , check gcj +- rework startup, maybe use init.c, start gettys after bootup ready +- more output for initscripts on bootup - try Preset Loops per Jiffy for faster bootup via lpj= - port uuterm -- move tools to package host infrastructure, - resolve dependency handling for host tools -- port uuterm - hash-style=gnu for non-mips and non-musl - add fb full screen logo - port opkg with gpg signing diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..1670e0041 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,24 @@ +TOPDIR=$(pwd) + +all: pdf text html + +pdf: + mkdir .pdf pdf + cp *.txt .pdf + cp images/*.png pdf + a2x -v --dblatex-opts "-P latex.output.revhistory=0" -f pdf -d book -L -D pdf .pdf/manual.txt + +text: + mkdir .text text + cp *.txt .text + cp images/*.png text + a2x -v -f text -d book -L -D text .text/manual.txt + +html: + mkdir .html html + cp *.txt .html + cp images/*.png html + a2x -v --xsltproc-opts "--stringparam toc.section.depth 2" -f xhtml -d book -L -D html .html/manual.txt + +clean: + rm -rf pdf .pdf text .text html .html diff --git a/docs/adding-packages-auto.txt b/docs/adding-packages-auto.txt new file mode 100644 index 000000000..ac52c395f --- /dev/null +++ b/docs/adding-packages-auto.txt @@ -0,0 +1,71 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for autotools-based packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[auto-package-tutorial]] + +First, let's see how to write a +Makefile+ file for an autotools-based +package, with an example: + +------------------------ +01: # This file is part of the OpenADK project. OpenADK is copyrighted +02: # material, please see the LICENCE file in the top-level directory. +03: +04: include ${TOPDIR}/rules.mk +05: +06: PKG_NAME:= libfoo +07: PKG_VERSION:= 1.0 +08: PKG_RELEASE:= 1 +09: PKG_MD5SUM:= ba526cd8f4403a5d351a9efaa8608fbc +10: PKG_DESCR:= foo library +11: PKG_SECTION:= libs +12: PKG_BUILDDEP:= openssl +13: PKG_DEPENDS:= libopenssl +14: PKG_URL:= http://www.libfoo.org/ +15: PKG_SITES:= http://downloads.libfoo.org/ +16: +17: include ${TOPDIR}/mk/package.mk +18: +19: $(eval $(call PKG_template,LIBFOO,libfoo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +20: +21: libfoo-install: +22: ${INSTALL_DIR} ${IDIR_LIBFOO}/usr/lib +23: ${CP} ${WRKINST}/usr/lib/libfoo.so* ${IDIR_LIBFOO}/usr/lib +24: +25: include ${TOPDIR}/mk/pkg-bottom.mk + +------------------------ + +The Makefile begins with line 4 with the inclusion of the top level rules.mk +file. After that the Makefile starts on line 6 to 15 with metadata +information: the name of the package (+PKG_NAME+), the version of the package +(+PKG_VERSION+), the release number of the package (+PKG_RELEASE+), which is +used in OpenADK to mark any package updates, the md5 hash of the source archive +(+PKG_MD5SUM+), the short one line description for the package (+PKG_DESCR+), +the package section for the menu configuration system (+PKG_SECTION+), the +package buildtime dependencies (+PKG_BUILDDEP+), the package runtime +dependencies (+PKG_DEPENDS+), the package homepage (+PKG_URL+) and finally the +internet locations at which the tarball can be downloaded from (+PKG_SITES+). +Normally ${PKG_NAME}-${PKG_VERSION}.tar.gz will be downloaded. You can +overwrite the default via the +DISTFILES+ variable. You can add more then one +archive name in +DISTFILES+ via space separated. If you have no source archive +at all, just use the boolean variable +NO_DISTFILES+ and set it to 1. + +On line 17 the +mk/package.mk+ file is included, which contains the PKG_template +function, which is used in line 19. + +On line 21-23 we install the shared library into the package installation +directory, which is used to create the resulting binary package or tar archive +for the target. + +On line 25 we include +mk/pkg-bottom.mk+, which includes common functions used +by the package fetching and building process. + +With the autotools infrastructure, all the steps required to build +and install the packages are already defined, and they generally work +well for most autotools-based packages. However, when required, it is +still possible to customize what is done in any particular step. +By adding a post-operation hook (after extract, patch, configure, +build or install). See xref:hooks[] for details. diff --git a/docs/adding-packages-conclusion.txt b/docs/adding-packages-conclusion.txt new file mode 100644 index 000000000..6ec88e999 --- /dev/null +++ b/docs/adding-packages-conclusion.txt @@ -0,0 +1,13 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Conclusion +~~~~~~~~~~ + +As you can see, adding a software package to OpenADK is simply a +matter of writing a Makefile using an existing template and modifying it +according to the compilation process required by the package. + +If you package software that might be useful for other people, don't +forget to send a patch to the OpenADK developer (see xref:submitting-patches[])! + diff --git a/docs/adding-packages-directory.txt b/docs/adding-packages-directory.txt new file mode 100644 index 000000000..347c39aa6 --- /dev/null +++ b/docs/adding-packages-directory.txt @@ -0,0 +1,57 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +New package +~~~~~~~~~~~ + +First of all, create a directory and Makefile under the +package+ +directory for your software, for example +libfoo+: + +------------ + $ make newpackage PKG=libfoo VER=0.1 +------------ + +This will create a sample Makefile for you, with a lot of comments and +hints. It describes how the package should be downloaded, configured, +built, installed, etc. + +Depending on the package type, the +Makefile+ must be written in a +different way, using two different infrastructures: + +* manual package configuration + +* automatic package configuration using autotools + + +[[dependencies-target-toolchain-options]] +Dependencies on target and toolchain options + +Some packages depend on certain options of the toolchain: mainly the +choice of C library and C++ support. Some packages can only be built on +certain target architectures or for specific target systems. + +These dependencies have to be expressed in the Makefile. The given values +are space separated and can be negated with ! as a prefix. + +* Target architecture +** variable used PKG_ARCH_DEPENDS +** allowed values are: arm, mips, .. see target/arch.lst + +* Target system +** variable used PKG_SYSTEM_DEPENDS +** for allowed values see the output of ./scripts/getsystems + +* Target C library +** variable used PKG_LIBC_DEPENDS +** allowed values are: uclibc glibc musl + +* Host system +** variable used PKG_HOST_DEPENDS +** allowed values are: linux darwin cygwin freebsd netbsd openbsd + +* C++ support +** variable used PKG_NEED_CXX +** Comment string: `C++` + +Further formatting details: see xref:writing-rules-mk[the writing +rules]. diff --git a/docs/adding-packages-hooks.txt b/docs/adding-packages-hooks.txt new file mode 100644 index 000000000..65786fbfc --- /dev/null +++ b/docs/adding-packages-hooks.txt @@ -0,0 +1,31 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[hooks]] +Hooks available in the various build steps +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The infrastructure allow packages to specify hooks. These define further +actions to perform after existing steps. Most hooks aren't really useful for +manual packages, since the +Makefile+ already has full control over the +actions performed in each step of the package construction. + +The following hook targets are available: + +* +post-extract+ +* +post-patch+ +* +pre-configure+ +* +post-configure+ +* +pre-build+ +* +post-build+ +* +pre-install+ +* +post-install+ + +For example, to make some scripts executable after extraction, +add following to your +Makefile+: + +--------------------- +post-extract: + chmod a+x $(WRKBUILD)/build/make/*.sh + chmod a+x $(WRKBUILD)/build/make/*.pl +--------------------- diff --git a/docs/adding-packages-host.txt b/docs/adding-packages-host.txt new file mode 100644 index 000000000..a858d4563 --- /dev/null +++ b/docs/adding-packages-host.txt @@ -0,0 +1,92 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for host packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[host-package-tutorial]] + +First, let's see how to write a +Makefile+ for an host only package, required +by another target package to build, with an example: + +------------------------ +01: # This file is part of the OpenADK project. OpenADK is copyrighted +02: # material, please see the LICENCE file in the top-level directory. +03: +04: include $(TOPDIR)/rules.mk +05: +06: PKG_NAME:= hostfoo +07: PKG_VERSION:= 1.0 +08: PKG_RELEASE:= 1 +09: PKG_MD5SUM:= 291ba57c0acd218da0b0916c280dcbae +10: PKG_DESCR:= hostfoo utility +11: PKG_SECTION:= misc +12: PKG_URL:= http://www.foo.org/ +13: PKG_SITES:= http://download.foo.org/ +14: +15: PKG_CFLINE_HOSTFOO:= depends on ADK_HOST_ONLY +16: +17: include $(TOPDIR)/mk/host.mk +18: include $(TOPDIR)/mk/package.mk +19: +20: $(eval $(call HOST_template,HOSTFOO,hostfoo,$(PKG_VERSION)-${PKG_RELEASE})) +21: +22: HOST_STYLE:= auto +23: +24: include ${TOPDIR}/mk/host-bottom.mk +25: include ${TOPDIR}/mk/pkg-bottom.mk +------------------------ + +The differences to a target package is the inclusion of +mk/host.mk+ in line 17 and ++mk/host-bottom.mk+ in line 24. Furthermore the HOST_template is called instead of +the PKG_template. The last difference is the usage of +PKG_CFLINE_HOSTFOO+ to mark +the package as host only package. + +Following mix between host and target package is possible, too: +------------------------ +01: # This file is part of the OpenADK project. OpenADK is copyrighted +02: # material, please see the LICENCE file in the top-level directory. +03: +04: include ${TOPDIR}/rules.mk +05: +06: PKG_NAME:= foo +07: PKG_VERSION:= 1.0 +08: PKG_RELEASE:= 1 +09: PKG_MD5SUM:= 032a7b7b9f1a6e278ccde73f82cec5c2 +10: PKG_DESCR:= foo tool +11: PKG_SECTION:= lang +12: PKG_BUILDDEP:= foo-host +13: PKG_URL:= http://www.foo.org/ +14: PKG_SITES:= http://download.foo.org/ +15: +16: include ${TOPDIR}/mk/host.mk +17: include ${TOPDIR}/mk/package.mk +18: +19: $(eval $(call HOST_template,FOO,foo,${PKG_VERSION}-${PKG_RELEASE})) +20: $(eval $(call PKG_template,FOO,foo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +21: +22: HOST_STYLE:= auto +23: +24: foo-install: +25: ${INSTALL_DIR} ${IDIR_FOO}/usr/bin +26: ${INSTALL_BIN} ${WRKINST}/usr/bin/foo ${IDIR_FOO}/usr/bin +27: +28: include ${TOPDIR}/mk/host-bottom.mk +29: include ${TOPDIR}/mk/pkg-bottom.mk +------------------------ + +It is important to have foo-host as package build dependency, see line 12, so that the order is always build the host package +and then the target package. +If you need to rebuild a mixed package, you are advised to use: +------------ + $ make package=<package> clean hostpackage package +------------ + +At the moment there is one limitation regarding the recursive dependency resolving. It is just not implemented, yet. +So you always need to set +PKG_BUILDDEP+ to all host tools dependencies in the right order. If package foo needs host +tool bar, and host tool bar needs host library libbaz, you have to use following +PKG_BUILDDEP+ variable: +------------ + PKG_BUILDDEP:=libbaz-host bar-host +------------ + + diff --git a/docs/adding-packages-manual.txt b/docs/adding-packages-manual.txt new file mode 100644 index 000000000..b231c19fb --- /dev/null +++ b/docs/adding-packages-manual.txt @@ -0,0 +1,83 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for packages with specific build systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By 'packages with specific build systems' we mean all the packages whose build +system is not the standard one, speak 'autotools'. This typically includes +packages whose build system is based on hand-written Makefiles or shell +scripts. + +[[manual-package-tutorial]] + +------------------------------ +01: # This file is part of the OpenADK project. OpenADK is copyrighted +02: # material, please see the LICENCE file in the top-level directory. +03: +04: include $(TOPDIR)/rules.mk +05: +06: PKG_NAME:= libfoo +07: PKG_VERSION:= 1.0 +08: PKG_RELEASE:= 1 +09: PKG_MD5SUM:= eade38998313c25fd7934719cdf8a2ea +10: PKG_DESCR:= foo library +11: PKG_SECTION:= libs +12: PKG_BUILDDEP:= openssl +13: PKG_DEPENDS:= libopenssl +14: PKG_URL:= http://www.libfoo.org/ +15: PKG_SITES:= http://download.libfoo.org/ +16: +17: include $(TOPDIR)/mk/package.mk +18: +19: $(eval $(call PKG_template,LIBFOO,libfoo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +20: +21: CONFIG_STYLE:= manual +22: BUILD_STYLE:= manual +23: INSTALL_STYLE:= manual +24: +25: do-configure: +26: ${CP} ./files/config ${WRKBUILD}/.config +27: +28: do-build: +29: ${MAKE} -C ${WRKBUILD} all +30: +31: do-install: +32: ${INSTALL_DIR} ${IDIR_LIBFOO}/usr/lib +33: ${CP} ${WRKBUILD}/libfoo.so* ${IDIR_LIBFOO}/usr/lib +34: +35: include ${TOPDIR}/mk/pkg-bottom.mk +-------------------------------- + +The Makefile begins with line 4 with the inclusion of the top level rules.mk +file. After that the Makefile starts on line 6 to 15 with metadata +information: the name of the package (+PKG_NAME+), the version of the package +(+PKG_VERSION+), the release number of the package (+PKG_RELEASE+), which is +used in OpenADK to mark any package updates, the md5 hash of the source archive +(+PKG_MD5SUM+), the short one line description for the package (+PKG_DESCR+), +the package section for the menu configuration system (+PKG_SECTION+), the +package buildtime dependencies (+PKG_BUILDDEP+), the package runtime +dependencies (+PKG_DEPENDS+), the package homepage (+PKG_URL+) and finally the +internet locations at which the tarball can be downloaded from (+PKG_SITES+). +Normally ${PKG_NAM |