linux/scripts
James Hogan 55fe6da9ef kbuild: Handle builtin dtb file names containing hyphens
cmd_dt_S_dtb constructs the assembly source to incorporate a devicetree
FDT (that is, the .dtb file) as binary data in the kernel image. This
assembly source contains labels before and after the binary data. The
label names incorporate the file name of the corresponding .dtb file.
Hyphens are not legal characters in labels, so .dtb files built into the
kernel with hyphens in the file name result in errors like the
following:

bcm3368-netgear-cvg834g.dtb.S: Assembler messages:
bcm3368-netgear-cvg834g.dtb.S:5: Error: : no such section
bcm3368-netgear-cvg834g.dtb.S:5: Error: junk at end of line, first unrecognized character is `-'
bcm3368-netgear-cvg834g.dtb.S:6: Error: unrecognized opcode `__dtb_bcm3368-netgear-cvg834g_begin:'
bcm3368-netgear-cvg834g.dtb.S:8: Error: unrecognized opcode `__dtb_bcm3368-netgear-cvg834g_end:'
bcm3368-netgear-cvg834g.dtb.S:9: Error: : no such section
bcm3368-netgear-cvg834g.dtb.S:9: Error: junk at end of line, first unrecognized character is `-'

Fix this by updating cmd_dt_S_dtb to transform all hyphens from the file
name to underscores when constructing the labels.

As of v4.16-rc2, 1139 .dts files across ARM64, ARM, MIPS and PowerPC
contain hyphens in their names, but the issue only currently manifests
on Broadcom MIPS platforms, as that is the only place where such files
are built into the kernel. For example when CONFIG_DT_NETGEAR_CVG834G=y,
or on BMIPS kernels when the dtbs target is used (in the latter case it
admittedly shouldn't really build all the dtb.o files, but thats a
separate issue).

Fixes: 695835511f ("MIPS: BMIPS: rename bcm96358nb4ser to bcm6358-neufbox4-sercom")
Signed-off-by: James Hogan <jhogan@kernel.org>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: <stable@vger.kernel.org> # 4.9+
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-03-09 01:14:38 +09:00
..
basic fixdep: do not ignore kconfig.h 2018-03-05 23:48:29 +09:00
coccinelle Coccinelle: memdup: Fix typo in warning messages 2018-03-03 00:41:24 +09:00
dtc
gcc-plugins gcc-plugins: Use dynamic initializers 2018-02-05 17:27:46 -08:00
gdb scripts/gdb/linux/tasks.py: fix get_thread_info 2018-01-19 10:09:41 -08:00
genksyms genksyms: drop *.hash.c from .gitignore 2018-01-13 21:50:13 +09:00
kconfig kconfig: fix line number in recursive inclusion error message 2018-03-03 00:44:47 +09:00
ksymoops
mod Modules updates for v4.16 2018-02-07 14:29:34 -08:00
package kbuild: pkg: make out-of-tree rpm/deb-pkg build immediately fail 2017-12-13 00:07:00 +09:00
selinux Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
tracing
.gitignore
Kbuild.include
Lindent
Makefile
Makefile.asm-generic Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.build objtool, retpolines: Integrate objtool with retpoline support more closely 2018-02-21 16:54:32 +01:00
Makefile.clean
Makefile.dtbinst
Makefile.extrawarn Kbuild: suppress packed-not-aligned warning for default setting only 2018-01-18 09:37:53 +09:00
Makefile.gcc-plugins
Makefile.headersinst Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.host Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.kasan kasan: rework Kconfig settings 2018-02-06 18:32:47 -08:00
Makefile.kcov Makefile: support flag -fsanitizer-coverage=trace-cmp 2017-11-17 16:10:04 -08:00
Makefile.lib kbuild: Handle builtin dtb file names containing hyphens 2018-03-09 01:14:38 +09:00
Makefile.modbuiltin
Makefile.modinst
Makefile.modpost Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.modsign
Makefile.ubsan lib/ubsan: remove returns-nonnull-attribute checks 2018-02-06 18:32:46 -08:00
adjust_autoksyms.sh
asn1_compiler.c
bloat-o-meter scripts/bloat-o-meter: fix typos in help 2018-03-09 01:12:31 +09:00
bootgraph.pl
check_00index.sh
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl checkpatch: improve OPEN_BRACE test 2018-02-06 18:32:45 -08:00
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck Coccinelle: coccicheck: fix typo 2018-02-02 00:21:47 +09:00
config
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
decodecode scripts/decodecode: make it take multiline Code line 2018-01-31 17:18:34 -08:00
depmod.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line scripts/faddr2line: fix CROSS_COMPILE unset error 2017-12-14 16:00:48 -08:00
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh
get_dvb_firmware
get_maintainer.pl get_maintainer: add more --self-test options 2017-11-17 16:10:01 -08:00
gfp-translate
headerdep.pl
headers.sh
headers_check.pl
headers_install.sh
insert-sys-cert.c
kallsyms.c kbuild/kallsyms: trivial typo fix 2018-03-02 09:20:56 +09:00
kernel-doc scripts: kernel_doc: better handle show warnings logic 2018-01-01 12:49:07 -07:00
ld-version.sh
leaking_addresses.pl
link-vmlinux.sh kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment 2018-03-02 09:20:56 +09:00
makelst
markup_oops.pl
mkcompile_h Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
namespace.pl
objdiff
parse-maintainers.pl parse-maintainers: add ability to specify filenames 2017-11-17 16:10:01 -08:00
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file.c
sortextable.c
sortextable.h
spelling.txt spelling.txt: add "unnecessary" typo variants 2017-11-17 16:10:00 -08:00
sphinx-pre-install
stackdelta
stackusage
tags.sh scripts/tags.sh: change find_other_sources() for include directories 2018-01-31 17:18:34 -08:00
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh