]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
config_defaults.h: new header for common u-boot config defaults
authorMike Frysinger <vapier@gentoo.org>
Thu, 3 Dec 2009 02:15:03 +0000 (21:15 -0500)
committerWolfgang Denk <wd@denx.de>
Sun, 17 Jan 2010 23:04:42 +0000 (00:04 +0100)
There are a bunch of features in U-Boot that we want to enable by default,
and it's best if we centralize them in one place rather than updating all
the board files out there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
common/cmd_bootm.c
include/config_defaults.h [new file with mode: 0644]
mkconfig

index 94ddac37cf33142db1d718b1b35d8ea22cb26147..0ef3e5ebc6347a3a32490554f09581943299d57e 100644 (file)
@@ -105,10 +105,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
                        bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
-#define CONFIG_BOOTM_LINUX 1
-#define CONFIG_BOOTM_NETBSD 1
-#define CONFIG_BOOTM_RTEMS 1
-
 #ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
 #endif
diff --git a/include/config_defaults.h b/include/config_defaults.h
new file mode 100644 (file)
index 0000000..08b6ede
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * config_defaults.h - sane defaults for everyone
+ *
+ * Copyright (c) 2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef _CONFIG_DEFAULTS_H_
+#define _CONFIG_DEFAULTS_H_
+
+/* Support bootm-ing different OSes */
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
+
+#endif
index 27d9f2bac7ca500f51a771000030d42081c8be3b..0f7f13e3a4d836d6bb8a1ab18b34e63a4125cc2c 100755 (executable)
--- a/mkconfig
+++ b/mkconfig
@@ -101,9 +101,11 @@ for i in ${TARGETS} ; do
        echo "#define CONFIG_MK_${i} 1" >>config.h ;
 done
 
-echo "#define CONFIG_BOARDDIR board/$BOARDDIR" >>config.h
-
-echo "#include <configs/$1.h>" >>config.h
-echo "#include <asm/config.h>" >>config.h
+cat << EOF >> config.h
+#define CONFIG_BOARDDIR board/$BOARDDIR
+#include <config_defaults.h>
+#include <configs/$1.h>
+#include <asm/config.h>
+EOF
 
 exit 0