diff options
Diffstat (limited to 'include/configs/km/keymile-common.h')
-rw-r--r-- | include/configs/km/keymile-common.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 7a01705496..4f606a0210 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -126,12 +126,29 @@ "netdev=eth0\0" #endif -#ifndef CONFIG_KM_UBI_PARTITION_NAME -#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" -#endif -#ifndef CONFIG_KM_UBI_LINUX_MTD_NAME -#define CONFIG_KM_UBI_LINUX_MTD_NAME "ubi0" -#endif +#ifndef CONFIG_KM_UBI_PARTITION_NAME_BOOT +#define CONFIG_KM_UBI_PARTITION_NAME_BOOT "ubi0" +#endif /* CONFIG_KM_UBI_PARTITION_NAME_BOOT */ + +#ifndef CONFIG_KM_UBI_PARTITION_NAME_APP +/* one flash chip only called boot */ +/* boot: CONFIG_KM_UBI_PARTITION_NAME_BOOT */ +# define CONFIG_KM_UBI_LINUX_MTD \ + "ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT +# define CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI \ + "ubiattach=ubi part " CONFIG_KM_UBI_PARTITION_NAME_BOOT "\0" +#else /* CONFIG_KM_UBI_PARTITION_NAME_APP */ +/* two flash chips called boot and app */ +/* boot: CONFIG_KM_UBI_PARTITION_NAME_BOOT */ +/* app: CONFIG_KM_UBI_PARTITION_NAME_APP */ +# define CONFIG_KM_UBI_LINUX_MTD \ + "ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT " " \ + "ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_APP +# define CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI \ + "ubiattach=if test ${boot_bank} -eq 0; then; " \ + "ubi part " CONFIG_KM_UBI_PARTITION_NAME_BOOT "; else; " \ + "ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0" +#endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */ #define xstr(s) str(s) #define str(s) #s @@ -173,7 +190,7 @@ " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}" \ " mem=${kernelmem} init=${init}" \ " phram.phram=phvar,${varaddr}," xstr(CONFIG_KM_PHRAM) \ - " ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + " " CONFIG_KM_UBI_LINUX_MTD " " \ CONFIG_KM_DEF_BOOT_ARGS_CPU \ "\0" \ "addpanic=" \ @@ -199,10 +216,9 @@ #define CONFIG_KM_DEF_ENV_FLASH_BOOT \ "cramfsaddr=" xstr(CONFIG_KM_CRAMFS_ADDR) "\0" \ "cramfsloadkernel=cramfsload ${load_addr_r} uImage\0" \ - "ubiattach=ubi part " CONFIG_KM_UBI_PARTITION_NAME "\0" \ "ubicopy=ubi read "xstr(CONFIG_KM_CRAMFS_ADDR) \ " bootfs${boot_bank}\0" \ - "" + CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI /* * constants |