File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Fixup inclusion of libfdt headers, which can fail in older u-boot versions
4+ # when libfdt-devel is installed system-wide.
5+ # The core change is equivalent to upstream commit
6+ # e0d20dc1521e74b82dbd69be53a048847798a90a (first in v2018.03). However, the fixup
7+ # is complicated by the fact that the underlying u-boot code changed multiple
8+ # times in history:
9+ # - The directory scripts/dtc/libfdt only exists since upstream commit
10+ # c0e032e0090d6541549b19cc47e06ccd1f302893 (first in v2017.11). For earlier
11+ # versions, create a dummy scripts/dtc/libfdt directory with symlinks for the
12+ # fdt-related files. This allows to use the same -I<path> option for both
13+ # cases.
14+ # - The variable 'srctree' used to be called 'SRCTREE' before upstream commit
15+ # 01286329b27b27eaeda045b469d41b1d9fce545a (first in v2014.04).
16+ # - The original location for libfdt, 'lib/libfdt/', used to be simply
17+ # 'libfdt' before upstream commit 0de71d507157c4bd4fddcd3a419140d2b986eed2
18+ # (first in v2010.06). Make the 'lib' part optional in the substitution to
19+ # handle this.
20+
21+ if [ ! -d scripts/dtc/libfdt ]; then
22+ mkdir -p scripts/dtc/libfdt
23+ cd scripts/dtc/libfdt
24+ ln -s ../../../include/fdt.h .
25+ ln -s ../../../include/libfdt* .h .
26+ ln -s ../../../lib/libfdt/libfdt_internal.h .
27+ fi
28+ sed -i -e ' s%-I\ *\$(srctree)/lib/libfdt%-I$(srctree)/scripts/dtc/libfdt%; s%-I\ *\$(SRCTREE)\(/lib\)\?/libfdt%-I$(SRCTREE)/scripts/dtc/libfdt%' tools/Makefile
You can’t perform that action at this time.
0 commit comments