@@ -851,7 +851,7 @@ quiet_cmd_cfgcheck = CFGCHK $2
cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
$(srctree)/scripts/config_whitelist.txt $(srctree)
-all: $(ALL-y)
+all: tools
ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y)
@echo "===================== WARNING ======================"
@echo "This board uses CONFIG_DM_I2C_COMPAT. Please remove"
@@ -55,6 +55,9 @@ HOSTCFLAGS_xway-swap-bytes.o := -pedantic
hostprogs-y += mkenvimage
mkenvimage-objs := mkenvimage.o os_support.o lib/crc32.o
+hostprogs-y += printvars
+printvars-objs := printvars.o
+
hostprogs-y += dumpimage mkimage
hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info fit_check_sign
@@ -364,9 +364,7 @@ class BuilderThread(threading.Thread):
# Now write the actual build output
if keep_outputs:
- self.CopyFiles(result.out_dir, build_dir, '', ['u-boot*', '*.bin',
- '*.map', '*.img', 'MLO', 'SPL', 'include/autoconf.mk',
- 'spl/u-boot-spl*'])
+ self.CopyFiles(result.out_dir, build_dir, '', ['tools/printvars'])
def CopyFiles(self, out_dir, build_dir, dirname, patterns):
"""Copy files from the build directory to the output.
new file mode 100644
@@ -0,0 +1,18 @@
+#include <stdio.h>
+/* HACK: Give us typedefs so we can proceed */
+typedef uint32_t u32;
+typedef uint16_t u16;
+typedef uint8_t u8;
+typedef int32_t s32;
+typedef int16_t s16;
+typedef int8_t s8;
+#include <generated/autoconf.h>
+#include <config.h>
+
+int main(int argc, char **argv) {
+#ifdef CONFIG_WHATEVER
+ printf("CONFIG_WHATEVER=whatever");
+#endif
+
+ return 0;
+}
When migrating to Kconfig there may be cases where the symbol to be migrated depends on a preprocessed or calculated value, and thus moveconfig.py will not migrate it correctly. Introduce an easily hackable tool, tools/printvars.c that will give the final value. Hack the main Makefile to only build this tool, and buildman to save this tool. Thus it becomes "quick" to have buildman build this tool for every board in U-Boot today. Signed-off-by: Tom Rini <trini@konsulko.com> --- Makefile | 2 +- tools/Makefile | 3 +++ tools/buildman/builderthread.py | 4 +--- tools/printvars.c | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 tools/printvars.c