
On 06/24/2013 02:46 PM, Simon Glass wrote:
This seems more intuitive that the current #define way of doing things. The resulting code is shorter, avoids the quoting and line continuation pain, and also improves the clumsy way that stdio variables are created:
#ifdef CONFIG_VIDEO_TEGRA #define STDOUT_LCD ",lcd" #else #define STDOUT_LCD "" #endif
... #define TEGRA_DEVICE_SETTINGS \ "stdout=serial" STDOUT_LCD "\0" \ ...
The MEM_LAYOUT_ENV_SETTINGS variable is left in the header files, since it depends on the SOC type and we probably don't want to add .emv files for each board at this stage.
Presumably e.g. seaboard.env could #include "tegra20.env" in order to allow *.env to define MEM_LAYOUT_ENV_SETTINGS?
BTW, what's the #include -I path for these files? Perhaps it's worth setting it up as board/$vendor/$board/env board/$vendor/env arch/$arch/env to match the dtc+cpp patches I posted?
diff --git a/board/nvidia/env/common.env b/board/nvidia/env/common.env
+bootcmd_mmc0=setenv devnum 0; run mmc_boot +bootcmd_mmc1=setenv devnum 1; run mmc_booxt +boot_targets+= mmc1 mmc0
The first two lines there have no space after = and the last has space after +=. Does that get stripped? Should it?
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
-#ifdef CONFIG_BOOTCOMMAND
-#define BOOTCMDS_COMMON ""
-#else
...
Overall this change seems reasonable, but as I alluded to earlier, removing this from tegra-common-post.h will break Tegra boards for vendors other than NVIDIA. I guess that's part of why this patch is RFC.