From 8decb3267be14596c377155d6bc84a0eb61f04e9 Mon Sep 17 00:00:00 2001 From: Lennart Johansson Date: Thu, 2 Jun 2016 13:41:16 +0200 Subject: Doc Add autovariables from manifest, poky.ent, enea.conf Add autovariable from manifest repository name, e.g. the profile name Add autovariables from poky.ent, e.g. Yocto version etc.. in pardoc-distro Add autovariables from enea.conf e.g. release MAJOR MINOR via generated s_docsrc_common/pardoc-distro and also pick up MAJOR MINOR into the make system to create BOOK_VER => BL_LABEL on books Add autocreate build_boot chapter in release info from the README files in all included targets Adapt book XML files to the above Currently this makes the Makefile and init scripts identical in different el6-.git All are now automatic: Just clone el6-xxxx.git and cd el6-xxx/doc ; make doc and all are done until the books are built and ready. It takes several minutes to autofetch all from git using the repo command according to the target manifests before the books start to build. Rebuilding books are quick. Signed-off-by: Lennart Johansson --- doc/Makefile | 136 ++++++++++++++------- doc/book-enea-linux-open-source/doc/about.xml | 2 +- doc/book-enea-linux-open-source/doc/book.xml | 2 +- .../doc/about_release.xml | 122 +++++++++--------- doc/book-enea-linux-release-info/doc/book.xml | 4 +- .../doc/build_boot_template.xml | 26 ++++ .../doc/main_changes.xml | 8 +- .../doc/prerequisites.xml | 75 ++++++++++++ .../doc/supported_features.xml | 2 +- doc/docsrc_common/pardoc-distro.xml | 5 +- doc/initbuildboot.sh | 111 +++++++++++++++++ 11 files changed, 378 insertions(+), 115 deletions(-) create mode 100644 doc/book-enea-linux-release-info/doc/build_boot_template.xml create mode 100644 doc/book-enea-linux-release-info/doc/prerequisites.xml create mode 100644 doc/initbuildboot.sh diff --git a/doc/Makefile b/doc/Makefile index 306bd4d..59d25d5 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,6 +1,11 @@ #Path to this subsystem's root directory SUBSYSROOT := $(shell pwd) +MANIFEST_DIR = $(dir $(SUBSYSROOT)) +MANIFEST_NAME = $(lastword $(subst /, ,$(MANIFEST_DIR))) +MANIFEST_TAIL = $(word 2,$(subst -, ,$(MANIFEST_NAME))) + +# Generic docbuild.git auto-clone + s_docbuild symlink. Includes TMPCLONEROOT include init.mk # ****************** SUPPORT FOR TARGETS *************************** @@ -15,8 +20,10 @@ TARGETDEFAULTXMLS := $(shell cd $(REPODIR); ls -1 */default.xml) # URL and HASH of this manifest repository to be used by the repo tool CURRENTHASH := $(shell git log -1 --pretty=format:%H 2>/dev/null) CURRENTURL := $(shell git remote show origin | sed -n '/Fetch URL: /s/^.*URL: //p' 2>/dev/null) -.PHONY: inittargets -# ****************************************************************** + +# ******************* AutoGenerated chapter from template and target READMEs ******* +BUILDBOOT_XML := book-enea-linux-release-info/doc/build_boot_generated.xml +BUILDBOOT_TEMPLATE := book-enea-linux-release-info/doc/build_boot_template.xml @@ -33,27 +40,10 @@ DOCBOOK_FO_USEFOP ?= yes DOCBOOK_TO_BOOKDIR ?= yes DOCBOOK_CLEANTMP ?= yes -#Components in this subsystem -COMPONENTS := book-enea-linux-release-info book-enea-linux-open-source -# COMPONENTS += book-enea-linux-target-guide -# ----------------------------------------------------- -#Release version, used in labels and text -REL_VER_EXT := $(shell perl -e \ -'while(<>) {\ - if (//) { print $$1 ; exit; }\ -}' \ -< $(SUBSYSROOT)/docsrc_common/pardoc-distro.xml 2>/dev/null) -#$(info REL_VER_EXT = $(REL_VER_EXT)) - -ifneq ($(REL_VER_EXT),) -REL_VER ?= $(REL_VER_EXT) -else -REL_VER ?= undefined -endif -$(info REL_VER = $(REL_VER)) - -# ----------------------------------------------------- - +#Components (books) in this subsystem +# COMPONENTS := book-enea-linux-release-info book-enea-linux-open-source +# COMPONENTS += book-enea-linux-eclipse-open-source +COMPONENTS := $(shell ls -d book-enea* ) # -------------------------------------------------------------- ifeq ($(VERBOSE),yes) @@ -76,34 +66,31 @@ VALIDATE = no # Export all parameters including those on the command line export -.PHONY: doc books docusage +.PHONY: doc books docusage init initbuild inittargets initpardoc initbuildboot docusage: @echo 'make docusage #Shows this help text' @echo ' DOCBOOK_TOOLS_VERSIONS=yes #Displays DocBook tools versions in this machine' @echo 'make doc #Builds the userdoc, does autoinit if needed' - @echo 'make init #Init both below' - @echo 'make initbuild #Init s_docbuild' - @echo 'make inittargets #Init s_targets using repo tool' + @echo 'make init #Init all needed init* below' + @echo 'make initbuild #Init s_docbuild Docbook build system and central files' + @echo 'make inittargets #Init s_targets using repo tool Targets in this distro with poky' + @echo 'make initpardoc #Init s_docsrc_common using info from poky/' + @echo 'make initbuildboot #Init build_boot chapter from READMEs and template in release info' @echo ' DOCBOOK_CLEANTMP=no #Option to keep temp files in doc/ and tmp/' @echo ' BOOK_GLOBALCLONEROOT=yes #Option for all init above to clone all outside the doc directory' @echo ' BOOK_GLOBALCLONEROOT=otherpath #Option for all init above to clone all' - @echo #Force rebuilding (ignore dependency on file times or BL_LABEL)' - @echo ' # Dependency only works if common doc directory is kept' - @echo ' BOOKCONDITION'make pullbuild #git pull in s_docbuild' - @echo 'make pulltargets #git pull in s_targets' + @echo 'make pullbuild #git pull in s_docbuild' + @echo 'make pulltargets #git pull in s_targets. You need also initpardoc initbuildboot' @echo 'make clean #Clean. Also clean s_* but not any external clones' - @echo 'The following directories are cloned via the init commands (s_* are symlinks to clones):' - @echo ' s_docbuild #Docbook build system and central files' - @echo ' s_targets #targets in this distro with poky, for picking some parameters' @echo '' @echo 'Optional parameters for make doc:' @echo ' COMP= #Component (book) to build. Book component names are book-*' @echo ' #Default component/s:' @echo ' $(COMPONENTS)' @echo ' FORMAT= #One of: pdf, html, or eclipse (Default all are built)' - @echo ' BL_LABEL= #Becomes footer in book (default: date + time)' + @echo ' BL_LABEL= #Becomes footer in book (default: from poky enea.conf MAJORMINOR)' @echo ' DOCBOOK_TO_BOOKDIR=no #(default yes) Avoid moving result to book directory' @echo ' # and avoid erasing common doc and tmp directories' @echo ' BOOKFORCE=yes #Force rebuilding (ignore dependency on file times or BL_LABEL)' @@ -118,7 +105,7 @@ docusage: @echo ' DOCBOOK_OLINK_TARGETDB=only #Build a target db for this book (for links into it)' @echo ' DOCBOOK_OLINK_TARGETDB=yes #Build a target db AND build the book' @echo ' #Master olinkdb defined in this Makefile, one per generated format, is:' - @echo ' $(DOCBOOKOLINKDB_BASE)_*.db' + @echo ' $(DOCBOOKOLINKDB_BASE)_*.db' @echo ' Typical examples:' @echo ' make doc Creates all books, all formats' @echo ' make doc COMP=book-xxxx FORMAT=html' @@ -137,7 +124,8 @@ ifeq ($(DOCBOOK_TOOLS_VERSIONS),yes) $(VERB)$(MAKE) -f $(DOCBOOKMAKE)/tools_book_standalone.mk book_tools_versions endif -init: initbuild inittargets +# We rely on make doing these in order left to right +init: initbuild inittargets initpardoc initbuildboot pullall: pullbuild pulltargets # If no COMP, iterate over books-* in COMPONENTS with make doc @@ -163,24 +151,27 @@ FORMAT=html pdf eclipse endif -books: initbuild inittargets +books: init # BOOKPACKAGES is defined in all book-*/swcomp.mk - $(VERB)for book in $(BOOKPACKAGES); do \ + $(VERB)DISTRO_VERSION_MAJOR=`egrep '"EneaLinux_DISTRO_VERSION_MAJOR"' s_docsrc_common/pardoc-distro.xml | sed 's/.*//;s/<\/phrase>.*//'` ; \ + DISTRO_VERSION_MINOR=`egrep '"EneaLinux_DISTRO_VERSION_MINOR"' s_docsrc_common/pardoc-distro.xml | sed 's/.*//;s/<\/phrase>.*//'` ; \ + BOOKVER="Profile $(MANIFEST_TAIL)-$$DISTRO_VERSION_MAJOR$$DISTRO_VERSION_MINOR" ; \ + for book in $(BOOKPACKAGES); do \ for format in $(FORMAT); do \ - $(MAKE) -f $(DOCBOOKMAKE)/make_docbook_standalone.mk BOOK=$$book FORMAT=$$format books || exit 10; \ + $(MAKE) -f $(DOCBOOKMAKE)/make_docbook_standalone.mk BOOK=$$book FORMAT=$$format BOOK_VER="$$BOOKVER" books || exit 10; \ done ; \ - done + done ifeq ($(DOCBOOK_TO_BOOKDIR),yes) - $(VERB)rm -rf doc tmp + $(VERB)rm -rf doc tmp else ifeq ($(DOCBOOK_CLEANTMP),yes) -# keep only doc/pdf/book-*.pdf doc/eclipse/plugins/com.enea.doc.book-* but delete doc/eclipse/plugins/com.enea.doc.book-*/done* - $(VERB)rm -rf tmp 2>/dev/null ; rm -rf doc/pdf/book-*/ ; rm -rf doc/eclipse/plugins/com.enea.doc.book-*/done* 2>/dev/null +# keep only doc/pdf/book-*.pdf doc/eclipse/plugins/com.enea.doc.book-* but delete doc/eclipse/plugins/com.enea.doc.book-*/done* + $(VERB)rm -rf tmp 2>/dev/null ; rm -rf doc/pdf/book-*/ ; rm -rf doc/eclipse/plugins/com.enea.doc.book-*/done* 2>/dev/null endif endif - -clean: cleaninit +# cleaninit cleans ALL tmpcommon and all s_* and generated build_boot chapter xml +clean: cleaninit cleanbuildboot $(VERB)rm -rf doc tmp 2>/dev/null ifneq ($(filter book-%, $(COMPONENTS)),) $(VERB)for comp in $(filter book-%, $(COMPONENTS)); do \ @@ -221,4 +212,55 @@ $(TMPCLONEROOT_TARGETS): repo init -u $(CURRENTURL) -b $(CURRENTHASH) -m $$target_default_xml ; repo sync ; \ ) ; \ done -# ****************************************************************** + +# **************************************************************************** +# ******************** SUPPORT FOR dynamic pardoc with added parameters ****** +# pardoc-distro can contain MAJOR.MINOR-xxxxx keeping -xxxx when replacing MINOR.MINOR from enea.conf + +PATH_DOCSRC_COMMON = $(SUBSYSROOT)/s_docsrc_common +NAME_DOCSRC_COMMON = docsrc_common +TMPCLONEROOT_DOCSRC_COMMON := $(TMPCLONEROOT)/$(NAME_DOCSRC_COMMON) +TMPPARDOC := $(TMPCLONEROOT_DOCSRC_COMMON)/pardoc-distro.xml + +initpardoc: s_docsrc_common + +cleanpardoc: + $(VERB)rm -rf $(TMPCLONEROOT_DOCSRC_COMMON) ; rm s_docsrc_common + +s_docsrc_common: $(TMPCLONEROOT_DOCSRC_COMMON) + $(VERB)rm s_docsrc_common 2>/dev/null; ln -s $(TMPCLONEROOT_DOCSRC_COMMON) s_docsrc_common + +$(TMPCLONEROOT_DOCSRC_COMMON): s_targets + $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi + $(VERB)if [ ! -d $(TMPCLONEROOT_DOCSRC_COMMON) ]; then mkdir -p $(TMPCLONEROOT_DOCSRC_COMMON) ; fi + @echo "Copy and patch docsrc_common/ files to $(TMPCLONEROOT_DOCSRC_COMMON)" + $(VERB)FIRSTTARGET=`ls -1 s_targets/ | head -1`; \ + ENEACONF=s_targets/$$FIRSTTARGET/poky/meta-el-common/conf/distro/enea.conf ; \ + DISTRO_VERSION_MAJOR=`egrep '^DISTRO_VERSION_MAJOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ + DISTRO_VERSION_MINOR=`egrep '^DISTRO_VERSION_MINOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ + cat docsrc_common/pardoc-distro.xml | sed '/<\/section>/d' | \ + sed '/$(TMPPARDOC) ; \ + echo "$$DISTRO_VERSION_MAJOR" >>$(TMPPARDOC) ; \ + echo "$$DISTRO_VERSION_MINOR" >>$(TMPPARDOC) ; \ + echo "" >>$(TMPPARDOC) + +# **************************************************************************** +# ***** Create XML chapter with build/boot commands from all README files in s_targets + +initbuildboot: $(BUILDBOOT_XML) + +cleanbuildboot: + $(VERB)rm -f $(BUILDBOOT_XML) 2>/dev/null + + +$(BUILDBOOT_XML): s_targets $(BUILDBOOT_TEMPLATE) + @echo "Creating $(BUILDBOOT_XML) from READMEs" + $(VERB)INITBB_CMD=initbuildboot.sh ; \ + if [ -f "$$INITBB_CMD" ]; then \ + sh "$$INITBB_CMD" -xml $(BUILDBOOT_XML) -template $(BUILDBOOT_TEMPLATE) ; \ + else \ + echo "ERROR: Missing $$INITBB_CMD, can not create $(BUILDBOOT_XML)"; exit 10; \ + fi + +# **************************************************************************** diff --git a/doc/book-enea-linux-open-source/doc/about.xml b/doc/book-enea-linux-open-source/doc/about.xml index 30f00e9..a3d62f8 100644 --- a/doc/book-enea-linux-open-source/doc/about.xml +++ b/doc/book-enea-linux-open-source/doc/about.xml @@ -6,7 +6,7 @@ This document contains the open source and license information pertaining to the Eclipse package provided with Enea Linux . \ No newline at end of file diff --git a/doc/book-enea-linux-open-source/doc/book.xml b/doc/book-enea-linux-open-source/doc/book.xml index dcc1189..d5da88e 100644 --- a/doc/book-enea-linux-open-source/doc/book.xml +++ b/doc/book-enea-linux-open-source/doc/book.xml @@ -6,7 +6,7 @@ <trademark class="registered">Enea</trademark> Linux Open Source Report Release Version - diff --git a/doc/book-enea-linux-release-info/doc/about_release.xml b/doc/book-enea-linux-release-info/doc/about_release.xml index 3cdea52..017f7b2 100644 --- a/doc/book-enea-linux-release-info/doc/about_release.xml +++ b/doc/book-enea-linux-release-info/doc/about_release.xml @@ -4,15 +4,16 @@ About This Release - This release of Enea Linux 6 provides a publicly available Enea Linux - distribution for a selected set of targets. This release is generated from - branch dizzy-eneaEneaLinux_BRANCH FIXME Is this correct branch, try - to ONLY HAVE THIS INFO in one place, here of applicable git - repositories.MAYBE WE COULD EXTRACT Enea Linux major and minor - version from meta-el-common/conf/distro/enea.conf ? This would be via shell - code in Makefile, the names clashes with those used in poky.ent. Suggest - using the docbuild feature BOOK_PARAM_n (n=1-5) to define parameters in - Makefile that can be used in XML files + This release of Enea Linux provides a publicly available + Enea Linux distribution for a selected set of targets. This release is + generated from the yocto distribution .INFO Yocto distro autopicked + from poky.ent as DISTRO_NAME_NO_CAP Provided contents: @@ -36,47 +37,38 @@ - Eclipse executable plus application development tools (ADT) for - command line and Eclipse + Eclipse executable plus development tools for command line and + Eclipse - + Supported targets: - Supported targets: - - Freescale P2041RDB FIXME Why are these listed three - times? - + FIXME should autocreate a list of targets, hopefully from the + generated README file, by using MAKEFILE to update pardoc-distro AND/OR also + auto-create an XML file to includ here with description text for each target + etc.. + - Freescale P3041DS FIXME Why are these listed three - times? + Freescale P2041RDB, Power architecture, No DSPs, Quad-core QorIQ + P2041 processor, e500mc cores. - - Freescale T4240RDB FIXME Why are these listed three - times? - - - QEMU PPC - Kernel configuration: - P2041RDB: One kernel flavor (release) + P2041RDB: One kernel flavor (release)FIXME Why are these + listed three times? Why only "one kernel"?? - P3041DS: One kernel flavor (release) - - - - T4240RDB: Two kernel flavors (release & debug) + P3041DS: One kernel flavor (release)FIXME Why are these + listed three times? @@ -94,32 +86,33 @@ Supported versions: Yocto version INFO: This is fetched from + xpointer="element(Yocto_VER/1)" />INFO: Auto-fetched from poky.ent via pardoc-distro.xml poky source version INFO: This is fetched from + xpointer="element(Poky_VER/1)" />INFO: Auto-fetched from poky.ent via pardoc-distro.xml - gcc version: 4.9was EneaLinux_GCC_VER + gcc version: 4.9was EneaLinux_GCC_VER Not in + poky.en Linux kernel version for all targets: 3.12was - EneaLinux_KERNEL_VER + EneaLinux_KERNEL_VER Not in poky.ent - Eclipse version 4.3 Keplerwas Eclipse_VER and was - Eclipse_NAME + Eclipse version 4.5 Marswas Eclipse_VER and was + Eclipse_NAME Not in poky.ent @@ -130,10 +123,10 @@ Distribution channel: All deliverables can be downloaded from This is still in - pardoc-distro.xml + xpointer="element(ULINK_ENEA_LINUX_URL/1)" /> QUEST REMOVE???? + This is still in pardoc-distro.xml @@ -188,7 +181,7 @@ Packages provided by Yocto See the Yocto "Release Notes" @@ -221,19 +214,17 @@
Provided Documentation - The following Enea Linux manuals are available for : + The following Enea Linux manuals are available: - README.htm - top page of the documentation + README.htm - top page of the documentationFIXME Needs to + be fixed to easily find also online doc - README.release - text file describing the release contents, - installation, and quick getting started + README - text files describing various details like build- and + boot-commands @@ -241,12 +232,6 @@ Information (this document) - - Enea Linux User's Guide - - + User's Guides are available online, not inside the + distribution. + + + + Enea + Linux Application User's Guide + (https://portal.enea.com/wp-content/uploads/_mediavault/book-enea-linux-applications-dev-guide.pdf) + + + + Enea + Linux Platforms User's Guide + (https://portal.enea.com/wp-content/uploads/_mediavault/book-enea-linux-platforms-dev-guide.pdf) + + + + How to use Eclipse is described inside the Enea Linux user's guides. + Eclipse's own documentation is available in directory + eclipse/readme. + The Enea Linux Eclipse tarball and Eclipse Open Source Report is inherited from Enea Linux 4.0. How to use Eclipse is described inside the <trademark class="registered">Enea</trademark> Linux Release Information Release Version - + + diff --git a/doc/book-enea-linux-release-info/doc/build_boot_template.xml b/doc/book-enea-linux-release-info/doc/build_boot_template.xml new file mode 100644 index 0000000..709e624 --- /dev/null +++ b/doc/book-enea-linux-release-info/doc/build_boot_template.xml @@ -0,0 +1,26 @@ + + + + Target Specific Build and Boot Instructions + + For each target, a README file contains the build and boot + instructions. To make it easier for the reader, the contents of these + build/boot instruction have been extracted below into this release + information document. + + The README files are parts of the distribution and can be seen after + the distribution is fetched.NOTE: Only EDIT THE TEMPLATE FILE! A new + build_boot.xml file is created from the template and sections are added + below automatically from the README files for each target when building the + book! Only in the template file you see a line below with SCRIPT_...._HERE + and the text telling that this is a template file. + + SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE + + This is a template file which you can edit. When + the book is built, a new XML chapter file is created where the above part of + this file is copied to the new XML file and all from the line above is + replaced automatically by build and boot sections from the README + files! + \ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/main_changes.xml b/doc/book-enea-linux-release-info/doc/main_changes.xml index 88ae1ef..2e6555b 100644 --- a/doc/book-enea-linux-release-info/doc/main_changes.xml +++ b/doc/book-enea-linux-release-info/doc/main_changes.xml @@ -5,7 +5,7 @@ Main Changes This chapter describes the major changes and additions in the Enea - Linux release compared to the previous general Enea Linux release (4.0-140919). @@ -44,17 +44,17 @@ Enea Linux is based on Yocto - (was 1.6) The poky source version is (was daisy-11.0) diff --git a/doc/book-enea-linux-release-info/doc/prerequisites.xml b/doc/book-enea-linux-release-info/doc/prerequisites.xml new file mode 100644 index 0000000..7241ed1 --- /dev/null +++ b/doc/book-enea-linux-release-info/doc/prerequisites.xml @@ -0,0 +1,75 @@ + + + + Prerequisites and Getting Enea Linux + +
+ Install Host Packages + + Building Enea Linux or compiling applications requires some packages + to be installed on your Linux development host. See the list of Required + Packages for Host Development System, found in the Yocto 2.1 document: + https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#required-packages-for-the-host-development-system. + If needed, replace 2.1 with the actual Yocto version in your Enea Linux + distribution.Sorry by the list in the Yocto document do not seem + to be enough at all at least for platform building! Therefore we need to + add a complete list here, and we actually have a bigger list than we + needed, but it's better to have more and not be needed than to lack + information. + + Install Host Packages + + + The list below is generic and might contain packages that are not + necessary. Additional packages might be required to build for some + targets. See the Enea Linux Release Information if more packages are + needed and which hosts have been tested by Enea for this Enea Linux + release.QUEST: Are the lists below ok? The lists below try to + cover ALL normal use cases for both ApplGuide and PlatfGuide, incl. + Eclipse, instead of limiting to some use case. Easier to keep + updated. + + +
+ Ubuntu or Debian + + Ensure the system is up-to-date: + + $ sudo apt-get update + + For a supported Ubuntu + Ubuntu + and Debian + Debian + distributions you need the following packages: + + # sudo apt-get install sed wget subversion git-core +coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk +python-pysqlite2 diffstat make gcc build-essential xsltproc g++ +desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev autoconf automake +groff libtool xterm libxml-parser-perl +
+
+ +
+ Getting Enea Linux + + For platform developers, an Enea Linux release is available for + cloning from git.enea.com. Releases are available in distribution-specific + repositories on git.enea.com, for cloning using the repo tool in the local + workstation. For more information on this topic, see the Enea Linux Platforms + Development Guide on http://portal.enea.com. + + Application developers will download pre-complied images from the + Enea Portal or will receive prebuilt images from the platform developers. + For further information on this see Enea Linux Application + Development Guide. +
+
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/supported_features.xml b/doc/book-enea-linux-release-info/doc/supported_features.xml index 11e49b1..ebc4b59 100644 --- a/doc/book-enea-linux-release-info/doc/supported_features.xml +++ b/doc/book-enea-linux-release-info/doc/supported_features.xml @@ -6,7 +6,7 @@ The basic features provided by Yocto are listed on the "Features" tab on the ???? FIXME THIS WAS "ULINK_YOCTO_DOWN_MINOR_URL" in previous pardoc-distro file - I don't know what is shall be now. Perhaps it is Yocto release notes which I have changed this to, as found in poky.ent. diff --git a/doc/docsrc_common/pardoc-distro.xml b/doc/docsrc_common/pardoc-distro.xml index 129d7a5..9c9edd6 100644 --- a/doc/docsrc_common/pardoc-distro.xml +++ b/doc/docsrc_common/pardoc-distro.xml @@ -5,7 +5,7 @@ ============================== --> - + %common_poky_entities; ]> @@ -24,8 +24,6 @@ **** The phrase elements below can be used as variables in several places in XML files **** - **** In addition: Makefile parses variable REL_VER from entity ENEA_LINUX_REL_VER, - after which swcomp.mk extracts BOOK_VER from variable REL_VER **** You can add more elements using ENTITY lines in poky.ent, e.g. like Poky_VER below @@ -34,5 +32,6 @@ https://linux.enea.com/&ENEA_LINUX_REL_VER; &POKYVERSION; &DISTRO; +&DISTRO_NAME_NO_CAP; &YOCTO_RELEASE_NOTES;
diff --git a/doc/initbuildboot.sh b/doc/initbuildboot.sh new file mode 100644 index 0000000..72606a6 --- /dev/null +++ b/doc/initbuildboot.sh @@ -0,0 +1,111 @@ +#!/bin/sh +VER="R0.06" + +BBTEMPLATE= +BBXML= + +USAGE="`basename $0` -xml buildbootxml-to-create -template templatexml-file ($VER) + Currently only supports sequence types Build-command: and Boot-command: + Both files should have path book-*release-info/doc/ + Creates the XML file from the template, inserting build/boot commands + from the various s_targets/XXXtargetXXX/README files + at the place in template with >SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE< + ignoring rest of template + The code tries to fold too long lines, but this is not perfect. Best would + be if the command lines already in README are short enough, e.g. by + using short variables, which work both on shell and uboot command lines" + +while echo "x$1" | egrep '^x-' >/dev/null 2>&1 +do + OPT="$1" ; shift + if [ "$OPT" = "--help" -o "$OPT" = "-h" -o "$OPT" = "-help" ] ; then echo "$USAGE" ; exit ; fi + if [ "$OPT" = "-xml" ] ; then BBXML="$1" ; shift; fi + if [ "$OPT" = "-template" ] ; then BBTEMPLATE="$1" ; shift; fi +done +if [ "$BBTEMPLATE" = "" ]; then echo "ERROR: Missing option -template templatefile"; exit ; fi +if [ "$BBXML" = "" ]; then echo "ERROR: Missing option -xml buildbootxml-to-create"; exit ; fi +if [ ! -f "$BBTEMPLATE" ]; then echo "ERROR: Missing templatefile '$BBTEMPLATE'"; exit; fi +if [ ! -d "`dirname \"$BBXML\"`" ]; then echo "ERROR: Missing parent directory for '$BBXML'"; exit ; fi + +echo "`basename $0` Creating $BBXML from" +TARGETREADMES=`cd s_targets ; ls -d */README | tr '\n' ' '` +echo " $TARGETREADMES" + +# README file formats: +# a) Sequence starts: ___ XXXX:yyyy or ___ XXXX:yyyy conffile +# where XXXX is a type, yyyy is text to be in title +# b) Inside sequence: ___ END ends the sequence (ignore rest of line) +# c) Inside sequence: # Documentation line +# d) Inside sequence: Anything else is command or config lines +# Conv.to XML: ">" "<" "&" and put all inside +# *) Anywhere ____xxxx Leading 4 underlines or more, always ignored +# unless one of the recognized XXXX +# *) Anywhere outside sequence, ignore all +# *) There can be multiple of each type of sequence in each README file +# with different yyyy + + +cat $BBTEMPLATE | awk ' + />SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE$BBXML + + +# Long command lines: The awk code below breaks too long lines, but this is not perfect. +extractcmds_filter() { + echo " " | tr -d '\n' + sed '/^___/d;s/\&/\&/g' | sed 's//\>/g;/^$/d' | \ + awk 'BEGIN { MAX=90; } + ( length($0) > MAX ) { + LINE=$0; + while (length(LINE) > MAX) { + if (index(LINE," ") == 0 ) { + print "ERROR: PROBLEM: No space in too long line:" LINE > "/dev/stderr"; + print $LINE; + next; + } + i=MAX; while ( substr(LINE,i,1) != " " ) { i=i-1; if (i==0) {break;} } + print substr(LINE,0,i) "\\"; + REST=substr(LINE,i+1); + if ( length(REST) == 0 ) { next ; } + LINE=" " REST; + } + if ( length(LINE) > 0 ) { print LINE; next ; } + } + { print;}' + echo "" +} + +extractcmds_for_type() { # target/README BOOTorBUILD + README=s_targets/"$1" + CMDTYPE="$2" + COMMANDSFOR=`egrep "___$CMDTYPE:" $README` + for CMDS in $COMMANDSFOR + do + cmdsfor=`echo "$CMDS" | sed 's/[^:]*://'` + echo " $CMDTYPE for $cmdsfor" + cat "$README" | sed -n "/$COMMANDSFOR/,/___END/p" | extractcmds_filter + done +} + +for targetreadme in $TARGETREADMES +do + TARGET=`dirname $targetreadme` + echo "" >>$BBXML + echo "
" >>$BBXML + echo " Target $TARGET - Build and Boot Instructions" >>$BBXML + echo " NOTE: DO NOT EDIT THIS GENERATED FILE! Only edit the template file." >>$BBXML + echo "
" >>$BBXML + echo " Build Instructions" >>$BBXML + extractcmds_for_type $targetreadme Build-command >>$BBXML + echo "
" >>$BBXML + echo "" >>$BBXML + echo "
" >>$BBXML + echo " Boot Instructions" >>$BBXML + extractcmds_for_type $targetreadme Boot-command >>$BBXML + echo "
" >>$BBXML + echo "
" >>$BBXML +done + +echo "
" >>$BBXML +echo "Ready created $BBXML" -- cgit v1.2.3-54-g00ecf