Commit Graph

57 Commits

Author SHA1 Message Date
Brandon Maier
15501457f3 package/dtc: update to dtc 1.7.2
Release notes: https://github.com/dgibson/dtc/releases/tag/v1.7.2

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2024-11-09 16:29:09 +01:00
Brandon Maier
d7b03301fe package/dtc: update to dtc 1.7.1
Release notes: https://lore.kernel.org/linux-devicetree/ZsBvsq5pVv9xEPmp@zatzit/

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-10-06 15:53:33 +02:00
Yann E. MORIN
c19cca0452 package: switch to _CPE_ID_VALID
Now that we document _CPE_ID_VALID, and that it shall be used instead of
setting a default value to one of the other _CPE_ID_* variables, change
all of the existing packages to use it, to avoid any error when we later
extend check-package to validate the sanity ofthe _CPE_ID_* variables.

Mechanical change done within the reference container, running the new
check in check-package, to report the CPE_ID errors:

    $ make check-package 2>/dev/null \
    |awk '{
            split($(1), a, ":"); fname = a[1]
            split($(2), a, "'\''"); val = a[2]
            new_var = $(8); gsub("_CPE_ID_.*", "_CPE_ID_VALID", new_var)
            printf("%s %s %s %s\n", fname, $(8), val, new_var)
    }' \
    |while read fname var val new_var; do
        sed -r -i -e "s/${var}[[:space:]]*=[[:space:]]*${val}/${new_var} = YES/" "${fname}"
    done

    $ git diff -I'CPE_ID_(VENDOR|VALID)'
    [empty]

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 16:30:06 +01:00
Fabrice Fontaine
a7879e349c package/dtc: bump to version 1.7.0
https://github.com/dgibson/dtc/releases/tag/v1.7.0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-11-03 10:26:11 +01:00
Fabrice Fontaine
e7c8da37fe package/dtc: bump to version 1.6.1
This will fix a build failure with gcc 11

https://github.com/dgibson/dtc/releases/tag/v1.6.1

Fixes:
 - http://autobuild.buildroot.org/results/59305de179a5bde415cfd42d75e005b36b7ec4f6

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-08-01 00:02:50 +02:00
Fabrice Fontaine
70d5a08dbe package/dtc: add DTC_CPE_ID_VENDOR
cpe:2.3🅰️dtc_project:dtc is a valid CPE identifier for this package:

  https://nvd.nist.gov/products/cpe/search/results?namingFormat=2.3&keyword=cpe%3A2.3%3Aa%3Adtc_project%3Adtc

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-20 20:58:22 +01:00
Julien Olivain
198db470a7 package/dtc: bump version to 1.6.0
When host compiler is gcc 10 (for example on Fedora 32), dtc 1.5.1
fail to build with the error:
/usr/bin/ld: dtc-parser.tab.o:(.bss+0x20): multiple definition of `yylloc'; dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

dtc 1.6.0 fixes this issue in the commit:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=0e9225eb0dfec51def612b928d2f1836b092bc7e

Also adopt new spacing convention in .hash files (two spaces).

Signed-off-by: Julien Olivain <juju@cotds.org>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-04-19 22:48:58 +02:00
Peter Korsgaard
7b24bd59c8 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-12-02 09:39:41 +01:00
Fabrice Fontaine
c4e0ce24ba package/dtc: fix license hashes
Update hash of license files and add BSD-2-Clause file, see
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=25bb080c18d1a8a96760e26257bf8c80ec7fcab4
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=702c1b6c0e73d2bcf24f0b8398aca6a940863e48

Fixes:
 - http://autobuild.buildroot.org/results/d3db8ddc096f09bb1728a0ba40b925fbf49c424b
 - http://autobuild.buildroot.org/results/799bddc1467413b1f202a8803e902c797f4f9c92

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit ae0dabd862)
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2019-11-17 10:19:02 +01:00
Sam Bobroff
870fc9be27 package/dtc: bump version to 1.5.1
Updated patch 1 to handle changed context.
Removed patch 2 which is now upstream.

The update allows QEMU's configure script to successfully detect libfdt.

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-15 21:56:30 +01:00
Carlos Santos
e381d823f6 package/dtc: install host libfdt headers in a subdirectory
Installing the libfdt headers at $(HOST_DIR)/include interferes with the
build of the kernel, as in beaglebone:

2019-11-01T22:23:16 /usr/bin/make -f ./scripts/Makefile.build obj=scripts
2019-11-01T22:23:16 /usr/bin/make -f ./scripts/Makefile.build obj=scripts/dtc need-builtin=
2019-11-01T22:23:16 (cat /dev/null; ) > scripts/dtc/modules.order
2019-11-01T22:23:16 /usr/bin/gcc -O2 -I/work/beaglebone/host/include -L/work/beaglebone/host/lib -Wl,-rpath,/work/beaglebone/host/lib -Wp,-MD,scripts/dtc/libfdt/.fdt_ro.o.d -Wall -Wmissing-prototypes -Wstrict-p>
2019-11-01T22:23:16 scripts/dtc/libfdt/fdt_ro.c:92:10: error: redefinition of ‘fdt_get_max_phandle’
2019-11-01T22:23:16 uint32_t fdt_get_max_phandle(const void *fdt)
2019-11-01T22:23:16 ^~~~~~~~~~~~~~~~~~~
2019-11-01T22:23:16 In file included from scripts/dtc/libfdt/fdt_ro.c:54:
2019-11-01T22:23:16 /work/beaglebone/host/include/libfdt.h:384:24: note: previous definition of ‘fdt_get_max_phandle’ was here
2019-11-01T22:23:16 static inline uint32_t fdt_get_max_phandle(const void *fdt)
2019-11-01T22:23:16 ^~~~~~~~~~~~~~~~~~~
2019-11-01T22:23:16 make[4]: *** [scripts/Makefile.host:107: scripts/dtc/libfdt/fdt_ro.o] Error 1
2019-11-01T22:23:16 make[3]: *** [scripts/Makefile.build:544: scripts/dtc] Error 2
2019-11-01T22:23:16 make[2]: *** [Makefile:1066: scripts] Error 2
2019-11-01T22:23:16 make[1]: *** [package/pkg-generic.mk:241: /work/beaglebone/build/linux-4dae378bbe721277b08699d1d88ffae12acc9b09/.stamp_built] Error 2

We cannot simply disable dtc support and patching the kernel makefiles
is risky and error-prone, so let's just install the host-dtc headers at
$(HOST_DIR)/include/libfdt to circumvent the problem.

Packages that depend on those headers (e.g. host-qemu) must be updated
to user the correct path but this is small change.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-15 21:54:55 +01:00
Yann E. MORIN
78b77a5c4a package/dtc: needs host-pkgconf unconditionally
Commits 495e757d2 (package/dtc: add optional libyaml dependency) and
e43d9072a (package/dtc: fix build without libyaml), added a conditional
dependency to host-pkgconf, when libyaml is enabled, while commit
56d6dd453 (package/dtc: disable valgrind) explicitly disabled support of
valgrind.

However, presence of libyaml, as well as that of valgrind, *is* detected
by calling pkg-config:

    NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
    NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?)

Passing NO_YAML=1 or NO_VALGRIND=1 do not prevent the tests from being
executed, which would yield messages like:

    /bin/sh: 1: /home/ymorin/dev/buildroot/O/host/bin/pkg-config: not found

(note however that, even if the test is executed, the value we pass on
the command line still takes precedence, and the support for either is
properly disabled.)

So, move the dependency on host-pkgconfig out of the condition. Ditto
for the host package.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Titouan Christophe <titouan.christophe@railnova.eu>
Cc: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-08 21:57:58 +01:00
Peter Korsgaard
b78eecb2c2 Revert "package/dtc: bump to v1.5.1"
This reverts commit 1e55b66e97.

This bump breaks the build of a number of defconfigs with errors like:

HOSTCC  scripts/dtc/libfdt/fdt_ro.o
scripts/dtc/libfdt/fdt_ro.c:92:10: error: redefinition of ‘fdt_get_max_phandle’
uint32_t fdt_get_max_phandle(const void *fdt)
^~~~~~~~~~~~~~~~~~~
In file included from scripts/dtc/libfdt/fdt_ro.c:54:
/work/beaglebone/host/include/libfdt.h:384:24: note: previous definition of ‘fdt_get_max_phandle’ was here

So revert it for 2019.11.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-11-05 22:15:49 +01:00
Peter Korsgaard
607369d081 Revert "package/dtc: fix license hashes"
This reverts commit ae0dabd862.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-11-05 22:15:29 +01:00
Yann E. MORIN
f295ad4cb0 package/*: do not override LICENSE, but append to it
Now that the infra takes care of removing extraneous spaces before
commas, we can safely append to LICENSE variables.

This removes the only case where we had to use immediate assignment
to append to a variable.

Mechanical change, with:

    $ sed -r -i -e 's/\<([^[:space:]]+_LICENSE) := \$\(\1\),/\1 += ,/' \
        $(git grep -l -E '\<([^[:space:]]+_LICENSE) := \$\(\1\),')

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-27 10:35:06 +01:00
Fabrice Fontaine
ae0dabd862 package/dtc: fix license hashes
Update hash of license files and add BSD-2-Clause file, see
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=25bb080c18d1a8a96760e26257bf8c80ec7fcab4
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=702c1b6c0e73d2bcf24f0b8398aca6a940863e48

Fixes:
 - http://autobuild.buildroot.org/results/d3db8ddc096f09bb1728a0ba40b925fbf49c424b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-10-26 20:52:26 +02:00
Titouan Christophe
1e55b66e97 package/dtc: bump to v1.5.1
Remove 0002-Makefile-Add-EXTRA_CFLAGS-variable.patch which is now
applied upstream

Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-10-26 15:37:53 +02:00
Fabrice Fontaine
e43d9072aa package/dtc: fix build without libyaml
- Pass NO_YAML=1 to make when libyaml is disabled
- Move BR2_PACKAGE_LIBYAML block outside
  BR2_PACKAGE_DTC_PROGRAMS block to avoid duplicating NO_YAML=1 even if
  libyaml is only used / needed with dtc program

Fixes:
 - http://autobuild.buildroot.org/results/68a1ba8d615951931567bc8a409c1d16624c902b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-08-13 21:39:00 +02:00
Fabrice Fontaine
56d6dd4530 package/dtc: disable valgrind
Since version 1.5.0, dtc optionally depends on valgrind so disable it by
setting NO_VALGRIND to 1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-01 10:54:37 +02:00
Fabrice Fontaine
495e757d20 package/dtc: add optional libyaml dependency
Since bump to version 1.5.0 with commit
b2f4dc7bc1, dtc binary optionally depends
on libyaml which is enabled if it is found by pkgconfig so:
 - add host-pkgconf and libyaml dependencies only if
   BR2_PACKAGE_DTC_PROGRAMS and BR2_PACKAGE_LIBYAML are set
 - disable yaml for host build (and so remove host-pkgconf from
   HOST_DTC_DEPENDENCIES)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-01 10:51:38 +02:00
Fabrice Fontaine
8f5f431463 package/dtc: add hash for license files
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-07-30 17:27:22 +02:00
Joel Stanley
b2f4dc7bc1 package/dtc: bump to version v1.5.0
Upstream now optionally supports a yaml output format, and support is
detected through pkg-config. It has not been added as a dependency but
could in the future if someone asks for it.

Patches applied upstream:

  - Kill bogus TYPE_BLOB marker type
  - checks: fix simple-bus compatible matching

New patch:

 - Makefile: Add EXTRA_CFLAGS variable

The new patch is required to correctly add buildroot's cflags. The
existing packaging was overwriting those set by the package's makefile,
which was breaking the yaml detection.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-07-29 09:14:32 +02:00
Thomas De Schampheleire
4c24006b0e package/dtc: additional fix of include guards for older u-boot
With recent dtc but old u-boot, compilation issues occur related to libfdt.
These problems really are u-boot issue since it does not properly set
include paths so that its own headers are included. Nevertheless, since the
u-boot version is typically decided by users and stuck at some version
provided by a SoC or board vendor, it is not feasible to fix those old
versions.

Instead, already several fixes were made in the past, in Buildroot.
See commits:

c7ffd8a75d "package/dtc: fix include guards for older kernel/u-boot"
f437bf547c "uboot: fix build for older uboot source trees"
bf73334232 "uboot: fix build when libfdt-devel is installed system-wide"
0bf80e4bcd "uboot: ensure host includes are searched before system default
                includes"
b15a7a62d3 "uboot: revert "uboot: use local libfdt.h""
baae5156ce "uboot: use local fdt headers"
3a6573ccee "uboot: use local libfdt.h"

Commit c7ffd8a75d fixes the problem caused by
dtc having changed their include guards from _FOO_H to FOO_H (leading
underscore removed). Old u-boot would still use _FOO_H, which (combined with
host-dtc headers that use FOO_H) would cause the inclusion of two different
copies of the same nominal include file, e.g. libfdt.h or libfdt_env.h,
causing 'error: redefinition of xxx' compilation issues.
The fix sets the 'new' include guard when the 'old' one is detected,
preventing a second inclusion of the same nominal file.

For some u-boot versions, however, this change not only needs to be made in
libfdt.h and libfdt_env.h, but also in 'fdt.h'.

Update the dtc patch to do just that.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-02-21 23:50:59 +01:00
Thomas Petazzoni
ea7c5aad0f package/dtc: backport upstream fix solving Assertion Error with some .dts files
The build of U-Boot on Microchip (formerly Atmel) platforms currently
fails to build with an Assertion Error in dtc. This happens since we
bumped dtc from 1.4.4 to 1.4.7, as a regression was introduced in dtc
1.4.6, and fixed post-1.4.7. This commit backports the upstream commit
to resolve this Assertion Error.

The build error was:

dtc: livetree.c:438: propval_cell: Assertion `prop->val.len == sizeof(cell_t)' failed.
dtc: livetree.c:438: propval_cell: Assertion `prop->val.len == sizeof(cell_t)' failed.
Aborted (core dumped)

Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/124434438
  (and numerous other similar build failures)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-11-26 17:26:13 +01:00
Thomas Petazzoni
f2922d9765 package/dtc: renumber patches correctly
When c7ffd8a75d ("package/dtc: fix
include guards for older kernel/u-boot") introduced a new patch to the
dtc package, it used the 0001 number, which was already used by
another patch. Let's fix that.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-11-26 17:26:02 +01:00
Lothar Felten
c7ffd8a75d package/dtc: fix include guards for older kernel/u-boot
U-Boot has a copy of dtc in-tree. However, it has a bug in its build
system which could result in both one of the in-tree dtc include files
and the same host-installed include file to be #included.

Normally, that wouldn't be a problem, because (a) the two include files
are compatible, so it doesn't matter which one you include, and (b) the
include guards are the same in both, so only one of them really does
get included. However, upstream dtc has changed the include guards,
removing the leading underscore. Therefore, now the header file does
get included twice, which leads to multiple definitions like:

/builds/buildroot.org/buildroot/output/host/include/libfdt.h:1790:19: error: redefinition of 'fdt_appendprop_cell'
 static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
                   ^~~~~~~~~~~~~~~~~~~
In file included from tools/fdt_host.h:11:0,
                 from tools/imagetool.h:24,
                 from tools/atmelimage.c:8:
tools/../include/libfdt.h:1656:19: note: previous definition of 'fdt_appendprop_cell' was here
 static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
                   ^~~~~~~~~~~~~~~~~~~

To fix this, patch (host) dtc to accept the old include guard as well,
which restores the old behaviour. This patch is probably not
upstreamable, since it's really a hack to work around an issue in
U-Boot.  Note that it has been fixed upstream, but Buildroot supports
building older versions of U-Boot as well.

Note that the problem may still occur if you have libdtc-dev installed
on the host. However, now there is a simple workaround: enable
BR2_TARGET_UBOOT_NEEDS_DTC.

Note that a similar problem also occurs with the beaglebone fork of the
kernel. It's not clear if it has been fixed there.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
[Arnout: rewrite commit message, rewrap patch commit message]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2018-10-20 12:35:03 +01:00
Joel Stanley
3729389a68 dtc: Fix segfault reading powernv device tree
When running this command on a powernv machine, dtc crashes:

 dtc -f -I fs -O dts /sys/firmware/devicetree

Upstream has fixed the segfault but have not made a release yet so we
add the patch for now.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-18 21:22:18 +02:00
Thomas Petazzoni
b50c95e914 dtc: do not build/install python support
The pylibfdt in dtc is new since 1.4.5, and therefore built since the
bump from 1.4.4 to 1.4.7 in commit
7b929ddcf0. Unfortunately, this Python
support causes a number of build failures, be it for host-dtc or dtc.

Since this Python support is not used/needed by anything in Buildroot
at this point, let's simply disable it by passing NO_PYTHON=1. While
doing this, introduce DTC_MAKE_OPTS and HOST_DTC_MAKE_OPTS to avoid
duplicating the variables several times.

Fixes:

  http://autobuild.buildroot.net/results/1ad41fd4890af0c97ee4ff2994ea5431b8953ef8/ (host-dtc)
  http://autobuild.buildroot.net/results/0aefc3aa03a93b1fdf76f2d8946b6f423405382f/ (dtc)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-28 15:33:51 +02:00
Geoff Levand
7b929ddcf0 dtc: bump version to 1.4.7
Bump from 1.4.4 to 1.4.7.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-25 18:15:57 +02:00
Guo Ren
b8c3e94173 package/dtc: qemu system build need libfdt
The "install-bin" target just installs dtc's programs to host/bin
without libfdt, but building qemu system requires libfdt.

see: https://gitlab.com/c-sky/buildroot/-/jobs/38654503

So we need to install libfdt to satisfy the requirements of qemu.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-11-02 22:13:54 +01:00
Arnout Vandecappelle
15bff58f3e generic packages: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix
Remove the redundant usr/ component of the HOST_DIR paths. Since a
previous commit added a symlink from $(HOST_DIR)/usr to $(HOST_DIR),
everything keeps on working.

This is a mechanical change with
git grep -l '\$(HOST_DIR)/usr' | xargs sed -i 's%\(prefix\|PREFIX\)=\("\?\)\$(HOST_DIR)/usr%\1=\2$(HOST_DIR)%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:02 +02:00
Adam Duskett
67f4794de1 package/d*/Config.in: fix help text wrapping
The check-package script when ran gives warnings on text wrapping
on all of these Config files.  This patch cleans up all warnings
related to the text wrapping for the Config files starting with
the letter d in the package directory.

The appropriate indentation is: <tab><2 spaces><62 chars>
See http://nightly.buildroot.org/#writing-rules-config-in for more
information.

Signed-off-by: Adam Duskett <aduskett@codeblue.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-05-11 23:29:21 +02:00
Peter Korsgaard
40a5d25378 dtc: bump version to 1.4.4
Adds overlay support.

Drop the non-upstreamed 0002-extra-cflags.patch and instead simply pass the
needed CFLAGS as make arguments.  Passing the full upstream warning flags
are not important in the Buildroot context, so this is simpler than
maintaining a patch.

Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-05-03 17:18:59 +02:00
Rahul Bedarkar
96e9480fbc boot, package: use SPDX short identifier for BSD-2c
We want to use SPDX identifier for license string as much as possible.
SPDX short identifier for BSD-2c is BSD-2-Clause.

This change is done using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/BSD-2c/BSD-2-Clause/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:27:05 +02:00
Rahul Bedarkar
af31c309e7 boot, linux, package: use SPDX short identifier for GPLv2/GPLv2+
We want to use SPDX identifier for license strings as much as possible.
SPDX short identifier for GPLv2/GPLv2+ is GPL-2.0/GPL-2.0+.

This change is done by using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv2\>/GPL-2.0/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:16:38 +02:00
Gustavo Zacarias
868a9b8e5f dtc: use $(TARGET_CONFIGURE_OPTS) when calling $(MAKE)
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-29 15:54:21 +02:00
Gustavo Zacarias
6fa39e2162 dtc: use $(HOST_CONFIGURE_OPTS) when calling $(MAKE)
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-22 15:19:24 +02:00
Rahul Bedarkar
af2658da20 dtc: update legal info
library libdtc is dual licensed under BSD-2c or GPLv2+ and dtc programs
are licensed under GPLv2+.

This patch annotates licenses with components and uses correct format to
specify dual licensing that is separating licenses with 'or' keyword
instead of '/'.

Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-19 23:28:19 +02:00
Thomas Petazzoni
8a69fa7779 Revert "dtc: install libfdt library and headers for host variant"
This reverts commit 5ca9b7cf66. Installing
dtc headers in $(HOST_DIR) causes some build failures of
host-uboot-tools due to a conflicting libfdt.h header.

The possible solution to solve this problem, based on -isystem, has been
reverted has it was causing too many issues that we didn't want to solve
so close to cutting 2016.08-rc1.

Since the headers of libfdt for the host are currently not needed for
any package in the Buildroot tree, it is easier and safer to just revert
this patch.

Fixes:

  http://autobuild.buildroot.net/results/9fba77f4080bf6bc26e341f3f383cdba26c0e14f/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-04 18:19:18 +02:00
David Raeman
5ca9b7cf66 dtc: install libfdt library and headers for host variant
The dtc package currently does not install libfdt for the host install.
It can be useful to have libfdt on the host, such as for building QEMU
with the --enable-fdt configure switch.

Signed-off-by: David Raeman <draeman@bbn.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-26 00:01:14 +02:00
Julien Floret
f56c62be67 dtc: add explicit dependencies for host variant
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-03 08:40:55 +02:00
Peter Seiderer
5774f07d43 dtc: add host build
Having a host variant of dtc is needed for example for U-Boot, which
uses the Device Tree for a number of platforms.

In addition, now that we have a proper host-dtc package, it is no
longer needed for the linux package to install the host dtc compiler:
users interested in having the host dtc compiler can simply enable
this package.

A Config.in.host option is added to build host-dtc, because the
initial reason why the host DTC built by the kernel was installed in
$(HOST_DIR)/usr/bin (commit 707d44d0a2
from Thomas DS) was:

    Having dtc as a host tool can be useful for users that have a
    custom boot scenario where the device tree is not embedded in the
    kernel.

[Thomas:
  - rework the commit log.]
[Peter: keep the (renamed) linux version]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 20:17:35 +02:00
Baruch Siach
2fc87f5bc6 dtc: install libfdt headers to staging
The newly introduced install-lib target that we use since commit 8b500c1b63
(dtc: bump version to 1.4.1) does not install headers. Add install-includes to
DTC_INSTALL_STAGING_CMDS to make dependent packages like kexec-lite build.

Fixes:
http://autobuild.buildroot.net/results/515/515d32e45957e911fda6345f909fa9200df311ff/
http://autobuild.buildroot.net/results/b09/b09f15c7b59e972d2180d071804810315d2ee047/
http://autobuild.buildroot.net/results/023/02376cd3dccc98d10a58e5398b9f8db75239f263/
...

Cc: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-16 22:36:09 +01:00
Peter Seiderer
6723a73e4b dtc: add hash
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-14 20:45:46 +01:00
Peter Seiderer
8b500c1b63 dtc: bump version to 1.4.1
Patch 0001-separate-lib-install.patch is no longer needed,
original Makefile already contains separate install-lib target
(but build always complete default target).

Remove superfluous CFLAGS setting.

Adjust 0002-extra-cflags.patch.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-14 20:41:20 +01:00
Peter Seiderer
304755acf5 dtc: rename patches to new convention
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-14 20:40:39 +01:00
Peter Seiderer
12c3bc1f23 dtc: fix project and download url
This fix the error:

fatal: unable to connect to git.jdl.com:
git.jdl.com[0: 208.123.73.151]: errno=Connection refused

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-14 20:40:25 +01:00
Thomas Petazzoni
665e13c85e Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.

As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.

This also helps preparing the addition of other options to select
shared, shared+static or just static.

Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-12-11 22:48:13 +01:00
Thomas De Schampheleire
f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Baruch Siach
913cf72c80 dtc: don't treat warnings as errors
Fixes:
http://autobuild.buildroot.net/results/c1e/c1e0764f27e6c842a2a324b7b2dc5052ff10f13b/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-04-28 14:09:20 +02:00