diff options
author | Xiaobo Gu <xiaobo.gu@amlogic.com> | 2015-12-18 14:21:25 +0800 |
---|---|---|
committer | Xiaobo Gu <xiaobo.gu@amlogic.com> | 2015-12-18 17:38:27 +0800 |
commit | a270928821d8161be0fcb71c52666b60db12b901 (patch) | |
tree | b88f42af7b32d5681562a17db95de2badc91793f /scripts | |
parent | 72ca77a0d988fa9930580a449311a2ff9d283e07 (diff) | |
download | u-boot-odroid-c1-a270928821d8161be0fcb71c52666b60db12b901.tar.gz |
PD#116790: Support customer folder
a). Support customer folder(no matter exist or not)
b). _defconfig and (config).h have 3 different place now.
_defconfig:
1. configs/
2. board/amlogic/defconfigs/
3. customer/board/defconfigs/
(config).h:
1. include/configs/
2. board/amlogic/configs/
3. customer/board/configs/
Change-Id: I63858d32931b72b35ac8fc0702c8903e3d00d279
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/Makefile.autoconf | 22 | ||||
-rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 15 | ||||
-rwxr-xr-x | scripts/multiconfig.sh | 9 |
3 files changed, 44 insertions, 2 deletions
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index 2dafb3a25c..ca15762a4a 100755 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -65,6 +65,26 @@ $(obj)/autoconf.mk: FORCE include/autoconf.mk include/autoconf.mk.dep: include/config.h +# support amlogic config folder and customer folder + +# 1st. this is old u-boot config file folder +config_file=$(shell echo "$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME).h") +ifneq ($(config_file), $(wildcard $(config_file))) + +# 2nd. this is amlogic config file folder +config_file=$(shell echo "$(srctree)/board/amlogic/configs/$(CONFIG_SYS_CONFIG_NAME).h") +ifneq ($(config_file), $(wildcard $(config_file))) + +# 3rd. this is amlogic customer config folder +config_file=$(shell echo "$(srctree)/customer/board/configs/$(CONFIG_SYS_CONFIG_NAME).h") +ifneq ($(config_file), $(wildcard $(config_file))) +$(error $(shell echo "Error: Can not find $(CONFIG_SYS_CONFIG_NAME).h")) +endif +endif +endif + +#$(warning "final file"$(config_file)) + # include/config.h # Prior to Kconfig, it was generated by mkconfig. Now it is created here. define filechk_config_h @@ -75,7 +95,7 @@ define filechk_config_h done; \ echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\ echo \#include \<config_defaults.h\>; \ - echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \ + echo \#include \<$(config_file)\>; \ echo \#include \<asm/config.h\>; \ echo \#include \<config_fallbacks.h\>; \ echo \#include \<config_uncmd_spl.h\>; \ diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index de5e84ed3f..03ae7ff632 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped @@ -1923,7 +1923,20 @@ yyreduce: { printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); - zconf_nextfile((yyvsp[(2) - (3)].string)); + printd(DEBUG_PARSE, "strcmp : %d\n", strncmp("customer", (yyvsp[(2) - (3)].string), 8)); + if (0 == strncmp("customer", (yyvsp[(2) - (3)].string), 8)) { + FILE *file; + file = zconf_fopen((yyvsp[(2) - (3)].string)); + if (file) { + zconf_nextfile((yyvsp[(2) - (3)].string)); + } + else { + printd(DEBUG_PARSE, "Customer folder doesn't exist!\n"); + } + } + else{ + zconf_nextfile((yyvsp[(2) - (3)].string)); + } } break; diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh index 70f3a5df6f..f0ed84d899 100755 --- a/scripts/multiconfig.sh +++ b/scripts/multiconfig.sh @@ -118,6 +118,15 @@ do_board_defconfig () { defconfig_path=$srctree/configs/$1 tmp_defconfig_path=configs/.tmp_defconfig + # amlogic configs folder support + if [ ! -r $defconfig_path ]; then + defconfig_path=$srctree/board/amlogic/defconfigs/$1 + fi + # amlogic customer configs support + if [ ! -r $defconfig_path ]; then + defconfig_path=$srctree/customer/board/defconfigs/$1 + fi + if [ ! -r $defconfig_path ]; then echo >&2 "***" echo >&2 "*** Can't find default configuration \"configs/$1\"!" |