misc: Add more -I$(objtree)/$(obj) lines
Subsystems (11)
PATCH 1/7 misc: Add more -I$(objtree)/$(obj) lines
We have a few more places where we depend at build time on generated files being found within the compiler search path. Add appropriate -I lines in these places.
--- cmd/Makefile | 2 ++ lib/Makefile | 1 + lib/crypto/Makefile | 4 ++++ 3 files changed, 7 insertions(+)
cmd/Makefile +2 -0
@@ -228,3 +228,5 @@ $(obj)/license_data_size.h: $(srctree)/Licenses/gpl-2.0.txt FORCE $(call filechk,data_size) CFLAGS_ethsw.o := -Wno-enum-conversion +CFLAGS_config.o += -I$(objtree)/$(obj) +CFLAGS_license.o += -I$(objtree)/$(obj)
lib/Makefile +1 -0
@@ -127,6 +127,7 @@ obj-y += date.o # Build a fast OID lookup registry from include/linux/oid_registry.h # obj-$(CONFIG_OID_REGISTRY) += oid_registry.o +CFLAGS_oid_registry.o += -I$(objtree)/$(obj) $(obj)/oid_registry.o: $(obj)/oid_registry_data.c
lib/crypto/Makefile +4 -0
@@ -47,3 +47,7 @@ pkcs7_message-y := \ $(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h + +CFLAGS_rsa_helper.o += -I$(objtree)/$(obj) +CFLAGS_pkcs7_parser.o += -I$(objtree)/$(obj) +CFLAGS_x509_cert_parser.o += -I$(objtree)/$(obj)
Signature · 1 line
2.17.1
PATCH 2/7 mx31pdk: Move CONFIG_SPL_LDSCRIPT to defconfig
As there is only one mx31pdk config file and with upcoming updates to the Kconfig parsing logic, rather than have an entry in board/freescale/mx31pdk/Kconfig, move this single setting to the defconfig file.
--- board/freescale/mx31pdk/Kconfig | 3 --- configs/mx31pdk_defconfig | 1 + 2 files changed, 1 insertion(+), 3 deletions(-)
board/freescale/mx31pdk/Kconfig +0 -3
@@ -1,8 +1,5 @@ if TARGET_MX31PDK -config SPL_LDSCRIPT - default "arch/$(ARCH)/cpu/u-boot-spl.lds" - config SYS_BOARD default "mx31pdk"
configs/mx31pdk_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y # CONFIG_SPL_USE_ARCH_MEMCPY is not set # CONFIG_SPL_USE_ARCH_MEMSET is not set CONFIG_ARCH_MX31=y +CONFIG_SPL_LDSCRIPT="arch/arm/cpu/u-boot-spl.lds" CONFIG_SYS_TEXT_BASE=0x87e00000 CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_TARGET_MX31PDK=y
Signature · 1 line
2.17.1
PATCH 2/7 mx31pdk: Move CONFIG_SPL_LDSCRIPT to defconfig
Quoted 9 lines · Tom Rini
As there is only one mx31pdk config file and with upcoming updates to the
Kconfigparsing logic, rather than have an entry in board/freescale/mx31pdk/Kconfig, move this single setting to the defconfig file.Cc Magnus Lilja <[email protected]>Signed-off-by Tom Rini <[email protected]>---
/Magnus
Quoted 34 lines
board/freescale/mx31pdk/Kconfig | 3 --- configs/mx31pdk_defconfig | 1 + 2 files changed, 1 insertion(+), 3 deletions(-)board/freescale/mx31pdk/Kconfig +0
-3@@ -1,8 +1,5 @@ if TARGET_MX31PDK -config SPL_LDSCRIPT - default "arch/$(ARCH)/cpu/u-boot-spl.lds" - config SYS_BOARD default "mx31pdk"configs/mx31pdk_defconfig +1
-1@@ -2,6 +2,7 @@ CONFIG_ARM=y # CONFIG_SPL_USE_ARCH_MEMCPY is not set # CONFIG_SPL_USE_ARCH_MEMSET is not set CONFIG_ARCH_MX31=y +CONFIG_SPL_LDSCRIPT="arch/arm/cpu/u-boot-spl.lds" CONFIG_SYS_TEXT_BASE=0x87e00000 CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_TARGET_MX31PDK=y --2.17.1
PATCH 2/7 mx31pdk: Move CONFIG_SPL_LDSCRIPT to defconfig
In reply to Tom RiniQuoted 8 lines · Tom Rini
As there is only one mx31pdk config file and with upcoming updates to the
Kconfigparsing logic, rather than have an entry in board/freescale/mx31pdk/Kconfig, move this single setting to the defconfig file.Cc Magnus Lilja <[email protected]>Signed-off-by Tom Rini <[email protected]>Reviewed-by Magnus Lilja <[email protected]>
Applied to u-boot/next, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200317/c081f8e5/attachment.sig>
PATCH 3/7 Kconfig: Escape variables to make in default strings
In reply to Tom RiniWe have some variables that need to include a variable to pass to make to evaluate later, typically ARCH and BOARDDIR, to find a file to use. The way we're doing this today isn't correct but works. With an update to Kconfig we will need to escape these properly, so do so.
--- arch/arm/mach-davinci/Kconfig | 2 +- arch/arm/mach-orion5x/Kconfig | 2 +- common/spl/Kconfig | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-davinci/Kconfig +1 -1
@@ -135,6 +135,6 @@ source "board/davinci/da8xxevm/Kconfig" source "board/lego/ev3/Kconfig" config SPL_LDSCRIPT - default "board/$(BOARDDIR)/u-boot-spl-da850evm.lds" + default "board/\$(BOARDDIR)/u-boot-spl-da850evm.lds" endif
arch/arm/mach-orion5x/Kconfig +1 -1
@@ -16,6 +16,6 @@ config SYS_SOC source "board/LaCie/edminiv2/Kconfig" config SPL_LDSCRIPT - default "$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5X + default "\$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5X endif
common/spl/Kconfig +2 -2
@@ -139,7 +139,7 @@ config SPL_HANDOFF config SPL_LDSCRIPT string "Linker script for the SPL stage" - default "arch/$(ARCH)/cpu/u-boot-spl.lds" + default "arch/\$(ARCH)/cpu/u-boot-spl.lds" help The SPL stage will usually require a different linker-script (as it runs from a different memory region) than the regular
@@ -1306,7 +1306,7 @@ config TPL_LDSCRIPT string "Linker script for the TPL stage" depends on TPL default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 - default "arch/$(ARCH)/cpu/u-boot-spl.lds" + default "arch/\$(ARCH)/cpu/u-boot-spl.lds" help The TPL stage will usually require a different linker-script (as it runs from a different memory region) than the regular
Signature · 1 line
2.17.1
PATCH 3/7 Kconfig: Escape variables to make in default strings
Quoted 19 lines · Tom Rini
We have some variables that need to include a variable to pass to make to evaluate later, typically ARCH and BOARDDIR, to find a file to use. The way we're doing this today isn't correct but works. With an update to
Kconfigwe will need to escape these properly, so do so.Cc Masahiro Yamada <[email protected]>Signed-off-by Tom Rini <[email protected]>--- arch/arm/mach-davinci/Kconfig | 2 +- arch/arm/mach-orion5x/Kconfig | 2 +- common/spl/Kconfig | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-davinci/Kconfig +0
-0
arch/arm/mach-davinci/Kconfig source "board/davinci/da8xxevm/Kconfig" · line 138
Quoted 5 lines
arch/arm/mach-davinci/Kconfig +1
-1@@ -135,6 +135,6 @@ source "board/davinci/da8xxevm/Kconfig" source "board/lego/ev3/Kconfig" config SPL_LDSCRIPT - default "board/$(BOARDDIR)/u-boot-spl-da850evm.lds" + default "board/\$(BOARDDIR)/u-boot-spl-da850evm.lds"
Only one file path for this.
$ find . -name u-boot-spl-da850evm.lds ./board/davinci/da8xxevm/u-boot-spl-da850evm.lds
I prefer hard-coding.
default "board/davinci/da8xxevm/u-boot-spl-da850evm.lds"
arch/arm/mach-orion5x/Kconfig config SYS_SOC · line 19
Quoted 11 lines
arch/arm/mach-davinci/Kconfig +0
-0endifarch/arm/mach-orion5x/Kconfig +1
-1@@ -16,6 +16,6 @@ config SYS_SOC source "board/LaCie/edminiv2/Kconfig" config SPL_LDSCRIPT - default "$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5X + default "\$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5X
Ditto.
We know the directory path of orion5x.
$ find . -name orion5x ./arch/arm/cpu/arm926ejs/orion5x
You can hard-code it.
Quoted 26 lines
arch/arm/mach-orion5x/Kconfig +0
-0endifcommon/spl/Kconfig +2
-3@@ -139,7 +139,7 @@ config SPL_HANDOFF config SPL_LDSCRIPT string "Linker script for the SPL stage" - default "arch/$(ARCH)/cpu/u-boot-spl.lds" + default "arch/\$(ARCH)/cpu/u-boot-spl.lds" help The SPL stage will usually require a different linker-script (as it runs from a different memory region) than the regular@@ -1306,7 +1306,7 @@ config TPL_LDSCRIPT string "Linker script for the TPL stage" depends on TPL default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 - default "arch/$(ARCH)/cpu/u-boot-spl.lds" + default "arch/\$(ARCH)/cpu/u-boot-spl.lds" help The TPL stage will usually require a different linker-script (as it runs from a different memory region) than the regular --2.17.1
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 3/7 Kconfig: Escape variables to make in default strings
Quoted 29 lines · Masahiro Yamada
Quoted 19 lines · Tom Rini
We have some variables that need to include a variable to pass to make to evaluate later, typically ARCH and BOARDDIR, to find a file to use. The way we're doing this today isn't correct but works. With an update to
Kconfigwe will need to escape these properly, so do so.Cc Masahiro Yamada <[email protected]>Signed-off-by Tom Rini <[email protected]>--- arch/arm/mach-davinci/Kconfig | 2 +- arch/arm/mach-orion5x/Kconfig | 2 +- common/spl/Kconfig | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-davinci/Kconfig +0
-0arch/arm/mach-davinci/Kconfig source "board/davinci/da8xxevm/Kconfig" · line 138
Quoted 5 lines
arch/arm/mach-davinci/Kconfig +1
-1@@ -135,6 +135,6 @@ source "board/davinci/da8xxevm/Kconfig" source "board/lego/ev3/Kconfig" config SPL_LDSCRIPT - default "board/$(BOARDDIR)/u-boot-spl-da850evm.lds" + default "board/\$(BOARDDIR)/u-boot-spl-da850evm.lds"Only one file path for this.
Quoted 7 lines
$ find . -name u-boot-spl-da850evm.lds ./board/davinci/da8xxevm/u-boot-spl-da850evm.ldsI prefer hard-coding.
default "
board/davinci/da8xxevm/u-boot-spl-da850evm.lds"
Done, new patch.
Quoted 14 lines
arch/arm/mach-orion5x/Kconfig config SYS_SOC · line 19
Quoted 11 lines
arch/arm/mach-davinci/Kconfig +0
-0endifarch/arm/mach-orion5x/Kconfig +1
-1@@ -16,6 +16,6 @@ config SYS_SOC source "board/LaCie/edminiv2/Kconfig" config SPL_LDSCRIPT - default "$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5X + default "\$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5XDitto.
Quoted 6 lines
We know the directory path of orion5x.
$ find . -name orion5x ./arch/arm/cpu/arm926ejs/orion5xYou can hard-code it.
Done, new patch.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200226/08078bcb/attachment.sig>
PATCH 4/7 Kconfig: Remove redundant variable sets
In reply to Tom RiniIn a few places we have Kconfig entries that set SPL_LDSCRIPT to what is the default value anyways. Drop these.
--- arch/microblaze/Kconfig | 3 --- arch/riscv/Kconfig | 3 --- board/armadeus/apf27/Kconfig | 3 --- 3 files changed, 9 deletions(-)
arch/microblaze/Kconfig +0 -3
@@ -30,7 +30,4 @@ config STACK_SIZE source "board/xilinx/microblaze-generic/Kconfig" -config SPL_LDSCRIPT - default "arch/microblaze/cpu/u-boot-spl.lds" - endmenu
arch/riscv/Kconfig +0 -3
@@ -229,7 +229,4 @@ config STACK_SIZE_SHIFT int default 14 -config SPL_LDSCRIPT - default "arch/riscv/cpu/u-boot-spl.lds" - endmenu
board/armadeus/apf27/Kconfig +0 -3
@@ -1,8 +1,5 @@ if TARGET_APF27 -config SPL_LDSCRIPT - default "arch/$(ARCH)/cpu/u-boot-spl.lds" - config SYS_BOARD default "apf27"
Signature · 1 line
2.17.1
PATCH 4/7 Kconfig: Remove redundant variable sets
Quoted 10 lines · Tom Rini
In a few places we have
Kconfigentries that setSPL_LDSCRIPTto what is the default value anyways. Drop these.Cc Michal Simek <[email protected]>Cc Rick Chen <[email protected]>Cc Philippe Reynes <[email protected]>Cc Eric Jarrige <[email protected]>Signed-off-by Tom Rini <[email protected]>---
I see more in defconfig files.
$ cd configs $ git grep SPL_LDSCRIPT axm_defconfig:CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds" brppt2_defconfig:CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds" mx31pdk_defconfig:CONFIG_SPL_LDSCRIPT="arch/arm/cpu/u-boot-spl.lds" taurus_defconfig:CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds"
They are the same as the default.
Can you remove them too?
Quoted 45 lines
arch/microblaze/Kconfig | 3 --- arch/riscv/Kconfig | 3 --- board/armadeus/apf27/Kconfig | 3 --- 3 files changed, 9 deletions(-)arch/microblaze/Kconfig +0
-3@@ -30,7 +30,4 @@ config STACK_SIZE source "board/xilinx/microblaze-generic/Kconfig" -config SPL_LDSCRIPT - default "arch/microblaze/cpu/u-boot-spl.lds" - endmenuarch/riscv/Kconfig +0
-3@@ -229,7 +229,4 @@ config STACK_SIZE_SHIFT int default 14 -config SPL_LDSCRIPT - default "arch/riscv/cpu/u-boot-spl.lds" - endmenuboard/armadeus/apf27/Kconfig +0
-4@@ -1,8 +1,5 @@ if TARGET_APF27 -config SPL_LDSCRIPT - default "arch/$(ARCH)/cpu/u-boot-spl.lds" - config SYS_BOARD default "apf27" --2.17.1
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 4/7 Kconfig: Remove redundant variable sets
Quoted 12 lines · Masahiro Yamada
Quoted 10 lines · Tom Rini
In a few places we have
Kconfigentries that setSPL_LDSCRIPTto what is the default value anyways. Drop these.Cc Michal Simek <[email protected]>Cc Rick Chen <[email protected]>Cc Philippe Reynes <[email protected]>Cc Eric Jarrige <[email protected]>Signed-off-by Tom Rini <[email protected]>---
Quoted 8 lines
I see more in defconfig files.
$ cd configs $ git grep SPL_LDSCRIPT axm_defconfig:CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds" brppt2_defconfig:CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds" mx31pdk_defconfig:CONFIG_SPL_LDSCRIPT="arch/arm/cpu/u-boot-spl.lds" taurus_defconfig:CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds"
Re-checking, all 4 of these cases are overriding the default, but the cases of $(ARCH) aren't helpful and should just be 'arm' so I'll do that.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200226/84e2fbe4/attachment.sig>
PATCH 5/7 Azure / GitLab / Travis: Add Kconfig unit tests to a job
In reply to Tom RiniThe Kconfig language provides a unit test that can be run. As these require pytest to be installed and run very quickly, bundle them in to an existing CI job.
--- .azure-pipelines.yml | 5 +++-- .gitlab-ci.yml | 7 ++++--- .travis.yml | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-)
.azure-pipelines.yml +3 -2
@@ -110,7 +110,7 @@ jobs: make tools-only_config envtools -j$(nproc) - job: utils - displayName: 'Run binman, buildman, dtoc and patman testsuites' + displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites' pool: vmImage: $(ubuntu_vm) steps:
@@ -125,7 +125,7 @@ jobs: export USER=azure virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate - pip install pyelftools + pip install pyelftools pytest export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
@@ -134,6 +134,7 @@ jobs: ./tools/buildman/buildman -t ./tools/dtoc/dtoc -t ./tools/patman/patman --test + make testconfig EOF cat build.sh # We cannot use "container" like other jobs above, as buildman
.gitlab-ci.yml +4 -3
@@ -150,7 +150,7 @@ Build envtools: script: - make tools-only_config envtools -j$(nproc) -Run binman, buildman, dtoc and patman testsuites: +Run binman, buildman, dtoc, Kconfig and patman testsuites: tags: [ 'all' ] stage: testsuites script:
@@ -159,7 +159,7 @@ Run binman, buildman, dtoc and patman testsuites: export USER=gitlab; virtualenv -p /usr/bin/python3 /tmp/venv; . /tmp/venv/bin/activate; - pip install pyelftools; + pip install pyelftools pytest; export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl; export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
@@ -167,7 +167,8 @@ Run binman, buildman, dtoc and patman testsuites: ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test; ./tools/buildman/buildman -t; ./tools/dtoc/dtoc -t; - ./tools/patman/patman --test + ./tools/patman/patman --test; + make testconfig # Test sandbox with test.py sandbox test.py:
.travis.yml +2 -1
@@ -150,7 +150,8 @@ script: ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test && ./tools/patman/patman --test && ./tools/buildman/buildman -t && - ./tools/dtoc/dtoc -t; + ./tools/dtoc/dtoc -t && + make testconfig; fi; fi
Signature · 1 line
2.17.1
PATCH 5/7 Azure / GitLab / Travis: Add Kconfig unit tests to a job
Quoted 6 lines · Tom Rini
The
Kconfiglanguage provides a unit test that can be run. As these require pytest to be installed and run very quickly, bundle them in to an existing CI job.Signed-off-by Tom Rini <[email protected]>
Quoted 85 lines
--- .azure-pipelines.yml | 5 +++-- .gitlab-ci.yml | 7 ++++--- .travis.yml | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-).azure-pipelines.yml +3
-2@@ -110,7 +110,7 @@ jobs: make tools-only_config envtools -j$(nproc) - job: utils - displayName: 'Run binman, buildman, dtoc and patman testsuites' + displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites' pool: vmImage: $(ubuntu_vm) steps:@@ -125,7 +125,7 @@ jobs: export USER=azure virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate - pip install pyelftools + pip install pyelftools pytest export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}@@ -134,6 +134,7 @@ jobs: ./tools/buildman/buildman -t ./tools/dtoc/dtoc -t ./tools/patman/patman --test + make testconfig EOF cat build.sh # We cannot use "container" like other jobs above, as buildman.gitlab-ci.yml +4
-3@@ -150,7 +150,7 @@ Build envtools: script: - make tools-only_config envtools -j$(nproc) -Run binman, buildman, dtoc and patman testsuites: +Run binman, buildman, dtoc, Kconfig and patman testsuites: tags: [ 'all' ] stage: testsuites script:@@ -159,7 +159,7 @@ Run binman, buildman, dtoc and patman testsuites: export USER=gitlab; virtualenv -p /usr/bin/python3 /tmp/venv; . /tmp/venv/bin/activate; - pip install pyelftools; + pip install pyelftools pytest; export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl; export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";@@ -167,7 +167,8 @@ Run binman, buildman, dtoc and patman testsuites: ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test; ./tools/buildman/buildman -t; ./tools/dtoc/dtoc -t; - ./tools/patman/patman --test + ./tools/patman/patman --test; + make testconfig # Test sandbox with test.py sandbox test.py:.travis.yml +2
-2@@ -150,7 +150,8 @@ script: ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test && ./tools/patman/patman --test && ./tools/buildman/buildman -t && - ./tools/dtoc/dtoc -t; + ./tools/dtoc/dtoc -t && + make testconfig; fi; fi --2.17.1
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 6/7 scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc
In reply to Tom RiniFrom: Rob Herring <[email protected]>
This adds the following commits from upstream:
84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword 4038fd90056e dtc: add ability to make nodes conditional on them being referenced e1f139ea4900 checks: drop warning for missing PCI bridge bus-range f4eba68d89ee checks: Print duplicate node name instead of parent name 46df1fb1b211 .travis.yml: Run valgrind checks via Travis 14a3002a1aee tests: Update valgrind suppressions for sw_tree1 02c5fe9debc0 tests: Remove valgrind error from tests/get_path df536831d02c checks: add graph binding checks2347c96edcbe checks: add a check for duplicate unit-addresses of child nodes 8f1b35f88395 Correct overlay syntactic sugar for generating target-path fragments afbddcd418fb Suppress warnings on overlay fragments119e27300359 Improve tests for dtc overlay generation
--- scripts/dtc/checks.c | 186 +++++++++++++++++++++++++++++++++++++- scripts/dtc/dtc-parser.y | 22 ++--- scripts/dtc/livetree.c | 12 ++- scripts/dtc/version_gen.h | 2 +- 4 files changed, 206 insertions(+), 16 deletions(-)
scripts/dtc/checks.c +185 -1
@@ -255,7 +255,7 @@ static void check_duplicate_node_names(struct check *c, struct dt_info *dti,child2 ; child2 = child2->next_sibling)if (streq (child->name, child2->name)) -FAIL (c, dti, node,"Duplicate node name" ); +FAIL (c, dti, child2,"Duplicate node name" ); }ERROR (duplicate_node_names, check_duplicate_node_names,NULL );
@@ -317,6 +317,11 @@ static void check_unit_address_vs_reg(struct check *c, struct dt_info *dti,const char *unitname =get_unitname (node);struct property *prop =get_property (node,"reg" ); +if (get_subnode (node,"__overlay__" )) { +/* HACK: Overlay fragments are a special case */ +return ; + } +if (!prop) { prop =get_property (node,"ranges" );if (prop && !prop->val.len)
@@ -1030,6 +1035,36 @@ static void check_avoid_unnecessary_addr_size(struct check *c, struct dt_info *d }WARNING (avoid_unnecessary_addr_size, check_avoid_unnecessary_addr_size,NULL , &avoid_default_addr_size); +static void check_unique_unit_address (struct check *c,struct dt_info *dti, +struct node *node) +{ +struct node *childa; + +if (node->addr_cells <0 || node->size_cells <0 ) +return ; + +if (!node->children) +return ; + +for_each_child (node, childa) { +struct node *childb; +const char *addr_a =get_unitname (childa); + +if (!strlen (addr_a)) +continue ; + +for_each_child (node, childb) { +const char *addr_b =get_unitname (childb); +if (childa == childb) +break ; + +if (streq (addr_a, addr_b)) +FAIL (c, dti, childb,"duplicate unit-address (also used in node %s)" , childa->fullpath); + } + } +} +WARNING (unique_unit_address, check_unique_unit_address,NULL , &avoid_default_addr_size); +static void check_obsolete_chosen_interrupt_controller (struct check *c,struct dt_info *dti,struct node *node)
@@ -1370,6 +1405,152 @@ static void check_interrupts_property(struct check *c, }WARNING (interrupts_property, check_interrupts_property, &phandle_references); +static const struct bus_type graph_port_bus = { + .name ="graph-port" , +}; + +static const struct bus_type graph_ports_bus = { + .name ="graph-ports" , +}; + +static void check_graph_nodes (struct check *c,struct dt_info *dti, +struct node *node) +{ +struct node *child; + +for_each_child (node, child) { +if (!(strprefixeq (child->name, child->basenamelen,"endpoint" ) || +get_property (child,"remote-endpoint" ))) +continue ; + + node->bus = &graph_port_bus; + +/* The parent of 'port' nodes can be either 'ports' or a device */ +if (!node->parent->bus && + (streq (node->parent->name,"ports" ) ||get_property (node,"reg" ))) + node->parent->bus = &graph_ports_bus; + +break ; + } + +} +WARNING (graph_nodes, check_graph_nodes,NULL ); + +static void check_graph_child_address (struct check *c,struct dt_info *dti, +struct node *node) +{ +int cnt =0 ; +struct node *child; + +if (node->bus != &graph_ports_bus && node->bus != &graph_port_bus) +return ; + +for_each_child (node, child) { +struct property *prop =get_property (child,"reg" ); + +/* No error if we have any non-zero unit address */ +if (prop &&propval_cell (prop) !=0 ) +return ; + + cnt++; + } + +if (cnt ==1 && node->addr_cells !=-1 ) +FAIL (c, dti, node,"graph node has single child node '%s', #address-cells/#size-cells are not necessary" , + node->children->name); +} +WARNING (graph_child_address, check_graph_child_address,NULL , &graph_nodes); + +static void check_graph_reg (struct check *c,struct dt_info *dti, +struct node *node) +{ +char unit_addr[9 ]; +const char *unitname =get_unitname (node); +struct property *prop; + + prop =get_property (node,"reg" ); +if (!prop || !unitname) +return ; + +if (!(prop->val.val && prop->val.len ==sizeof (cell_t))) { +FAIL (c, dti, node,"graph node malformed 'reg' property" ); +return ; + } + +snprintf (unit_addr,sizeof (unit_addr),"%x" ,propval_cell (prop)); +if (!streq (unitname, unit_addr)) +FAIL (c, dti, node,"graph node unit address error, expected \"%s\"" , + unit_addr); + +if (node->parent->addr_cells !=1 ) +FAIL_PROP (c, dti, node,get_property (node,"#address-cells" ), +"graph node '#address-cells' is %d, must be 1" , + node->parent->addr_cells); +if (node->parent->size_cells !=0 ) +FAIL_PROP (c, dti, node,get_property (node,"#size-cells" ), +"graph node '#size-cells' is %d, must be 0" , + node->parent->size_cells); +} + +static void check_graph_port (struct check *c,struct dt_info *dti, +struct node *node) +{ +if (node->bus != &graph_port_bus) +return ; + +if (!strprefixeq (node->name, node->basenamelen,"port" )) +FAIL (c, dti, node,"graph port node name should be 'port'" ); + +check_graph_reg (c, dti, node); +} +WARNING (graph_port, check_graph_port,NULL , &graph_nodes); + +static struct node *get_remote_endpoint (struct check *c,struct dt_info *dti, +struct node *endpoint) +{ +int phandle; +struct node *node; +struct property *prop; + + prop =get_property (endpoint,"remote-endpoint" ); +if (!prop) +return NULL ; + + phandle =propval_cell (prop); +/* Give up if this is an overlay with external references */ +if (phandle ==0 || phandle ==-1 ) +return NULL ; + + node =get_node_by_phandle (dti->dt, phandle); +if (!node) +FAIL_PROP (c, dti, endpoint, prop,"graph phandle is not valid" ); + +return node; +} + +static void check_graph_endpoint (struct check *c,struct dt_info *dti, +struct node *node) +{ +struct node *remote_node; + +if (!node->parent || node->parent->bus != &graph_port_bus) +return ; + +if (!strprefixeq (node->name, node->basenamelen,"endpoint" )) +FAIL (c, dti, node,"graph endpont node name should be 'endpoint'" ); + +check_graph_reg (c, dti, node); + + remote_node =get_remote_endpoint (c, dti, node); +if (!remote_node) +return ; + +if (get_remote_endpoint (c, dti, remote_node) != node) +FAIL (c, dti, node,"graph connection to node '%s' is not bidirectional" , + remote_node->fullpath); +} +WARNING (graph_endpoint, check_graph_endpoint,NULL , &graph_nodes); +static struct check *check_table[] = { &duplicate_node_names, &duplicate_property_names, &node_name_chars, &node_name_format, &property_name_chars,
@@ -1404,6 +1585,7 @@ static struct check *check_table[] = { &avoid_default_addr_size, &avoid_unnecessary_addr_size, + &unique_unit_address, &obsolete_chosen_interrupt_controller, &chosen_node_is_root, &chosen_node_bootargs, &chosen_node_stdout_path,
@@ -1430,6 +1612,8 @@ static struct check *check_table[] = { &alias_paths, + &graph_nodes, &graph_child_address, &graph_port, &graph_endpoint, + &always_fail, };
scripts/dtc/dtc-parser.y +11 -11
@@ -191,18 +191,18 @@ devicetree: } | devicetree DT_REF nodedef { - struct node *target = get_node_by_ref($1, $2); - - if (target) { - merge_nodes(target, $3); + /* + * We rely on the rule being always: + * versioninfo plugindecl memreserves devicetree + * so $-1 is what we want (plugindecl) + */ + if ($<flags>-1 & DTSF_PLUGIN) { + add_orphan_node($1, $3, $2); } else { - /* - * We rely on the rule being always: - * versioninfo plugindecl memreserves devicetree - * so $-1 is what we want (plugindecl) - */ - if ($<flags>-1 & DTSF_PLUGIN) - add_orphan_node($1, $3, $2); + struct node *target = get_node_by_ref($1, $2); + + if (target) + merge_nodes(target, $3); else ERROR(&@2, "Label or path %s not found", $2); }
scripts/dtc/livetree.c +9 -3
@@ -238,10 +238,16 @@ struct node * add_orphan_node(struct node *dt, struct node *new_node, char *ref)struct data d = empty_data;char *name; - d =data_add_marker (d,REF_PHANDLE , ref); - d =data_append_integer (d,0xffffffff ,32 ); +if (ref[0 ] =='/' ) { + d =data_append_data (d, ref,strlen (ref) +1 ); - p =build_property ("target" , d); + p =build_property ("target-path" , d); + }else { + d =data_add_marker (d,REF_PHANDLE , ref); + d =data_append_integer (d,0xffffffff ,32 ); + + p =build_property ("target" , d); + }xasprintf (&name,"fragment@%u" , next_orphan_fragment++);
scripts/dtc/version_gen.h +1 -1
@@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.6-gaadd0b65" +#define DTC_VERSION "DTC 1.4.6-g84e414b0"
Signature · 1 line
2.17.1
PATCH 7/7 kconfig / kbuild: re-sync with Linux 4.18
In reply to Tom RiniAlign Kconfig and Kbuild logic to Linux 4.18 release with minimal impact on files outside of this scope.
Our previous Kconfig sync was done by commit e91610da7c8a ("kconfig:
re-sync with Linux 4.17-rc4").
A very small number of changes upstream since our sync with v4.17-rc4 that exist in the v4.18 release have already been applied here and have been omitted from the list in this commit (and are readily available in our own git history).
The imported Linux commits are:b3aa58d2e85d fixdep: suppress consecutive / from file paths in dependency list files 74656b682902 kbuild: disable new dtc graph and unit-address warnings 74d931716151 genksyms: remove symbol prefix supporte6ecfb45072c kbuild: do not display CHK for filechk0b669a5076fd kconfig: refactor Qt package checks for building qconf b464ef583dc7 kconfig: refactor GTK+ package checks for building gconf 1c5af5cf9308 kconfig: refactor ncurses package checks for building mconf and nconf 694c49a7c01c kconfig: drop localization support96f60dfa5819 trace: Use -mcount-record for dynamic ftracebb222ceeb327 kconfig: remove string expansion in file_lookup()96d8e48da55a kconfig: remove string expansion for mainmenu after yyparse() 5b31a9746756 kconfig: remove sym_expand_string_value()137c0118a900 kconfig: make default prompt of mainmenu less specific e298f3b49def kconfig: add built-in function support2fd5b09c201e kconfig: add 'shell' built-in function9de071536c87 kconfig: begin PARAM state only when seeing a command keyword 9ced3bddec08 kconfig: support user-defined function and recursively expanded variable 1175c02506ff kconfig: support simply expanded variableed2a22f277c6 kconfig: support append assignment operator82bc8bd82e5c kconfig: expand lefthand side of assignment statement 1d6272e6fe43 kconfig: add 'info', 'warning-if', and 'error-if' built-in functions a702a6176e2f kconfig: add 'filename' and 'lineno' built-in variables 915f64901eb3 kconfig: error out if a recursive variable references itself 2bece88f89fa kconfig: test: add Kconfig macro language tests21c54b774744 kconfig: show compiler version text in the top comment 59f7b5847b0c kbuild: $(CHECK) doesnt need NOSTDINC_FLAGS twice145167650b96 kbuild: add endianness flag to CHEKCFLAGS1f2f01b122d7 kbuild: add machine size to CHECKFLAGSd6a0c8a1326b kconfig: Add testconfig into make help outputbb6d83dde191 kbuild: Move last word of nconfig help to the previous line 8593080c0fcf kconfig: fix localmodconfiged7d40bc67b8 tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount b2d00d7c61c8 kconfig: fix line numbers for if-entries in menu tree ecd53ac2f2c6 kconfig: handle P_SYMBOL in print_symbol()73d1c580f92b kconfig: loop boundary condition fix48f6e3cf5bc6 kbuild: do not drop -I without parameterbd412d81b7ea kbuild: .PHONY is not a variable, but PHONY is6916162c7308 kbuild: remove duplicated comments about PHONY
--- Kconfig | 6 +- Makefile | 11 +- scripts/Kbuild.include | 3 +- scripts/Makefile.build | 10 +- scripts/Makefile.clean | 3 - scripts/Makefile.lib | 3 + scripts/basic/fixdep.c | 6 +- scripts/kconfig/.gitignore | 4 - scripts/kconfig/Makefile | 194 ++---- scripts/kconfig/POTFILES.in | 12 - scripts/kconfig/check.sh | 14 - scripts/kconfig/conf.c | 51 +- scripts/kconfig/confdata.c | 37 +- scripts/kconfig/expr.h | 3 + scripts/kconfig/gconf-cfg.sh | 23 + scripts/kconfig/gconf.c | 46 +- scripts/kconfig/kconf_id.c | 1 - scripts/kconfig/kxgettext.c | 235 ------- scripts/kconfig/lkc.h | 19 +- scripts/kconfig/lkc_proto.h | 15 +- scripts/kconfig/lxdialog/check-lxdialog.sh | 93 --- scripts/kconfig/lxdialog/checklist.c | 4 +- scripts/kconfig/lxdialog/dialog.h | 8 +- scripts/kconfig/lxdialog/inputbox.c | 4 +- scripts/kconfig/lxdialog/menubox.c | 10 +- scripts/kconfig/lxdialog/textbox.c | 2 +- scripts/kconfig/lxdialog/yesno.c | 4 +- scripts/kconfig/mconf-cfg.sh | 44 ++ scripts/kconfig/mconf.c | 141 +++-- scripts/kconfig/menu.c | 23 +- scripts/kconfig/nconf-cfg.sh | 44 ++ scripts/kconfig/nconf.c | 148 +++-- scripts/kconfig/nconf.h | 1 - scripts/kconfig/preprocess.c | 572 ++++++++++++++++++ scripts/kconfig/qconf-cfg.sh | 25 + scripts/kconfig/qconf.cc | 104 ++-- scripts/kconfig/streamline_config.pl | 4 +- scripts/kconfig/symbol.c | 109 ---- .../no_write_if_dep_unmet/expected_config | 2 +- scripts/kconfig/util.c | 33 +- scripts/kconfig/zconf.l | 95 ++- scripts/kconfig/zconf.y | 54 +- 42 files changed, 1198 insertions(+), 1022 deletions(-) delete mode 100644 scripts/kconfig/POTFILES.in delete mode 100755 scripts/kconfig/check.sh create mode 100755 scripts/kconfig/gconf-cfg.sh delete mode 100644 scripts/kconfig/kxgettext.c delete mode 100755 scripts/kconfig/lxdialog/check-lxdialog.sh create mode 100755 scripts/kconfig/mconf-cfg.sh create mode 100644 scripts/kconfig/nconf-cfg.sh create mode 100644 scripts/kconfig/preprocess.c create mode 100755 scripts/kconfig/qconf-cfg.sh
Kconfig +1 -5
@@ -3,11 +3,7 @@ # see the file Documentation/kbuild/kconfig-language.txt in the # Linux kernel source tree. # -mainmenu "U-Boot $UBOOTVERSION Configuration" - -config UBOOTVERSION - string - option env="UBOOTVERSION" +mainmenu "U-Boot $(UBOOTVERSION) Configuration" # Allow defaults in arch-specific code to override any given here source "arch/Kconfig"
Makefile +9 -2
@@ -436,6 +436,8 @@ export HOSTCXX HOSTCXXFLAGS CHECK CHECKFLAGS DTC DTC_FLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS export KBUILD_CFLAGS KBUILD_AFLAGS +export CC_VERSION_TEXT := $(shell $(CC) --version | head -n 1) + # When compiling out-of-tree modules, put MODVERDIR in the module # tree rather than in the kernel tree. The kernel tree might # even be read-only.
@@ -710,7 +712,6 @@ UBOOTINCLUDE := \ -include $(srctree)/include/linux/kconfig.h NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -CHECKFLAGS += $(NOSTDINC_FLAGS) # FIX ME cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \
@@ -924,6 +925,12 @@ ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif +# insure the checker run with the right endianness +CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian) + +# the checker needs the correct machine size +CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32) + # Normally we fill empty space with 0xff quiet_cmd_objcopy = OBJCOPY $@ cmd_objcopy = $(OBJCOPY) --gap-fill=0xff $(OBJCOPYFLAGS) \
@@ -2196,6 +2203,6 @@ endif # skip-makefile PHONY += FORCE FORCE: -# Declare the contents of the .PHONY variable as phony. We keep that +# Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY)
scripts/Kbuild.include +1 -2
@@ -54,7 +54,6 @@ kecho := $($(quiet)kecho) # to specify a valid file as first prerequisite (often the kbuild file) define filechk $(Q)set -e; \ - $(kecho) ' CHK $@'; \ mkdir -p $(dir $@); \ $(filechk_$(1)) < $< > [email protected]; \ if [ -r $@ ] && cmp -s $@ [email protected]; then \
@@ -208,7 +207,7 @@ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter addtree = $(if $(patsubst -I%,%,$(1)), \ -$(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)) +$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)),$(1)) # Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
scripts/Makefile.build +6 -4
@@ -181,7 +181,6 @@ $(obj)/%.i: $(src)/%.c FORCE cmd_gensymtypes = \ $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ $(GENKSYMS) $(if $(1), -T $(2)) \ - $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \ $(if $(KBUILD_PRESERVE),-p) \ -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null))
@@ -231,6 +230,11 @@ cmd_modversions = \ endif ifdef CONFIG_FTRACE_MCOUNT_RECORD +# gcc 5 supports generating the mcount tables directly +ifneq ($(call cc-option,-mrecord-mcount,y),y) +KBUILD_CFLAGS += -mrecord-mcount +else +# else do it all manually ifdef BUILD_C_RECORDMCOUNT ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") RECORDMCOUNT_FLAGS = -w
@@ -259,6 +263,7 @@ cmd_record_mcount = \ "$(CC_FLAGS_FTRACE)" ]; then \ $(sub_cmd_record_mcount) \ fi; +endif # -record-mcount endif define rule_cc_o_c
@@ -450,7 +455,4 @@ ifneq ($(cmd_files),) include $(cmd_files) endif -# Declare the contents of the .PHONY variable as phony. We keep that -# information in a variable se we can use it in if_changed and friends. - .PHONY: $(PHONY)
scripts/Makefile.clean +0 -3
@@ -91,7 +91,4 @@ PHONY += $(subdir-ymn) $(subdir-ymn): $(Q)$(MAKE) $(clean)=$@ -# Declare the contents of the .PHONY variable as phony. We keep that -# information in a variable se we can use it in if_changed and friends. - .PHONY: $(PHONY)
scripts/Makefile.lib +3 -0
@@ -280,6 +280,9 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \ -Wno-unit_address_format \ -Wno-avoid_unnecessary_addr_size \ -Wno-alias_paths \ + -Wno-graph_child_address \ + -Wno-graph_port \ + -Wno-unique_unit_address \ -Wno-simple_bus_reg \ -Wno-pci_device_reg
scripts/basic/fixdep.c +4 -2
@@ -117,7 +117,7 @@ static void usage(void)*/ static void print_dep (const char *m,int slen,const char *dir) { -int c, i; +int c, prev_c ='/' , i;printf (" $(wildcard %s/" , dir);for (i =0 ; i < slen; i++) {
@@ -126,7 +126,9 @@ static void print_dep(const char *m, int slen, const char *dir) c ='/' ; else c =tolower (c); -putchar (c); +if (c !='/' || prev_c !='/' ) +putchar (c); + prev_c = c; }printf (".h) \\\n" ); }
scripts/kconfig/.gitignore +0 -4
@@ -2,9 +2,6 @@ # Generated files # *.moc -gconf.glade.h -*.pot -*.mo # # configuration programs
@@ -14,4 +11,3 @@ mconf nconf qconf gconf -kxgettext
scripts/kconfig/Makefile +53 -141
238 lines not on this page · raw message
scripts/kconfig/POTFILES.in deleted +0 -12
@@ -1,12 +0,0 @@ -scripts/kconfig/lxdialog/checklist.c -scripts/kconfig/lxdialog/inputbox.c -scripts/kconfig/lxdialog/menubox.c -scripts/kconfig/lxdialog/textbox.c -scripts/kconfig/lxdialog/util.c -scripts/kconfig/lxdialog/yesno.c -scripts/kconfig/mconf.c -scripts/kconfig/conf.c -scripts/kconfig/confdata.c -scripts/kconfig/gconf.c -scripts/kconfig/gconf.glade.h -scripts/kconfig/qconf.cc
scripts/kconfig/check.sh deleted +0 -14
@@ -1,14 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 -# Needed for systems without gettext -$* -x c -o /dev/null - > /dev/null 2>&1 << EOF -#include <libintl.h> -int main() -{ - gettext(""); - return 0; -} -EOF -if [ ! "$?" -eq "0" ]; then - echo -DKBUILD_NO_NLS; -fi
scripts/kconfig/conf.c +23 -28
181 lines not on this page · raw message
scripts/kconfig/confdata.c +6 -31
@@ -30,7 +30,7 @@ static void conf_message(const char *fmt, ...)static const char *conf_filename;static int conf_lineno, conf_warnings; -const char conf_defname[] ="arch/$ARCH/defconfig" ; +const char conf_defname[] ="arch/$(ARCH)/defconfig" ;static void conf_warning (const char *fmt, ...) {
@@ -81,39 +81,13 @@ const char *conf_get_autoconfig_name(void)return name ? name :"include/config/auto.conf" ; } -static char *conf_expand_value (const char *in) -{ -struct symbol *sym; -const char *src; -static char res_value[SYMBOL_MAXLENGTH ]; -char *dst, name[SYMBOL_MAXLENGTH ]; - - res_value[0 ] =0 ; - dst = name; -while ((src =strchr (in,'$' ))) { -strncat (res_value, in, src - in); - src++; - dst = name; -while (isalnum (*src) || *src =='_' ) - *dst++ = *src++; - *dst =0 ; - sym =sym_lookup (name,0 ); -sym_calc_value (sym); -strcat (res_value,sym_get_string_value (sym)); - in = src; - } -strcat (res_value, in); - -return res_value; -} -char *conf_get_default_confname (void ) {struct stat buf;static char fullname[PATH_MAX +1 ];char *env, *name; - name =conf_expand_value (conf_defname); + name =expand_string (conf_defname); env =getenv (SRCTREE );if (env) {sprintf (fullname,"%s/%s" , env, name);
@@ -270,10 +244,11 @@ int conf_read_simple(const char *name, int def)if (expr_calc_value (prop->visible.expr) == no || prop->expr->type !=E_SYMBOL )continue ; - name =conf_expand_value (prop->expr->left.sym->name); +sym_calc_value (prop->expr->left.sym); + name =sym_get_string_value (prop->expr->left.sym); in =zconf_fopen (name);if (in) { -conf_message (_ ("using defaults found in %s" ), +conf_message ("using defaults found in %s" , name); goto load; }
@@ -829,7 +804,7 @@ next:return 1 ; } -conf_message (_ ("configuration written to %s" ), newname); +conf_message ("configuration written to %s" , newname);sym_set_change_count (0 );
scripts/kconfig/expr.h +3 -0
@@ -171,6 +171,9 @@ struct symbol {* config BAZ * int "BAZ Value" * range 1..255 +* +* Please, also check zconf.y:print_symbol() when modifying the +* list of property types! */ enum prop_type {P_UNKNOWN ,
scripts/kconfig/gconf-cfg.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +PKG="gtk+-2.0 gmodule-2.0 libglade-2.0" + +if ! pkg-config --exists $PKG; then + echo >&2 "*" + echo >&2 "* Unable to find the GTK+ installation. Please make sure that" + echo >&2 "* the GTK+ 2.0 development package is correctly installed." + echo >&2 "* You need $PKG" + echo >&2 "*" + exit 1 +fi + +if ! pkg-config --atleast-version=2.0.0 gtk+-2.0; then + echo >&2 "*" + echo >&2 "* GTK+ is present but version >= 2.0.0 is required." + echo >&2 "*" + exit 1 +fi + +echo cflags=\"$(pkg-config --cflags $PKG)\" +echo libs=\"$(pkg-config --libs $PKG)\"
scripts/kconfig/gconf.c +21 -25
167 lines not on this page · raw message
scripts/kconfig/kconf_id.c +0 -1
@@ -32,7 +32,6 @@ static struct kconf_id kconf_id_array[] = { { "on", T_ON, TF_PARAM }, { "modules", T_OPT_MODULES, TF_OPTION }, { "defconfig_list", T_OPT_DEFCONFIG_LIST, TF_OPTION }, - { "env", T_OPT_ENV, TF_OPTION }, { "allnoconfig_y", T_OPT_ALLNOCONFIG_Y, TF_OPTION }, };
scripts/kconfig/kxgettext.c deleted +0 -235
235 lines not on this page · raw message
scripts/kconfig/lkc.h +1 -18
@@ -8,15 +8,6 @@#include "expr.h" -#ifndef KBUILD_NO_NLS -# include <libintl.h> -#else -static inline const char *gettext (const char *txt) {return txt; } -static inline void textdomain (const char *domainname) {} -static inline void bindtextdomain (const char *name,const char *dir) {} -static inline char *bind_textdomain_codeset (const char *dn,char *c) {return c; } -#endif -#ifdef __cplusplusextern "C" {#endif
@@ -29,11 +20,6 @@ extern "C" {#define PACKAGE "linux"#endif -#define LOCALEDIR "/usr/share/locale" - -#define _ (text) gettext(text) -#define N_ (text) (text) -#ifndef CONFIG_ #define CONFIG_ "CONFIG_"#endif
@@ -58,7 +44,6 @@ enum conf_def_mode {#define T_OPT_MODULES 1#define T_OPT_DEFCONFIG_LIST 2 -#define T_OPT_ENV 3#define T_OPT_ALLNOCONFIG_Y 4struct kconf_id {
@@ -117,6 +102,7 @@ void *xmalloc(size_t size);void *xcalloc (size_t nmemb,size_t size);void *xrealloc (void *p,size_t size);char *xstrdup (const char *s); +char *xstrndup (const char *s,size_t n);struct gstr {size_t len;
@@ -134,9 +120,6 @@ void str_printf(struct gstr *gs, const char *fmt, ...);const char *str_get (struct gstr *gs);/* symbol.c */ -extern struct expr *sym_env_list; - -void sym_init (void );void sym_clear_all_valid (void );struct symbol *sym_choice_default (struct symbol *sym);const char *sym_get_string_default (struct symbol *sym);
scripts/kconfig/lkc_proto.h +14 -1
@@ -31,7 +31,6 @@ extern struct symbol * symbol_hash[SYMBOL_HASHSIZE];struct symbol *sym_lookup (const char *name,int flags);struct symbol *sym_find (const char *name); -char *sym_expand_string_value (const char *in);const char *sym_escape_string_value (const char *in);struct symbol **sym_re_search (const char *pattern);const char *sym_type_name (enum symbol_type type);
@@ -49,5 +48,19 @@ const char * sym_get_string_value(struct symbol *sym);const char *prop_get_type_name (enum prop_type type); +/* preprocess.c */ +enum variable_flavor { +VAR_SIMPLE , +VAR_RECURSIVE , +VAR_APPEND , +}; +void env_write_dep (FILE *f,const char *auto_conf_name); +void variable_add (const char *name,const char *value, +enum variable_flavor flavor); +void variable_all_del (void ); +char *expand_string (const char *in); +char *expand_dollar (const char **str); +char *expand_one_token (const char **str); +/* expr.c */ void expr_print (struct expr *e,void (*fn)(void *,struct symbol *,const char *),void *data,int prevtoken);
scripts/kconfig/lxdialog/check-lxdialog.sh deleted +0 -93
93 lines not on this page · raw message
scripts/kconfig/lxdialog/checklist.c +2 -2
@@ -90,8 +90,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)int x = width /2 -11 ;int y = height -2 ; -print_button (dialog,gettext ("Select" ), y, x, selected ==0 ); -print_button (dialog,gettext (" Help " ), y, x +14 , selected ==1 ); +print_button (dialog,"Select" , y, x, selected ==0 ); +print_button (dialog," Help " , y, x +14 , selected ==1 );wmove (dialog, y, x +1 +14 * selected);wrefresh (dialog);
scripts/kconfig/lxdialog/dialog.h +1 -7
@@ -13,16 +13,10 @@#include <string.h> #include <stdbool.h> -#ifndef KBUILD_NO_NLS -# include <libintl.h> -#else -# define gettext (Msgid) ((const char *) (Msgid)) -#endif -#ifdef __sun__#define CURS_MACROS #endif -#include CURSES_LOC +#include <ncurses.h> /* * Colors in ncurses 1.9.9e do not work properly since foreground and
scripts/kconfig/lxdialog/inputbox.c +2 -2
@@ -18,8 +18,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)int x = width /2 -11 ;int y = height -2 ; -print_button (dialog,gettext (" Ok " ), y, x, selected ==0 ); -print_button (dialog,gettext (" Help " ), y, x +14 , selected ==1 ); +print_button (dialog," Ok " , y, x, selected ==0 ); +print_button (dialog," Help " , y, x +14 , selected ==1 );wmove (dialog, y, x +1 +14 * selected);wrefresh (dialog);
scripts/kconfig/lxdialog/menubox.c +5 -5
@@ -144,11 +144,11 @@ static void print_buttons(WINDOW * win, int height, int width, int selected)int x = width /2 -28 ;int y = height -2 ; -print_button (win,gettext ("Select" ), y, x, selected ==0 ); -print_button (win,gettext (" Exit " ), y, x +12 , selected ==1 ); -print_button (win,gettext (" Help " ), y, x +24 , selected ==2 ); -print_button (win,gettext (" Save " ), y, x +36 , selected ==3 ); -print_button (win,gettext (" Load " ), y, x +48 , selected ==4 ); +print_button (win,"Select" , y, x, selected ==0 ); +print_button (win," Exit " , y, x +12 , selected ==1 ); +print_button (win," Help " , y, x +24 , selected ==2 ); +print_button (win," Save " , y, x +36 , selected ==3 ); +print_button (win," Load " , y, x +48 , selected ==4 );wmove (win, y, x +1 +12 * selected);wrefresh (win);
scripts/kconfig/lxdialog/textbox.c +1 -1
@@ -116,7 +116,7 @@ do_resize:print_title (dialog, title, width); -print_button (dialog,gettext (" Exit " ), height -2 , width /2 -4 , TRUE); +print_button (dialog," Exit " , height -2 , width /2 -4 , TRUE);wnoutrefresh (dialog);getyx (dialog, cur_y, cur_x);/* Save cursor position */
scripts/kconfig/lxdialog/yesno.c +2 -2
@@ -16,8 +16,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)int x = width /2 -10 ;int y = height -2 ; -print_button (dialog,gettext (" Yes " ), y, x, selected ==0 ); -print_button (dialog,gettext (" No " ), y, x +13 , selected ==1 ); +print_button (dialog," Yes " , y, x, selected ==0 ); +print_button (dialog," No " , y, x +13 , selected ==1 );wmove (dialog, y, x +1 +13 * selected);wrefresh (dialog);
scripts/kconfig/mconf-cfg.sh new file +44 -0
44 lines not on this page · raw message
scripts/kconfig/mconf.c +68 -73
367 lines not on this page · raw message
scripts/kconfig/menu.c +10 -13
@@ -214,9 +214,6 @@ void menu_add_option(int token, char *arg)zconf_error ("trying to redefine defconfig symbol" ); sym_defconfig_list->flags |=SYMBOL_AUTO ;break ; -case T_OPT_ENV : -prop_add_env (arg); -break ;case T_OPT_ALLNOCONFIG_Y : current_entry->sym->flags |=SYMBOL_ALLNOCONFIG_Y ;break ;
@@ -711,7 +708,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,struct menu *submenu[8 ], *menu, *location =NULL ;struct jump_key *jump =NULL ; -str_printf (r,_ ("Prompt: %s\n" ),_ (prop->text)); +str_printf (r,"Prompt: %s\n" , prop->text); menu = prop->menu->parent;for (i =0 ; menu != &rootmenu && i <8 ; menu = menu->parent) {bool accessible =menu_is_visible (menu);
@@ -744,16 +741,16 @@ static void get_prompt_str(struct gstr *r, struct property *prop, }if (i >0 ) { -str_printf (r,_ (" Location:\n" )); +str_printf (r," Location:\n" );for (j =4 ; --i >=0 ; j +=2 ) { menu = submenu[i];if (jump && menu == location) jump->offset =strlen (r->s);str_printf (r,"%*c-> %s" , j,' ' , -_ (menu_get_prompt (menu))); +menu_get_prompt (menu));if (menu->sym) {str_printf (r," (%s [=%s])" , menu->sym->name ? - menu->sym->name :_ ("<choice>" ), + menu->sym->name :"<choice>" ,sym_get_string_value (menu->sym)); }str_append (r,"\n" );
@@ -817,23 +814,23 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym, prop =get_symbol_prop (sym);if (prop) { -str_printf (r,_ (" Defined at %s:%d\n" ), prop->menu->file->name, +str_printf (r," Defined at %s:%d\n" , prop->menu->file->name, prop->menu->lineno);if (!expr_is_yes (prop->visible.expr)) { -str_append (r,_ (" Depends on: " )); +str_append (r," Depends on: " );expr_gstr_print (prop->visible.expr, r);str_append (r,"\n" ); } } -get_symbol_props_str (r, sym,P_SELECT ,_ (" Selects: " )); +get_symbol_props_str (r, sym,P_SELECT ," Selects: " );if (sym->rev_dep.expr) {expr_gstr_print_revdep (sym->rev_dep.expr, r, yes," Selected by [y]:\n" );expr_gstr_print_revdep (sym->rev_dep.expr, r, mod," Selected by [m]:\n" );expr_gstr_print_revdep (sym->rev_dep.expr, r, no," Selected by [n]:\n" ); } -get_symbol_props_str (r, sym,P_IMPLY ,_ (" Implies: " )); +get_symbol_props_str (r, sym,P_IMPLY ," Implies: " );if (sym->implied.expr) {expr_gstr_print_revdep (sym->implied.expr, r, yes," Implied by [y]:\n" );expr_gstr_print_revdep (sym->implied.expr, r, mod," Implied by [m]:\n" );
@@ -852,7 +849,7 @@ struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head)for (i =0 ; sym_arr && (sym = sym_arr[i]); i++)get_symbol_str (&res, sym, head);if (!i) -str_append (&res,_ ("No matches found.\n" )); +str_append (&res,"No matches found.\n" );return res; }
@@ -867,7 +864,7 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)str_printf (help,"%s%s:\n\n" ,CONFIG_ , sym->name); help_text =menu_get_help (menu); } -str_printf (help,"%s\n" ,_ (help_text)); +str_printf (help,"%s\n" , help_text);if (sym)get_symbol_str (help, sym,NULL ); }
scripts/kconfig/nconf-cfg.sh new file +44 -0
44 lines not on this page · raw message
scripts/kconfig/nconf.c +72 -76
388 lines not on this page · raw message
scripts/kconfig/nconf.h +0 -1
@@ -14,7 +14,6 @@#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <locale.h> #include <ncurses.h> #include <menu.h> #include <panel.h>
scripts/kconfig/preprocess.c new file +572 -0
572 lines not on this page · raw message
scripts/kconfig/qconf-cfg.sh new file +25 -0
@@ -0,0 +1,25 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +PKG="Qt5Core Qt5Gui Qt5Widgets" +PKG2="QtCore QtGui" + +if pkg-config --exists $PKG; then + echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\" + echo libs=\"$(pkg-config --libs $PKG)\" + echo moc=\"$(pkg-config --variable=host_bins Qt5Core)/moc\" + exit 0 +fi + +if pkg-config --exists $PKG2; then + echo cflags=\"$(pkg-config --cflags $PKG2)\" + echo libs=\"$(pkg-config --libs $PKG2)\" + echo moc=\"$(pkg-config --variable=moc_location QtCore)\" + exit 0 +fi + +echo >&2 "*" +echo >&2 "* Could not find Qt via pkg-config." +echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH" +echo >&2 "*" +exit 1
scripts/kconfig/qconf.cc +46 -58
140 lines not on this page · raw message
scripts/kconfig/symbol.c +0 -109
109 lines not on this page · raw message
scripts/kconfig/tests/no_write_if_dep_unmet/expected_config +1 -1
Lines of this file are not shown. View the raw message.
scripts/kconfig/zconf.l +89 -6
95 lines not on this page · raw message
scripts/kconfig/zconf.y +31 -23
54 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 7/7 kconfig / kbuild: re-sync with Linux 4.18
Hi Tom,
Quoted 41 lines · Tom Rini
Align
KconfigandKbuildlogic to Linux 4.18 release with minimal impact on files outside of this scope.Our previous
Kconfigsync was done by commite91610da7c8a("kconfig:
re-sync with Linux 4.17-rc4").A very small number of changes upstream since our sync with v4.17-rc4 that exist in the v4.18 release have already been applied here and have been omitted from the list in this commit (and are readily available in our own git history).
The imported Linux commits are:
b3aa58d2e85dfixdep: suppress consecutive / from file paths in dependency list files74656b682902kbuild: disable new dtc graph and unit-address warnings74d931716151genksyms: remove symbol prefix supporte6ecfb45072ckbuild: do not display CHK for filechk0b669a5076fdkconfig: refactor Qt package checks for building qconfb464ef583dc7kconfig: refactor GTK+ package checks for building gconf1c5af5cf9308kconfig: refactor ncurses package checks for building mconf and nconf694c49a7c01ckconfig: drop localization support96f60dfa5819trace: Use -mcount-record for dynamic ftracebb222ceeb327kconfig: remove string expansion infile_lookup()96d8e48da55akconfig: remove string expansion for mainmenu afteryyparse()5b31a9746756kconfig: removesym_expand_string_value()137c0118a900kconfig: make default prompt of mainmenu less specifice298f3b49defkconfig: add built-in function support2fd5b09c201ekconfig: add 'shell' built-in function9de071536c87kconfig: begin PARAM state only when seeing a command keyword9ced3bddec08kconfig: support user-defined function and recursively expanded variable1175c02506ffkconfig: support simply expanded variableed2a22f277c6kconfig: support append assignment operator82bc8bd82e5ckconfig: expand lefthand side of assignment statement1d6272e6fe43kconfig: add 'info', 'warning-if', and 'error-if' built-in functionsa702a6176e2fkconfig: add 'filename' and 'lineno' built-in variables915f64901eb3kconfig: error out if a recursive variable references itself2bece88f89fakconfig: test: addKconfigmacro language tests21c54b774744kconfig: show compiler version text in the top comment59f7b5847b0ckbuild: $(CHECK) doesnt needNOSTDINC_FLAGStwice145167650b96kbuild: add endianness flag to CHEKCFLAGS1f2f01b122d7kbuild: add machine size to CHECKFLAGS
Quoted 8 lines
d6a0c8a1326bkconfig: Add testconfig into make help outputbb6d83dde191kbuild: Move last word of nconfig help to the previous line8593080c0fcfkconfig: fix localmodconfiged7d40bc67b8tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcountb2d00d7c61c8kconfig: fix line numbers for if-entries in menu treeecd53ac2f2c6kconfig: handleP_SYMBOLinprint_symbol()73d1c580f92bkconfig: loop boundary condition fix48f6e3cf5bc6kbuild: do not drop -I without parameter
This is what I noted in another patch.
48f6e3cf5bc6 depends on db547ef1906,
which you silently, partially imported.
That is why you ended up with -I$(objtee)/$(obj) everywhere.
BTW, you can delete unused 'cc-option-align' if you like. (39a33ff80a259b2bddebb236549baee55f9b4f41)
This is a low-hanging fruit.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 7/7 kconfig / kbuild: re-sync with Linux 4.18
Quoted 54 lines · Masahiro Yamada
Hi Tom,
Quoted 41 lines · Tom Rini
Align
KconfigandKbuildlogic to Linux 4.18 release with minimal impact on files outside of this scope.Our previous
Kconfigsync was done by commite91610da7c8a("kconfig:
re-sync with Linux 4.17-rc4").A very small number of changes upstream since our sync with v4.17-rc4 that exist in the v4.18 release have already been applied here and have been omitted from the list in this commit (and are readily available in our own git history).
The imported Linux commits are:
b3aa58d2e85dfixdep: suppress consecutive / from file paths in dependency list files74656b682902kbuild: disable new dtc graph and unit-address warnings74d931716151genksyms: remove symbol prefix supporte6ecfb45072ckbuild: do not display CHK for filechk0b669a5076fdkconfig: refactor Qt package checks for building qconfb464ef583dc7kconfig: refactor GTK+ package checks for building gconf1c5af5cf9308kconfig: refactor ncurses package checks for building mconf and nconf694c49a7c01ckconfig: drop localization support96f60dfa5819trace: Use -mcount-record for dynamic ftracebb222ceeb327kconfig: remove string expansion infile_lookup()96d8e48da55akconfig: remove string expansion for mainmenu afteryyparse()5b31a9746756kconfig: removesym_expand_string_value()137c0118a900kconfig: make default prompt of mainmenu less specifice298f3b49defkconfig: add built-in function support2fd5b09c201ekconfig: add 'shell' built-in function9de071536c87kconfig: begin PARAM state only when seeing a command keyword9ced3bddec08kconfig: support user-defined function and recursively expanded variable1175c02506ffkconfig: support simply expanded variableed2a22f277c6kconfig: support append assignment operator82bc8bd82e5ckconfig: expand lefthand side of assignment statement1d6272e6fe43kconfig: add 'info', 'warning-if', and 'error-if' built-in functionsa702a6176e2fkconfig: add 'filename' and 'lineno' built-in variables915f64901eb3kconfig: error out if a recursive variable references itself2bece88f89fakconfig: test: addKconfigmacro language tests21c54b774744kconfig: show compiler version text in the top comment59f7b5847b0ckbuild: $(CHECK) doesnt needNOSTDINC_FLAGStwice145167650b96kbuild: add endianness flag to CHEKCFLAGS1f2f01b122d7kbuild: add machine size to CHECKFLAGSQuoted 8 lines
d6a0c8a1326bkconfig: Add testconfig into make help outputbb6d83dde191kbuild: Move last word of nconfig help to the previous line8593080c0fcfkconfig: fix localmodconfiged7d40bc67b8tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcountb2d00d7c61c8kconfig: fix line numbers for if-entries in menu treeecd53ac2f2c6kconfig: handleP_SYMBOLinprint_symbol()73d1c580f92bkconfig: loop boundary condition fix48f6e3cf5bc6kbuild: do not drop -I without parameter
Quoted 4 lines
This is what I noted in another patch.
48f6e3cf5bc6depends ondb547ef1906,
which you silently, partially imported.
Thanks for catching that, I'll fix things up and drop some of the changes.
Quoted 2 lines
BTW, you can delete unused 'cc-option-align' if you like. (
39a33ff80a259b2bddebb236549baee55f9b4f41)
Interesting, that's v4.12-rc2-..., I'll poke around and see if there's anything else that got missed too.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200225/6988e81c/attachment.sig>