Commit Graph

14 Commits

Author SHA1 Message Date
Tom Rini da58dec866 Various Makefiles: Add SPDX-License-Identifier tags
After consulting with some of the SPDX team, the conclusion is that
Makefiles are worth adding SPDX-License-Identifier tags too, and most of
ours have one.  This adds tags to ones that lack them and converts a few
that had full (or in one case, very partial) license blobs into the
equivalent tag.

Cc: Kate Stewart <kstewart@linuxfoundation.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-10 09:19:52 -05:00
Masahiro Yamada 71ba24581c kbuild: docbook: sync with Linux Kernel v3.15-rc1
This commit imports DocBook-related updates
from v3.14 to v3.15-rc1.

 - commit ec3fadd64b9940baa2a369bf978e8561837db3f5
    kbuild: docbook: use $(obj) and $(src) rather than specific path
 - commit 100da4c0150c97ce34d4d3b38bf2f5449b05ae4f
    kbuild: docbook: specify KERNELDOC dependency correctly
 - commit 6f89b9c1d6b29eaa600ac4a8ac1314b0d06f15e3
    kbuild: docbook: include cmd files more simply
 - commit ac6d662a95a6989d83b259ccf8ec01dd7903af73
    doc: Add "*.svg" to DocBook/.gitignore
 - commit 832919bfcf0cfd75767c68b0c61f7cf48be860a8
    DocBook: Make mandocs parallel-safe
 - commit c4d79a4799719f2b0cd354ee498aad605730c97e
    work around xmlto bug in htmldocs

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-04-18 11:43:36 -04:00
Masahiro Yamada 7424145f30 kbuild: consolidate version and timestamp headers generation
- Generate include/generated/{timestamp.h, version.h}
   more simply by using filechk rule.

 - Add $(UBOOTRELEASE) variable and re-write u-boot.imx rule
   more simply.

 - Rename U_BOOT_VERSION in Makefile to UBOOTVERSION

   Before this commit, the same variable name, "U_BOOT_VERSION"
   was used for two different strings.

   One of them was defined in Makefile.
   It takes the form like "2014.01-rc1" and used in
   makefiles and script files.

   The other is defined in include/generated/version.h
   It takes the form like "U-Boot 2014.01-rc1-00010-gbe6d426-dirty"
   and used in C and Aseembler.

   It is confusing when grepping the source tree. So, this commit
   renames the former to UBOOTVERSION.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25 11:01:28 -05:00
Masahiro Yamada babb4440cf kernel-doc: fix some errors
- Delete fs.xml from DOCBOOKS to fix an error.
     Commit e3ff797c added fs.xml to DOCBOOKS
     but missed to add doc/DocBook/fs.tmpl.
  - Fix the location of include guard in include/linker_lists.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Abraham Varricatt <abraham.varricatt@vvdntech.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-02-19 11:10:04 -05:00
Masahiro Yamada ced032989a kernel-doc: update kernel-doc related files to Linux v3.13
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-02-19 11:10:04 -05:00
Masahiro Yamada 8fac9c7b7d kernel-doc: move kernel-doc tools to scripts/
tools/kernel-doc/docproc.c and tools/kernel-doc/kernel-doc are
files imported from Linux Kernel.

They originally resided under scripts/ directory in Linux Kernel.

This commit moves them to the original location.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-02-19 11:10:04 -05:00
Masahiro Yamada 6825a95b0b kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.

This commit disables temporary scripts:
  scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
  scripts/{Makefile.build,Makefile.host,Makefile.lib}.

This switch is triggered by the line in scripts/Kbuild.include
  -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
  +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj

We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.

Additionally, we need to fix compiler flags which are
locally added or removed.

In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-19 11:07:50 -05:00
Masahiro Yamada 9e4140329e kbuild: change out-of-tree build
This commit changes the working directory
where the build process occurs.

Before this commit, build process occurred under the source
tree for both in-tree and out-of-tree build.

That's why we needed to add $(obj) prefix to all generated
files in makefiles like follows:
  $(obj)u-boot.bin:  $(obj)u-boot

Here, $(obj) is empty for in-tree build, whereas it points
to the output directory for out-of-tree build.

And our old build system changes the current working directory
with "make -C <sub-dir>" syntax when descending into the
sub-directories.

On the other hand, Kbuild uses a different idea
to handle out-of-tree build and directory descending.

The build process of Kbuild always occurs under the output tree.
When "O=dir/to/store/output/files" is given, the build system
changes the current working directory to that directory and
restarts the make.

Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>"
syntax for descending into sub-directories.
(We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
This means the current working directory is always the top
of the output directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-19 11:07:50 -05:00
Wolfgang Denk 93e1459641 Coding Style cleanup: replace leading SPACEs by TABs
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Drop changes for PEP 4 following python tools]
Signed-off-by: Tom Rini <trini@ti.com>
2013-10-14 16:06:54 -04:00
Simon Glass e3ff797cdb cbfs: Add docbook template
This adds a docbook template for fs, and makes CBFS use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 13:56:39 -07:00
Marek Vasut 47444a27d2 kerneldoc: tmpl: Implement template for LG-arrays
Implement kerneldoc template for linker-generated arrays. This is
the first template in U-Boot that is used to generate kerneldoc
style documentation. This template is very basic.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-22 08:29:55 -07:00
Marek Vasut eb1f09e007 kerneldoc: stdio: tmpl: Add stdio template
Add STDIO documentation template.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
[trini: Fix DOCBOOKS line as we don't have linker_lists yet]
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-17 07:58:44 -07:00
Marek Vasut 8d5d89e21d kerneldoc: Add nicer CSS stylesheet for HTML docs
Import basic CSS stylesheet for the HTML documentation. The base for
the stylesheet is taken from:

	http://ds9a.nl/docbook/minimal-page.html

I customized the CSS a bit further, for example to add curvy corners
to example section and change the tint of gray. The HTML documentation
does not look that crude anymore.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:15 -07:00
Marek Vasut 30ff89189b kerneldoc: Implant DocBook from Linux kernel
Pull slightly modified version of Documentation/DocBook, the related perl
script scripts/kernel-doc and the scripts/docproc.c from Linux kernel and
implant it into U-Boot. This will allow smooth generation of kerneldoc
style documentation.

It was necessary to modify the DocBook/Makefile to work with U-Boot build
system. The changes were only minor though and involved replacing the kbuild
specific parts.

It was also necessary to replace use of variables like KERNEL_VERSION with
U_BOOT_VERSION, strings like Linux kernel with U-Boot Bootloader etc. so
the generated result actually matches.

Finally, it was necessary to adjust docproc.c, since the documentation in
U-Boot is located in doc/DocBook instead of Documentation/DocBook as is in
case of the Linux kernel.

Some parts of the DocBook Makefile are unused, but to allow easier sync with
Linux kernel, these parts are still left in. The targets enabled now are
"htmldocs" "pdfdocs" "psdocs" "xmldocs" and "cleandocs" to remove the results
of documentation build.

Linux scripts/docproc.c:
commit f0f3ca8d967462dafb815412b14ca3339b9817a6
Date:   Wed Jun 15 11:53:13 2011 +0200

Linux scripts/kernel-doc:
commit 1b40c1944db445c1de1c47ffd8cd426167f488e8
Date:   Sun Aug 12 10:46:15 2012 +0200

Linux Documentation/DocBook:
commit bb8187d35f820671d6dd76700d77a6b55f95e2c5
Date:   Thu May 17 19:06:13 2012 -0400

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:14 -07:00